Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2020 - BaseA Style (Day 4)

Jean-Balteryx
16 - Nebula
16 - Nebula

Discussion thread for day 4 of the Advent of Code : https://adventofcode.com/2020/day/4

18 REPLIES 18
Steph_Maddrell
8 - Asteroid

I went for some validation within the regex and some in the filter - see the giant custom formula in the filter tool at the end! This one definitely helped my regex skills.

 

Spoiler
stephM_0-1607090903110.png

 

 

NicoleJohnson
ACE Emeritus
ACE Emeritus

Definitely well suited to Alteryx - always love a good parsing exercise, especially if it includes a little RegEx! 

 

Spoiler
Solved this two ways - the first way for speed of star gathering, of course... the second way, because the whole time I was doing it the first way I was thinking "this would be a fun excuse to use the Dynamic Formula CReW Macro tool that I never can find good opportunities to use..." - and I was right!

Method 1: An exercise in the Favorites tools.

Day4_1.JPG

  

Method 2: Dynamic Formula for the 8-tool win! (Not sure that actually counts as 8 tools since Dynamic Formula is a macro... but whatever.)

Day4_Alternate.JPG

Cheers!

NJ

patrick_digan
17 - Castor
17 - Castor

My regex wasn't pretty, but I did get the right answer the first time (so I got lucky)

Spoiler
patrick_digan_0-1607111176436.png

 

T_Willins
14 - Magnetar
14 - Magnetar

Day 4

 

Spoiler
AOC 20.4.jpg

 

joshbennett
11 - Bolide
11 - Bolide

I really enjoyed this one!

 

Part 1 and Part 2:

Spoiler
joshbennett_0-1607227231604.png

 

 

Part 1:

Spoiler
2020_day4part1.png

 

Part 2:

Spoiler
2020_day4part2.png
OllieClarke
15 - Aurora
15 - Aurora

And here's day 4

Spoiler
Probs not best practice to write a single IFTHEN filled with RegEx to get the valid/invalidDay 4.PNG
estherb47
15 - Aurora
15 - Aurora

Somehow I lost my workflow for this one. Posting this as proof that I got both stars

 

EstherB47_0-1607308558566.png

 


Edited. Rebuilt the workflow the same way I did the last time. Too many tools, and runs in only 0.6 seconds.

 

Shrink the data set filter by filter so everything runs faster (lessons from @MarqueeCrew and @Deanna via InspireEU in 2019!)

Spoiler
EstherB47_0-1607310641223.png

 

 

 

 

peter_gb
10 - Fireball

Day 4 | Remembered regex

Spoiler
4.png

KaneG
Alteryx Alumni (Retired)

I've just caught up with the first 4 days. I'm not sure if it's because of my role (Instructional in nature) or not, but I always tend to use more tools if it makes it clearer.

 

I used a text input with REGEX validation criteria, same as I would if I was validating all the fields in an incoming file for instance. 

 

Spoiler
Part 1:
KaneG_0-1607413188186.png



Part 2:

KaneG_1-1607413271814.png

 

Text Input for Validation:

KaneG_2-1607413337878.png

 

 

Labels
Top Solution Authors