synapse pipelines - add output parameters

jk 11 Reputation points
2022-01-17T02:51:33.23+00:00

I have a pipeline that does a unit of work and saves it to a variable within that pipeline

I want to use that variable outside of the pipeline. how do I reference it? The output list of the pipeline is pipelineName & pipelineRunId

[activity 1] -> [execute pipeline] -> [activity 2 - access variable from the previous pipeline]

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,057 questions
{count} vote

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 38,466 Reputation points Microsoft Employee
    2022-01-17T10:20:18.757+00:00

    Hi @jk ,

    Thank you for posting query in Microsoft Q&A Platform.

    There is no direct way of accessing variable of one pipeline in another pipeline.

    But you can think of below work arounds.

    Option1: Lets say you have pipeline1 and pipeline2. In pipeline1 you have a variable called "testvariable" and you want to pass that variable value to pipeline2.
    In this case, follow below steps to pass variable from pipeline1 to pipeline2.

    • In pipeline2 create a parameter to take value from variable. Lets say create a parameter with name "testParameter".
    • At the end of pipeline1 use Execute pipeline activity to call pipeline. Once you select pipeline2 in execute pipeline activity then it will ask you to supply value for "testParameter". Here you pass your variable as value.
    • Now in pipeline2 access "testParameter" where ever you want to consume its value.

    Option2: At the end of pipeline1 try to store that variable value in to some table or file in your preferred storage and then in pipeline2 try to use Lookup activity to take that data in to pipeline from that table or file.

    Your ask actually triggers a great idea of enhancing product too. Having global variables which you can be set and accessed anywhere within ADF or Synapse Pipelines. I strongly encourage you to log this item as feedback in below ADF or Synapse feedbacks portal. Product team will closely monitor feedbacks and consider them for future releases.

    Hope this will help. Please let us know if any further queries.

    -------------------

    Please consider hitting Accept Answer. Accepted answers helps community as well.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.