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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Matces
Frequent Visitor

How Copy files/tables from lakehouse to another lakehouse in other workpace?

Hi!

There is a way to copy files/tables from lakehouse to another lakehouse in other workspace?

1 ACCEPTED SOLUTION
NandanHegde
Super User
Super User

Hey,

There are multiple ways to transfer data/files between 2 different lakehouses  via :

1) Python code as stated by @v-nikhilan-msft 

2) You can use Azure data factory/Synapse pipelines :

NandanHegde_0-1708491903312.png

where your source and sink can ben lakehouses

 

But it is currenly not possible via Fabric data pipelines




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com

View solution in original post

7 REPLIES 7
joeguicearnold
Frequent Visitor

This seems like a perfect application of Shortcuts.  No need for a true copy of the data as both Files or Tables work as if they are native in the 2nd Lakehouse.

Matces
Frequent Visitor

thanks @v-nikhilan-msft 

NandanHegde
Super User
Super User

Hey,

There are multiple ways to transfer data/files between 2 different lakehouses  via :

1) Python code as stated by @v-nikhilan-msft 

2) You can use Azure data factory/Synapse pipelines :

NandanHegde_0-1708491903312.png

where your source and sink can ben lakehouses

 

But it is currenly not possible via Fabric data pipelines




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com
HimanshuS-msft
Community Support
Community Support

Hello @Matces , 

Just to add what @v-nikhilan-msft  said above .

I am not sure how big is the dataset but as a work around you can copy the file/tables  from one WS to a storage location using data flow ot pipeline and the  from there you can to the siderent WS . 

You can use the data flows or pipelines : https://learn.microsoft.com/en-us/fabric/data-factory/transform-data

Thanks 
Himanshu 

Hi @Matces 
You can copy the data present in one lakehouse in Workspace A to another lakehouse in Workspace B in the following way by using Notebooks:
I have a table named publicholidays in Workspace A. Using it as source I created another table in Workspace B by using the below code:

vnikhilanmsft_0-1708454345894.png

 

source = "abfss://*****.Lakehouse/Tables/publicholidays"
dest = "Tables/test"
df = spark.read.format("delta").load(source)
df.write.mode("overwrite").format("delta").save(dest)


In the above code replace source with the abfss path of Workspace A.  You can get the abfss path like shown below:

vnikhilanmsft_1-1708454579941.png


vnikhilanmsft_3-1708454645307.png


You should add the destination lakehouse present in Workspace B as the default lakehouse in the notebook and run the above code. The table will be successfully created in workspace B.

vnikhilanmsft_4-1708454827254.png


Hope this helps. Please let me know if you have further queries.

 

v-nikhilan-msft
Community Support
Community Support

Hi  @Matces 
Thanks for using Fabric Community. Apologies for the delay in response.
Copying files/tables directly from one workspace to another in Microsoft Fabric is currently not possible due to security restrictions. The isolation between workspaces prevents direct cross-workspace access.

Help us prioritize this feature! You can post your idea on the ideas site or cast a vote on an existing idea. Below is the link to the ideas site.

https://aka.ms/FabricIdeas

Hope this helps. Please let me know if you have any further questions.

 

Hi @Matces 
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. Otherwise, will respond back with the more details and we will try to help.
Thanks

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

November Update

Fabric Monthly Update - November 2024

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

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.