# Data Lineage & Dependencies

Generated on: 2026-01-16 12:49:47

This document shows the relationships and dependencies between models, views, and data sources.

## Overview

- **Total Models:** 8
- **Total Views:** 41
- **Derived Views:** 3
- **Direct Table Views:** 38

## Model Dependencies

### Models and Their Views

#### Analytics_Use_Case_Model
- **Includes:** 12 views
- **Views:**
  - `int_dbt_prod_summary_streams`
  - `orch_app_ar_releases`
  - `facts_prod_dim_release`
  - `facts_prod_dim_track`
  - `orch_app_ar_track`
  - `facts_prod_dim_artist`
  - `orch_app_ar_genre`
  - `facts_prod_dim_label`
  - `orch_app_ar_country`
  - `orch_app_ar_vendor`
  - `facts_prod_dim_country`
  - `facts_prod_dim_playlist`

#### Westcott_Schedules
- **Includes:** 2 views
- **Views:**
  - `Westcott/int_dbt_prod_westcott_daily_schedules`
  - `Westcott/int_dbt_prod_westcott_schedules_cumulative_units`

#### alta_webhook_schedules
- **Includes:** 30 views
- **Views:**
  - `int_dbt_prod_alta_tiktok`
  - `facts_prod_staging_raw_insta_reels_views`
  - `/int_dbt_prod_alta_spotify`
  - `int_dbt_prod_stg_dim_playlist_spotify`
  - `facts_prod_dim_label`
  - `facts_prod_dim_country`
  - `facts_prod_dim_release`
  - `facts_prod_dim_track`
  - `facts_prod_dim_artist`
  - `orch_app_ar_releases`
  - `orch_app_ar_country`
  - `orch_app_ar_genre`
  - `int_dbt_prod_awal_tier_groups`
  - `orch_app_ar_vendor`
  - `orch_app_ar_owner`
  - `orch_app_prod_ddex_ingester_upc_remap`
  - `orch_app_ar_orchadmin_users`
  - `orch_app_ar_subaccount`
  - `int_dbt_prod_spotify_track_audio_features`
  - `int_dbt_prod_playlist_return_rate_last_6_month_avg`
  - `int_dbt_prod_spotify_playlist_downstream_impact_6_month_avg`
  - `int_dbt_prod_spotify_playlist_post_discovery_streaming_6_month_avg`
  - `playlist_metrics/spotify_playlist_lean_fwd_lean_back_categorization`
  - `dt_mising_upc_track_mapping`
  - `orch_app_ar_track`
  - `metadata_simplified`
  - `int_dbt_prod_product_manager_mapping_union`
  - `orch_app_ar_subaccount`
  - `orch_app_ar_orchadmin_users`
  - `orch_app_ar_artist_info`

#### black17_streams
- **Includes:** 25 views
- **Views:**
  - `Black17/int_dbt_prod_black17_summary_streams`
  - `/facts_prod_dim_playlist`
  - `/facts_prod_dim_label`
  - `Facts/facts_prod_dim_country`
  - `/facts_prod_dim_release`
  - `/facts_prod_dim_track`
  - `/facts_prod_dim_artist`
  - `/orch_app_ar_releases`
  - `/orch_app_ar_country`
  - `/orch_app_ar_genre`
  - `/metadata_simplified`
  - `/int_dbt_prod_awal_tier_groups`
  - `/orch_app_ar_vendor`
  - `/orch_app_ar_subaccount`
  - `/orch_app_ar_orchadmin_users`
  - `orch_app_ar_release_subgenre`
  - `orch_app_ar_subgenre`
  - `orch_app_ar_product_type`
  - `orch_app_ar_mkt_priority`
  - `dt_flatten_marketing_info`
  - `dt_flatten_country_region`
  - `/orch_app_ar_track`
  - `orch_app_ar_language`
  - `/int_dbt_prod_product_manager_mapping_union`
  - `int_prod_vw_deleted_releases.view`

#### black17_tiktok_creations
- **Includes:** 3 views
- **Views:**
  - `Black17/int_dbt_prod_black17_tiktok`
  - `/metadata_simplified`
  - `/orch_app_ar_releases`

#### communion_s3_data
- **Includes:** 2 views
- **Views:**
  - `Communion/*`
  - `Facts/facts_prod_dim_country`

#### glassnote_data_delivery
- **Includes:** 2 views
- **Views:**
  - `Glassnote/weekly_glassnote_spotify_raw`
  - `test`

