Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEAThe link to the solution for last challenge #36 is HERE.
Using raw XML files as input can present some interesting challenges. The challenge is that the data is nested into the records in a way that requires you to extract it through parsing steps, sometimes drilling many levels into the data (Root and child levels). Alteryx makes this easier to do using the XML Parsing tool. We will explore the process in this exercise.
Use Case: A company receives customer purchase and shipping data on a weekly level based on web and catalog purchases. The company would like to analyze their customers and produce a profile by market by SKU. The challenge is that the data feed contains XML that needs to be parsed in order effectively analyze the data.
Objective: The column called customer_OuterXML contains the data that needs to be parsed into 25 unique fields detailing the customer contact information for both the “Bill To” and “Ship To” attributes.
Note: As of 9/11/2019, the Start file and Solution files were edited. Based on when you complete this challenge, you may see that the solutions posted here may reference a dataset that was previously available. Posted solutions (as files) using the previous dataset have been replaced with the Alteryx Academy logo to acknowledge that user's contribution that we can no longer share publicly.
New to xml parsing. There's probably a simpler way to do it. Curious to see what everyone else comes up with.
I have seen this exercise before!
My solution was similar to @Naledi
Thank you for the exercise
Sean
Trying to to as little hard renaming as possible makes this a long workflow, and a great exploration of the XML parse tool.
My solution!
Turns out not all parsing tools are created equal, and I do NOT like XML parse as much as RegEx. But I managed... Very similar to other solutions, although kudos to @SeanAdams on the point about the dynamic rename, that is definitely a better long term/adaptable solution.