From 2842827a69fb91eb4ab6526e2d746f645d623e88 Mon Sep 17 00:00:00 2001 From: Mike Gouline Date: Fri, 27 Mar 2020 17:16:09 +1100 Subject: [PATCH] Specify what model/column missing in compatibility --- dbtmetabase/metabase.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dbtmetabase/metabase.py b/dbtmetabase/metabase.py index 682f07f0..1a875939 100644 --- a/dbtmetabase/metabase.py +++ b/dbtmetabase/metabase.py @@ -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