Command Line to reverse engineering a Snowflake Table to DBT Model file
Project description
Snow2dbt
Command Line to reverse engineering a Snowflake Table to DBT model and SQL
Be careful this tool is under development. There's no stable release yet.
1. Installing
• From pip
pip install snow2dbt
• From Github repository
pip install https://github.com/tensor365/snow2dbt
2. Authentication
Dbt SSO
If you have already a Snowflake Connection in your profile.yml , snow2dbt will use this identity to connect to your Snowflake tenant. If you've multiple identity in your profile.yml, you can specify the profile you want by using the argument: --profile .
Standard Authentication
If you want to use a standard authentification to Snowflake, you can specify following arguments:
• Password Authentication
```bash
--account <snowflake_accountname>
--user <snowflake_user>
--password <snowflake_password>
```
• Keypair Authentication
Not available yet. Incoming soon
```bash
--account <snowflake_accountname>
--key <snowflake_private_key>
```
3. Reversing a Snowflake Table into model/contract
snow2dbt --target <databse>.<schema>.<table>
CLI arguments
| Option | Description |
|---|---|
-l, --lower |
Output type names as lowercase in YAML file |
--snake |
Convert field names to snake_case |
--prefix |
Prefix to add to columns names (default: None) |
--suffix |
Suffix to add to column names (default: None) |
--output |
Destination folder for scripts. (default: target/bq2dbt) |
--empty_description |
Add empty description property to YAML file if field description is empty (placeholder) |
--tabs |
Use tabs instead of 4 spaces in SQL file indentation |
--leading_comma |
Put comma at the start of line in SQL file column list instead of end of line |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file snow2dbt-0.2.2.tar.gz.
File metadata
- Download URL: snow2dbt-0.2.2.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f8ac8a35a786f8132d998942e3f5692e6db0b0975995bae3de6de16160cdbee
|
|
| MD5 |
e5eadce1d794b36ac53d1f300e070647
|
|
| BLAKE2b-256 |
f9c0227e5ec580dc902829c5357eddbee7462c8ac0d31046d47beb9f55563ed7
|
File details
Details for the file snow2dbt-0.2.2-py3-none-any.whl.
File metadata
- Download URL: snow2dbt-0.2.2-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a91d51a6841343db47dfccfe0cface7bd48c05aeaaaf3989c0f19a5aabf94a2a
|
|
| MD5 |
dbb5b7273b3c0112d5c03479f160c785
|
|
| BLAKE2b-256 |
10e756036fa39d78a23f2e6dff58af4bc6fe97ac2ef1750939e2281abe4c5fbd
|