This is a dbt project managed by uv package manager which is already connected to Snowflake.

### Current state

I have a Snowflake database called CRM_ECOMMERCE_DATA which includes 174 Shopify store schemas, these we will call "CRM Stores".  There are also 10 schemas in a database called PROD_SHOPIFY_SCHEMAS, we will call these "Fansifter Stores".  

All of these stores were synced to Snowflake by Fivetran via its Shopify Connector (https://fivetran.com/docs/connectors/applications/shopify).

These stores are summarized in the shopify_stores_master.sql that was already created in this project located here: models/shopify_stores_master.sql

For the CRM Stores, each lives in a separate schema, with the schema name starting with the `SHOPIFY_` prefix. The tables available in the schemas are managed by Fivetran and should be mostly the same, but can vary in some cases.

For the Fansifter Stores schemas, each lives in a separate schema with a different naming convention but we can ignore those with "TEST_LABEL" in the schema name.

### Task
I want to consolidate the data from all schemas into a series of unified tables within my new 'global schema'.
Specifically, I want to combine the data from these tables in each schema:

"COLLECTION",
"COLLECTION_PRODUCT",
"CUSTOMER",
"CUSTOMER_ADDRESS",
"ORDER",
"ORDER_LINE",
"ORDER_LINE_REFUND",
"PRODUCT",
"PRODUCT_VARIANT",
"REFUND",
"SHOP",
"TRANSACTION",
"ABANDONED_CHECKOUT",
"ORDER_DISCOUNT_CODE",
"PRODUCT_TAG",
“ORDER_URL_TAG”,
”FULFILLMENT”,
”FULFILLMENT_EVENT”,
”FULFILLMENT_ORDER”,
"FULLFILLMENT_ORDER_FULLFILLMENT_HOLD",
”FULFILLMENT_ORDER_LINE”,
”FULFILLMENT_ORDER_LINE_ITEM”,
”INVENTORY_ITEM”,
”INVENTORY_LEVEL”,
”INVENTORY_QUANTITY”,
	
I know that Fivetran has their own fivetran/fivetran_utils dbt package (https://hub.getdbt.com/fivetran/fivetran_utils/latest/) that has a helpful `union_relations` macro that should help us consolidate the data for a given Shopify entity across all dbt schemas. It should be able to recognize when new schemas appear in PROD_SHOPIFY_SCHEMAS and add them to the process.

Please create a staging dbt model for each of the above tables that combines records from all schemas.

For the first 5 columns of each table should be sourced from shopify_stores_master (matching on STORE_SCHEMA) and should be these fields:
STORE_ID,
STORE_SCHEMA,
STORE_NAME,
ARTIST,
VENDOR_NAME,
VENDOR_ID

The last column in each table should include a fully qualified identifier of the schema from which the data is sourced.

Let's start by creating the staging dbt model for the PRODUCT table.  For testing purposes, let's plan to create this table in Snowflake in the same location where we put BF_SHOPIFY_STORES_MASTER and give it an alias name of BF_SHOPIFY_PRODUCT.