The target-snowflake loader sends data into Snowflake after it was pulled from a source using an extractor
Alternate Implementations
Getting Started
Prerequisites
If you haven't already, follow the initial steps of the Getting Started guide:
Installation and configuration
-
Add the target-snowflake loader to your
project using
:meltano add
-
Configure the target-snowflake
settings using
:meltano config
meltano add loader target-snowflake
meltano config target-snowflake set --interactive
Next steps
Follow the remaining steps of the Getting Started guide:
If you run into any issues, learn how to get help.
Capabilities
The current capabilities for
target-snowflake
may have been automatically set when originally added to the Hub. Please review the
capabilities when using this loader. If you find they are out of date, please
consider updating them by making a pull request to the YAML file that defines the
capabilities for this loader.
This plugin has the following capabilities:
- about
- schema-flattening
- stream-maps
You can
override these capabilities or specify additional ones
in your meltano.yml
by adding the capabilities
key.
Settings
Snowflake Account Quickstart
This target has an interactive feature that will help you get a Snowflake account initialized with everything needed to get started loading data.
- User
- Role
- Warehouse
- Database
- Proper grants
If you don't have a Snowflake account yet you can sign up for a free trial.
Run the following command to get started with the interactive CLI. The CLI will print the SQL queries it is planning to run and confirm with you before it makes any changes.
meltano invoke target-snowflake --initialize
The CLI will ask you to provide information about the new user/role/etc. you want to create but it will also need SYSADMIN credentials to execute the queries. You should prepare the following inputs:
- Account (e.g.
lqnwlrc-onb17812
) - User that has SYSADMIN and SECURITYADMIN access. These comes default with the user that created the Snowflake account.
- The password for your SYSADMIN user.
After the CLI is done, you should have a new user/role/etc. created and ready to use. You can now use the CLI to load data into Snowflake.
The
target-snowflake
settings that are known to Meltano are documented below. To quickly
find the setting you're looking for, click on any setting name from the list:
account
clean_up_batch_files
database
password
private_key_passphrase
private_key_path
role
schema
user
warehouse
Expand To Show SDK Settings
You can also list these settings using
with the meltano config
list
subcommand:
meltano config target-snowflake list
You can
override these settings or specify additional ones
in your meltano.yml
by adding the settings
key.
Please consider adding any settings you have defined locally to this definition on MeltanoHub by making a pull request to the YAML file that defines the settings for this plugin.
Account (account)
-
Environment variable:
TARGET_SNOWFLAKE_ACCOUNT
Your account identifier. See Account Identifiers.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set account [value]
Clean Up Batch Files (clean_up_batch_files)
-
Environment variable:
TARGET_SNOWFLAKE_CLEAN_UP_BATCH_FILES
-
Default Value:
true
Whether to remove batch files after processing.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set clean_up_batch_files [value]
Database (database)
-
Environment variable:
TARGET_SNOWFLAKE_DATABASE
The initial database for the Snowflake session.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set database [value]
Password (password)
-
Environment variable:
TARGET_SNOWFLAKE_PASSWORD
The password for your Snowflake user.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set password [value]
Private Key Passphrase (private_key_passphrase)
-
Environment variable:
TARGET_SNOWFLAKE_PRIVATE_KEY_PASSPHRASE
Passphrase to decrypt private key if encrypted.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set private_key_passphrase [value]
Private Key Path (private_key_path)
-
Environment variable:
TARGET_SNOWFLAKE_PRIVATE_KEY_PATH
Path to file containing private key.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set private_key_path [value]
Role (role)
-
Environment variable:
TARGET_SNOWFLAKE_ROLE
The initial role for the session.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set role [value]
Schema (schema)
-
Environment variable:
TARGET_SNOWFLAKE_SCHEMA
The initial schema for the Snowflake session.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set schema [value]
User (user)
-
Environment variable:
TARGET_SNOWFLAKE_USER
The login name for your Snowflake user.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set user [value]
Warehouse (warehouse)
-
Environment variable:
TARGET_SNOWFLAKE_WAREHOUSE
The initial warehouse for the session.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set warehouse [value]
Expand To Show SDK Settings
Add Record Metadata (add_record_metadata)
-
Environment variable:
TARGET_SNOWFLAKE_ADD_RECORD_METADATA
-
Default Value:
true
Whether to add metadata columns.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set add_record_metadata [value]
Default Target Schema (default_target_schema)
-
Environment variable:
TARGET_SNOWFLAKE_DEFAULT_TARGET_SCHEMA
The default target database schema name to use for all streams.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set default_target_schema [value]
Flattening Enabled (flattening_enabled)
-
Environment variable:
TARGET_SNOWFLAKE_FLATTENING_ENABLED
'True' to enable schema flattening and automatically expand nested properties.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set flattening_enabled [value]
Flattening Max Depth (flattening_max_depth)
-
Environment variable:
TARGET_SNOWFLAKE_FLATTENING_MAX_DEPTH
The max depth to flatten schemas.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set flattening_max_depth [value]
Stream Map Config (stream_map_config)
-
Environment variable:
TARGET_SNOWFLAKE_STREAM_MAP_CONFIG
User-defined config values to be used within map expressions.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set stream_map_config [value]
Stream Maps (stream_maps)
-
Environment variable:
TARGET_SNOWFLAKE_STREAM_MAPS
Config object for stream maps capability. For more information check out Stream Maps.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set stream_maps [value]
Something missing?
This page is generated from a YAML file that you can contribute changes to.
Edit it on GitHub!Looking for help?
#plugins-general
channel.