Use R and Python scripts in your flow
Starting in version 2019.3.1 you can use R and Python scripts to perform more complex cleaning operations or incorporate predictive modeling data into your flow. Data is passed from the flow as input through the R or Python script step, then returned as output data that you can continue cleaning using the features and functions of Tableau Prep Builder.
Note: Connecting to scripts as an input step for your flow is not yet supported.
When you add a script step to your flow and enter in the configuration details for the selected service, Tableau Prep Builder passes the data to Rserve for R or Tableau Python server (TabPy) for Python and returns the resulting data back to the flow in the form of a table. You can continue to apply cleaning operations to the results and generate your output for analysis.
When you create your script, you will need to include a function that specifies a data frame as an argument of the function. If you want to return different fields than what you input, you'll need to include a getOutputSchema function in your script that defines the output and data types. Otherwise, the output will use the fields from the input data.