dbt-labs/dbt_metrics

[SEMANTIC-154] [Feature] Adding dbt_metrics_default_calendar.yml file for documentation

Closed this issue · 4 comments

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

I would like to add a yml file to document the dbt_metrics_default_calendar model in this dbt-metrics.

The reason is related to the new released dbt-project-evaluator packages which can be used to check our code based on the best practics. One of the test is fct_undocumented_models to ensure that each model has been documented. Check this link for more detail about this test.

Currently, when we run this test, the dbt_metrics_default_calendar will be detected as undocumented model. Hence, adding the documentation will solve this issue.

Describe alternatives you've considered

Create a new dbt_metrics_default_calendar.yml in the models folder to documenting this model. Which will looks like this:

version: 2

models:
  - name: dbt_metrics_default_calendar
    description: |
      An auto generated calendar table that used for metrics.
  
    columns:
      - name: DATE_DAY
        description: "Date"
        tests:
          - not_null
          - unique
      - name: DATE_WEEK
        description: "Date truncated into week"
      - name: DATE_MONTH
        description: "Date truncated into month"
      - name: DATE_QUARTER
        description: "Date truncated into quarter"
      - name: DATE_YEAR
        description: "Date truncated into year"

Who will this benefit?

All people that use dbt-metrics and dbt-project-evaluator

Are you interested in contributing this feature?

yes, I want to do it

Anything else?

No response

We also faced the same issue.
Our workaround is to create our own yml somewhere to fix the misalignment.
However, I think it shouldn't run in this way; the package should also follow the best practice, which is every model is with a doc.

It will be so great if the doc can be directly in the package!

@WeihaoLiTW @bimaputra1 - what a great find! We definitely don't want this to cause problems for those using dbt-project-evaluator, especially after so much work has gone in to make that package useful for the community.

@bimaputra1 if you're interested in opening up the PR for this issue I'm happy to take a look and review it!

Hi @callum-mcdata, yes sure. I would love to contribute by opening up the PR for this issue.

Added a pull request #221