Skip to content

Commit

Permalink
fix(dbt): Removing BQ-specific metadata from columns (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitor-Avila authored Apr 10, 2024
1 parent b7bd31a commit d5285ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/preset_cli/cli/superset/sync/dbt/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def clean_metadata(metadata: Dict[str, Any]) -> Dict[str, Any]:
"name",
"nullable",
"type_generic",
"precision",
"scale",
"max_length",
):
if key in metadata:
del metadata[key]
Expand Down
3 changes: 3 additions & 0 deletions tests/cli/superset/sync/dbt/datasets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1391,6 +1391,9 @@ def test_clean_metadata() -> None:
"nullable": "Nullable",
"type_generic": "Type Generic",
"yeah": "sure",
"precision": "very precise",
"scale": "to the max",
"max_length": 9000,
}
result = clean_metadata(test_data)
assert result == {
Expand Down

0 comments on commit d5285ca

Please sign in to comment.