Connect 2 File Browse tool to a Python tool
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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("#3")
Solved! Go to Solution.
- Labels:
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Can you just connect then to two Input Data tools that connect into the Python tool?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
If I do that, can the files in the input tools be any file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@ppatane it can be most structured data sets. Worth testing a few file types as well
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
