Skip to content

Conversation

@GabyRangelB
Copy link
Contributor

@GabyRangelB GabyRangelB commented Jan 8, 2026

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


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.

2 participants