New featureMedium

Amazon Redshift Data API announces long polling, session management, and flexible batch execution

Amazon Redshift Data API adds long polling to reduce API calls for SQL metadata or results, session management for visibility into active sessions, and flexible batch execution allowing each statement in a batch to execute independently. These enhancements improve efficiency for ETL pipelines and administrative scripts.

Amazon Redshift Data API introduces new capabilities that reduce the number of API calls needed to retrieve SQL statement metadata or results, provide visibility into sessions, and allow batch statements to execute on separate transactions. Long polling enables retrieval of SQL statement metadata or results without repeatedly polling until the statement reaches a terminal state, by delaying the return of a synchronous response until the SQL statement finishes. ListSessions allows applications that reuse sessions across multiple queries to enumerate active sessions and filter by status, compute target, or database, eliminating the need to track session identifiers externally. Flexible batch execution via BatchExecuteStatement now supports an ExecutionMode parameter with AUTO_COMMIT mode, allowing each SQL statement in a batch to execute independently so that a single failure no longer rolls back the entire batch. Additionally, BatchExecuteStatement now accepts an array of SqlParameter, enabling parameter reuse across all statements in a batch.

Read the original AWS announcement