Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

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 #16: Parsing Out the New-line Character

GeneR
Alteryx Alumni (Retired)

Here is a new challenge for this week. The link to the solution for last week’s challenge is HERE.

The use case:

We received some text data and that includes an embedded line-feed character.


The objective is to remove the new line character, convert the date-time string to a date-time formatted field and then do some renaming per the sample output.

Good luck, I look forward to your feedback.

TaraM
Alteryx Alumni (Retired)

This one has been updated with a solution.

Spoiler

16spoiler.png
Tara McCoy
kconner
6 - Meteoroid

Spoiler #2

 

Here is another approach..

 

 

.Capture#16.JPG

JoeM
Alteryx Alumni (Retired)

@kconner - Nice solution! If you'd ever like the share the workflow file, the weekly challenge can now have files attached in responses!

mceleavey
17 - Castor
17 - Castor
Spoiler

I realise I've done this following the introduction of the data cleansing tool, but I think that's worth showcasing, so:

 

Solution.PNG

 

I simply fed the fields into the "Data Cleansing" tool, removed line breaks, then converted the date using the "Date Parse" tool. Then I simply renamed the columns appropriately and dropped the old date field.

 



Bulien

MarqueeCrew
20 - Arcturus
20 - Arcturus

@JoeM

 

Friday is here

 

m

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
JoeM
Alteryx Alumni (Retired)

@MarqueeCrew - It's a good day to make it to "base camp". One more!

SeanAdams
17 - Castor
17 - Castor

Original solution that I did was the same as provided - but when I looked at the answers provided by @MarqueeCrew and @mceleavey, wanted to add them as well to experiment and try them out, so all 3 are included.

 

Note: Only the solution from @mceleavey deals with the line-break gracefully and doesn't smash the words together at the end of the first line, and beginning of the next.

 

mceleavey
17 - Castor
17 - Castor

Thanks for that, @SeanAdams!



Bulien

NicoleJohnson
ACE Emeritus
ACE Emeritus

Solution posted.

 

PS. I noticed in the solution output in the "Mary had a little lamb" poem that the space between "lamb" and "whose" was removed, I'm assuming due to leaving the box checked in Data Cleansing to remove white space. In this case, based on the poem output, I decided to leave that box unchecked so that the poem reads correctly with the space between the words that were initially separated by the newline character.

 

UPDATED: Aaaaaand since i didn't read any of the prior comments before posting my solution, I see now that @mceleavey & @SeanAdams already figured that out. :) Soooo I'm a bit late to the party. But at least I got there. And I usually bring cookies..

 

Spoiler
WeeklyChallenge16.JPG