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!

Alteryx Designer Desktop Discussions

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

Can I output a model (or workflow) created with Alteryx as source code (Pytho etc.)?

kodama3104
7 - Meteor

Can I output a model (or workflow) created with Alteryx as source code (Pytho etc.)?

5 REPLIES 5
RishiK
Alteryx
Alteryx

When you state 'source code', can you provide some more context?

kodama3104
7 - Meteor

Thank you for your reaction.

 

For example, suppose that I created a workflow that uses Summarize Tool to obtain and display average, maximum, minimum, and standard deviation using training data file "file1".

 

In that case, it means that "Can Alteryx output the source code like below".

 

(python source code)

----------------------------------------------------------------

import pandas as pd

# read csv
df = pd.read_csv("file1.csv", index_col=0)

# sum
sum = df['ATK'].sum()
print("sum:", sum)

# mean
mean = df['ATK'].mean()
print("mean:", mean)

# max
dfmax = df['ATK'].max()
print("max:", dfmax)

# min
dfmin = df['ATK'].min()
print("min:", dfmin)

# std
std = df['ATK'].std()
print("std:", std)

# variance
var = df['ATK'].var()
print("var:", var)

----------------------------------------------------------------

 

We would like to do something similar to this, for example, with respect to models created with regression tools.

RishiK
Alteryx
Alteryx

If you were using Alteryx Promote then this would be quite easy to do.

 

There could potentially be 2 ways (or a combination of both) to do this.  You can right click on the predictive tool itself and Open the Macro to navigate to the R code behind the model.  You also have access to the XML code behind each tool when you select the white Canvas and select XML view on the left hand side configuration.

 

Why would you want to convert the model into source code anyway?

kodama3104
7 - Meteor

Hello RishiK,

 

Thank you for your comment.

I'll try to do your advice.

 

I want to run the model on the edge computer that OS is linux .

So I want source some kind of source code .

 

If there is other easier way ,  it is helpful for me.

 

best,

Satoshi

RishiK
Alteryx
Alteryx

Try the above.  Alteryx Designer does work on a Unix / Linux environment.

 

Another option is maybe explore Alteryx Promote if you are only using Alteryx Designer for now.

Labels