Skip to content

Commit

Permalink
Set semantic type only when present (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
gouline authored Jul 7, 2022
1 parent 4ad4d05 commit 646a914
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dbtmetabase/metabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,11 @@ def export_column(
body_field["description"] = column_description
if api_field.get("visibility_type") != column_visibility:
body_field["visibility_type"] = column_visibility
if api_field.get(semantic_type_key) != column.semantic_type:
body_field["points_of_interest"] = column.semantic_type
if (
column.semantic_type
and api_field.get(semantic_type_key) != column.semantic_type
):
body_field[semantic_type_key] = column.semantic_type
if api_field.get("fk_target_field_id") != fk_target_field_id:
body_field["fk_target_field_id"] = fk_target_field_id

Expand Down

0 comments on commit 646a914

Please sign in to comment.