SDF as a best-in-class transformation layer for Snowflake
Collect Required Information
sdf auth login snowflake --help
to see all login options.Connect SDF to Snowflake
Password Authentication
Connect using username and password
password
option and enter your password when prompted.Alternatively include the password directly inline:Key Pair Authentication
Connect using key pair authentication
private key path
or private key pem
option and enter the path or pem content to your private key when prompted.--private-key-path
flag to pass the path to the file.private-key-pem
in a credential.sdf.yml
file with an environment variable, replace newlines with \n
and include key delimiters.\n
as newline characters and no extra whitespace.~/.sdf/
directory in the root of your system. This credential will be used to authenticate with Snowflake.Add Snowflake Provider in Workspace
workspace.sdf.yml
. This tells SDF to use Snowflake 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:snowflake-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.