#### saaregama_s3_data
- **Includes:** 1 views
- **Views:**
  - `Saaregama/*`

## View Dependencies

### Views by Data Source

#### Direct Database Tables
Views that directly reference database tables:

**"DBT_PROD"."COMMUNION_AMAZON_DAILY_DATA"**
- Used by 1 views: `int_dbt_prod_communion_amazon_daily_data`


**"DBT_PROD"."COMMUNION_APPLE_DAILY_DATA"**
- Used by 1 views: `int_dbt_prod_communion_apple_daily_data`


**"DBT_PROD"."COMMUNION_INSTAGRAM_CREATIONS_SOCIALS"**
- Used by 1 views: `int_dbt_prod_communion_instagram_creations_socials`


**"DBT_PROD"."COMMUNION_INSTAGRAM_VIEWS_SOCIALS"**
- Used by 1 views: `int_dbt_prod_communion_instagram_views_socials`


**"DBT_PROD"."COMMUNION_SPOTIFY_DAILY_DATA"**
- Used by 1 views: `int_dbt_prod_communion_spotify_daily_data`


**"DBT_PROD"."COMMUNION_TIKTOK_SOCIALS"**
- Used by 1 views: `int_dbt_prod_communion_tiktok_socials`


**"DBT_PROD"."COMMUNION_YOUTUBE_SOCIALS"**
- Used by 1 views: `int_dbt_prod_communion_youtube_socials`


**"DBT_PROD"."SAAREGAMA_AMAZON_DAILY_DATA"**
- Used by 1 views: `int_dbt_prod_saaregama_amazon_daily_data`


**"DBT_PROD"."SAAREGAMA_REVENUE_DATA"**
- Used by 1 views: `int_dbt_prod_saaregama_revenue_data`


**"DBT_PROD"."SAAREGAMA_SPOTIFY_DAILY_DATA"**
- Used by 1 views: `int_dbt_prod_saaregama_spotify_daily_data`


**"DBT_PROD"."SAREGAMA_APPLE_DAILY_DATA"**
- Used by 1 views: `int_dbt_prod_saregama_apple_daily_data`


**"DBT_PROD"."WEEKLY_GLASSNOTE_SPOTIFY_RAW"**
- Used by 1 views: `weekly_glassnote_spotify_raw`


**DBT_PROD.ALTA_DAILY_DATA_DSP_LEVEL**
- Used by 1 views: `int_dbt_prod_summary_streams`


**DBT_PROD.ALTA_SPOTIFY_MODEL**
- Used by 1 views: `int_dbt_prod_alta_spotify`


**DBT_PROD.ALTA_TIKTOK**
- Used by 1 views: `int_dbt_prod_alta_tiktok`


**DBT_PROD.AWAL_TIER_GROUPS**
- Used by 1 views: `int_dbt_prod_awal_tier_groups`


**DBT_PROD.STG_DIM_PLAYLIST_SPOTIFY**
- Used by 1 views: `int_dbt_prod_stg_dim_playlist_spotify`


**PROD.STAGING_RAW_INSTA_REELS_VIEWS**
- Used by 1 views: `facts_prod_staging_raw_insta_reels_views`


**PROD_DDEX_INGESTER_DDEX_INGESTER.UPC_REMAP**
- Used by 1 views: `orch_app_prod_ddex_ingester_upc_remap`


**art_relations_prod_art_relations.artist_info**
- Used by 1 views: `orch_app_ar_artist_info`


**art_relations_prod_art_relations.country**
- Used by 1 views: `orch_app_ar_country`


**art_relations_prod_art_relations.genre**
- Used by 1 views: `orch_app_ar_genre`


**art_relations_prod_art_relations.orchadmin_users**
- Used by 1 views: `orch_app_ar_orchadmin_users`


**art_relations_prod_art_relations.releases**
- Used by 1 views: `orch_app_ar_releases`


**art_relations_prod_art_relations.subaccount**
- Used by 1 views: `orch_app_ar_subaccount`


**dbt_prod.artist_services_pm_union**
- Used by 1 views: `int_dbt_prod_product_manager_mapping_union`


**dbt_prod.black17_summary_streams**
- Used by 1 views: `int_dbt_prod_black17_summary_streams`


**dbt_prod.black17_tiktok**
- Used by 1 views: `int_dbt_prod_black17_tiktok`


**dbt_prod.orch_app_ar_track_track_physical_joined**
- Used by 1 views: `orch_app_ar_track`


