We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a6542f9 commit e6c4688Copy full SHA for e6c4688
sqlmesh/core/engine_adapter/base.py
@@ -1273,7 +1273,11 @@ def _scd_type_2(
1273
source_table, columns_to_types, target_table=target_table, batch_size=0
1274
)
1275
columns_to_types = columns_to_types or self.columns(target_table)
1276
- if valid_from_name not in columns_to_types or valid_to_name not in columns_to_types:
+ if (
1277
+ valid_from_name not in columns_to_types
1278
+ or valid_to_name not in columns_to_types
1279
+ or not columns_to_types_all_known(columns_to_types)
1280
+ ):
1281
columns_to_types = self.columns(target_table)
1282
if not columns_to_types:
1283
raise SQLMeshError(f"Could not get columns_to_types. Does {target_table} exist?")
0 commit comments