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

JSON Question

alexlyle
8 - Asteroid

I'm trying to import the attached JSON file into Alteryx. To use Python terms, the file was created as a series of dictionaries with identical layouts as opposed to a single dictionary with multiple entries. I'm trying to figure out a way to get Alteryx to read it but it stops after the first entry with:

 

Input Data (7) Error message: The document root must not be followed by other values. at character position: 3975. I can't figure out why. I've attached a sample of the data plus a screenshot of the input. The process flow only has the input tool thus far.

 

Anyone have any ideas?

6 REPLIES 6
mceleavey
17 - Castor
17 - Castor

Hi @alexlyle ,

 

The sample you've provided is blank. Can you try uploading again?



Bulien

alexlyle
8 - Asteroid

That is strange because I see both files attached and I downloaded both and they are populated. But, that could be unnecessary. Here is the JSON sample. It's Unicode UTF-8 encoded. The process flow in Alteryx only had the input tool.But, you can see what i mean by it being multiple dictionaries, to use Python parlance, in one file. That is throwing off Alteryx.

 

{"created_at": "Tue Aug 01 16:23:56 +0000 2017", "id": 892420643555336193, "id_str": "892420643555336193", "full_text": "This is Phineas. He's a mystical boy. Only ever appears in the hole of a donut. 13/10 https://t.co/MgUWQ76dJU", "truncated": false, "display_text_range": [0, 85], "entities": {"hashtags": [], "symbols": [], "user_mentions": [], "urls": [], "media": [{"id": 892420639486877696, "id_str": "892420639486877696", "indices": [86, 109], "media_url": "http://pbs.twimg.com/media/DGKD1-bXoAAIAUK.jpg", "media_url_https": "https://pbs.twimg.com/media/DGKD1-bXoAAIAUK.jpg", "url": "https://t.co/MgUWQ76dJU", "display_url": "pic.twitter.com/MgUWQ76dJU", "expanded_url": "https://twitter.com/dog_rates/status/892420643555336193/photo/1", "type": "photo", "sizes": {"large": {"w": 540, "h": 528, "resize": "fit"}, "thumb": {"w": 150, "h": 150, "resize": "crop"}, "small": {"w": 540, "h": 528, "resize": "fit"}, "medium": {"w": 540, "h": 528, "resize": "fit"}}}]}, "extended_entities": {"media": [{"id": 892420639486877696, "id_str": "892420639486877696", "indices": [86, 109], "media_url": "http://pbs.twimg.com/media/DGKD1-bXoAAIAUK.jpg", "media_url_https": "https://pbs.twimg.com/media/DGKD1-bXoAAIAUK.jpg", "url": "https://t.co/MgUWQ76dJU", "display_url": "pic.twitter.com/MgUWQ76dJU", "expanded_url": "https://twitter.com/dog_rates/status/892420643555336193/photo/1", "type": "photo", "sizes": {"large": {"w": 540, "h": 528, "resize": "fit"}, "thumb": {"w": 150, "h": 150, "resize": "crop"}, "small": {"w": 540, "h": 528, "resize": "fit"}, "medium": {"w": 540, "h": 528, "resize": "fit"}}}]}, "source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>", "in_reply_to_status_id": null, "in_reply_to_status_id_str": null, "in_reply_to_user_id": null, "in_reply_to_user_id_str": null, "in_reply_to_screen_name": null, "user": {"id": 4196983835, "id_str": "4196983835", "name": "WeRateDogs\u2122 (author)", "screen_name": "dog_rates", "location": "DM YOUR DOGS, WE WILL RATE", "description": "#1 Source for Professional Dog Ratings | STORE: @ShopWeRateDogs | IG, FB & SC: WeRateDogs MOBILE APP: @GoodDogsGame | Business: dogratingtwitter@gmail.com", "url": "https://t.co/N7sNNHAEXS", "entities": {"url": {"urls": [{"url": "https://t.co/N7sNNHAEXS", "expanded_url": "http://weratedogs.com", "display_url": "weratedogs.com", "indices": [0, 23]}]}, "description": {"urls": []}}, "protected": false, "followers_count": 3200889, "friends_count": 104, "listed_count": 2784, "created_at": "Sun Nov 15 21:41:29 +0000 2015", "favourites_count": 114031, "utc_offset": null, "time_zone": null, "geo_enabled": true, "verified": true, "statuses_count": 5288, "lang": "en", "contributors_enabled": false, "is_translator": false, "is_translation_enabled": false, "profile_background_color": "000000", "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png", "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png", "profile_background_tile": false, "profile_image_url": "http://pbs.twimg.com/profile_images/861415328504569856/R2xOOfwe_normal.jpg", "profile_image_url_https": "https://pbs.twimg.com/profile_images/861415328504569856/R2xOOfwe_normal.jpg", "profile_banner_url": "https://pbs.twimg.com/profile_banners/4196983835/1501129017", "profile_link_color": "F5ABB5", "profile_sidebar_border_color": "000000", "profile_sidebar_fill_color": "000000", "profile_text_color": "000000", "profile_use_background_image": false, "has_extended_profile": true, "default_profile": false, "default_profile_image": false, "following": true, "follow_request_sent": false, "notifications": false, "translator_type": "none"}, "geo": null, "coordinates": null, "place": null, "contributors": null, "is_quote_status": false, "retweet_count": 8853, "favorite_count": 39467, "favorited": false, "retweeted": false, "possibly_sensitive": false, "possibly_sensitive_appealable": false, "lang": "en"}
{"created_at": "Tue Aug 01 00:17:27 +0000 2017", "id": 892177421306343426, "id_str": "892177421306343426", "full_text": "This is Tilly. She's just checking pup on you. Hopes you're doing ok. If not, she's available for pats, snugs, boops, the whole bit. 13/10 https://t.co/0Xxu71qeIV", "truncated": false, "display_text_range": [0, 138], "entities": {"hashtags": [], "symbols": [], "user_mentions": [], "urls": [], "media": [{"id": 892177413194625024, "id_str": "892177413194625024", "indices": [139, 162], "media_url": "http://pbs.twimg.com/media/DGGmoV4XsAAUL6n.jpg", "media_url_https": "https://pbs.twimg.com/media/DGGmoV4XsAAUL6n.jpg", "url": "https://t.co/0Xxu71qeIV", "display_url": "pic.twitter.com/0Xxu71qeIV", "expanded_url": "https://twitter.com/dog_rates/status/892177421306343426/photo/1", "type": "photo", "sizes": {"large": {"w": 1407, "h": 1600, "resize": "fit"}, "thumb": {"w": 150, "h": 150, "resize": "crop"}, "small": {"w": 598, "h": 680, "resize": "fit"}, "medium": {"w": 1055, "h": 1200, "resize": "fit"}}}]}, "extended_entities": {"media": [{"id": 892177413194625024, "id_str": "892177413194625024", "indices": [139, 162], "media_url": "http://pbs.twimg.com/media/DGGmoV4XsAAUL6n.jpg", "media_url_https": "https://pbs.twimg.com/media/DGGmoV4XsAAUL6n.jpg", "url": "https://t.co/0Xxu71qeIV", "display_url": "pic.twitter.com/0Xxu71qeIV", "expanded_url": "https://twitter.com/dog_rates/status/892177421306343426/photo/1", "type": "photo", "sizes": {"large": {"w": 1407, "h": 1600, "resize": "fit"}, "thumb": {"w": 150, "h": 150, "resize": "crop"}, "small": {"w": 598, "h": 680, "resize": "fit"}, "medium": {"w": 1055, "h": 1200, "resize": "fit"}}}]}, "source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>", "in_reply_to_status_id": null, "in_reply_to_status_id_str": null, "in_reply_to_user_id": null, "in_reply_to_user_id_str": null, "in_reply_to_screen_name": null, "user": {"id": 4196983835, "id_str": "4196983835", "name": "WeRateDogs\u2122 (author)", "screen_name": "dog_rates", "location": "DM YOUR DOGS, WE WILL RATE", "description": "#1 Source for Professional Dog Ratings | STORE: @ShopWeRateDogs | IG, FB & SC: WeRateDogs MOBILE APP: @GoodDogsGame | Business: dogratingtwitter@gmail.com", "url": "https://t.co/N7sNNHAEXS", "entities": {"url": {"urls": [{"url": "https://t.co/N7sNNHAEXS", "expanded_url": "http://weratedogs.com", "display_url": "weratedogs.com", "indices": [0, 23]}]}, "description": {"urls": []}}, "protected": false, "followers_count": 3200889, "friends_count": 104, "listed_count": 2784, "created_at": "Sun Nov 15 21:41:29 +0000 2015", "favourites_count": 114031, "utc_offset": null, "time_zone": null, "geo_enabled": true, "verified": true, "statuses_count": 5288, "lang": "en", "contributors_enabled": false, "is_translator": false, "is_translation_enabled": false, "profile_background_color": "000000", "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png", "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png", "profile_background_tile": false, "profile_image_url": "http://pbs.twimg.com/profile_images/861415328504569856/R2xOOfwe_normal.jpg", "profile_image_url_https": "https://pbs.twimg.com/profile_images/861415328504569856/R2xOOfwe_normal.jpg", "profile_banner_url": "https://pbs.twimg.com/profile_banners/4196983835/1501129017", "profile_link_color": "F5ABB5", "profile_sidebar_border_color": "000000", "profile_sidebar_fill_color": "000000", "profile_text_color": "000000", "profile_use_background_image": false, "has_extended_profile": true, "default_profile": false, "default_profile_image": false, "following": true, "follow_request_sent": false, "notifications": false, "translator_type": "none"}, "geo": null, "coordinates": null, "place": null, "contributors": null, "is_quote_status": false, "retweet_count": 6514, "favorite_count": 33819, "favorited": false, "retweeted": false, "possibly_sensitive": false, "possibly_sensitive_appealable": false, "lang": "en"}

alexlyle
8 - Asteroid

let me know if these show up

mceleavey
17 - Castor
17 - Castor

Hi @alexlyle ,

 

I loaded this in as a .csv with \0 delimiter as follows: 

mceleavey_0-1585922095975.png

This give me the following:

mceleavey_1-1585922144685.png

I can then parse that field into the JSON Parse Tool:

mceleavey_1-1585922319784.png

 

 

mceleavey_0-1585922307006.png

 

 

That seems to be working for me. I Let me know if that works.

 

M.

 

 

 



Bulien

alexlyle
8 - Asteroid

Thanks!

mceleavey
17 - Castor
17 - Castor

Glad I could help.

 

M.



Bulien

Labels