You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MS Fabric schema export appears to need capital letters on table names #1705
Was trying to connect the datacontract-cli to a Fabric Warehouse, and was getting errors saying that the information_schema.tables view did not exist.
Fixed it by putting all the view in upper case, can we check to see if the connection is a Fabric Warehouse and use capital letters instead?
Here's what I did to fix the selects, it created a data contract after that:
In the sqlserver_importer.py file, lines 39-66:
_TABLES_QUERY=""" SELECT table_name, table_type FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = '{schema}'"""########################### SQL Server reports the type in parts (base type plus length / precision /# scale). reconstruct_native_type() reassembles them exactly as the test path# reads them back, including the -1 that means MAX, so an imported physicalType# matches on the first `datacontract test`.##########################_COLUMNS_QUERY=""" SELECT table_name, column_name, data_type, character_maximum_length, numeric_precision, numeric_scale, is_nullable FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = '{schema}' ORDER BY table_name, ordinal_position"""_PRIMARY_KEYS_QUERY=""" SELECT kcu.table_name, kcu.column_name, kcu.ordinal_position FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE kcu ON tc.constraint_name = kcu.constraint_name AND tc.table_schema = kcu.table_schema WHERE tc.constraint_type = 'PRIMARY KEY' AND tc.table_schema = '{schema}' ORDER BY kcu.table_name, kcu.ordinal_position"""
Activity
Octacon100 commentedon Oct 6, 2026
Made a pull request to fix this here: Fix for Fabric warehouses- #1707 -#1707