AWS Redshift connector
Trusted IDPAnalyticsDatabasesAmazon Redshift is a fully managed cloud data warehouse that enables fast, cost-effective analysis of structured and semi-structured data at scale.
AWS Redshift connector
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set your credentials”Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- List databases, tables, statements — List the databases available in the connected Amazon Redshift cluster or serverless workgroup, using the Redshift Data API
- Statement describe — Get the status, duration, and row count of a previously submitted statement without fetching result rows
- Execute batch, sql — Run multiple SQL statements serially in a single call against Amazon Redshift using the Redshift Data API’s BatchExecuteStatement action, returning one batch statement ID
- Get query result — Retrieve the results of a previously executed Redshift SQL statement using the statement ID returned by redshift_execute_sql
- Table describe — Describe the schema of a table in Amazon Redshift using the Redshift Data API, including column names, types, and metadata
- Query cancel — Cancel a running Amazon Redshift SQL statement using its statement ID
Tool list
Section titled “Tool list”Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.
redshift_batch_execute_sql#Run multiple SQL statements serially in a single call against Amazon Redshift using the Redshift Data API's BatchExecuteStatement action, returning one batch statement ID. Distinct from redshift_execute_sql, which only accepts a single statement. If any statement in the batch fails, remaining statements are not run.3 params
Run multiple SQL statements serially in a single call against Amazon Redshift using the Redshift Data API's BatchExecuteStatement action, returning one batch statement ID. Distinct from redshift_execute_sql, which only accepts a single statement. If any statement in the batch fails, remaining statements are not run.
sqlsarrayrequiredThe SQL statements to run, in order. Each must be non-empty.statement_namestringoptionalOptional label for the batch, echoed back by DescribeStatement for tracking purposes.with_eventbooleanoptionalIf true, AWS publishes an EventBridge event when the batch completes.redshift_cancel_query#Cancel a running Amazon Redshift SQL statement using its statement ID.1 param
Cancel a running Amazon Redshift SQL statement using its statement ID.
statement_idstringrequiredThe ID of the statement to cancel. Must be non-empty.redshift_describe_statement#Get the status, duration, and row count of a previously submitted statement without fetching result rows. This is the only way to poll or confirm success/failure of DDL/DML statements (CREATE/INSERT/UPDATE) that cannot be passed to redshift_get_query_result, which requires a statement that returns a result set. redshift_list_statements lists many statements at once but doesn't substitute for checking one specific statement's full status detail (e.g. its error message on failure).1 param
Get the status, duration, and row count of a previously submitted statement without fetching result rows. This is the only way to poll or confirm success/failure of DDL/DML statements (CREATE/INSERT/UPDATE) that cannot be passed to redshift_get_query_result, which requires a statement that returns a result set. redshift_list_statements lists many statements at once but doesn't substitute for checking one specific statement's full status detail (e.g. its error message on failure).
statement_idstringrequiredThe ID of the statement to describe. Must be non-empty.redshift_describe_table#Describe the schema of a table in Amazon Redshift using the Redshift Data API, including column names, types, and metadata.5 params
Describe the schema of a table in Amazon Redshift using the Redshift Data API, including column names, types, and metadata.
tablestringrequiredName of the table to describe. Must be non-empty.connected_databasestringoptionalOverride the connected account's default database for this request.max_resultsintegeroptionalMaximum number of columns to return per page.next_tokenstringoptionalPagination cursor from a previous redshift_describe_table response.schemastringoptionalSchema name that contains the table.redshift_execute_sql#Execute a SQL statement against Amazon Redshift using the Redshift Data API. Returns a statement ID that can be used with redshift_get_query_result to fetch results.3 params
Execute a SQL statement against Amazon Redshift using the Redshift Data API. Returns a statement ID that can be used with redshift_get_query_result to fetch results.
sqlstringrequiredSQL statement to execute. Must be non-empty.statement_namestringoptionalOptional label for the statement, echoed back by DescribeStatement for tracking purposes.with_eventbooleanoptionalIf true, AWS publishes an EventBridge event when the statement completes.redshift_get_query_result#Retrieve the results of a previously executed Redshift SQL statement using the statement ID returned by redshift_execute_sql. Supports pagination via next_token.2 params
Retrieve the results of a previously executed Redshift SQL statement using the statement ID returned by redshift_execute_sql. Supports pagination via next_token.
statement_idstringrequiredThe statement ID returned by redshift_execute_sql. Must be non-empty.next_tokenstringoptionalPagination token from a prior redshift_get_query_result response when results spanned multiple pages.redshift_list_databases#List the databases available in the connected Amazon Redshift cluster or serverless workgroup, using the Redshift Data API. Mirrors redshift_list_schemas / redshift_list_tables one level up the hierarchy.3 params
List the databases available in the connected Amazon Redshift cluster or serverless workgroup, using the Redshift Data API. Mirrors redshift_list_schemas / redshift_list_tables one level up the hierarchy.
connected_databasestringoptionalOverride the connected account's default database for this request.max_resultsintegeroptionalMaximum number of databases to return.next_tokenstringoptionalPagination cursor from a previous redshift_list_databases response.redshift_list_schemas#List schemas in an Amazon Redshift database using the Redshift Data API. Supports filtering by schema name pattern with pagination.4 params
List schemas in an Amazon Redshift database using the Redshift Data API. Supports filtering by schema name pattern with pagination.
connected_databasestringoptionalOverride the connected account's default database for this request.max_resultsintegeroptionalMaximum number of schemas to return.next_tokenstringoptionalPagination cursor from a previous redshift_list_schemas response.schema_patternstringoptionalLIKE pattern to filter schemas (e.g., public, my_schema%).redshift_list_statements#List previously executed SQL statements in Amazon Redshift using the Redshift Data API. Supports filtering by name, status, and role level with pagination.5 params
List previously executed SQL statements in Amazon Redshift using the Redshift Data API. Supports filtering by name, status, and role level with pagination.
max_resultsintegeroptionalMaximum number of statements to return.next_tokenstringoptionalPagination cursor from a previous redshift_list_statements response.role_levelbooleanoptionalWhen true, lists all statements run by the IAM role rather than just the current session.statement_namestringoptionalFilter statements by name label.statusstringoptionalFilter by execution status (e.g., FINISHED, FAILED, ABORTED, PICKED, STARTED, SUBMITTED).redshift_list_tables#List tables in an Amazon Redshift database using the Redshift Data API. Supports filtering by schema and table name patterns with pagination.5 params
List tables in an Amazon Redshift database using the Redshift Data API. Supports filtering by schema and table name patterns with pagination.
connected_databasestringoptionalOverride the connected account's default database for this request.max_resultsintegeroptionalMaximum number of tables to return.next_tokenstringoptionalPagination cursor from a previous redshift_list_tables response.schema_patternstringoptionalLIKE pattern to filter schemas (e.g., public, my_schema%).table_patternstringoptionalLIKE pattern to filter tables (e.g., orders, user%).