Deciding between the use of a command-line argument and a named parameter
Both command-line arguments and named parameters are means for creating more flexible jobs and transformations. The following table summarizes the differences and reasons for using one or the other. In the first column, the word argument refers to the external value you will use in your job or transformation. That argument could be implemented as a named parameter or as a command-line argument.
Situation |
Solution using named parameters |
Solution using arguments |
---|---|---|
It is desirable to have a default for the argument. |
Named parameters are perfect in this case. You provide default values at the time you define them. |
Before using the command-line argument, you have to evaluate if it was provided in the command line. If not, you have to set the default value at that moment. |
The argument is mandatory. |
You don't have means to determine if the user provided a value for the named parameter. |
To know if the user provided... |