Keeps bombing out with ValueError: Cannot compress with snappy when pandas is not compiled with snappy support. Trying to pull raw CSV datasets from /api/v2/analytics/queues/summary so the pipeline can pivot metrics by queue and time interval. Documentation states “export payloads must be fetched with a valid bearer token and parsed into iterable rows before transformation.” Running Python 3.10 with pandas 2.1.4. Threw this at the script:
The whole thing halts right there. It’s supposed to calculate derived KPIs using vectorized operations and upload the artifact to a cloud bucket with version control tagging, but it doesn’t even get past the export line. Ran the install again. Same crash. Docs say the SDK handles the heavy lifting automatically. Left the console hanging on the traceback.
Are you actually binding the platformClient to a dedicated connection pool before hitting /api/v2/analytics/queues/summary? Documentation explicitly states: “The Analytics API requires a persistent OAuth bearer token with the analytics:queues:view scope to paginate large result sets.” When pandas tries to compress without snappy, it throws that exact error because the underlying C extensions lack the library. Switching to gzip fixes it, but you’ll still hit memory limits if you’re pulling unfiltered queue summaries.
Here is how I configure the Java SDK side to keep the payload manageable before the Pandas conversion step:
ApiClient apiClient = new ApiClient();
apiClient.setConnectTimeout(10000);
apiClient.setReadTimeout(30000);
AnalyticsApi analyticsApi = new AnalyticsApi(apiClient);
QueueSummaryRequest request = new QueueSummaryRequest()
.dateRange("2024-01-01/2024-01-02")
.interval("PT1H");
QueueSummaryResponse response = analyticsApi.postAnalyticsQueuesSummary(request);
Make sure you set the date range in the query object otherwise the API will default to the last 24 hours and your dataframe will balloon. The Java PlatformApiClient handles the token refresh automatically, but the Python requests library doesn’t, so your bearer token expires mid-stream if you skip the retry logic. Documentation notes: “Export jobs exceeding 10MB should be chunked by interval to prevent gateway timeouts.” I keep getting 403s on the initial fetch even with valid scopes. I’m not sure why the endpoint rejects the request when the payload matches the spec exactly. The docs just say it requires a valid scope but the response body comes back empty. Weird.