Skip to content

Conversation

@cbini
Copy link
Member

@cbini cbini commented Oct 29, 2025

…s models

Pull Request

Summary & Motivation

Self-review

General

  • If this is a same-day request, please flag that in the #data-team Slack
  • Update due date and assignee on the
    TEAMster Asana Project
  • Run Format on all modified files

dbt

  • Include a corresponding [model name].yml properties file for all models.
    These can be generated by running
    dbt run-operation generate_model_yaml --args '{"model_names": ["MODEL NAME"]}'
    and saving the console output to a YAML file.

    models:
      - name: [model name]
        config:
          contract:
            enforced: false  # required while creating a contracted model, delete before merging
        columns:  # required for contracted models
          - name: ...
            data_type: ...
            data_tests:  # column tests, optional
              - ...
        data_tests:  # model tests, optional
          - ...
          - dbt_utils.unique_combination_of_columns:  # recommended for intermediate models
              arguments:
                combination_of_columns:
                  - ...
              config:
                store_failures: true
    
  • Include (or update) an
    exposure for all
    models that will be consumed by a dashboard, analysis, or application:

    exposures:
      - name: [exposure name, snake_case]
        label: [exposure name, Title Case]
        type: dashboard | notebook | analysis | ml | application
        owner:
          name: Data Team
        depends_on:
          - ref("[model name]")
          - ...
        url: ...  # optional
        meta:
          dagster:
            kinds:
              - tableau | googlesheets | ...
              - ...
            asset:
              metadata:
                id: [lsid]  # required for Tableau Server workbooks
                cron_schedule:  # required for Dagster automation
                  - * * * * *
                  - ...
    

Dagster "kinds" Reference

SQL

  • Use the union_dataset_join_clause() macro for queries that employ models
    that use regional datasets

  • Do not use group by without any aggregations when you mean to use
    distinct

  • All distinct usage must be accompanied by an comment explaining it's
    necessity

  • Do not use order by for select statements. That should be done in the
    reporting layer.

  • If you are adding a new external source, before building, run:

    dbt run-operation stage_external_sources --vars "{'ext_full_refresh': 'true'}" --args select: [model name(s)]
    

Troubleshooting

@cbini cbini requested review from a team as code owners October 29, 2025 23:03
@cbini cbini marked this pull request as draft October 29, 2025 23:03
@cbini cbini marked this pull request as ready for review October 31, 2025 14:39
@cbini cbini requested a review from a team as a code owner October 31, 2025 17:21
@cbini cbini linked an issue Dec 3, 2025 that may be closed by this pull request
4 tasks
@cbini cbini marked this pull request as draft January 21, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor base_powerschool__student_enrollments for pure powerschool tables

2 participants