version: 2
models:
  - name: GLOBAL_INT_SME_EMAIL_CLICK_DATA
    description: '{{ doc("GLOBAL_INT_SME_EMAIL_CLICK_DATA") }}'
    data_tests:
      - dbt_utils.unique_combination_of_columns:
          combination_of_columns:
            - GLOBAL_PARTICIPANT_ID
            - FAN_ID
            - PERIOD_NAME
    columns:
      - name: GLOBAL_PARTICIPANT_ID
        description: ID representing global participant from Orchard
        data_tests:
          - not_null
      - name: FAN_ID
        description: ID representing fan in the Fansifter database
        data_tests:
          - not_null
      - name: NR_OF_EVENTS
        description: Number of unique links per per email
        data_tests:
          - not_null
      - name: PERIOD_NAME
        description: Period used for decay calculation
        data_tests:
          - not_null
  - name: GLOBAL_INT_SME_EMAIL_OPEN_DATA
    description: '{{ doc("GLOBAL_INT_SME_EMAIL_OPEN_DATA") }}'
    data_tests:
      - dbt_utils.unique_combination_of_columns:
          combination_of_columns:
            - GLOBAL_PARTICIPANT_ID
            - FAN_ID
            - PERIOD_NAME
    columns:
      - name: GLOBAL_PARTICIPANT_ID
        description: ID representing global participant from Orchard
        data_tests:
          - not_null
      - name: FAN_ID
        description: ID representing fan in the Fansifter database
        data_tests:
          - not_null
      - name: NR_OF_EVENTS
        description: Number of unique emails opened
        data_tests:
          - not_null
      - name: PERIOD_NAME
        description: Period used for decay calculation
        data_tests:
          - not_null
  - name: GLOBAL_INT_SME_CAMPAIGN_DATA
    description: '{{ doc("GLOBAL_INT_SME_CAMPAIGN_DATA") }}'
    data_tests:
      - dbt_utils.unique_combination_of_columns:
          combination_of_columns:
            - GLOBAL_PARTICIPANT_ID
            - FAN_ID
            - PERIOD_NAME
    columns:
      - name: GLOBAL_PARTICIPANT_ID
        description: ID representing global participant from Orchard
        data_tests:
          - not_null
      - name: FAN_ID
        description: ID representing fan in the Fansifter database
        data_tests:
          - not_null
      - name: NR_OF_EVENTS
        description: Number of unique campaigns
        data_tests:
          - not_null
      - name: PERIOD_NAME
        description: Period used for decay calculation
        data_tests:
          - not_null
  - name: GLOBAL_INT_SONGWHIP_PRESAVE_DATA
    description: '{{ doc("GLOBAL_INT_SONGWHIP_PRESAVE_DATA") }}'
    data_tests:
      - dbt_utils.unique_combination_of_columns:
          combination_of_columns:
            - GLOBAL_PARTICIPANT_ID
            - FAN_ID
            - PERIOD_NAME
    columns:
      - name: GLOBAL_PARTICIPANT_ID
        description: ID representing global participant from Orchard
        data_tests:
          - not_null
      - name: FAN_ID
        description: ID representing fan in the Fansifter database
        data_tests:
          - not_null
      - name: NR_OF_EVENTS
        description: Number of unique dsp per campaign
        data_tests:
          - not_null
      - name: PERIOD_NAME
        description: Period used for decay calculation
        data_tests:
          - not_null
