[# Hub Model YAML Schema Template #]
version: 2

models:
  - name: [[ hub_name ]]
    description: "[[ 'Standard' if hub_type == 'standard' else 'Reference' ]] hub for [[ hub_name ]]"
    config:
      tags: ['hub', 'raw_vault'[% if group %], '[[ group ]]'[% endif %]]
    columns:
[% if hashkey %]
      - name: [[ hashkey.hashkey_name ]]
        description: "Hash key for [[ hub_name ]]"
        data_tests:
          - unique
          - not_null
[% endif %]
[% for bk in business_key_columns %]
      - name: [[ bk ]]
        description: "Business key column"
        data_tests:
          - not_null
[% endfor %]
      - name: ldts
        description: "Load date timestamp"
      - name: rsrc
        description: "Record source"
