We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a739741 commit 868f30dCopy full SHA for 868f30d
sqlglot/schema.py
@@ -386,6 +386,8 @@ def _normalize(self, schema: t.Dict) -> t.Dict:
386
387
if not isinstance(columns, dict):
388
raise SchemaError(error_msg.format(".".join(keys[:-1]), len(flattened_schema[0])))
389
+ if not columns:
390
+ raise SchemaError(f"Table {'.'.join(keys[:-1])} must have at least one column")
391
if isinstance(first(columns.values()), dict):
392
raise SchemaError(
393
error_msg.format(
0 commit comments