Double parameterization in ADF

Sharukh Kundagol 105 Reputation points
2023-02-06T13:45:37.3133333+00:00

Hi Team,

I Have 2 global parameters as below.

QC_cluster_id

DC_cluster_id

KC_cluster_id

this are getting used in pipeline, which has parameters of "type" whose values could be(QC,DC,KC)

i want use different global parameter based on type parameter

for example : if i pass type values as QC then it should be

@pipeline().globalParameters.QC_cluster_id

for this i am using expression as , but obviously it is not working is there way to achieve this

@concat(pipeline().globalParameters.@{pipeline().parameters.type},'_cluster_id')

i was hopping atlease below one will help , but did not

@pipeline().globalParameters[concat(pipeline().parameters.type,'_cluster_id')]
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,663 questions
{count} votes

Accepted answer
  1. AnnuKumari-MSFT 31,151 Reputation points Microsoft Employee
    2023-02-07T11:58:46.2+00:00

    Hi Sharukh Kundagol ,

    Welcome to Microsoft Q&A platform and thanks for posting your question here.

    As I understand your issue, you are trying to use multiple global Parameters in ADF and the global parameters should be selected based on the value provided in the pipeline parameter.

    You have mentioned that you have 3 global Parameters , in that case , you can make use of Switch activity in ADF pipeline which will execute set of activities if the condition meets.

    1. Create all three global Parameters
    2. Create pipeline parameter 'Type'
    3. In switch activity, provide this expression: @pipeline().parameters.Type
    4. Create 3 cases: QC,DC and KC
    5. Inside all cases, make use of the corresponding global Parameters , forexample: use @pipeline().globalParameters.QC_cluster_id in QC case . switchGlobalParam2

    Hope it helps. Please do consider clicking Accept Answer and Up-Vote for the same as accepted answers help community as well.


0 additional answers

Sort by: Most helpful