version: 2

models:
  - name: combined_expenses_dbt
    description: Contains expenses data from Abacus and Workstation
    columns:
      - name: account_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: activity_statement_period_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: apply_to_statement_period_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: note
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: upc
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: worksheet_adjustment_detail_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: worksheet_adjustment_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: distribution_type
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: reference_adjustment_type_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: reference_adjustment_type_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: artist_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: artist_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: subaccount_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: subaccount_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: adjustment_payee_currency_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: adjustment_amount_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: unique_identifier
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar

  - name: combined_expenses_by_artist_dbt
    description: combined expenses grouped by artist model.
    columns:
      - name: account_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: account_id
      - name: activity_statement_period_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: activity_statement_period_id
      - name: adjustment_amount_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: adjustment_payee_currency_code
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: adjustment_payee_currency_code
      - name: apply_to_statement_period_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: apply_to_statement_period_id
      - name: contract_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: contract_id
      - name: artist_name
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: artist_name
      - name: artist_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: artist_id
      - name: reference_adjustment_type_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: reference_adjustment_type_id
      - name: reference_adjustment_type_name
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: reference_adjustment_type_name
      - name: upc
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: upc
      - name: worksheet_adjustment_detail_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: worksheet_adjustment_detail_id
      - name: subaccount_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: subaccount_id

  - name: expenses_by_subaccount_dbt
    description: combined expenses grouped by subaccount model.
    columns:
      - name: account_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: account_id
      - name: activity_statement_period_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: activity_statement_period_id
      - name: adjustment_amount_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: adjustment_payee_currency_code
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: adjustment_payee_currency_code
      - name: apply_to_statement_period_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: apply_to_statement_period_id
      - name: contract_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: contract_id
      - name: artist_name
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: artist_name
      - name: artist_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: artist_id
      - name: subaccount_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: subaccount_id
      - name: subaccount_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: reference_adjustment_type_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: reference_adjustment_type_id
      - name: reference_adjustment_type_name
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: reference_adjustment_type_name
      - name: upc
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: upc
      - name: worksheet_adjustment_detail_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: worksheet_adjustment_detail_id

  - name: combined_expenses_by_imprint_dbt
    description: expenses grouped by imprint model.
    columns:
      - name: account_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: account_id
      - name: activity_statement_period_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: activity_statement_period_id
      - name: adjustment_amount_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: adjustment_payee_currency_code
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: adjustment_payee_currency_code
      - name: apply_to_statement_period_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: apply_to_statement_period_id
      - name: artist_name
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: artist_name
      - name: artist_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: artist_id
      - name: contract_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: contract_id
      - name: imprint
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: imprint_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: reference_adjustment_type_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: reference_adjustment_type_id
      - name: reference_adjustment_type_name
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: reference_adjustment_type_name
      - name: upc
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: upc
      - name: worksheet_adjustment_detail_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: worksheet_adjustment_detail_id
      - name: subaccount_id
        data_tests:
          - relationships:
              to: ref('combined_expenses_dbt')
              field: subaccount_id

  - name: revenue_distro_dbt
    description: Revenue distro model copies from vw_abacus_fact_sales_distro_v3
    columns:
      - name: statement_period_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: account_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: account_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: country_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: isrc
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: track_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: store_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: upc
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: transaction_date
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: date
      - name: transaction_type
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: transaction_subtype
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: txn_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: project_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: product_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: product_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: gross_revenue_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_revenue_after_withholding_tax_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_revenue_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: withholding_tax_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_revenue_after_withholding_tax_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: adjusted_net_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: artist_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: track_unique_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: subdistributor
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: subaccount_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: current_batch_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: new_allocation
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: boolean
      - name: abacus_sale_type
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: original_statement_period_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: label_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: phys_ppd_usd
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: quantity
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: royalty_rate
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: transaction_type_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: country_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: imprint_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: sale_currency_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: start_date
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: date
      - name: unit_price_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: video_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: mechanical_deduction_amount_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: publisher_admin_fee_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number

  - name: revenue_nr_dbt
    description: Revenue nr model copies from vw_abacus_fact_sales_nr_v3
    columns:
      - name: statement_period_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: account_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_term_condition_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: schedule_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: account_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: country_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: isrc
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: store_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: start_date
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: date
      - name: end_date
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: date
      - name: transaction_type
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: transaction_subtype_description
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: quantity
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contributor_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: contributor_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: sound_recording_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: sound_recording_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: txn_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: accounting_run_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: royalty_rate
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: unit_price_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_revenue_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: withholding_tax_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_share_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_revenue_after_withholding_tax_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_revenue_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: withholding_tax_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: unit_price_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_revenue_after_withholding_tax_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: abacus_sale_type
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: original_statement_period_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_transaction_nr_contract_txn_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: transaction_nr_contract_txn_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: txn_correction_nr_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number

  - name: revenue_publishing_dbt
    description: Revenue distro model copies from vw_abacus_fact_sales_distro_v3
    columns:
      - name: statement_detail_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: statement_period_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: activity_period_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: account_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: iswc
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: song_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: external_song_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: account_payee_currency
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: gross_revenue_payee_currency
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_revenue_payee_currency
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number

  - name: revenue_by_country_dbt
    description: Revenue aggregated by country.
    columns:
      - name: account_id
        data_tests:
          - not_null
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: activity_period_id
        data_tests:
          - relationships:
              to: ref('revenue_distro_dbt')
              field: activity_period_id
      - name: statement_period_id
        data_tests:
          - not_null
      - name: country_code
        data_tests:
          - not_null
          - dbt_utils.not_empty_string
      - name: artist_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: subaccount_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: product_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: track_unique_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: transaction_type_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: imprint_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: store_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: project_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_revenue_payee_currency
        data_tests:
          - not_null
      - name: gross_revenue_payee_currency
        data_tests:
          - not_null

  - name: revenue_by_imprint_dbt
    description: Revenue aggregated by imprint.
    columns:
      - name: account_id
        data_tests:
          - not_null
      - name: account_payee_currency
        data_tests:
          - not_null
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: statement_period_id
        data_tests:
          - not_null
      - name: activity_period_id
        data_tests:
          - relationships:
              to: ref('revenue_distro_dbt')
              field: activity_period_id
      - name: imprintid
        data_tests:
          - not_null
      - name: imprint
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: artist_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: subaccount_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: store_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - relationships:
              to: ref('revenue_distro_dbt')
              field: store_id
      - name: transaction_type_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: country_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: mechanical_deduction_amount_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - not_null
      - name: publisher_admin_fee_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - not_null
      - name: net_share_payee_currency
        data_tests:
          - not_null
      - name: gross_revenue_payee_currency
        data_tests:
          - not_null

  - name: revenue_by_project_dbt
    description: Revenue aggregated by project.
    columns:
      - name: account_id
        data_tests:
          - not_null
      - name: account_payee_currency
        data_tests:
          - not_null
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: statement_period_id
        data_tests:
          - not_null
      - name: activity_period_id
        data_tests:
          - relationships:
              to: ref('revenue_distro_dbt')
              field: activity_period_id
      - name: project_id
        data_tests:
          - not_null
      - name: project_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: project_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: project_artist
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: artist_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: subaccount_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: store_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - relationships:
              to: ref('revenue_distro_dbt')
              field: store_id
      - name: transaction_type_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: country_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: product_count
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_share_payee_currency
        data_tests:
          - not_null
      - name: gross_revenue_payee_currency
        data_tests:
          - not_null

  - name: revenue_by_recording_distro_dbt
    description: Distribution revenue aggregated by sound recording.
    columns:
      - name: account_id
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_distro_dbt')
              field: account_id
      - name: account_payee_currency
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_distro_dbt')
              field: account_payee_currency
      - name: activity_period_id
        data_tests:
          - relationships:
              to: ref('revenue_distro_dbt')
              field: activity_period_id
      - name: statement_period_id
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_distro_dbt')
              field: statement_period_id
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - relationships:
              to: ref('revenue_distro_dbt')
              field: contract_id
      - name: recording_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: recording_title
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: artist
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: version
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: isrc
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: store_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - relationships:
              to: ref('revenue_distro_dbt')
              field: store_id
      - name: transaction_type_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: country_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: imprint_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_share_payee_currency
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_revenue_payee_currency
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number

  - name: revenue_by_recording_nr_dbt
    description: Neighbouring rights revenue aggregated by sound recording.
    columns:
      - name: account_id
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_nr_dbt')
              field: account_id
      - name: account_payee_currency
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_nr_dbt')
              field: account_payee_currency
      - name: statement_period_id
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_nr_dbt')
              field: statement_period_id
      - name: contract_id
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_nr_dbt')
              field: contract_id
      - name: recording_id
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_nr_dbt')
              field: sound_recording_id
      - name: recording_title
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: artist
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: version
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: isrc
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: net_share_payee_currency
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_revenue_payee_currency
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number

  - name: revenue_by_store_dbt
    description: Revenue aggregated by store.
    columns:
      - name: account_id
        data_tests:
          - not_null
      - name: account_payee_currency
        data_tests:
          - not_null
      - name: activity_period_id
        data_tests:
          - relationships:
              to: ref('revenue_distro_dbt')
              field: activity_period_id
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: statement_period_id
        data_tests:
          - not_null
      - name: artist_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: subaccount_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: store_id
        data_tests:
          - not_null
      - name: store_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: product_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: track_unique_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: transaction_type_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: country_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: imprint_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: project_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_revenue_payee_currency
        data_tests:
          - not_null
      - name: gross_revenue_payee_currency
        data_tests:
          - not_null

  - name: revenue_by_track_dbt
    description: Aggregates distro revenue associated with a track.
    columns:
      - name: account_id
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_distro_dbt')
              field: account_id
      - name: account_payee_currency
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_distro_dbt')
              field: account_payee_currency
      - name: activity_period_id
        data_tests:
          - relationships:
              to: ref('revenue_distro_dbt')
              field: activity_period_id
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - relationships:
              to: ref('revenue_distro_dbt')
              field: contract_id
      - name: statement_period_id
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_distro_dbt')
              field: statement_period_id
      - name: primary_artist_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: subaccount_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: product_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: store_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - relationships:
              to: ref('revenue_distro_dbt')
              field: store_id
      - name: transaction_type_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: country_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: imprint_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: track_unique_id
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_distro_dbt')
              field: track_unique_id
      - name: track_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: isrc
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: artist_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: imprint
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: subaccount_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: product_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: project_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: project_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: release_date
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: date
      - name: product_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: mechanical_deduction_amount_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - not_null
      - name: publisher_admin_fee_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - not_null
      - name: net_revenue_payee_currency
        data_tests:
          - not_null
      - name: gross_revenue_payee_currency
        data_tests:
          - not_null

  - name: revenue_by_transaction_type_dbt
    description: Aggregates distro and NR revenue by transaction type.
    columns:
      - name: account_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - not_null
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: activity_period_id
        data_tests:
          - relationships:
              to: ref('revenue_distro_dbt')
              field: activity_period_id
      - name: statement_period_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - not_null
      - name: transaction_type_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - not_null
      - name: transaction_type_desc
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: transaction_type_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: transaction_type_group_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - not_null
      - name: transaction_type_group_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: store_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - relationships:
              to: ref('revenue_distro_dbt')
              field: store_id
      - name: country_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: imprint_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: quantity
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_revenue_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - not_null
      - name: gross_revenue_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - not_null
      - name: artist_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: subaccount_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: track_unique_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: product_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: project_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number

  - name: revenue_by_artist_dbt
    description: Revenue aggregated by artist.
    columns:
      - name: account_id
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_distro_dbt')
              field: account_id
      - name: account_payee_currency
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_distro_dbt')
              field: account_payee_currency
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - relationships:
              to: ref('revenue_distro_dbt')
              field: contract_id
      - name: statement_period_id
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_distro_dbt')
              field: statement_period_id
      - name: activity_period_id
        data_tests:
          - relationships:
              to: ref('revenue_distro_dbt')
              field: activity_period_id
      - name: store_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - relationships:
              to: ref('revenue_distro_dbt')
              field: store_id
      - name: transaction_type_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: country_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: imprint_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: artist_id
        data_tests:
          - not_null
      - name: artist_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: subaccount_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: mechanical_deduction_amount_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: publisher_admin_fee_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - not_null
      - name: net_revenue_payee_currency
        data_tests:
          - not_null
      - name: gross_revenue_payee_currency
        data_tests:
          - not_null
  - name: revenue_by_product_distro_dbt
    description: Revenue aggregated by product.
    columns:
      - name: account_id
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_distro_dbt')
              field: account_id
      - name: account_payee_currency
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_distro_dbt')
              field: account_payee_currency
      - name: activity_period_id
        data_tests:
          - relationships:
              to: ref('revenue_distro_dbt')
              field: activity_period_id
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - relationships:
              to: ref('revenue_distro_dbt')
              field: contract_id
      - name: statement_period_id
        data_tests:
          - not_null
          - relationships:
              to: ref('revenue_distro_dbt')
              field: statement_period_id
      - name: product_id
        data_tests:
          - not_null
      - name: product_name
        data_tests:
          - not_null
      - name: display_upc
        data_tests:
          - not_null
      - name: store_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - relationships:
              to: ref('revenue_distro_dbt')
              field: store_id
      - name: transaction_type_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: country_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: imprint_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_share_payee_currency
        data_tests:
          - not_null
      - name: gross_revenue_payee_currency
        data_tests:
          - not_null
      - name: release_date
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: date
      - name: artist_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: artist_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: subaccount_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: product_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: project_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: project_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: project_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: mechanical_deduction_amount_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - not_null
      - name: publisher_admin_fee_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - not_null
  - name: revenue_by_statement_period_dbt
    description: Revenue aggregated by statement period.
    columns:
      - name: account_id
        data_tests:
          - not_null
      - name: account_payee_currency
        data_tests:
          - not_null
      - name: activity_period_id
        data_tests:
          - relationships:
              to: ref('revenue_distro_dbt')
              field: activity_period_id
              config:
                where: gross_publishing_revenue_payee_currency IS NULL
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: statement_period_id
        data_tests:
          - not_null
      - name: artist_id
      - name: product_id
      - name: track_unique_id
      - name: subaccount_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: transaction_type_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: imprint_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: store_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: country_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: project_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_revenue_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_revenue_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_publishing_revenue_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_publishing_revenue_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
  - name: revenue_by_activity_month_dbt
    description: Revenue aggregated by activity month.
    columns:
      - name: account_id
        data_tests:
          - not_null
      - name: account_payee_currency
        data_tests:
          - not_null
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: store_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - relationships:
              to: ref('revenue_distro_dbt')
              field: store_id
      - name: transaction_type_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: country_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: imprint_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: statement_period_id
        data_tests:
          - not_null
      - name: activity_period_id
        data_tests:
          - not_null
      - name: activity_month_name
        data_tests:
          - not_null
      - name: artist_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: subaccount_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_share_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_revenue_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_publishing_revenue_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_publishing_revenue_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: product_id
      - name: track_unique_id
      - name: project_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number

  - name: revenue_by_subaccount_dbt
    description: Revenue aggregated by subaccount.
    columns:
      - name: account_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: account_payee_currency
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: activity_period_id
        data_tests:
          - relationships:
              to: ref('revenue_distro_dbt')
              field: activity_period_id
      - name: artist_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: statement_period_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: subaccount_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: subaccount_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: store_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - relationships:
              to: ref('revenue_distro_dbt')
              field: store_id
      - name: transaction_type_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: country_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: imprint_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: mechanical_deduction_amount_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - not_null
      - name: publisher_admin_fee_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
          - not_null
      - name: net_revenue_payee_currency
        data_tests:
          - not_null
      - name: gross_revenue_payee_currency
        data_tests:
          - not_null

  - name: combined_adjustments_dbt
    description: Contains adjustments related data from Abacus and Workstation
    columns:
      - name: account_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: activity_statement_period_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: apply_to_statement_period_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: note
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: worksheet_adjustment_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: reference_adjustment_type_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: reference_adjustment_type_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: adjustment_payee_currency_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: adjustment_amount_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: ledger_adjustment_applied_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: unique_identifier
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
  - name: combined_adjustments_by_type_dbt
    description: Contains adjustments related data from Abacus and Workstation
    columns:
      - name: account_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: statement_period_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: reference_adjustment_type_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: reference_adjustment_type_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: adjustment_payee_currency_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: adjustment_amount_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: ledger_adjustment_applied_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
  - name: workstation_fact_sales_unified_dbt
    description: Merging Abacus fact sales into the Workstation fact sales.
    columns:
      - name: artistid
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: statement_detail_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: accountingperiodid
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: accountingyear
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: accountingmonth
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: activityperiodid
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: activityyear
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: activitymonth
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: labelid
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: storeid
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: genreid
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: releaseid
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: trackid
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: countryid
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: transactiontypeid
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: catalogid
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: isrcid
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: imprintid
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: sales
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: fx_spread_fee
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: cloud_publishing
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: partner_share
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: subaccountid
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: datecreated
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: timestamp_ntz
      - name: original_currency_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: payout_currency_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: activity_fx_rate
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: fx_gross
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: fx_adjusted_gross
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: fx_actual_net
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: fx_distribution_fees
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: fx_dpd_publishing
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: fx_oms_fees
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: fx_ringtone_publishing
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: fx_cloud_publishing
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: retail_price
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: original_price
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: discount
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: record_type
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: accountingquarter
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: activityquarter
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: adjusted_gross
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_receipt
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: actual_net
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: distribution_fees
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: oms_fees
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: dpd_publishing
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: ringtone_publishing
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: fx_adjusted_exchange_rate
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: fx_net_receipt
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number

  - name: abacus_fact_sales_unified_dbt
    description: Merging Workstation fact sales into the Abacus fact sales.
    columns:
      - name: statement_period_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: account_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: account_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: sale_currency_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: sale_activity_rate
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: accounting_period_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: country_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: isrc
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: track_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: cd_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: store_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: video_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: upc
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: statement_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: start_date
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: date
      - name: transaction_type
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: transaction_subtype
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: label_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: quantity
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: phys_ppd_usd
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: unique_detail_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: txn_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: accounting_run_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: accounting_run_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: withholding_tax_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_revenue_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_revenue_after_withholding_tax_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_share_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: distribution_fee_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: withholding_tax_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: batch_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: sales_file_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: run_controller_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_term_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_term_condition_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: project_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: artist_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: track_unique_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: subdistributor
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: current_batch_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: new_allocation
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: boolean
      - name: abacus_sale_type
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: original_statement_period_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: activity_period_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: dpd_publishing_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: cloud_publishing_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: subaccount_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: record_type
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: unit_price_usd
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: transaction_date
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: date
      - name: royalty_rate
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: unit_price_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_revenue_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_revenue_after_withholding_tax_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_share_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: distribution_fee_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: actual_statement_number
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: is_excluded_from_sap
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: boolean
      - name: mechanical_deduction_admin_type
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: mechanical_royalty_amount_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: mechanical_royalty_amount_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: mechanical_deduction_amount_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: mechanical_deduction_amount_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: publisher_admin_fee_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: publisher_admin_fee_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_revenue_after_mechanical_sale_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_revenue_after_mechanical_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
  - name: payments_dbt
    description: Payments and credits.
    columns:
      - name: ledger_account_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: account_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: currency_code
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: currency_amount
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: created_at
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: timestamp_ntz
      - name: statement_period_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: event_name
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: action_status
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: withholding_tax_ledger_account_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: withholding_tax_currency_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: withholding_tax_currency_amount
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: withholding_tax_created_at
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: timestamp_ntz

  - name: combined_payments_dbt
    description: Combined payments and credits.
    columns:
      - name: unique_key
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: account_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: currency_code
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: currency_amount
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: created_at
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: timestamp_ntz
      - name: statement_period_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: event_name
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: action_status
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: withholding_tax_ledger_account_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: withholding_tax_currency_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: withholding_tax_currency_amount
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: withholding_tax_created_at
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: timestamp_ntz

  - name: workstation_summary_dbt
    description: Workstation summary model with all related data
    columns:
      - name: account_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: account_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: statement_period_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: opening_balance
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: payments
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: net_revenue
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: gross_revenue
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: fee
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: expenses
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: adjustments
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: advanced_paid
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: closing_balance
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: mechanicals
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: mechanical_fees
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number

  - name: account_statement_periods_dbt
    description: Account activity statement periods model
    columns:
      - name: account_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: statement_period_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: statement_period_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: statement_period_status
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: statement_year
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: statement_month
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: currency_code
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar

  - name: combined_advances_dbt
    description: Contains advances data from Abacus and Workstation
    columns:
      - name: account_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: statement_period_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: advance_amount
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: advance_currency_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: advance_amount_payee_currency
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: advance_payee_currency_code
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: advance_description
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: unique_key
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar

  - name: contract_dbt
    description: Combined contracts model
    columns:
      - name: account_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_name
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: term_start
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: date

  - name: ledger_summary_dbt
    description: Ledger data aggregated by statement period ID
    columns:
      - name: account_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: contract_id
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: statement_period_id
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: currency_code
        data_tests:
          - not_null
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: varchar
      - name: total_gross_revenue_amount
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: total_net_revenue_amount
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: distribution_fee
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: mechanical_deduction_total
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
      - name: mechanical_deduction_admin_fee_total
        data_tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: number
