Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #114: Think Like a CSE...Remove the extra delimiter from the JSON output

kennydso
5 - Atom
 
Inactive User
Not applicable
 
JimPer
5 - Atom

Here it is !

 

Spoiler
weekly challenge.png

 

 

ckings
7 - Meteor
Spoiler
Change the output tool to .CSV and the delimiter to no delimiter
wk114.PNG
NicoleJohnson
ACE Emeritus
ACE Emeritus

My solution!

 

Spoiler
Same as the others, I eventually found some info on the site about the extra characters in JSON output resolving if you output to CSV... however, this might be a stupid question, but couldn't you avoid this whole thing by just outputting your original data direct to JSON, without the Transpose/formulas/JSON Build tools in between? Looks largely similar in output, but as I'm not super familiar with JSON, I'm unclear whether there is an advantage/purpose for having all records combined (as in the first example) or if a separate record for each would be acceptable. Any insight from the JSON experts out there on why you would do this one way vs. the other would be great!! :)

WeeklyChallenge114.JPG

Cheers,

NJ

ggruccio
ACE Emeritus
ACE Emeritus

This one had me stumped for a bit!

Spoiler
Not really much of a spoiler, but I had to search community for an approach to this.  I knew there had to be something related to the output tool.  Found an article that addressed this about 3 years ago.  Just another example of how great the Alteryx community is as a resource and how we may not know everything ourselves, but can solve with collaboration!
david_fetters
11 - Bolide
 
kat
12 - Quasar
Spoiler
Challenge #114.PNG
DiganP
Alteryx Alumni (Retired)

@NicoleJohnson 

 

Spoiler

 

If you compare the 2 outputs:

NotworkingNotworkingNotworking1Notworking1

The 'Notworking' defines a Record object with an array of 2 while the 'Notworking1' does not have the Record object at all. Inside the object, we can declare any number of properties using "name" : "value" paring, separated by commas. In the 'Notworking example' if I wanted to access the information, I would just call the record object while in the Notworking example, it would be harder for me to call the object as there isn't one. 

 

 

Digan
Alteryx
petgrap
8 - Asteroid

On the designer core exam that I recently passed, there was a question on \0 delimiter. Not familiar with it, I ask during a webex training this week to demo the concept. I did not see the delimiter option with the JSON output (no experience with JSON).

Tried to use it in the formula did not work. So I turned to the community topic to solve the challenge and learned a new trick of using CSV output but saving the file with a different extension.

 

I love these challenges. I am always learning something new which eventually becomes useful!!!