In this blog I'll be talking about how the second day of my project went, discussing challenges along the way, and speaking about how I'm currently going through building my schema.

What I Did Today

Today, I finalized a second Alteryx flow, as I decided to use both shortage data and overall drug information data. This took a significant chunk of time as it required a lot of JSON parse tools. Additionally, at some point I realized that I had an extremely large amount of data, and was informed to avoid overloading our Snowflake instance, so I put filters into my workflow to limit the time period being worked in. I'm also experiencing significant load time which has been limiting my work.

See below for what both of the workflows look like now. I'm making it so that I only have data from after 2024.

I also did some cleaning in Tableau Prep, a tool I choose because I was using Tableau prep for data exploration during my schema building. However, now that I'm in Tableau Prep, I'm realizing that a significant amount of rows from the FDA Drugs table aren't making on application number with the Shortages table, so I'm currently trying to understand why and think about if there's any other way I want to connect the two datasets. One theory is that only the drugs that don't have a shortage but are in the shortage dataset are matching, so I'm considering unioning the data that doesn't match.

Building the Schema

I began building my schema while exploring the data, a process I'm still completing. One challenge that I faced was that there were some fields in the data that weren't in the provided data dictionary, so I took time to research them in other to ensure that I understood where everything belongs.

So far, I know that I want a dimension table for each pharmacy class type. Currently, only some of the types already have an separate field for an identifier, so I plan on keeping those and creating an ID for ones that don't (see below).

This will optimize storage as instead of having strings in the fact table, which take up more space, there will be IDs as integers. The fact table will connect to these dimension tables using the IDs, allowing them to join logically in Tableau.

Also, I know that I want a table for Application Information (information about what was submitted to the FDA for approval), Drug Information, and a table specifically for Drug Shortage Information.

Next Steps

Even after filtering the time period in my workflow, I still have a large amount of rows so I plan on looking into ways to sample the data before or during ingestion. I also will complete look into connecting my two datasets and completing my schema before I build tables, and finally start building concept sketches.