User and role
Connecting DirectQuery to Redshift first requires a user linked to a role with sufficient privileges. The following actions require a Redshift ‘power user’ account.How to create a role
The AWS role creation reference describes how to create a role.How to grant required privileges to this role
DirectQuery required privileges are:USAGEprivilege on target schemaSELECTprivilege on schema queryable objects (tables, views)
How to create a user linked to this role
The last step is to create a user with the following attributes:- login
- password
GRANT ROLE command.
Basic authentication connection
Connection is done through DirectQuery Redshift connector passing the following minimal properties:- JDBC connection string
- password
Authentication connection with AWS IAM credentials
After configuring AWS, the credentials are usually stored into the file~/.aws/credentials.
If the location is different, it can be set with the AWS_CREDENTIAL_PROFILES_FILE environment variable.
The AWS user needs the AWS permissions redshift:DescribeClusters and redshift:GetClusterCredentials.
Then only the connection string has to be provided, starting with jdbc:redshift:iam://.
For more details, check the AWS documentation.