SOLVED
JSON not found
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
patricklshan
6 - Meteoroid
‎04-13-2022
05:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
My workflows can't find the JSON files. How can this be fixed?
Solved! Go to Solution.
Labels:
- Labels:
- Developer
2 REPLIES 2
gabrielvilella
14 - Magnetar
‎04-14-2022
07:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You need to add the JSON to a new column on the existing pandas dataframe then write it to an Alteryx anchor.
from ayx import Package
from ayx import Alteryx
try:
import requests
except:
Alteryx.installPackage('requests --user')
df = Alteryx.read('#1')
url = df.iloc[0,0]
page = requests.get(url)
df.json = page.text
df['json'] = df.json
Alteryx.write(df,1)
‎04-14-2022
01:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you very much
