Create Dynamic Linked Service in Azure Data Factory V2


  • I have a scenario like copying data to blob locations from a Table to Blob locations.

    While reading from Table(differentiated by Regions). I used a LookUp to read Regions and ForEach activity to Push the data to respective blob location. Like below

    Table --> Regions/R1/File.Gz

    Table --> Regions/R2/File.Gz

    Now I have to read the respective Region file from blob and push to different Region specific databases.

    I am not able to embed another copy activity in the same pipeline because the destination database changes based on the Region.

    Is there a provision in ADF V2, to dynamically change the Linked Service or Connect to Linked Service at Run time?

    is there any way where single copy activity can connect multiple sink dataset one by one in same foreach or dynamically change the database connection in the sink of copy activity?

    The idea is to use same Linked Service and change the database name during run time. is it possible?

    Thursday, October 11, 2018 5:46 AM


All replies

  • Hi Kishore,

    ADF supports linked service parameterization now. 

    You may try parameterizing the database name of the sink database, and using it in the foreach activity.

    Ref doc: Parameterize linked services in Azure Data Factory

    Thursday, October 11, 2018 6:38 AM
  • Hey 

    Thanks for the reply.

    Yes, I have gone through the same article when tried to create new linked service. I am able to do this parameterization and complete my task.

    Thanks again :)

    Thursday, October 11, 2018 8:13 AM
  • Apparently, this parameterization only applies in database linked service, as far as i can tell this option doesn't exist in FTP and some other linked service in which I'm currently having difficulties right now.
    Wednesday, April 3, 2019 11:37 AM