<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=612681139262614&amp;ev=PageView&amp;noscript=1">
Skip to content

Need help? Talk to an expert: phone(904) 638-5743

Azure Data Factory v2 Parameter Passing

Azure Data Factory v2 Parameter Passing
Summary of the Matter:
Parameter passing in ADFv2 had a slight change in the summer of 2018.   Microsoft modified how parameters are passed between pipelines and datasets.  Prior, you could reference a pipeline parameter in a dataset without needing to create a matching dataset parameter.   The screen prints below explain this much better, and if you are new to ADFv2 and parameter passing, this will give you a nice introduction.  I personally feel the change is an improvement.

New Warnings and Errors
My client had been using ADFv2 since the beginning of 2018, then on a particular Monday, we walked into the office and noticed that our ADFv2 datasets were throwing errors and warnings. 
Dataset  Connection New Error
Picture
 
Dynamic Content Window
Picture
 
Thankfully, Microsoft made this change backward compatible to an extent, so our pipelines were still humming merrily along.   The new methodology is actually an improvement, so let's go with it!  Here are the summary steps to correct the problem:
  1. In the dataset, create parameter(s).
  2. In the dataset, change the dynamic content to reference the new dataset parameters.
  3. In the calling pipeline, you will now see your new dataset parameters.  Enter dynamic content referencing the original pipeline parameter.
 Just in case that is a bit confusing, let me walk your through it.

Step #1 - In the dataset, create parameter(s).
Picture
 
Step #2 - In the dataset, change the dynamic content to reference the new dataset parameters
Picture
 
The content showing above used to read "@pipeline().parameters.outputDirectoryPath".  You now have to reference the newly created dataset parameter, "@dataset().outputDirectoryPath".

Step #3 - 
In the calling pipeline, you will now see your new dataset parameters.  Enter dynamic content referencing the original pipeline parameter.
Picture
 
Conclusion: 
The advantage is now we can explicitly pass different values to the dataset.  As a dataset is an independent object and is called by a pipeline activity, referencing any sort of pipeline parameter in the dataset causes the dataset to be "orphaned".  What if you want to use that dataset in a pipeline that does not have our example parameter "outputDirectoryPath"?  Prior, your pipeline would fail, now you can give the dataset parameter a default inside the dataset.  Better yet, your two parameter names do not have to match.   In step #3, the pipeline screen print immediately above, you can put any parameter reference, system variable or function in the "VALUE".

That's pretty much all there is to it!  If you haven't already, start editing.

Sign-up now and get instant access

Leave a comment

Free Trial

On-demand learning

Most Recent

private training

Hackathons, enterprise training, virtual monitoring