community
cancel
Showing results for 
Search instead for 
Did you mean: 
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Unable to display your progress at this time. Please try again a little later, or contact an administrator if you continue to see this error.
Announcement | Get certified today - take the Alteryx Designer Core and Advanced exams on-demand now!

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.

Creative Director
Creative Director

This one has been updated with a solution.

Spoiler

16spoiler.png
Tara McCoy
Meteoroid

Spoiler #2

 

Here is another approach..

 

 

.Capture#16.JPG

Director, Customer Enablement
Director, Customer Enablement

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

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.

 

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.
Director, Customer Enablement
Director, Customer Enablement

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

Aurora
Aurora

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.

 

Alteryx Certified Partner

Thanks for that, @SeanAdams!

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