diff --git a/superset/migrations/versions/a9422eeaae74_new_dataset_models_take_2.py b/superset/migrations/versions/a9422eeaae74_new_dataset_models_take_2.py index 9a2498bfa8590..87c7e13849abd 100644 --- a/superset/migrations/versions/a9422eeaae74_new_dataset_models_take_2.py +++ b/superset/migrations/versions/a9422eeaae74_new_dataset_models_take_2.py @@ -597,7 +597,7 @@ def print_update_count(): ) updated = True - if not is_physical and expression: + if not is_physical and drivername and expression: table_refrences = extract_table_references( expression, get_dialect_name(drivername), show_warning=False )