Skip to content

Commit 3d4e441

Browse files
Update casting to string for sprint ids
1 parent dc362f8 commit 3d4e441

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# dbt_jira v0.20.1-a2
2+
The latest version of [PR #138](https://github.com/fivetran/dbt_jira/pull/138) contains the following updates:
3+
4+
## Bug Fix
5+
- Changed casting of `sprint_id` to a string rather than an integer in `jira__daily_sprint_issue_history` to resolve casting errors.
6+
7+
## Under the Hood
8+
- Updated the package maintainer pull request template.
9+
- Updated `consistency_issue_enhanced` test to exclude columns that depend on calculations involving the current timestamp to remove failures.
10+
- Updated the sprint integrity tests to handle the new `sprint_id` casting.
11+
112
# dbt_jira v0.20.1-a1
213
[PR #138](https://github.com/fivetran/dbt_jira/pull/138) contains the following updates:
314

docs/catalog.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/manifest.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

models/jira__daily_sprint_issue_history.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ sprint_issue_pairing as (
2828
sprint_activity_window as (
2929

3030
select
31-
cast(sprint_id as {{ dbt.type_int() }}) as sprint_id,
31+
sprint_id,
3232
min(cast(updated_at as date)) as first_change_date,
3333
max(cast(updated_at as date)) as last_change_date
3434
from sprint_issue_pairing
@@ -38,7 +38,7 @@ sprint_activity_window as (
3838
ranked_sprint_updates as (
3939

4040
select
41-
cast(sprint_issue_pairing.sprint_id as {{ dbt.type_int() }}) as sprint_id,
41+
sprint_issue_pairing.sprint_id,
4242
sprint_issue_pairing.issue_id,
4343
sprint_issue_pairing.updated_at,
4444
sprint_issue_pairing.is_active,
@@ -56,7 +56,7 @@ ranked_sprint_updates as (
5656
) as row_num
5757
from sprint_issue_pairing
5858
left join sprint_activity_window
59-
on sprint_activity_window.sprint_id = cast(sprint_issue_pairing.sprint_id as {{ dbt.type_int() }})
59+
on cast(sprint_activity_window.sprint_id as {{ dbt.type_string() }}) = sprint_issue_pairing.sprint_id
6060
left join daily_issue_field_history
6161
on sprint_issue_pairing.issue_id = daily_issue_field_history.issue_id
6262
-- Ensure tracking starts at the correct earliest date
@@ -85,7 +85,7 @@ filtered_issue_sprint_history as (
8585
inner join {{ ref('jira__issue_enhanced') }} issue
8686
on ranked_sprint_updates.issue_id = issue.issue_id
8787
inner join {{ var('sprint') }} sprint
88-
on ranked_sprint_updates.sprint_id = sprint.sprint_id
88+
on ranked_sprint_updates.sprint_id = cast(sprint.sprint_id as {{ dbt.type_string() }})
8989
where row_num = 1 --Keep only the last update per sprint-issue-date_day
9090
),
9191

0 commit comments

Comments
 (0)