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.

Command Line panel on Job page

.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