Skip to content

BUG - Incorrect schema for issue_label to get label name #21

@rywong99

Description

@rywong99

Are you a current Fivetran customer?

Ryan Wong, Data Platform Engineer, CircleCI. Yes, my company is a fivetran customer.

Describe the bug

Reference the github schema from the fivetran help pages: https://fivetran.com/docs/applications/github

The github source model for getting the label name in issue_label is incorrect. Table issue_label does not have the label name, but has a FK label_id. You have to join to table label to get the label name.
You can see the table issue_label is not defined correctly:
https://github.com/fivetran/dbt_github_source/blob/main/models/src_github.yml#L35-L42

Because of this issue, the macro generates null for all the label names. https://github.com/fivetran/dbt_github_source/blob/main/models/stg_github__issue_label.sql

Bring in the label table as a github_source and change the downstream model in https://github.com/fivetran/dbt_github to join appropriately.

Steps to reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Have the label name propagate through the model appropriately.

Project variables configuration

copy dbt_project.yml here

Package Version

packages:
  - package: dbt-labs/dbt_utils
    version: [">=0.8.0", "<0.9.0"]
  - package: fivetran/github_source
    version: [">=0.4.0", "<0.5.0"]
  - package: fivetran/github
    version: [">=0.4.0", "<0.5.0"]

Warehouse

  • BigQuery
  • Redshift
  • Snowflake
  • Postgres
  • Databricks
  • Other (provide details below)

Additional context

Screenshots

Please indicate the level of urgency

This is causing reports to not filter correctly based on label name. Since this is not working correctly, we may have to write a work-around or model this ourselves.

Are you interested in contributing to this package?

  • I'm open to any of the below options. Because of time constraints on my end, I lean towards either pairing or if someone from fivetran could fix this. The fix may require modifications to 2 repos.

  • Yes, I can do this and open a PR for your review.

  • Possibly, but I'm not quite sure how to do this. I'd be happy to do a live coding session with someone to get this fixed.

  • No, I'd prefer if someone else fixed this. I don't have the time and/or don't know what the root cause of the problem is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething is broken or incorrect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions