Note – Snowflake is supported as a Target by Repstance Advanced Edition only (see Supported Database Requirements).
These parameters are used by prepare, validate and remove with database=target dbtype=snowflake (see Prepare Target Database, Validate Database and Remove Repstance Objects from Database). The login that is given in user needs the privileges that are described in Database Privileges.
| Parameter | Description |
|---|---|
| database | target. Required. |
| dbtype | snowflake. Required. |
| generatesql | 1 makes prepare return the SQL script and change nothing. The default is 0: prepare creates the objects. validate does not use the parameter, and remove removes the objects whatever its value. |
| account | The Snowflake account. Required. |
| region | The Snowflake region of the account. Required. |
| warehouse | The warehouse that runs the statements. Required. |
| dbname | The database in which the schema REPI is created. Required. |
| user | The Snowflake user. Required. |
| password | The password of the user. It is not needed for the key pair authentication. |
| authtype | How the user logs in: 0, the default, with the user name and the password, 1 with a key pair, the private key is given by privatekey. |
| privatekey | The RSA private key in PEM format, for authtype=1. The key must not be encrypted (no passphrase). With repcli the key can be taken from a file: privatekeyfile=path_to_the_file. |
For the key pair authentication the public key has to be assigned to the Snowflake user (see Key-pair authentication in the Snowflake documentation). The account and the region are in the address of the Snowflake web interface: in https://ab12345.eu-west-2.aws.snowflakecomputing.com the account is ab12345 and the region is eu-west-2.aws.
Return the script instead of running it. No connection is made:
repcli prepare database=target dbtype=snowflake account=ab12345 region=eu-west-2.aws warehouse=DEMO_WH dbname=DWH user=repuser password=Passw0rd123 generatesql=1
[Completed]:
---- SQL ----
create schema if not exists repi;
create table if not exists REPI.APPLY_CKPT(
apply_id int,
file_sequence int not null,
md_sequence int not null,
position int not null,
first_lsn varchar(22) not null,
ckpt_lsn varchar(22) not null,
ckpt_lsntime timestamp,
ldckpt int not null default 0,
...Validate with a key pair:
repcli validate database=target dbtype=snowflake account=ab12345 region=eu-west-2.aws warehouse=DEMO_WH dbname=DWH user=repuser authtype=1 privatekeyfile=/home/repstance/snowflake_key.p8The form “Database Settings” of an Apply Process for Snowflake has the fields “Account”, “Username”, “Database Name”, “Region”, “Auth Type”, “Password” and “Warehouse”. The buttons that prepare the database are shown in Prepare Target Database:
For the key pair authentication choose “Key Pair” in “Auth Type”. The field “Password” is replaced by “Private Key”. Click “Add Private Key”:
The window takes the private key in PEM format: paste the key or upload the key file.
Prev page:
MySQL as TargetNext page:
Redshift as Target