-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the issue
In our organization we can have multiple components for one jira story. We added component to our list of columns we want to see in the dbt_project.yml issue_field_history_columns variable and it seems to work up to a point. In reviewing the jira__daily_issue_field_history there is a join in the set_values CTE where it does not account for the fact we can have multiple values. If we could add the join further up stream to get the correct values that would be greatly beneficial.
Relevant error log or model output
As a work around we have had to
- flatten the components column from the jira__issue_enhanced dbt model
- then join to stg_jira__component to get the actual name of the component
- then listagg the name partitioning by the issue_id
`with test as (
SELECT trim(f.value) as component_id, a.* --f.value as component_id_new, a.*
FROM ANALYTICS.JIRA.JIRA_ISSUE a,
LATERAL SPLIT_TO_TABLE(a.components, ',') f
WHERE ISSUE_ID IN (948017,
925164)
)
select a.issue_id
,a.components
,a.component_id
,b.component_name
,coalesce(b.component_name, a.component_id) as new_component_name
from test a
left join analytics.stg.stg_jira__component b on a.component_id = b.component_id::varchar
; `

Thanks!Expected behavior
That the components all are the names of the components and not just those where a story has one component listed
dbt Project configurations
issue_field_history_columns: ['Story Points','Summary','Components']
Package versions
version: 0.15.0
What database are you using dbt with?
snowflake
dbt Version
1.7.9
Additional Context
No response
Are you willing to open a PR to help address this issue?
- Yes.
- Yes, but I will need assistance and will schedule time during our office hours for guidance
- No.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels