Amazon AWS Redshift
13 min
this connector allows turbine to execute sql statements on aws redshift asset setup this integration authenticates with aws redshift using the following input values aws access key id a long term aws access key id with access to redshift aws secret key id a long term secret access key associated with the above accesskey id region name the aws region role arn an arn of an aws iam role to assume capabilities this connector has the following capabilities execute statement get statement result obtaining aws credentials to use this integration, you will need to have an aws account and obtain the necessary aws credentials you can obtain these credentials by following the steps below log in to your aws account and navigate to the iam console in the left navigation pane, click on the "users" tab and select the user for which you want to create credentials click on the "security credentials" tab, and then click on the "create access key" make sure to save the access key id and secret access key in a secure location, as you will not be able to see the secret access key again after this step if you want to use an aws iam role, you will need to have the arn of the role and an optional external id, if one was specified by the aws account administrator configurations asset authenticates using aws credentials configuration parameters parameter description type required aws access key id a specific long term aws access key id string required aws secret access key a specific long term aws secret access key string required region name the aws region where you want to create new connections string required role arn role arn string required actions execute statement runs one or more sql statements input argument name type required description clienttoken string optional a unique, case sensitive identifier that you provide to ensure the idempotency of the request this field is auto populated if not provided clusteridentifier string optional this parameter is required when connecting to a cluster and authenticating using either secrets manager or temporary credentials database string required the name of the database parameters array optional parameters for the execute statement action name string optional name of the resource value string optional value for the parameter dbuser string optional the database user name secretarn string optional the name or arn of the secret that enables access to the database sql string required the sql statement text to run statementname string optional the name of the sql statements withevent boolean optional a value that indicates whether to send an event to the amazon eventbridge event bus after the sql statements run workgroupname string optional the serverless workgroup name or amazon resource name (arn) output parameter type description clusteridentifier string unique identifier createdat string output field createdat database string response data dbuser string output field dbuser id string unique identifier secretarn string output field secretarn workgroupname string name of the resource example \[ { "clusteridentifier" "string", "createdat" "02/23/2012", "database" "string", "dbuser" "string", "id" "string", "secretarn" "string", "workgroupname" "string" } ] get statement result fetches the temporarily cached result of an sql statement input argument name type required description id string required this value is a universally unique identifier (uuid) generated by amazon redshift data api nexttoken string optional a value that indicates the starting point for the next set of response records in a subsequent request output parameter type description columnmetadata array response data columndefault string output field columndefault iscasesensitive boolean output field iscasesensitive iscurrency boolean output field iscurrency issigned boolean output field issigned label string output field label length number output field length name string name of the resource nullable number output field nullable precision number output field precision scale number output field scale schemaname string name of the resource tablename string name of the resource typename string name of the resource nexttoken string output field nexttoken records array output field records 0 object output field 0 booleanvalue boolean value for the parameter doublevalue number value for the parameter isnull boolean output field isnull longvalue number value for the parameter stringvalue string value for the parameter totalnumrows number output field totalnumrows example \[ { "columnmetadata" \[ {} ], "nexttoken" "string", "records" \[ \[] ], "totalnumrows" 123 } ] notes temporary credentials when connecting to your data warehouse, choose one of the following options when connecting to a serverless workgroup, specify the workgroup name and database name the database user name is derived from the iam identity for example, arn\ iam 123456789012\ user \ foo has the database username iam \ foo also, permission to call the redshift serverless \ getcredentials operation is required when connecting to a cluster as an iam identity, specify the cluster identifier and the database name the database user name is derived from the iam identity for example, arn\ iam 123456789012\ user \ foo has the database username iam \ foo also, permission to call the redshift \ getclustercredentialswithiam operation is required when connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name also, permission to call the redshift \ getclustercredentials operation is required aws account and access keys https //docs aws amazon com/powershell/latest/userguide/pstools appendix sign up html boto3 redshift documentation https //boto3 amazonaws com/v1/documentation/api/latest/reference/services/redshift data html#redshiftdataapiservice for more information about amazon redshift, click here! https //docs aws amazon com/redshift/latest/mgmt/data api html