Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
6972642
init snowflake importer
dmaresma Jan 25, 2026
3b1886b
ruff format fix
dmaresma Jan 25, 2026
bc0d9a7
add documentation
dmaresma Jan 25, 2026
8669385
improve export query and fix ordered columns position, disable empty …
dmaresma Jan 25, 2026
5e3b0ec
inject account in server.account
dmaresma Jan 25, 2026
6f4eb69
improve connector login
dmaresma Jan 25, 2026
0fa07e3
ruff
dmaresma Jan 25, 2026
778223c
rename customProperties ordinalPosition
dmaresma Jan 27, 2026
d3201fc
refactor snowflake-db and add test_import_snowflake
dmaresma Feb 1, 2026
9cb08bb
ruff lint applied
dmaresma Feb 1, 2026
047560c
Merge branch 'main' into feat/snowflake_importer
dmaresma Feb 1, 2026
d3330d4
typo during refactor
dmaresma Feb 1, 2026
73e7aed
Merge branch 'feat/snowflake_importer' of https://github.com/dmaresma…
dmaresma Feb 1, 2026
f57bfec
force string, char as varchar for physicalType
dmaresma Feb 2, 2026
402b041
add columns tags, customProperties: precisition, scale, autoIncrement…
dmaresma Feb 8, 2026
920fe52
refactor
dmaresma Feb 8, 2026
5698b84
turn snowflake tags as str Key=Value array
dmaresma Feb 8, 2026
5593386
added tests and key authentication
bhuesemann Feb 8, 2026
d5780cc
Merge branch 'feat/snowflake_importer' into feat/snowflake_importer_bhn
bhuesemann Feb 8, 2026
b13ca1a
add DMF as quality (schema & properties) based on last results
dmaresma Feb 8, 2026
c326a4b
merged upstream changes
bhuesemann Feb 8, 2026
c219998
removed temp file
bhuesemann Feb 8, 2026
e673d9e
Merge branch 'feat/snowflake_importer' of https://github.com/dmaresma…
bhuesemann Feb 9, 2026
6124646
Merge pull request #14 from bhuesemann/feat/snowflake_importer_bhn
dmaresma Feb 9, 2026
5be60cb
fix bug
dmaresma Feb 9, 2026
70548b4
typo on description
dmaresma Feb 9, 2026
85c065b
test success
dmaresma Feb 9, 2026
e2236d5
double-quoted schema identifiers and authenticator documentation
dmaresma Feb 11, 2026
c455ac7
ruff format
dmaresma Feb 11, 2026
ffd7886
detect snowflake_authenticator in env. variable
dmaresma Feb 20, 2026
72ef4f7
ruff format
dmaresma Feb 20, 2026
00d54da
remove_unexpect_characters
dmaresma Mar 13, 2026
9318a9b
remove schema
dmaresma Mar 14, 2026
3cdfb37
Merge branch 'main' into feat/snowflake_importer
dmaresma Apr 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,16 @@ For example:
| `role` | `DATACONTRACT_SNOWFLAKE_ROLE` |
| `connection_timeout` | `DATACONTRACT_SNOWFLAKE_CONNECTION_TIMEOUT` |

##### EV Authentication options

| Soda optionnal parameter | Environment Variable |
|--------------------------|-------------------------------------------------|
| `authenticator` | `DATACONTRACT_SNOWFLAKE_AUTHENTICATOR` |
| `private_key` | `DATACONTRACT_SNOWFLAKE_PRIVATE_KEY` |
| `private_key_passphrase` | `DATACONTRACT_SNOWFLAKE_PRIVATE_KEY_PASSPHRASE` |
| `private_key_path` | `DATACONTRACT_SNOWFLAKE_PRIVATE_KEY_PATH` |


Beware, that parameters:
* `account`
* `database`
Expand Down Expand Up @@ -1619,6 +1629,7 @@ For more information about the Excel template structure, visit the [ODCS Excel T
│ [default: None] │
│ --source TEXT The path to the file that │
│ should be imported. │
│ also snowflake account │
│ [default: None] │
│ --dialect TEXT The SQL dialect to use │
│ when importing SQL files, │
Expand Down Expand Up @@ -1682,6 +1693,7 @@ For more information about the Excel template structure, visit the [ODCS Excel T
│ [default: None] │
│ --id TEXT The identifier for the the │
│ data contract. │
│ --database TEXT Snowflake target database │
│ [default: None] │
│ --debug --no-debug Enable debug logging │
│ [default: no-debug] │
Expand Down Expand Up @@ -1897,6 +1909,20 @@ Example:
datacontract import --format protobuf --source "test.proto"
```

#### snowflake

Importing from snowflake schema. Specify snowflake workspace account in `source` parameter, database name `database` and schema in `schema`.
Multiple authentification are supported,
login/password using the `DATACONTRACT_SNOWFLAKE_ ...` test environement variable are setup,
MFA using external browser is selected when `DATACONTRACT_SNOWFLAKE_PASSWORD` is missing
TOML file authentification using the default profile when `SNOWFLAKE_DEFAULT_CONNECTION_NAME` environment variable is defined

Example:

```bash
datacontract import --format snowflake --source account.canada-central.azure --database databaseName --schema schemaName
```


### catalog
```
Expand Down
5 changes: 5 additions & 0 deletions datacontract/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,10 @@ def import_(
Optional[str],
typer.Option(help="The identifier for the the data contract."),
] = None,
database: Annotated[
Optional[str],
typer.Option(help="The snowflake database name."),
] = None,
debug: debug_option = None,
):
"""
Expand All @@ -469,6 +473,7 @@ def import_(
iceberg_table=iceberg_table,
owner=owner,
id=id,
database=database,
)
if output is None:
console.print(result.to_yaml(), markup=False, soft_wrap=True)
Expand Down
1 change: 1 addition & 0 deletions datacontract/imports/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class ImportFormat(str, Enum):
csv = "csv"
protobuf = "protobuf"
excel = "excel"
snowflake = "snowflake"

@classmethod
def get_supported_formats(cls):
Expand Down
6 changes: 5 additions & 1 deletion datacontract/imports/importer_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ def load_module_class(module_path, class_name):
module_path="datacontract.imports.excel_importer",
class_name="ExcelImporter",
)

importer_factory.register_lazy_importer(
name=ImportFormat.snowflake,
module_path="datacontract.imports.snowflake_importer",
class_name="SnowflakeImporter",
)

importer_factory.register_lazy_importer(
name=ImportFormat.json,
Expand Down
Loading
Loading