19

Im just learning ADF, can you explain to me the difference between Variables and Parameters? I cant find a good explanation about it.

4 Answers 4

21

Parameters are set for the whole pipeline, and are constant during a pipeline run. You can read them during a run to control what the pipeline does. They are like constants in a programming language, defined at the top of the source code.

Variables can be set at the start of a pipeline and read and modified during a run. They are like normal variables in a programming language.

Sign up to request clarification or add additional context in comments.

Comments

2

Parameters are something that can be set to model (dataset, pipeline, etc) at runtime. Without parameters, you model is fixed, for example, without parameters you can only write query like "select * from order where timestamp > '11/01/2018'" in dataset, with parameter 'TS' you can write query like "select * from order where timestamp > '@dataset.TS'" so that your activity run will query and copy data in different time window.

Variables are something that contain real value at runtime and can be assigned to those parameters in app model(dataset, pipeline, etc) to get real things done.

Here are some examples:

https://learn.microsoft.com/en-us/azure/data-factory/control-flow-expression-language-functions#examples

2 Comments

Great response, however that link does not have any variable examples, only parameter.
Very much half an answer. Information on how to use variables would be greatly appreciated.
0

Pipeline parameters can only be assigned at the start of a pipeline run and cannot be updated or assigned during the run. However, pipeline variables can be declared at the pipeline level and updated or assigned during execution using the SetVariable activity

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
-1

A variable can be used as a parameter (input). A constant can also be used as a parameter. Being a parameter is being used.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.