Can you call Tableau Prep parameters via TabPy in a Python Script?

120 Views Asked by At

I would like to know if the new parameter functionality in Tableau Prep can be called from a Python script when implementing a TabPy script in your flow?

I am not sure how to call the parameter from the python function

1

There are 1 best solutions below

0
On

I have been looking for the same functionality, but I have not found a direct way to implement passing parameters.

Looking at indirect ways, my use case seems similar to yours. I wanted to select for particular values of a variable and run function on the filtered data.

What I ended up doing is to create a Clean step with the Add Filter feature. From there, I chose which Year I wanted to run my script on. Afterwards, my TabPy script ran.

There should be ways for other use cases, you can also create a calculated field in the Clean step and input the the parameter with the values you would want into the data to input into the TabPy script.

enter image description here