Forum Discussion

pmscorca's avatar
pmscorca
Icon for Post Prodigy rankPost Prodigy
6 months ago
Solved

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

9 Replies

  • 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's avatar
      pmscorca
      Icon for Post Prodigy rankPost 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

      • tayloramy's avatar
        tayloramy
        Icon for Super User rankSuper User

        Hi pmscorca

         

        Fabric will need to write to an SMB share, so if your shared folder is mounted as an SMB share it should work no problem.  By default Linux uses NSF shares, which the gateway can't see. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi pmscorca 

    Thank you for reaching out to the Microsoft Fabric Forum Community.

    tayloramy Thanks for the inputs.

    I hope the information provided by user was helpful. If you still have questions, please don't hesitate to reach out to the community.

     

  • Anonymous's avatar
    Anonymous
    Not 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's avatar
      pmscorca
      Icon for Post Prodigy rankPost 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.

      • Anonymous's avatar
        Anonymous
        Not 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.