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
- hard-delete
- 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
batch_size_rows
clean_up_batch_files
database
password
private_key
private_key_passphrase
private_key_path
role
schema
use_browser_authentication
user
warehouse
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]
Batch Size Rows (batch_size_rows)
-
Environment variable:
TARGET_SNOWFLAKE_BATCH_SIZE_ROWS
Maximum number of rows in each batch.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set batch_size_rows [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 (private_key)
-
Environment variable:
TARGET_SNOWFLAKE_PRIVATE_KEY
The private key contents. For KeyPair authentication either private_key or private_key_path must be provided.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set private_key [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. For KeyPair authentication either private_key or private_key_path must be provided.
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]
Use Browser Authentication (use_browser_authentication)
-
Environment variable:
TARGET_SNOWFLAKE_USE_BROWSER_AUTHENTICATION
-
Default Value:
false
Whether to use SSO authentication using an external browser.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set use_browser_authentication [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]
Faker Locale (faker_config.locale)
-
Environment variable:
TARGET_SNOWFLAKE_FAKER_CONFIG_LOCALE
One or more LCID locale strings to produce localized output for: https://faker.readthedocs.io/en/master/#localization
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set faker_config locale [value]
Faker Seed (faker_config.seed)
-
Environment variable:
TARGET_SNOWFLAKE_FAKER_CONFIG_SEED
Value to seed the Faker generator for deterministic output: https://faker.readthedocs.io/en/master/#seeding-the-generator
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set faker_config seed [value]
Enable Schema Flattening (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]
Max Flattening 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]
Hard Delete (hard_delete)
-
Environment variable:
TARGET_SNOWFLAKE_HARD_DELETE
-
Default Value:
false
Hard delete records.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set hard_delete [value]
Load Method (load_method)
-
Environment variable:
TARGET_SNOWFLAKE_LOAD_METHOD
-
Default Value:
append-only
The method to use when loading data into the destination. append-only
will always write all input records whether that records already exists or not. upsert
will update existing records and insert new records. overwrite
will delete all existing records and insert all input records.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set load_method [value]
User Stream Map Configuration (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]
Validate Records (validate_records)
-
Environment variable:
TARGET_SNOWFLAKE_VALIDATE_RECORDS
-
Default Value:
true
Whether to validate the schema of the incoming streams.
Configure this setting directly using the following Meltano command:
meltano config target-snowflake set validate_records [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.