RedshiftData class
You can use the Amazon Redshift Data API to run queries on Amazon Redshift tables. You can run SQL statements, which are committed if the statement succeeds.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
Constructors
- RedshiftData({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
batchExecuteStatement(
{required List< String> sqls, String? clientToken, String? clusterIdentifier, String? database, String? dbUser, List<SqlParameter> ? parameters, ResultFormatString? resultFormat, String? secretArn, String? sessionId, int? sessionKeepAliveSeconds, String? statementName, bool? withEvent, String? workgroupName}) → Future<BatchExecuteStatementOutput> - Runs one or more SQL statements, which can be data manipulation language (DML) or data definition language (DDL). Depending on the authorization method, use one of the following combinations of request parameters:
-
cancelStatement(
{required String id}) → Future< CancelStatementResponse> - Cancels a running query. To be canceled, a query must be running.
-
close(
) → void - Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
-
describeStatement(
{required String id}) → Future< DescribeStatementResponse> - Describes the details about a specific instance when a query was run by the Amazon Redshift Data API. The information includes when the query started, when it finished, the query status, the number of rows returned, and the SQL statement.
-
describeTable(
{required String database, String? clusterIdentifier, String? connectedDatabase, String? dbUser, int? maxResults, String? nextToken, String? schema, String? secretArn, String? table, String? workgroupName}) → Future< DescribeTableResponse> - Describes the detailed information about a table from metadata in the cluster. The information includes its columns. A token is returned to page through the column list. Depending on the authorization method, use one of the following combinations of request parameters:
-
executeStatement(
{required String sql, String? clientToken, String? clusterIdentifier, String? database, String? dbUser, List< SqlParameter> ? parameters, ResultFormatString? resultFormat, String? secretArn, String? sessionId, int? sessionKeepAliveSeconds, String? statementName, bool? withEvent, String? workgroupName}) → Future<ExecuteStatementOutput> - Runs an SQL statement, which can be data manipulation language (DML) or data definition language (DDL). This statement must be a single SQL statement. Depending on the authorization method, use one of the following combinations of request parameters:
-
getStatementResult(
{required String id, String? nextToken}) → Future< GetStatementResultResponse> -
Fetches the temporarily cached result of an SQL statement in JSON format.
The
ExecuteStatementorBatchExecuteStatementoperation that ran the SQL statement must have specifiedResultFormatasJSON, or let the format default to JSON. A token is returned to page through the statement results. -
getStatementResultV2(
{required String id, String? nextToken}) → Future< GetStatementResultV2Response> -
Fetches the temporarily cached result of an SQL statement in CSV format.
The
ExecuteStatementorBatchExecuteStatementoperation that ran the SQL statement must have specifiedResultFormatasCSV. A token is returned to page through the statement results. -
listDatabases(
{required String database, String? clusterIdentifier, String? dbUser, int? maxResults, String? nextToken, String? secretArn, String? workgroupName}) → Future< ListDatabasesResponse> - List the databases in a cluster. A token is returned to page through the database list. Depending on the authorization method, use one of the following combinations of request parameters:
-
listSchemas(
{required String database, String? clusterIdentifier, String? connectedDatabase, String? dbUser, int? maxResults, String? nextToken, String? schemaPattern, String? secretArn, String? workgroupName}) → Future< ListSchemasResponse> - Lists the schemas in a database. A token is returned to page through the schema list. Depending on the authorization method, use one of the following combinations of request parameters:
-
listStatements(
{String? clusterIdentifier, String? database, int? maxResults, String? nextToken, bool? roleLevel, String? statementName, StatusString? status, String? workgroupName}) → Future< ListStatementsResponse> - List of SQL statements. By default, only finished statements are shown. A token is returned to page through the statement list.
-
listTables(
{required String database, String? clusterIdentifier, String? connectedDatabase, String? dbUser, int? maxResults, String? nextToken, String? schemaPattern, String? secretArn, String? tablePattern, String? workgroupName}) → Future< ListTablesResponse> -
List the tables in a database. If neither
SchemaPatternnorTablePatternare specified, then all tables in the database are returned. A token is returned to page through the table list. Depending on the authorization method, use one of the following combinations of request parameters: -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited