# Data Lineage & Dependencies

Generated on: 2026-02-26 16:55:45

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

## Overview

- **Total Models:** 1
- **Total Views:** 10
- **Derived Views:** 4
- **Direct Table Views:** 6

## Model Dependencies

### Models and Their Views

#### publishing-looker
- **Includes:** 10 views
- **Views:**
  - `publishing_app_change_log`
  - `publishing_metadata`
  - `publishing_metadata_simplified`
  - `royalty_accounting_qa_fact_sale_publishing`
  - `royalty_accounting_prod_vw_abacus_fact_sales_publishing`
  - `royalty_accounting_prod_vw_abacus_fact_sales_publishing_unpivoted`
  - `orch_app_ar_vendor`
  - `orch_app_ar_acct_period`
  - `unified_publishing_master_royalties`
  - `int_dbt_prod_publishing_metadata_standard`

## View Dependencies

### Views by Data Source

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

**"PROD_ROYALTY_ACCOUNTING_ROYALTY_ACCOUNTING"."STATEMENT_PERIOD"**
- Used by 1 views: `orch_app_ar_acct_period`


**dbt_prod.publishing_app_change_log**
- Used by 1 views: `publishing_app_change_log`


**dbt_prod.publishing_metadata**
- Used by 1 views: `publishing_metadata`


**dbt_prod.publishing_metadata_standard**
- Used by 1 views: `int_dbt_prod_publishing_metadata_standard`


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


**qa.fact_sale_publishing**
- Used by 1 views: `royalty_accounting_qa_fact_sale_publishing`


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

Total: 4 views

| View | Lines of Code | Source Tables |
|------|---------------|---------------|
| `royalty_accounting_prod_vw_abacus_fact_sales_publishing` | 410 |  Prod.Vw_Abacus_Fact_Sales_Publishing, Royalty_... |
| `publishing_metadata_simplified` | 216 |  Prod.Publishing_Agreement, Prod.Publishing_Com... |
| `unified_publishing_master_royalties` | 189 |  Dbt_Prod.Publishing_Metadata, Intelligence.Dbt_Prod |
| `royalty_accounting_prod_vw_abacus_fact_sales_publishing_unpivoted` | 185 |  Prod.Publishing_Agreement, Prod.Publishing_Com... |


## Explore Relationships

### Explores and Their Dependencies

#### Model: publishing-looker

**publishing_metadata** (Publishing Metadata)
- Base View: `publishing_metadata`
- View Type: Direct Table
- Data Source: intelligence.dbt_prod.publishing_metadata

**royalty_accounting_prod_vw_abacus_fact_sales_publishing** (Publishing Metadata)
- Base View: `royalty_accounting_prod_vw_abacus_fact_sales_publishing`
- View Type: Derived Table
- Data Source: Derived from: Prod.Vw_Abacus_Fact_Sales_Publishing, Royalty_Accounting, Royalty_...

**royalty_accounting_prod_vw_abacus_fact_sales_publishing_unpivoted** (Publishing Metadata)
- Base View: `royalty_accounting_prod_vw_abacus_fact_sales_publishing_unpivoted`
- View Type: Derived Table
- Data Source: Derived from: Prod.Publishing_Agreement, Prod.Publishing_Composition, Prod.Publi...

**unified_publishing_master_royalties** (Publishing Metadata)
- Base View: `unified_publishing_master_royalties`
- View Type: Derived Table
- Data Source: Derived from: Dbt_Prod.Publishing_Metadata, Intelligence.Dbt_Prod

**publishing_metadata_simplified** (Publishing Metadata)
- Base View: `publishing_metadata_simplified`
- View Type: Derived Table
- Data Source: Derived from: Prod.Publishing_Agreement, Prod.Publishing_Composition, Prod.Publi...

**int_dbt_prod_publishing_metadata_standard** (Publishing Metadata)
- Base View: `int_dbt_prod_publishing_metadata_standard`
- View Type: Direct Table
- Data Source: intelligence.dbt_prod.publishing_metadata_standard

## 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

