KNOWLEDGE BASE

Parameters are not overridden in Input Steps when running a flow with Command Line and parameters override .json file


Pubblicato: 04 Oct 2022
Data dell'ultima modifica: 09 Dec 2022

Problema

The parameters in a flow file could not be applied to the Input steps when using the command line to override ​the current (default) parameter values.

For example, a parameter is applied in both the input and output step.
User-added image
User-added image

And using a command line to override the parameter value in the flow.
Command:

"C:\Program Files\Tableau\Tableau Prep Builder 2021.4\scripts"\tableau-prep-cli.bat -t "C:\Users\nlu\Downloads\parameter_repro\parameter.tfl" -p "C:\Users\nlu\Downloads\parameter_repro\Parameters.json"
Parameters.json:
{"YEAR":"2021"}

The output should use the [Input2021.xlsx] and output to [Output2021.xlsx].
However, when using the command line, the flow is using the default parameter value [2022] in the Input step.
The output file will look as follows:
User-added image

Ambiente

  • Tableau Prep Builder 2021.4
  • Tableau Prep Builder 2022.1
  • Tableau Prep Builder 2022.2.1, 2022.2.2
  • Parameter 
  • Command Line

Soluzione

Option 1
Upgrade to Tableau Prep 2022.2.3.
Option 2
Avoid using the parameters in the Input step.

Steps:
Instead of using the parameters in the Input Step to specify the input files, use wildcard unions to unionize multiple files, then use the parameters in the cleaning step to filter only the necessary data.
Please also refer to the image below for the wild union and filter settings.
User-added image
User-added image

Please also check the attached sample flow [Parameter_Workaround.tfl] and data.

Causa

This has been resolved in Tableau Prep 2022.2.3.
 
Con questo articolo hai risolto il problema?