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

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
BryanCarmichael
Advocate I
Advocate I

Lakehouse Add or Remove columns from table

Not sure if this is the right forum or not - but here is the issue.

 

We are loading data to a Lakehouse using gen 2 data flows (for now they are just pointing at exisitn gen 1 dataflows then doing the lakehouse insert - we will recify this later on).

 

Over time it is typical for columns to be added, removed and / or updated in a dataflow  - with a datamart these changes are reflected automatically in the schema - however with a laehouse when adding a new column to the dtaflow i can see no way to bring that into the lakehouse.

 

What do i need to do here - only options i can see are
1: import it as a new table but that seems to be very clunky as you would need to update queoroes / stored procedures on your sql end point to cater for this
2: Delete exisitng table in lakehouse and then add a new one with the same name.

 

Am i missing something ?

6 REPLIES 6
funtomas
Frequent Visitor

There is 3rd option which worked for me:

 

3.Rename original table. For exmplate rename "Table" to "Table1"

 

Then go to your Dataflow and setup destination of your Dataflow again. (Of course use create new table called "Table".)

 

funtomas_1-1699027621980.png

 

 

BryanCarmichael
Advocate I
Advocate I

So where we ended up with this is moving to using a warehouse for almost everything - and creating our own tables in it.

This allows you to alter them and create primary keys (not enforced) .
Lakehouse is good for super unstructured data but if you have structured data then a warehouse is a much better option.

asittrivedi
New Member

I have used a Python notebook to add a column to an existing table and that works just fine. One can use spark dataframe or pyspark.pandas dataframe to get the desired outcome. 

could you share how to do this in python?

marcuspaivio
New Member

I was wondering the same. 🙂

Helpful resources

Announcements
November Fabric 2023 Webinars

Fabric Monthly Update - November 2023

Check out the November 2023 Fabric update to learn about new features.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Get Help with Synapse in the General Discussion Forum

General Discussion Forum

Ask your questions about Synapse here!