fivetran / dbt_github

Fivetran's GitHub dbt package
https://fivetran.github.io/dbt_github/
Apache License 2.0
18 stars 22 forks source link

[Feature] Support repository column in the calculated metrics #41

Closed onimsha closed 1 year ago

onimsha commented 1 year ago

Is there an existing feature request for this?

Describe the Feature

Currently the (daily|weekly|monthly|quarterly)_metrics tables don't have the repository column, and the result is they will show the metrics of all selected repositories. Is it a good idea of supporting this column ? If the answer is yes then I can try open a PR to implement this.

Thanks

Describe alternatives you've considered

No response

Are you interested in contributing this feature?

Anything else?

No response

fivetran-joemarkiewicz commented 1 year ago

Hi @onimsha thanks so much for opening this feature request. Funny enough, this was something we were recently discussing internally to more easily leverage this package.

I think including repository would be a welcome addition to this package. I notice you are interested in opening a PR. Feel free to go the PR route and I will be happy to help provide guidance where needed. My team will then be able to review and work with you to fold the future PR into our next release!

onimsha commented 1 year ago

@fivetran-joemarkiewicz I've submitted my PR to address the feature. Please take a look whenever you can. Thank you :)

fivetran-catfritz commented 1 year ago

Hi @onimsha, I have incorporated your suggestion, along with a few other updates, into a release branch that you can test out if you like. One thing to note for tests, I added a test that checks for a unique combination between the time period and the repository, since as you noticed, the prior uniqueness test for the time period no longer applies.

You can install the test branch by adding the below to you packages.yml instead.

packages:
  - git: https://github.com/fivetran/dbt_github.git
    revision: release/v0.7.0
    warn-unpinned: false

If you do get a chance to test it out, please let me know if you have any feedback or issues!

onimsha commented 1 year ago

Hi @fivetran-catfritz , I've tested the release branch and also use it in our production pipeline. So far everything is working as expected. Thanks for including my changes into this release 🥂