Analytic App/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
Hi SME,
I have a workflow that's connected to a Python tool using Alteryx.read("#1"). When I converted the workflow into Analytical App, I couldn't get the same reading to work. Is there a way that I can import everything like Alteryx.read("#1") in an Analytic App? Or do I have to use Alteryx.read("#1").iloc[i] where i is in a loop? I do have a problem figuring out what i is though since it's depended on user's input.
Thanks,
kwl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey - there have been a slew of posts about this over the past few months - the short is - do not have an Analytic App modify code inside of a python tool directly. Have the analytic app modify a text input (or other tool) outside of the Python tool - and then bring it into the Python tool. I also have no idea what Alteryx.read("#1").iloc[i] would do. Alteryx.read("#1") is AFAIK a set command to bring in the entire datastream coming in at #1. I do not believe you can truncate this in your read call - you can however modify this outside of the Python tool.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@knnwndlm set the mode to 'Production'. I saw this in another python related post for apps: https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Python-error-in-chained-Analyt...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@BS_THE_ANALYST How long have you been using it - and how many times? I'd recommend running some UAT on this to see if it always updates the code as you'd expect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hey @apathetichell. I'll have a little dive into it now. I'd not normally attack the Python tool directly with interface tools. The action tool does seem to imply that we can mess with it though. I can't speak about the reliability in doing so!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Checking it with Debug:
Value has been changed in the notebook:
Running Debug workflow:
Running as Analytic App:
Looks to be a success.
Things to note. It was important to keep the Python Tool on 'Interactive' not 'Production'. Production seemed to not allow the value to update.
I'm off for today! Maybe that's of some use to you guys. New workflow attached for UAT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@knnwndlm it's pretty fiddly. I think the suggestion @apathetichell is better suited here, I'm not an expert with the Python tool by any means. It's cool to see that you can mess with it though, and some level of success can be found. In terms of reliability, that's for you to decide: @knnwndlm
All the best,
BS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@BS_THE_ANALYST my experience is that it will work approximately 75% of the time. The python venv is mildly unstable so if yo have other stuff going on - it can mess up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you @BS_THE_ANALYST and @apathetichell !
It turns out that the issue was related to having a Container inside a Control Container. Apparently, that's not allowed. Also, you can't run in Debug Mode with the Control Container.
