In this blog I'll be talking about day 4 of my project, during which I had to pivot towards creating my tables in Tableau Prep and then loading the data into Snowflake.

What were the issues?

SQL Functions not working as intended

The first thing that took time was trying to union the data, as I realized I needed to split a row and then pivot, and quickly realized that the SPLIT function in Snowflake wasn't giving me my intended output, instead making an array. Additionally, my research pointed me to functions like SPLIT_TO_TABLE, which Snowflake didn't recognize. In order to save time, I switched to cleaning within my Alteryx flow.

Data not matching up

While building my tables, I quickly realized that having two fact tables that didn't connect well (I expected them to connect on application number and overlap on drug name) was making my SQL queries confusing and complicated. This ate up a significant amount of time, with me eventually switching to building the tables within Tableau Prep at the advice of my coach.

Constraints too strict

I learned well loading the data that some constraints I thought were generous (i.e. varchar(100) )weren't generous enough, leading an error (see below) and my having to return to my DDL to change it.

Tableau Prep Tables

This is what the workflow looks like:

This work flow creates 12 tables. I found this method more simple than creating the tables in Snowflake.

Loading onto Snowflake

To load the data, I navigated to the side panel, ingestion, load into table, selected the relevant database and schema, selected the table I created earlier, and then configured the headers to match each other.

Next Steps

My next steps are to connect the tables to Tableau, create the relevant logical tables, create concepts sketches, and dashboards, of which I may have to down scope and make simple for the sake of time.