Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
deanbeane
Employee
Employee

Lakehouse table schema not updating at dataflow refresh

In online service, I have a simple dataflow gen2 that has a single 2-column, 3-row query (image below) that publishes (update method replace) to my lakehouse. Updates to the dataflow (i.e. modifying data in existing rows or new rows added) show up in the lakehouse table just fine when the dataflow and lakehouse are refreshed. All good so far.

 

However, if I add a new column to my dataflow query (table structure/schema is changed, simple text column) - taking care to ensure successful publish and lakehouse refresh - the lakehouse table doesn't show the new 3rd column.

deanbeane_0-1697198370933.png

 

Refreshing the individual table in the lakehouse doesnt change anything either.

The relevant 'refresh-timestamped' parquet and json files for the lakehouse table do not reflect the new table schema either.

deanbeane_1-1697198487650.png

 

In the dataflow query editor, the schema view shows the newly added column so at least dataflow side everything is normal. Also in the dataflow query editor, going through the lakehouse data destination settings and 'refresh destination schema' dialogue makes no difference - despite the process acknowledging that, quote "Schema changed since you last set the output settings. Column mappings have been reset to their default". Strangely, if I select "Append" mode it adds the 3rd columns data to the bottom of the 1st and 2nd columns.

The only way to get the changed table to update correctly to the lakehouse is to delete the lakehouse table itself and then refresh the dataflow. Not ideal if you've got upstream dependencies and model relationships to consider.

Same behaviour no matter which of my many dataflow schemas change - the lakehouse always retains the original schema.
Any help greatly appreciated.

1 ACCEPTED SOLUTION
deanbeane
Employee
Employee

Solution: As at 13th Dec 2023 this fix works: When your query schema changes (e.g. add or delete new column ) before clicking 'Publish' to lakehouse, go into data destination settings (cog bottom right), click 'Next' into 'Choose Destination Target' - and this is the critical bit - ensure 'New table' is selected (even though you know that this table already exists in your Lakehouse! I know, so intuitive right?!). Ensure your destination lakehouse and table name are unchanged, click 'Next' which should display a message to the effect of 'your schema has changed', (you might need to check the box next to your new column(s) to include them in the schema) then save and publish. Please note this method does not work on my historical dataflows/tables - only new ones. To get this to work on your older tables you will need to delete them from the lakehouse, re-publish them from your dataflow, then from that point on you should be good for future schema changes. 

View solution in original post

2 REPLIES 2
deanbeane
Employee
Employee

Solution: As at 13th Dec 2023 this fix works: When your query schema changes (e.g. add or delete new column ) before clicking 'Publish' to lakehouse, go into data destination settings (cog bottom right), click 'Next' into 'Choose Destination Target' - and this is the critical bit - ensure 'New table' is selected (even though you know that this table already exists in your Lakehouse! I know, so intuitive right?!). Ensure your destination lakehouse and table name are unchanged, click 'Next' which should display a message to the effect of 'your schema has changed', (you might need to check the box next to your new column(s) to include them in the schema) then save and publish. Please note this method does not work on my historical dataflows/tables - only new ones. To get this to work on your older tables you will need to delete them from the lakehouse, re-publish them from your dataflow, then from that point on you should be good for future schema changes. 

KA78
Advocate I
Advocate I

I have the same problem. Are we missing something?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors