version: 2
sources:
- name: awal_fpa
  database: awal_sax
  schema: fpa
  tables:
# please retain alphabetical order for source table names

  - name: current_exchange_rates
    description: AWAL report "current_exchange_rates" from s3://prod-orcd-awal-drop/AWAL_TO_ORCH/FINANCIAL_REPORTING/FPA/current_exchange_rates/
    tests:
    - not_transient
    - has_data:
        amount: '>= 209'

  - name: fpa_pr_awal
    description: AWAL report "fpa_pr_awal" from s3://prod-orcd-awal-drop/AWAL_TO_ORCH/FINANCIAL_REPORTING/FPA/fpa_pr_awal/
    tests:
    - not_transient
    - has_data

  - name: fpa_recoupment
    description: AWAL report "fpa_recoupment" from s3://prod-orcd-awal-drop/AWAL_TO_ORCH/FINANCIAL_REPORTING/FPA/fpa_recoupment/
    tests:
    - not_transient
    - has_data:
        amount: '>= 1951647'

  - name: fund_lookup
    description: AWAL report "fund_lookup" from s3://prod-orcd-awal-drop/AWAL_TO_ORCH/FINANCIAL_REPORTING/FPA/fund_lookup/
    tests:
    - not_transient
    - has_data

  - name: fund_lookup_view
    description: AWAL report "fund_lookup_view" from s3://prod-orcd-awal-drop/AWAL_TO_ORCH/FINANCIAL_REPORTING/FPA/fund_lookup_view/
    tests:
    - not_transient
    - has_data

  - name: historical_recoupment
    description: AWAL report "historical_recoupment" from s3://prod-orcd-awal-drop/AWAL_TO_ORCH/FINANCIAL_REPORTING/FPA/historical_recoupment/
    tests:
    - not_transient
    - has_data

  - name: processed_revenue
    description: AWAL report "processed_revenue" from s3://prod-orcd-awal-drop/AWAL_TO_ORCH/FINANCIAL_REPORTING/FPA/processed_revenue/
    tests:
    - not_transient
    - has_data
    - clustered:
        by: business_unit,payment_year

  - name: sax_recoupment
    description: AWAL report "sax_recoupment" from s3://prod-orcd-awal-drop/AWAL_TO_ORCH/FINANCIAL_REPORTING/FPA/sax_recoupment/
    tests:
    - not_transient
    - has_data

  - name: segmentation_lookup
    description: AWAL report "segmentation_lookup" from s3://prod-orcd-awal-drop/AWAL_TO_ORCH/FINANCIAL_REPORTING/FPA/segmentation_lookup/
    tests:
    - not_transient
    - has_data

  - name: sub_deal_agreement_mappings
    description: AWAL report "sub_deal_agreement_mappings" from s3://prod-orcd-awal-drop/AWAL_TO_ORCH/FINANCIAL_REPORTING/FPA/final/sub_deal_agreement_mappings/
    tests:
    - not_transient
    - has_data

  - name: territory_groups
    description: AWAL report "territory_groups" from s3://prod-orcd-awal-drop/AWAL_TO_ORCH/FINANCIAL_REPORTING/FPA/territory_groups/
    tests:
    - not_transient
    - has_data
