version: 2
models:
  - name: SONGWHIP_AE_ACCOUNTS_DBT
    description: '{{ doc("SONGWHIP_AE_ACCOUNTS_DBT") }}'
    columns:
      - name: SEGMENT_ID
        data_tests:
          - not_null
          - unique
      - name: VENDOR_ID
        data_tests:
          - not_null
      - name: SUBACCOUNT_ID
        data_tests:
          - not_null
      - name: REPORT_LICENSOR
        data_tests:
          - not_null
      - name: BUSINESS_UNIT_NAME
        data_tests:
          - not_null
  - name: INT_SONGWHIP_FAN_CONSENT_DBT
    description: '{{ doc("INT_SONGWHIP_FAN_CONSENT_DBT") }}'
    columns:
      - name: FAN_ID
        data_tests:
          - not_null
          - unique
      - name: ADVERTISING_PROFILING
        description: Whether we have ever collected a positive ADVERTISING_PROFILING consent from this fan during one of their presaves
        data_tests:
          - not_null
      - name: ADVERTISING_PROFILING_COLLECTED_AT
        description: The timestamp when the above consent (positive or negative) was collected
        data_tests:
          - not_null
      - name: ANALYTICS_PROFILING
        description: Whether we have ever collected a positive ANALYTICS_PROFILING consent from this fan during one of their presaves
        data_tests:
          - not_null
      - name: ANALYTICS_PROFILING_COLLECTED_AT
        description: The timestamp when the above consent (positive or negative) was collected
        data_tests:
          - not_null
      - name: DATA_SHARING
        description: Whether we have ever collected a positive DATA_SHARING consent from this fan during one of their presaves
        data_tests:
          - not_null
      - name: DATA_SHARING_COLLECTED_AT
        description: The timestamp when the above consent (positive or negative) was collected
        data_tests:
          - not_null
      - name: MARKETING_PROFILING
        description: Whether we have ever collected a positive MARKETING_PROFILING consent from this fan during one of their presaves
        data_tests:
          - not_null
      - name: MARKETING_PROFILING_COLLECTED_AT
        description: The timestamp when the above consent (positive or negative) was collected
        data_tests:
          - not_null
      - name: IP_LOCATION_BASED_MARKETING
        description: Whether we have ever collected a positive IP_LOCATION_BASED_MARKETING consent from this fan during one of their presaves
        data_tests:
          - not_null
      - name: IP_LOCATION_BASED_MARKETING_COLLECTED_AT
        description: The timestamp when the above consent (positive or negative) was collected
        data_tests:
          - not_null
  - name: INT_SONGWHIP_FAN_ARTIST_CONSENT_DBT
    description: '{{ doc("INT_SONGWHIP_FAN_ARTIST_CONSENT_DBT") }}'
    data_tests:
      - dbt_utils.unique_combination_of_columns:
          combination_of_columns:
            - FAN_ID
            - GLOBAL_PARTICIPANT_ID
    columns:
      - name: FAN_ID
        data_tests:
          - not_null
      - name: GLOBAL_PARTICIPANT_ID
        data_tests:
          - not_null
      - name: EMAIL_MARKETING
        data_tests:
          - not_null
      - name: COLLECTED_AT
        data_tests:
          - not_null