**dbt_prod.westcott_daily_schedules**
- Used by 1 views: `int_dbt_prod_westcott_daily_schedules`


**dbt_prod.westcott_schedules_cumulative_units**
- Used by 1 views: `int_dbt_prod_westcott_schedules_cumulative_units`


**prod.dim_artist**
- Used by 1 views: `facts_prod_dim_artist`


**prod.dim_country**
- Used by 1 views: `facts_prod_dim_country`


**prod.dim_label**
- Used by 1 views: `facts_prod_dim_label`


**prod.dim_playlist**
- Used by 1 views: `facts_prod_dim_playlist`


**prod.dim_release**
- Used by 1 views: `facts_prod_dim_release`


**prod.dim_track**
- Used by 1 views: `facts_prod_dim_track`


**prod.vw_dim_abacus_ar_vendor**
- Used by 1 views: `orch_app_ar_vendor`


#### Derived Tables
Views with custom SQL (complex transformations):

Total: 3 views

| View | Lines of Code | Source Tables |
|------|---------------|---------------|
| `metadata_simplified` | 190 |  Dbt_Prod.Metadata_Simplified, Intelligence.Dbt_Prod |
| `test` | 44 | Custom SQL |
| `dt_mising_upc_track_mapping` | 32 |  Art_Relations_Prod_Art_Relations.Track, Orchar... |


## Explore Relationships

### Explores and Their Dependencies

#### Model: Analytics_Use_Case_Model

**int_dbt_prod_summary_streams** (Alta Summary Streams Model)
- Base View: `int_dbt_prod_summary_streams`
- View Type: Direct Table
- Data Source: INTELLIGENCE.DBT_PROD.ALTA_DAILY_DATA_DSP_LEVEL

#### Model: Westcott_Schedules

**int_dbt_prod_westcott_daily_schedules** (Westcott Daily Schedules)
- Base View: `int_dbt_prod_westcott_daily_schedules`
- View Type: Direct Table
- Data Source: intelligence.dbt_prod.westcott_daily_schedules

**int_dbt_prod_westcott_schedules_cumulative_units** (Westcott Cumulative Units)
- Base View: `int_dbt_prod_westcott_schedules_cumulative_units`
- View Type: Direct Table
- Data Source: intelligence.dbt_prod.westcott_schedules_cumulative_units

#### Model: alta_webhook_schedules

**int_dbt_prod_alta_tiktok** (Orchard Metadata)
- Base View: `int_dbt_prod_alta_tiktok`
- View Type: Direct Table
- Data Source: INTELLIGENCE.DBT_PROD.ALTA_TIKTOK

**facts_prod_staging_raw_insta_reels_views** (Alta Instagram Data)
- Base View: `facts_prod_staging_raw_insta_reels_views`
- View Type: Direct Table
- Data Source: FACTS.PROD.STAGING_RAW_INSTA_REELS_VIEWS

**int_dbt_prod_alta_spotify** (Alta Spotify Data)
- Base View: `int_dbt_prod_alta_spotify`
- View Type: Direct Table
- Data Source: INTELLIGENCE.DBT_PROD.ALTA_SPOTIFY_MODEL

#### Model: black17_streams

**int_dbt_prod_black17_summary_streams** (Summary Streams Model)
- Base View: `int_dbt_prod_black17_summary_streams`
- View Type: Direct Table
- Data Source: intelligence.dbt_prod.black17_summary_streams

**metadata_simplified** (metadata_simplified)
- Base View: `metadata_simplified`
- View Type: Derived Table
- Data Source: Derived from: Dbt_Prod.Metadata_Simplified, Intelligence.Dbt_Prod

#### Model: black17_tiktok_creations

**facts_prod_staging_raw_tiktok_trends_topsong** (Top Songs)
- Base View: `facts_prod_staging_raw_tiktok_trends_topsong`
- View Type: Direct Table
- Data Source: Unknown

**facts_prod_staging_raw_tiktok_trends_tophashtag** (Top Hashtags)
- Base View: `facts_prod_staging_raw_tiktok_trends_tophashtag`
- View Type: Direct Table
- Data Source: Unknown

**int_dbt_prod_black17_tiktok** (Orchard Metadata)
- Base View: `int_dbt_prod_black17_tiktok`
- View Type: Direct Table
- Data Source: intelligence.dbt_prod.black17_tiktok

#### Model: communion_s3_data

**int_dbt_prod_communion_amazon_daily_data** (Transaction Country)
- Base View: `int_dbt_prod_communion_amazon_daily_data`
- View Type: Direct Table
- Data Source: "INTELLIGENCE"."DBT_PROD"."COMMUNION_AMAZON_DAILY_DATA"

**int_dbt_prod_communion_spotify_daily_data** (Transaction Country)
- Base View: `int_dbt_prod_communion_spotify_daily_data`
- View Type: Direct Table
- Data Source: "INTELLIGENCE"."DBT_PROD"."COMMUNION_SPOTIFY_DAILY_DATA"

**int_dbt_prod_communion_apple_daily_data** (Transaction Country)
- Base View: `int_dbt_prod_communion_apple_daily_data`
- View Type: Direct Table
- Data Source: "INTELLIGENCE"."DBT_PROD"."COMMUNION_APPLE_DAILY_DATA"

**int_dbt_prod_communion_tiktok_socials** (Communion TikTok Data)
- Base View: `int_dbt_prod_communion_tiktok_socials`
- View Type: Direct Table
- Data Source: "INTELLIGENCE"."DBT_PROD"."COMMUNION_TIKTOK_SOCIALS"

**int_dbt_prod_communion_youtube_socials** (Communion YouTube Data)
- Base View: `int_dbt_prod_communion_youtube_socials`
- View Type: Direct Table
- Data Source: "INTELLIGENCE"."DBT_PROD"."COMMUNION_YOUTUBE_SOCIALS"

**int_dbt_prod_communion_instagram_creations_socials** (Transaction Country)
- Base View: `int_dbt_prod_communion_instagram_creations_socials`
- View Type: Direct Table
- Data Source: "INTELLIGENCE"."DBT_PROD"."COMMUNION_INSTAGRAM_CREATIONS_SOCIALS"

**int_dbt_prod_communion_instagram_views_socials** (Transaction Country)
- Base View: `int_dbt_prod_communion_instagram_views_socials`
- View Type: Direct Table
- Data Source: "INTELLIGENCE"."DBT_PROD"."COMMUNION_INSTAGRAM_VIEWS_SOCIALS"

#### Model: glassnote_data_delivery

**weekly_glassnote_spotify_raw** (weekly_glassnote_spotify_raw)
- Base View: `weekly_glassnote_spotify_raw`
- View Type: Direct Table
- Data Source: "INTELLIGENCE"."DBT_PROD"."WEEKLY_GLASSNOTE_SPOTIFY_RAW"

**glassnote_test_send** (glassnote_test_send)
- Base View: `glassnote_test_send`
- View Type: Direct Table
- Data Source: Unknown

#### Model: saaregama_s3_data

**int_dbt_prod_saaregama_amazon_daily_data** (Saaregama Amazon Daily Data)
- Base View: `int_dbt_prod_saaregama_amazon_daily_data`
- View Type: Direct Table
- Data Source: "INTELLIGENCE"."DBT_PROD"."SAAREGAMA_AMAZON_DAILY_DATA"

**int_dbt_prod_saaregama_spotify_daily_data** (Saaregama Spotify Daily Data)
- Base View: `int_dbt_prod_saaregama_spotify_daily_data`
- View Type: Direct Table
- Data Source: "INTELLIGENCE"."DBT_PROD"."SAAREGAMA_SPOTIFY_DAILY_DATA"

**int_dbt_prod_saregama_apple_daily_data** (Saaregama Apple Daily Data)
- Base View: `int_dbt_prod_saregama_apple_daily_data`
- View Type: Direct Table
- Data Source: "INTELLIGENCE"."DBT_PROD"."SAREGAMA_APPLE_DAILY_DATA"

**int_dbt_prod_saaregama_revenue_data** (Saaregama Revenue Data)
- Base View: `int_dbt_prod_saaregama_revenue_data`
- View Type: Direct Table
- Data Source: "INTELLIGENCE"."DBT_PROD"."SAAREGAMA_REVENUE_DATA"

## Impact Analysis Guide

### Making Changes Safely

1. **Before changing a database table:**
   - Check "Views by Data Source" section above
   - Identify all views that use the table
   - Review explores that depend on those views

2. **Before modifying a view:**
   - Check which models include the view
   - Review explores that use the view as base
   - Consider downstream reporting impact

3. **Before changing a model:**
   - Review all explores in the model
   - Check business usage of those explores
   - Coordinate with report consumers

### Complexity Indicators

- **High Line Count Views**: Complex business logic, may need optimization
- **Many Source Tables**: Complex joins, potential performance impact
- **Multiple Dependencies**: Changes have wide impact, need careful testing

