version: 2

models:
  - name: dim_times
    description: >
      The dim_times table contains dimensions associated with time.
    columns:
      - name: datetime
        description: >
          The representation of a date and time in the ISO 8601 format.
        tests:
          - not_null
          - unique
      - name: date_day
        description: >
          The representation of a date in YYYY-MM-DD format.
        tests:
          - not_null
      - name: prior_date_day
        description: >
          The representation of a date in YYYY-MM-DD format, one day prior to the date_day.
        tests:
          - not_null
      - name: next_date_day
        description: >
          The representation of a date in YYYY-MM-DD format, one day after the date_day.
        tests:
          - not_null
      - name: prior_year_date_day
        description: >
          The representation of a date in YYYY-MM-DD format, one year prior to the date_day.
        tests:
          - not_null
      - name: prior_year_over_year_date_day
        description: >
          The representation of the date one year prior to the current date in YYYY-MM-DD format, considering the same day and month.
        tests:
          - not_null
      - name: day_of_week
        description: >
          The numerical representation of the day of the week, where Sunday is assigned the value 1 and Saturday is assigned the value 7.
        tests:
          - not_null
      - name: day_of_week_iso
        description: >
          The numerical representation of the day of the week following the ISO 8601 standard, where Monday is assigned the value 1 and Sunday is assigned the value 7.
        tests:
          - not_null
      - name: day_of_week_name
        description: >
          The full name of the day of the week.
        tests:
          - not_null
      - name: day_of_month
        description: >
          The numerical representation of the day of the month.
        tests:
          - not_null
      - name: day_of_year
        description: >
          The numerical representation of the day within a year, ranging from 1 to 365 (or 366 in a leap year).
        tests:
          - not_null
      - name: week_start_date
        description: >
          The representation of the starting date of the week in YYYY-MM-DD format.
        tests:
          - not_null
      - name: week_end_date
        description: >
          The representation of the ending date of the week in YYYY-MM-DD format.
        tests:
          - not_null
      - name: prior_year_week_start_date
        description: >
          The representation of the starting date of the week one year prior to the current week.
        tests:
          - not_null
      - name: prior_year_week_end_date
        description: >
          The representation of the ending date of the week one year prior to the current week.
        tests:
          - not_null
      - name: week_of_year
        description: >
          The numerical representation of the week within a year, ranging from 1 to 52 (or 53 in a leap year).
        tests:
          - not_null
      - name: iso_week_start_date
        description: >
          The representation of the starting date of the week following the ISO 8601 standard in YYYY-MM-DD format.
        tests:
          - not_null
      - name: iso_week_end_date
        description: >
          The representation of the ending date of the week following the ISO 8601 standard in YYYY-MM-DD format.
        tests:
          - not_null
      - name: iso_week_of_year
        description: >
          The numerical representation of the week within a year following the ISO 8601 standard, ranging from 1 to 52 (or 53 in a leap year).
        tests:
          - not_null
      - name: prior_year_iso_week_of_year
        description: >
          The numerical representation of the week within a year following the ISO 8601 standard, ranging from 1 to 52 (or 53 in a leap year), one year prior to the current ISO week.
        tests:
          - not_null
      - name: month_of_year
        description: >
          The numerical representation of the month within a year, ranging from 1 to 12.
        tests:
          - not_null
      - name: month_name
        description: >
          The full name of the month.
        tests:
          - not_null
      - name: month_name_short
        description: >
          The abbreviated name of the month.
        tests:
          - not_null
      - name: month_start_date
        description: >
          The representation of the starting date of the month in YYYY-MM-DD format.
        tests:
          - not_null
      - name: month_end_date
        description: >
          The representation of the ending date of the month in YYYY-MM-DD format.
        tests:
          - not_null
      - name: prior_year_month_start_date
        description: >
          The representation of the starting date of the month one year prior to the current month.
        tests:
          - not_null
      - name: prior_year_month_end_date
        description: >
          The representation of the ending date of the month one year prior to the current month.
        tests:
          - not_null
      - name: quarter_of_year
        description: >
          The numerical representation of the quarter within a year, ranging from 1 to 4.
        tests:
          - not_null
      - name: quarter_start_date
        description: >
          The representation of the starting date of the quarter in YYYY-MM-DD format.
        tests:
          - not_null
      - name: quarter_end_date
        description: >
          The representation of the ending date of the quarter in YYYY-MM-DD format.
        tests:
          - not_null
      - name: year_number
        description: >
          The numerical representation of the year.
        tests:
          - not_null
      - name: year_start_date
        description: >
          The representation of the starting date of the year in YYYY-MM-DD format.
        tests:
          - not_null
      - name: year_end_date
        description: >
          The representation of the ending date of the year in YYYY-MM-DD format.
        tests:
          - not_null
      - name: us_holiday_name
        description: >
          The name of the holiday, if the date is a US holiday.