Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Dev Space

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.
SOLVED

Have python OR alteryx pop out a box to user when they run analytics tool

nshapir2
7 - Meteor

I am building a ML model in python that will be run with the analytics tool. currently a dataframe with the r^2 is being printed to a .csv file. Is there a way to have alteryx output a message box that says for Model X is the r^2 is "r^2 value" ? or something of that sort?

 

The code runs in python that is the final step of the flow. 

18 REPLIES 18
NeilR
Alteryx Alumni (Retired)

Hi @nshapir2 , if you're using the Python tool in Alteryx Designer, you can use the print function to write to the Results window, see below...

NeilR_0-1637336327671.png

 

nshapir2
7 - Meteor

hmm but I am using analytics app? 

nshapir2
7 - Meteor

@NeilR will this print to the log in alteryx gallery?

NeilR
Alteryx Alumni (Retired)

Ah, for an app you'll want to use reporting tools and output to a pcxml file. See attached.

nshapir2
7 - Meteor

so I followed this procedure in Alteryx, and I can produce the file but the output says [Message] rather than what is stored in the message. 

 

 

TheOC
15 - Aurora
15 - Aurora

hey @nshapir2 

Ensure the output from the python tool that you want to display, is called 'Message':

TheOC_0-1637762648469.png



If not, it will product the issue you are receiving.


Bulien
nshapir2
7 - Meteor

I am running in an analytics tool. It should be called message? the dataframe I created has message stored in it.

its a dataframe with message 1 and message 2, (two rows). That I write to output 1

nshapir2
7 - Meteor

@NeilR @TheOC 

 

I need to output the messages in alteryx gallery. How can I accomplish this?

NeilR
Alteryx Alumni (Retired)

@nshapir2 I provided an example of how this can be done with the above python_example.yxwz example. If you're having trouble replicating it perhaps you can attach the workflow you're creating so that we can troubleshoot it?