Forum Discussion
Column added to Lakehouse table as string shows up as wrong type in SQL Endpoint and Power BI
Hi , JeffGray,
ALTER TABLE command is not supported for tables in Lakehouse.
This may be helpful to you:
Solved: Re: Lakehouse table column names not reflected in ... - Microsoft Fabric Community
The SQL analytics endpoint is read-only that is automatically generated upon creation from a Lakehouse in Microsoft Fabric.
The Synapse Data Warehouse or Warehouse is a 'traditional' data warehouse and supports the full transactional T-SQL capabilities like an enterprise data warehouse.
You can click here for more information.
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous I think the documentation you are referring to, is about T-SQL limitations in Data Warehouse and/or SQL Analytics Endpoint.
However JeffGray seems to be using SQL inside PySpark in a Lakehouse notebook. From what I have heard earlier, that is a different topic than T-SQL for data warehouse and SQL Analytics Endpoint.
Is there any documentation about limitations for using SQL in Spark?
Here are some other posts which show that we have been able to add columns to Lakehouse tables:
https://youtu.be/2RuoHpNZbc4?si=IoUopjtCXYozEgh2
- JeffGray2 years ago
Advocate I
Yes, exactly... I have a theory that I will test tomorrow, that the SQL endpoint (and power bi) are typing based on a profile of the first written data (as happens with Power BI imports) rather than from metadata of the Lakehouse table. In my case, the first several thousand values written into this column are all '9'. I think the SQL endpoint may be typing this as numeric based on those values. I'll try explicitly writing string data first tomorrow to see if I get a string datatype.