fivetran / dbt_jira

Data models for Fivetran's Jira connector built using dbt.
https://fivetran.github.io/dbt_jira/
Apache License 2.0
8 stars 15 forks source link

[Feature] Revise documentation for vars `jira_field_grain` and `issue_field_history_columns` #119

Closed dyt783 closed 7 months ago

dyt783 commented 7 months ago

Is there an existing issue for this?

Describe the issue

Regardless whether I set jira_field_grain as 'field_id' or 'field_name', I don't seem to be able to use the value 'customfield_10028' to define the field in issue_field_history_columns. I can use the value 'Story Points' and it works fine with both grain settings.

Relevant error log or model output

No response

Expected behavior

I expect to be able to use the value 'customfield_10028' to define the fields in issue_field_history_columns

dbt Project configurations

Variables for the Fivetran JIRA package

jira_database: dw
jira_schema: jira
issue_field_history_columns: ['Story Points', 'customfield_10028']
jira_field_grain: 'field_id' # field_id or field_name

Package versions

packages:

What database are you using dbt with?

snowflake

dbt Version

1.7

Additional Context

No response

Are you willing to open a PR to help address this issue?

fivetran-catfritz commented 7 months ago

Hi @dyt783, thanks for bringing this up. The issue_field_history_columns variable is designed to use the field_name only. If you use the corresponding field_name for field_id=customfield_10028 found in your field staging table, that should allow it to pull the custom field through.

As for the jira_field_grain variable, it serves a different purpose. It is for switching the field that our joins and window functions use. It is useful in the case where you might have IDs customfield_01 and customfield_02, but both are named "sprint", and you want them to be treated together instead of separately.

I hope that helps clear things up, but please let me know if you have any other questions!

fivetran-catfritz commented 7 months ago

Updating this issue to a feature to revise documentation since this is not truly a bug. @dyt783 If you have any further comments/questions, you can continue to comment in this thread!