version: 2

models:
  - name: AD_LISTENERS_LOCATION_COUNTRIES
    description: |
      artist affinity model for Audience Development team.
      model contains pre-aggregated data by spotify artist id, iso2 country code and month/year period.
      this table would contain data starting from 2021/01/01. This table can be updated monthly.
    data_tests:
      - transient
    columns:
      - name: spotify_artist_id
      - name: year_month
        description: Date of first day in the month
        data_tests:
          - min:
              arguments:
                value: "= '2021-01-01'"
          - max:
              config:
                tags:
                  - freshness
              arguments:
                value: '> current_date - 31*2'
      - name: country_code_2
        description: ISO2 country code
      - name: total_streams
        description: number of streams
