Forum Discussion

Jerome22's avatar
Jerome22
Resolver I
1 year ago
Solved

user data functions + deployment pipeline, no variables ?

Hi,

 

how it's possible to manage the connections setup in an user data function in a deployment pipeline?

 

I have a UDF in a dev workspace which connects to a specific database, when I deploy my function in my production workspace, I want my function to be connected to another database not my development one.

how to do it?

 

I also need to use variables for other parameters used in my function which has to be changed between my dev and prod usage of my function.

 

maybe I can access variables setup in a workspace from within the UDF?

 

thanks.

4 Replies

  • Hi Jerome22 

     

    You can use Varaiable Libraires in data pipelines(preview mode) Read more about variable libraries here Learn how to use Variable libraries - Microsoft Fabric | Microsoft Learn 

     

    But, while coming to UDF, as of now UDF's not supported to use direct access to Variable libraries inside UDF. As a work around you can use notebook that reads the values from variable library and it passes the values to the UDF as parameters. Then you can use the parameters to setup your conenctions dynamically. Just give a try.

     

    Pls read this blog User data functions source control and deployment - Microsoft Fabric | Microsoft Learn it may helps you

     

    Please let me know if it works.

     

     

    Thank you!

     

    Did I answer your question? Mark my post as a solution!

    Proud to be a Super User!

  • v-lgarikapat's avatar
    v-lgarikapat
    Community Support

    Hi Jerome22  

    Thanks for reaching out to the Microsoft fabric community forum.

    suparnababu8 

    Thanks for your prompt response

    Jerome22 ,

    I wanted to follow up and confirm whether you’ve had the opportunity to review the information  provided By suparnababu8  If you have any questions or need further clarification, please don’t hesitate to reach out.

     

    Best Regards,

    Lakshmi 

    • v-lgarikapat's avatar
      v-lgarikapat
      Community Support

      Hi Jerome22 ,

      I just wanted to check if your issue has been resolved. If you still have any questions or need help, feel free to reach out I’m happy to assist.

      Thank you for being an active part of the community. Looking forward to hearing from you!

      Best regards,
      Lakshmi

      • v-lgarikapat's avatar
        v-lgarikapat
        Community Support

        Hi Jerome22 ,

         

        I just wanted to check if your issue has been resolved. If you still have any questions or need help, feel free to reach out I’m happy to assist.

        Thank you for being an active part of the community. Looking forward to hearing from you!

        Best regards,
        Lakshmi