diff --git a/dbtmetabase/_models.py b/dbtmetabase/_models.py index aed92380..08d5c853 100644 --- a/dbtmetabase/_models.py +++ b/dbtmetabase/_models.py @@ -100,7 +100,7 @@ def export_models( field = table.get("fields", {}).get(column_name) if not field: - if table.get("visibility_type") == "hidden": + if table.get("visibility_type") is not None: table_label = "hidden table" table["stale"] = True else: @@ -189,8 +189,8 @@ def __export_model( # Going from hidden to visible may require a retry retryable = ( - api_table.get("visibility_type") == "hidden" - and model_visibility != "hidden" + api_table.get("visibility_type") is not None + and model_visibility is None and api_table.get("stale", False) ) @@ -221,7 +221,7 @@ def __export_model( else: _logger.info("Table '%s' is up to date", table_key) - if model_visibility == "hidden": + if model_visibility is not None: _logger.info("Table '%s' is hidden, skipping columns", table_key) return success