Alteryx Designer Desktop Discussions

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

Connect 2 File Browse tool to a Python tool

ppatane
8 - Asteroid

I have python code to copy 3 Excel sheets from one file to another, but I am not sure about how to properly connect 2 File Browse tools to a python tool. Is it just like this? To get the files into the data frame, would I use df = Alteryx.read("#2") and df = Alteryx.read("#3community pic.jpg")

6 REPLIES 6
alexnajm
18 - Pollux
18 - Pollux

Can you just connect then to two Input Data tools that connect into the Python tool?

ppatane
8 - Asteroid

If I do that, can the files in the input tools be any file?

apathetichell
19 - Altair

This isn't right.

 

You can:

 

1) preferred way -> connect file browse tools to a text tool (or two). Have the action tool update the path in the text input tool. if you are using multiple file browse - make sure to use the  action tool to update two different columns/fields. Note - two text tools is just a variation of this.

2) you can create template values in your python script. you can have the action tools update the template path locations. This is not preferered. Some of us have had rough experiences with action tools updating Python tools.

 

 

You cannot send data directly from an action tool into Python as a data frame. I'd recommend going back and reviewing whatever you are using to learn Alteryx.

alexnajm
18 - Pollux
18 - Pollux

@ppatane it can be most structured data sets. Worth testing a few file types as well

apathetichell
19 - Altair

@ppataneWho knows - perhaps start with what you are trying to do??? Here's the deal - Alteryx can parse Alteryx datastreams into pandas because Alteryx knows the inherent format. If you have a path to a pdf and try to read that directly into a pandas dataframe in Python -> well that's on you - and won't work. You need to build these guardrails into your workflow whether in Alteryx or in Python.

ppatane
8 - Asteroid

Thank you for the information as I was able to get the files with their path by connecting 2 file browse tools to one text input with 2 columns.  

Labels
Top Solution Authors