Passing Arguments to Command Line Scripts in ETL+
Arguments, also know as, parameters can be passed to .bat scripts from ETL+ Job page. Scripts may be more secure if credentials are passed in via arguments.
Script File Security – several ways of securing credentials and passwords in script files
.bat Script Example
The file referenced in the Program/Script entry is a .bat file with the following line.
"C:\Program Files\Tableau\DataSelf Desktop 2022.1\bin\tableau" refreshextract -s http://localhost/ -u <uid> -p "%~1%" --project <project> --datasource "datasource"
The string "%~1%"
is a reference to the first argument passed to the .bat file.
When run by ETL+ the script will resolve the argument (parameter) as:
"C:\Program Files\Tableau\DataSelf Desktop 2022.1\bin\tableau" refreshextract -s http://localhost/ -u <uid> -p "mypassword
" --project <project> --datasource "datasource"
%1
is a reference to the first argument/parameter that's passed to the script.%~1
strips out double-quotes in case the parameter is passed in as "mypassword".
Related Pages
ETL+ Command Line Interface DOS command line commands to run ETL+ Jobs.