KNOWLEDGE BASE

How To Use Today's Date As Output File Name By Tableau Prep CLI


Published: 10 Jun 2022
Last Modified Date: 10 Jun 2022

Question

How to use today's date as the output file name in Tableau Prep CLI.

Environment

  • Tableau Prep Builder 2022.1.2
  • Windows 10

Answer

1. Open the flow with Tableau Prep Builder GUI then set the parameters as output file name.
2. Create a batch file that gets today's date and create parameters.override.json.
After running the batch file, it will save the output file name as today's date.

As an example:
SET YYYYMMDD=%DATE:/=%
ECHO { "yyyymmdd": "%YYYYMMDD%" } > C:\Users\<user_directory>\parameters.override.sample.json
"C:\Program Files\Tableau\Tableau Prep Builder 2022.1\scripts\tableau-prep-cli.bat" -t C:\Users\<user_directory>\Output.tflx -p C:\Users\<user_directory>\parameters.override.sample.json
Did this article resolve the issue?