Skip to content

Commit

Permalink
Specify what model/column missing in compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Gouline committed Mar 27, 2020
1 parent 0ff67cd commit 2842827
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dbtmetabase/metabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,14 @@ def models_compatible(self, database_id: str, schema: str, models: list) -> bool
for model in models:
model_name = model['name'].upper()
if model_name not in field_lookup:
logging.warn("Model %s not found", model_name)
return False

table_lookup = field_lookup[model_name]
for column in model.get('columns', []):
column_name = column['name'].upper()
if column_name not in table_lookup:
logging.warn("Column %s not found in model %s", column_name, model_name)
return False

return True
Expand Down

0 comments on commit 2842827

Please sign in to comment.