Forum Discussion
Writing csv files from Fabric to a shared folder on a Linux server
Hi
I need to copy some csv files from a Fabric lakehouse into a shared folder on a Linux server.
Which is the right Fabric connection to implement for a such scenario, please?
Many thanks
Hi pmscorca,
Do you have any windows machines in your environment?
You will need a data gateway for this which requires a windows machine.If you have a gateway, then you can create an SMB share that is accessible to both windows and linux, and everything will work as expected.
Other than that, you might be able to use Powershell or the ADLS REST APIs to pull files from your lakehouse.
https://learn.microsoft.com/en-us/rest/api/storageservices/data-lake-storage-gen2
9 Replies
- tayloramy
Super User
Hi pmscorca,
Do you have any windows machines in your environment?
You will need a data gateway for this which requires a windows machine.If you have a gateway, then you can create an SMB share that is accessible to both windows and linux, and everything will work as expected.
Other than that, you might be able to use Powershell or the ADLS REST APIs to pull files from your lakehouse.
https://learn.microsoft.com/en-us/rest/api/storageservices/data-lake-storage-gen2
- pmscorca
Post Prodigy
Hi, thanks for your reply.
There is already a Windows machine with the ODPG installed.
Now, Fabric cannot write on a shared folder on a Linux server, isn't it? Is it a limitation or an architecture issue? Thanks
- AnonymousNot applicable
- AnonymousNot applicable
Hi pmscorca
Thank you for reaching out to the Microsoft Fabric Forum Community.
@tayloramy Lozovskyi Thanks for the inputs.
Suggestions from users are extremely valuable.Both suggestions can work, and the best option depends on how your Linux/SAP environment needs to access the files. If the SAP DP Agent expects the files to be available in a local or shared folder, then the first approach (using the On-premises Data Gateway with an SMB/Samba share) would be great. However, if the Linux VM can access Azure Storage directly, the second approach (using ADLS Gen2, mounting it on Linux, and creating a Lakehouse shortcut) may be simpler and more scalable since it avoids the need for the gateway.
I hope this works for you. If you encounter any other issues, please contact the community.
Thanks.- pmscorca
Post Prodigy
Hi, thanks for your reply.
The OPDG machine is already present for the Fabric solution in order to get data from other on-premises sources, and so I could use it also for copying csv files.
I'd like to remain inside the Fabric perimeter and not using some Azure items: having Fabric, I hope that Azure items will be used less and less as time goes by.
- AnonymousNot applicable
Hi pmscorca
That makes sense. Since you already have an On-premises Data Gateway and prefer to stay within Fabric without adding Azure resources, using the SMB/Samba shared folder through the gateway would be the suitable approach.
As long as the gateway machine can access the SMB share, you can copy the CSV files from the Lakehouse using a File System/Folder connector through the gateway.
If you have any other issues, please reach the community.
- Lozovskyi
Kudo Collector
Hello pmscorca,
what if you simply
- create ADLS Gen2
- attach it to your Linux VM https://lnx.azurewebsites.net/how-to-mount-azure-data-lake-storage-gen2-in-linux/
- create a shortcut in Fabric Lakehouse to that ADLS Gen2 (to the desired container).
- put this shortcut path as target path for your code to export csv files.