Scripting API bulk export truncates content at 4000 chars
Glue job chokes on the JSON payload from /api/v2/analytics/details. PySpark stage fails immediately upon deserialization. Content field gets chopped mid-sentence. Logs show the truncation happens exactly at the character limit. Redshift COPY throws validation errors because the structure breaks.
{"error": "JSONDecodeError", "msg": "Unterminated string starting at line 1 column 4002"}
S3 landing zone is full of half-baked files. Don’t see a chunking param in the docs.
Does the current capacity model support unbounded JSON payloads, or is there a governance policy restricting export sizes? That’s a hard limit on the serialization buffer. The engineering team should review the payload size constraints and adjust the export configuration. Logs show ...truncated.
The inline endpoint caps at four kilobytes, so you’ll hit that parse error every time. Switch to the async flow instead. You send the query via postAnalyticsDetailsQuery, grab the returned id, then poll /api/v2/analytics/details/queries/{queryId} until the status flips to complete.
Your PySpark stage just needs to fetch the result_url from that status object. The full payload downloads without truncation.
HTTP 400 Bad Request: Malformed JSON. The inline endpoint hard-caps responses at four kilobytes to prevent gateway timeouts. You’re smashing that buffer before the async queue spins up.
Poll the query ID instead. The result_url drops a raw file without the event envelope, so your schema registry will choke if you don’t map it.
res = platformClient.analyticsApi.getAnalyticsDetailsQuery(query_id=query_id)