SDF as a best-in-class transformation layer for Redshift
Collect Required Information
access_key
the access key of your IAM profilesecret_access_key
the secret key of your IAM profileCLUSTER_IDENTIFIER
- The Redshift cluster you want to connect tosdf auth login aws --help
to see all login options.Register the User in the AWS CLI
Connect SDF to AWS
~/.sdf/
directory in the root of your system. This credential will be used to authenticate with AWS services. By default, the
credential’s name is default. As such, the credential does not need to be explicitly referenced in the integrations configuration below.Add Redshift Provider in Workspace
workspace.sdf.yml
workspace block. This tells SDF to use Redshift to hydrate missing table schemas.<DATABASE>
with the name of the database you want to hydrate. Note this is configurable and can be changed to any database you have access to. For example, if I wanted SDF to pull from two databases, called db1
and db2
, I would write:redshift-creds
, you would write:Try it out!
sdf compile -q "select * from <DATABASE>.<SCHEMA>.<TABLE>" --show all
If the connection is successful, you will see the schema for the table you selected.ERROR: permission denied for schema schema1
from sdf run
?
This may be due to the Redshift user not having the correct permissions to this schema.
To check if you have the right access, you can run the following query.
Use SVV_SCHEMA_PRIVILEGES
to view the schema owner, and schema_acl which shows the access control list for the schema.
<username>
is the user name of your IAM user, with IAM:
prefix. For example, if your IAM user name is my_user
, you can run: