Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Passing Input Parameter to Aletryx workflow Python Box and Workload Identity Federation

Haron3112
5 - Atom

Hi All,

Looking for way to pass parameter before Python Box, to replace and run the query for several date.

 

For Example

Python Box has big query code using python pandas and data frame.

 

Big query used Select Category,Product, Sum(Sales) from Table1 where DeliveryDate >= '2024-10-23' and OrderDate >= '2024-10-23' Group By 1,2

 

Parameter need to be passed  Replace '2024-10-23' with looping multiple dates. Run the code for n number of times based on user input of loop value.

PFA

1 REPLY 1
gawa
16 - Nebula
16 - Nebula

@Haron3112 As the Python tool can accept multiple input streams, you can add one more input for variables to rephrase query in Python tool.

 

For example, put the Text Input tool with 1 row x N columns(N=number of variables you want), and configure Interface tools to update their values based on user's input on Analytic App question or Macro configuration window.


 In the Python script, those variables are retrieved by Alteryx.Read() function as a pandas dataframe, and define variables and set its value by 'iloc' or something.

Labels