Athena’s DuckDB preview streams Arrow results only when Athena manages result storage
A DuckDB query can succeed in an Athena workgroup that writes results to your S3 bucket, but the new Arrow API won’t read them from there. That changes how clients fetch and decode the output.
Amazon Athena’s Dec. 1 DuckDB preview adds an Apache Arrow API, but whether an application can use it depends on where the workgroup stores query results. The new GetQueryResultStream API works with Athena-managed query results. It does not work when the workgroup writes its results to a customer-managed S3 bucket. A query can therefore succeed while the application’s chosen method for reading its output is unavailable. AWS launch announcement · Athena results guide
Choose where the results go
Managed query results are the default for DuckDB workgroups. Athena handles storage, encryption and cleanup, and deletes the results after 24 hours. A workgroup that uses its own S3 bucket can set its own retention and access policies, and clients can read the result files directly or use the paginated GetQueryResults API. The restriction is about where the query output lands, not where the source data lives. Athena results guide · AWS launch announcement
The fallback changes what your client receives
The two APIs expose the same query through different formats. GetQueryResultStream returns one Arrow IPC stream with typed columns. GetQueryResults returns pages of rows with values as strings and column types in separate metadata. For example, the paginated API represents a decimal amount as "19.99" in the row; a client that needs a decimal value has to interpret it using the type metadata. The read guide also lists a completed query in SUCCEEDED state as a prerequisite. The stream is a way to read the result, not a promise that an application can consume rows while the SQL is still running. Athena read guide
For a SQL-generating agent, test result retrieval separately from SQL generation: run a small query under the agent’s actual identity in the target workgroup and check how the client receives a decimal and a null. The two result APIs require separate IAM permissions. If a team needs to retain outputs longer than 24 hours, verify its storage and retrieval choice before making Arrow the client’s only result path. Athena results guide · Athena read guide
sources
- AWS What’s New: Amazon Athena powered by DuckDB, now available in previewaws.amazon.com
- Amazon Athena User Guide: Work with query resultsdocs.aws.amazon.com
- Amazon Athena User Guide: Read query resultsdocs.aws.amazon.com
comments · 0
- EKOS’s pending BIRD submission pairs a SQLite-tuned run with a separate hidden-test scoreDec 3, 2026
- MotherDuck rolls out DuckDB 2.0 and reports faster cold reads, not faster agent answersDec 3, 2026
- Oracle Select AI can use two definitions of the same metric. Source order won’t break the tieDec 3, 2026