Forum Discussion

sreekanthreddy's avatar
sreekanthreddy
New Member
1 year ago
Solved

can i install pyrfc library in Fabric notebook

Can I install the Pyrfc library in fabric notebooks?

To establish a connection 

between SAP ECC and Fabric notebooks to read tables from SAP ECC and load them into one lake house

by using this code

# Define SAP ECC connection parameters

sap_connection_params = {

    'user': 'your_username',

    'passwd': 'your_password',

    'ashost': 'your_sap_host',

    'sysnr': 'your_system_number',

    'client': 'your_client_number',

    'lang': 'EN'

}

govindarajan_d 

 

  • Hi sreekanthreddy,

     

    Spark in Fabric supports installing new libraries and working with them. But from the Github URL of the package (https://github.com/SAP-archive/PyRFC), I see that it is no longer maintained. And also it asks for Cython to be installed in the environment for using it. (there is a possibility you might have to build it from source). It would be difficult to setup Fabric Spark environment with all the pre-requisites to use PyRFC. 

     

    Apart from that, your Fabric environment should be configured to be in the same network as your SAP ECC network, so that when the script runs, it can access your SAP machine. 

    https://learn.microsoft.com/en-us/fabric/security/security-managed-vnets-fabric-overview

     

    Considering the effort to setup and the complexity of maintaining this, I would recommend using an ETL tool that supports SAP connector to bring data. Check ADF once where you have the option to connect SAP ECC in different ways. 

5 Replies

  • Hi sreekanthreddy 

     

    If you have administrator access, you could potentially create a custom Fabric environment that includes the necessary SAP NWRFC SDK and PyRFC library.

     

    https://learn.microsoft.com/en-us/fabric/data-engineering/environment-manage-library

     

    Pip install wont work in you case because PyRFC requires the SAP NWRFC SDK, which is not pre-installed in Fabric environments. The SAP NWRFC SDK is not publicly available and requires SAP credentials to download

     

     

  • Hi sreekanthreddy,

     

    Spark in Fabric supports installing new libraries and working with them. But from the Github URL of the package (https://github.com/SAP-archive/PyRFC), I see that it is no longer maintained. And also it asks for Cython to be installed in the environment for using it. (there is a possibility you might have to build it from source). It would be difficult to setup Fabric Spark environment with all the pre-requisites to use PyRFC. 

     

    Apart from that, your Fabric environment should be configured to be in the same network as your SAP ECC network, so that when the script runs, it can access your SAP machine. 

    https://learn.microsoft.com/en-us/fabric/security/security-managed-vnets-fabric-overview

     

    Considering the effort to setup and the complexity of maintaining this, I would recommend using an ETL tool that supports SAP connector to bring data. Check ADF once where you have the option to connect SAP ECC in different ways. 

  • v-prasare's avatar
    v-prasare
    Icon for Community Support rankCommunity Support

    Hi sreekanthreddy, Thanks for actively participating Fabric community support.

     

    govindarajan_dnilendraFabric Thanks for your promt response.

     

    sreekanthreddy, as we haven’t heard back from you, we wanted to kindly follow up to check if the solution we have provided for your issue worked? or let us know if you need any further assistance here?

     

     

    Your feedback is important to us, Looking forward to your response. 

     

    Thanks,

    Prashanth Are

    MS Fabric community support.

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query.

  • v-prasare's avatar
    v-prasare
    Icon for Community Support rankCommunity Support

    sreekanthreddy, as we haven’t heard back from you, we wanted to kindly follow up to check if the solution we have provided for your issue worked? or let us know if you need any further assistance here?

     

     

    Your feedback is important to us, Looking forward to your response. 

     

    Thanks,

    Prashanth Are

    MS Fabric community support.

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query.

  • v-prasare's avatar
    v-prasare
    Icon for Community Support rankCommunity Support

    sreekanthreddy, as we haven’t heard back from you, we wanted to kindly follow up to check if the solution we have provided for your issue worked? or let us know if you need any further assistance here?

     

     

    Your feedback is important to us, Looking forward to your response. 

     

    Thanks,

    Prashanth Are

    MS Fabric community support.

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query.