Weekly Challenge

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

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.

Challenge #16: Parsing Out the New-line Character

Highlighted
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.

Highlighted
Alteryx
Alteryx

This one has been updated with a solution.

Spoiler

16spoiler.png
Tara McCoy
Highlighted
6 - Meteoroid

Spoiler #2

 

Here is another approach..

 

 

.Capture#16.JPG

Highlighted
Alteryx Community Team
Alteryx Community Team

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

Highlighted
Alteryx Certified Partner
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.

 

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@JoeM

 

Friday is here

 

m

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Highlighted
Alteryx Community Team
Alteryx Community Team

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

Highlighted
16 - Nebula
16 - Nebula

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.

 

Highlighted
Alteryx Certified Partner

Thanks for that, @SeanAdams!

Highlighted
14 - Magnetar
14 - Magnetar

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