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
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.
Comments
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:
2 Comments
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