Skip to content

Commit

Permalink
Update snowflake generator with relationships path (#97)
Browse files Browse the repository at this point in the history
* Update PathsModel with relationships

* Update tests

---------

Co-authored-by: Valerii Mironchenko <vmironchenko@provectus.com>
  • Loading branch information
ValeriyWorld and Valerii Mironchenko committed Feb 18, 2024
1 parent 022ea5c commit 5fd8b07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions oddrn_generator/path_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class SnowflakePathsModel(BasePathsModel):
tables_columns: Optional[str] = Field(alias="columns")
views_columns: Optional[str] = Field(alias="columns")
pipes: Optional[str]
relationships: Optional[str]

class Config:
dependencies_map = {
Expand All @@ -142,6 +143,7 @@ class Config:
"tables_columns": ("databases", "schemas", "tables", "tables_columns"),
"views_columns": ("databases", "schemas", "views", "views_columns"),
"pipes": ("pipes",),
"relationships": ("databases", "schemas", "tables", "relationships"),
}
data_source_path = "databases"

Expand Down
1 change: 1 addition & 0 deletions tests/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"tables_columns": "some_table_column",
"views_columns": "some_view_column",
"pipes": "pipe",
"relationships": "some_relationship",
},
"aliases": {
"tables_columns": "columns",
Expand Down

0 comments on commit 5fd8b07

Please sign in to comment.