Managed to figure this out. No worries! Managed to figure it out.
Took some adjustments from this article which really set up the macro, but managed it: https://serge-g.medium.com/dynamic-sql-pivots-with-dbt-dea16d7b9b63|https://serge-g.medium.com/dynamic-sql-pivots-with-dbt-dea16d7b9b63
Note: @alexnleyva97 originally posted this reply in Slack. It might not have transferred perfectly.