Skip to content

Commit

Permalink
fix(dbt): Remove Redshift-specific column metadata (#291)
Browse files Browse the repository at this point in the history
* fix(dbt): Remove Redshift-specific column metadata
* Addressing pre-commit issue
  • Loading branch information
Vitor-Avila committed May 9, 2024
1 parent 9785acb commit 3908256
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/preset_cli/cli/superset/sync/dbt/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def clean_metadata(metadata: Dict[str, Any]) -> Dict[str, Any]:
"precision",
"scale",
"max_length",
"info",
):
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 @@ -1433,6 +1433,9 @@ def test_clean_metadata() -> None:
"precision": "very precise",
"scale": "to the max",
"max_length": 9000,
"info": {
"custom_info": "blah",
},
}
result = clean_metadata(test_data)
assert result == {
Expand Down

0 comments on commit 3908256

Please sign in to comment.