AWS announces CSV result format support for Amazon Redshift Data API

Posted on: Nov 1, 2024

Amazon Redshift Data API enables you to access data efficiently from Amazon Redshift data warehouses by eliminating the need to manage database drivers, connections, network configurations, data buffering, and more. Data API now supports comma seperated values (CSV) result format which provides flexibility in how you access and process data, allowing you to choose between JSON and CSV formats based on your application needs.

With CSV result format, you can now specify whether you want your query results formatted as JSON or CSV through the --result-format parameter when calling ExecuteStatement and BatchExecuteStatement APIs. To retrieve CSV results, use the new GetStatementResultV2 API which supports CSV results, while GetStatementResult API continues to support only JSON. If not specified, the default format remains JSON.

CSV support with Data API is now generally available for both Redshift Provisioned and Amazon Redshift Serverless data warehouses in all AWS commercial and the AWS GovCloud (US) Regions which support Data API. To get started and learn more, visit Amazon Redshift database developers guide.