General Discussions

Discuss a wide range of topics! Questions about the Alteryx Platform should be directed to the appropriate Product discussion forum.

General Discussions has some can't miss conversations going on right now! From conversations about automation to sharing your favorite Alteryx memes, there's something for everyone. Make it part of your community routine!

Advent of Code 2020 - BaseA Style (Day 7)

Jean-Balteryx
13 - Pulsar

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

NicoleJohnson
14 - Magnetar
14 - Magnetar

Golly, I do love me an iterative macro! 

 

Spoiler
Though I'm wary of iterative macros in the world of AoC (#IntcodeNightmares), this one seemed innocent enough. For now. 😉

I've built my fair share of "parent-child" macros over the years (six degrees of Kevin Bacon, anyone?), so this was at least a familiar path. Parsed out the bag descriptions & quantities and then built simple macros for part 1 & 2 to find the inner-outer combos (or outer-inner combos). While the macros were similar, they do lookup data in different directions, so created a separate instance for each part.

Day7.JPG

For Part 1 macro, used an iterative process that found the parent of every inner bag (and then the parent of that parent in the next iteration).   

Day7_Macro1.JPG
For Part 2, swapped the join to find the Inner bags & quantities for each Outer bag, summarized, then called them "outer" for the next iteration, repeating the process.
Day7_Macro2.JPG

Cheers!

NJ

https://github.com/AlteryxNJ/AdventOfCode_2020

T_Willins
13 - Pulsar
13 - Pulsar

Modified my standard/iterative inception macro set that I used for building trial balances.  After finishing I see that I could have used a single standard/iterative macro set to do both a&b, but it's Sunday night and there is a drink and a dip in the hot tub waiting.

 

Spoiler
WorkflowWorkflow

 

7a Standard Macro7a Standard Macro7a Iterative Macro7a Iterative Macro

 

 

7b Standard Macro7b Standard Macro7b Iterative Macro7b Iterative Macro

 

 

Greg_Murray
12 - Quasar

Similar to @NicoleJohnson's solutions.

 

Spoiler
Greg_Murray_0-1607324013887.png

part 1 iterative macro

Greg_Murray_1-1607324064243.png

part 2 iterative macro

Greg_Murray_2-1607324146898.png

 

 

AkimasaKajitani
14 - Magnetar

Day 7!

 

I often fall into the trap of repetitive macros...

 

Spoiler
AkimasaKajitani_0-1607326578943.png

Part1 Macro :

AkimasaKajitani_1-1607326610619.png

Part1 Macro :

AkimasaKajitani_2-1607326637139.png

 

As anonymous user #1105310

PhilipMannering
14 - Magnetar
14 - Magnetar

My Solution

Spoiler
PhilipMannering_0-1607329104177.png

 

And my macros

Spoiler
PhilipMannering_1-1607329125328.pngPhilipMannering_2-1607329142784.png

 

peter_gb
8 - Asteroid

Day 7 | iterative macros always make my head hurt but got there...

Spoiler
7.png

jdunkerley79
16 - Nebula
16 - Nebula

My brain was not working well enough for iterative macros this morning...

 

Think mine is a little different to others but same general idea

 

Spoiler
jdunkerley79_0-1607330690471.png


Macro:

jdunkerley79_1-1607330714908.png

 

Flows on GitHub: https://github.com/jdunkerley/adventofcode

cgoodman3
12 - Quasar
12 - Quasar

Note to self - Must read the question. I forgot to swap the inner bag to be outer bags in the second part so wasted a lot of time doing that!

 

Spoiler
cgoodman3_0-1607334899670.png

Macro for part A - familiar heirarchy macro

cgoodman3_1-1607334965666.png

Macro for part B:

cgoodman3_2-1607335030020.png

 

Chris
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
dsmdavid
11 - Bolide

Similar to others'

Spoiler
Alteryx_Day_07.png

also, keeping track of the lineage...for no apparent good reason (yet, who knows what future days have in store for us...).

Spoiler
Alteryx_Day_07_lineage.png

https://github.com/dsmdavid/AdventCode2020