Forum Discussion
SQL Tables importing without associated data types
- 5 years ago
None, it's the out of the box SQL Server connector from Power Query. The only inputs it's taking is the SQL string and DB, then navigating to the table in question.
let
Source = Sql.Database(sqlserver, db)
Table = Source{[Schema="dbo",Item=tablename]}[Data]
in
TableAgree, it doesn't seem to be a widespread issue, this is the first time I've come across an issue like this. Just tested with a sandbox WorldWideImporters DB and the native query generated brings through datatypes fine.
Odd!
Run a fiddler trace and also check the query logs on your SQL server. Maybe something is blocking the meta data calls?
Looks like the issue is with the Power BI SQL Connector itself. Looking at the native query being sent, all fields are being converted to text data types:
Writing a custom SQL statement to select the data seems to bring across the right datatypes. I haven't come across documentation on why this occurs and how to turn it off yet though.