Create a Snowflake metadata target
LiveData Migrator for Azure supports metadata migration to a Snowflake warehouse.
Before you start
Ensure you have the following:
- A Snowflake account identifier, warehouse, stage, database, and schema. See the Snowflake documentation for more information about these.
- A cloud storage service already configured as your target filesystem. See Configure target filesystems.
- If you choose the private key method of authentication, you need a private key file for Snowflake key pair authentication on your LiveData Migrator host cluster. It must be accessible to the system user and group that runs the Hive Migrator service. By default, these are
hive
andhadoop
respectively. You can make it accessible by changing the owner:
chown hive:hadoop /etc/wandisco/my-private-key.pem
We also recommend you set up appropriate user and role privileges to ensure LiveData Migrator for Azure can only access and modify the Snowflake target schemas you need for migrations. See User Roles in the Snowflake documentation.
Create a Snowflake metadata target
- Azure Portal
- Azure CLI
- In the Azure Portal, navigate to the LiveData Migrator resource page.
- From the LiveData Migrator menu on the left, select Metadata Targets.
- Select Add.
- Enter a Name for the metadata target as you want it to appear in your resource list.
- Select Snowflake Metadata Target in the Type dropdown list.
- Complete the Snowflake details:
- Account Identifier: The identifier for your Snowflake account, in the form of
<organization>-<account_name>
. For example,myaccount-mycompany.com
. See Account Identifier and Organization Name for more information. - Stage Database: The Snowflake database which contains the stage in which you want to store metadata.
- Stage Schema: The name of the schema that contains the stage.
- Stage: The name of the stage you want to use in your Snowflake environment.
- Warehouse: The name of the Snowflake warehouse you want to use.
- Schema: This is the schema into which you want to migrate metadata tables. For example, the migrated database and table
testdb.table1
displays in Snowflake as"testdb".PUBLIC."table1"
, wherePUBLIC
is the default value for the schema name. - Role: The role name to use when inserting data into Snowflake.
- Auth Type: The choice of basic authentication or private key authentication. Use the appropriate one for your Snowflake system.
- Username: The username to connect to the Snowflake platform with.
- Password: The password associated with your basic authentication username. If you've selected private key authentication, this is the password (if any) for your private key file.
- Private Key Location: The path on your LiveData Migrator host machine to the file in which you store the private key. For example,
/etc/wandisco/my-private-key.pem
. You only need this for private key authentication.
- Account Identifier: The identifier for your Snowflake account, in the form of
- Under Filesystem Details, use the Data Target dropdown to set the default filesystem for the metadata target.
- Select Review and create.
- Select Create.
See Create Stage in the Snowflake documentation for more information.
See Update authentication settings for information on updating your authentication settings with the UI.
You can configure a Snowflake metadata target with either basic authentication or private key authentication. Run the corresponding command to set up a Snowflake database as a target:
az livedata migrator metadata-target snowflake create --resource-group <resource_group> --metadata-target-name <target_name> --migrator-name <migrator_name> --data-target <data_target> --stage <stage_name> --stage-database <stage_database_name> --stage-schema <stage_schema> --account-identifier <account_identifier> --warehouse <snowflake_warehouse> --auth-type Basic --user <user_name> --password <password>
az livedata migrator metadata-target snowflake create --resource-group <resource_group> --metadata-target-name <target_name> --migrator-name <migrator_name> --data-target <data_target> --stage <stage_name> --stage-database <stage_database_name> --stage-schema <stage_schema> --account-identifier <account_identifier> --warehouse <snowflake_warehouse> --schema <schema> --auth-type PrivateKey --user <user_name> --password <password> --private-key-location <private_key_path>
See the Snowflake Metadata Migration Target section of the Azure CLI LiveData Extension page for help with these parameters.
Next steps
You can migrate metadata to your Snowflake target.