Skip to content

Commit 4bf3c28

Browse files
Pre-release for fixing cast value issues
1 parent 14923fd commit 4bf3c28

File tree

8 files changed

+51
-34
lines changed

8 files changed

+51
-34
lines changed
Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
1-
## PR Overview
2-
**This PR will address the following Issue/Feature:**
1+
<!--
2+
Pre-Submission Reminders
3+
Before marking this PR as "ready for review":
34
4-
**This PR will result in the following new package version:**
5-
<!--- Please add details around your decision for breaking vs non-breaking version upgrade. If this is a breaking change, were backwards-compatible options explored? -->
5+
- `dbt run --full-refresh && dbt test`
6+
- `dbt run` && `dbt test` (if incremental models are present)
7+
- The related issue is linked, tagged, and appropriately assigned
8+
- Documentation and version updates are included, if applicable
9+
- `docs` have been regenerated (unless there are no code or YAML changes)
10+
- BuildKite integration tests are passing
11+
-->
612

7-
**Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:**
8-
<!--- Copy/paste the CHANGELOG for this version below. -->
13+
## PR Overview
14+
**Package version introduced in this PR:**
15+
16+
**This PR addresses the following Issue/Feature(s):**
17+
<!-- Add Issue # or internal ticket reference -->
918

10-
## PR Checklist
11-
### Basic Validation
12-
Please acknowledge that you have successfully performed the following commands locally:
13-
- [ ] dbt run –full-refresh && dbt test
14-
- [ ] dbt run (if incremental models are present) && dbt test
19+
**Summary of changes:**
20+
<!-- 1-2 sentences describing PR changes. -->
1521

16-
Before marking this PR as "ready for review" the following have been applied:
17-
- [ ] The appropriate issue has been linked, tagged, and properly assigned
18-
- [ ] All necessary documentation and version upgrades have been applied
19-
- [ ] docs were regenerated (unless this PR does not include any code or yml updates)
20-
- [ ] BuildKite integration tests are passing
21-
- [ ] Detailed validation steps have been provided below
2222

23-
### Detailed Validation
24-
Please share any and all of your validation steps:
25-
<!--- Provide the steps you took to validate your changes below. -->
23+
### Submission Checklist
24+
- [ ] Alignment meeting with the reviewer (if needed)
25+
- [ ] Timeline and validation requirements discussed
26+
- [ ] Provide validation details:
27+
- [ ] **Validation Steps:** Check for unintentional effects (e.g., add/run consistency & integrity tests)
28+
- [ ] **Testing Instructions:** Confirm the change addresses the issue(s)
29+
- [ ] **Focus Areas:** Complex logic or queries that need extra attention
2630

27-
### If you had to summarize this PR in an emoji, which would it be?
28-
<!--- For a complete list of markdown compatible emojis check our this git repo (https://gist.github.com/rxaviers/7360908) -->
29-
:dancer:
31+
### Changelog
32+
<!-- Recommend drafting changelog notes, then refining via ChatGPT using:
33+
"Draft a changelog entry based on the following notes." -->
34+
- [ ] Draft changelog for PR
35+
- [ ] Final changelog for release review

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# dbt_jira v0.20.1-a1
2+
[PR #138](https://github.com/fivetran/dbt_jira/pull/138) contains the following updates:
3+
4+
## Bug Fix
5+
- Moved casting of integer of `sprint_id` in `jira__daily_sprint_issue_history` into a later CTE to avoid casting errors where `field_value` is a string.
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+
111
# dbt_jira v0.20.0
212
This release includes the following updates.
313

dbt_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'jira'
2-
version: '0.20.0'
2+
version: '0.20.1'
33
config-version: 2
44
require-dbt-version: [">=1.3.0", "<2.0.0"]
55
vars:

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.

integration_tests/dbt_project.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'jira_integration_tests'
2-
version: '0.20.0'
2+
version: '0.20.1'
33
config-version: 2
44
profile: 'integration_tests'
55

@@ -32,8 +32,8 @@ vars:
3232

3333
models:
3434
jira:
35-
+schema: "{{ 'jira_integrations_tests_sqlw' if target.name == 'databricks-sql' else 'jira' }}"
36-
# +schema: "jira_{{ var('directed_schema','dev') }}"
35+
# +schema: "{{ 'jira_integrations_tests_sqlw' if target.name == 'databricks-sql' else 'jira' }}"
36+
+schema: "jira_{{ var('directed_schema','dev') }}"
3737

3838
seeds:
3939
jira_integration_tests:

integration_tests/tests/consistency/consistency_issue_enhanced.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
) }}
66

77
{# Exclude columns that depend on calculations involving the current time in seconds or aggregate strings in a random order, as they will differ between runs. #}
8-
{% set exclude_columns = [] %}
8+
{% set exclude_columns = ['open_duration_seconds', 'any_assignment_duration_seconds', 'last_assignment_duration_seconds'] %}
99
with prod as (
1010
select {{ dbt_utils.star(from=ref('jira__issue_enhanced'), except=exclude_columns) }}
1111
from {{ target.schema }}_jira_prod.jira__issue_enhanced

models/jira__daily_sprint_issue_history.sql

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,18 @@ sprint_issue_pairing as (
1717

1818
select
1919
issue_id,
20-
cast(field_value as {{ dbt.type_int() }}) as sprint_id,
20+
field_value as sprint_id,
2121
updated_at,
2222
is_active
2323
from {{ ref('int_jira__issue_multiselect_history') }}
2424
where field_name = 'sprint'
2525
and field_value is not null
2626
),
27+
2728
sprint_activity_window as (
2829

2930
select
30-
sprint_id,
31+
cast(sprint_id as {{ dbt.type_int() }}) as sprint_id,
3132
min(cast(updated_at as date)) as first_change_date,
3233
max(cast(updated_at as date)) as last_change_date
3334
from sprint_issue_pairing
@@ -37,7 +38,7 @@ sprint_activity_window as (
3738
ranked_sprint_updates as (
3839

3940
select
40-
sprint_issue_pairing.sprint_id,
41+
cast(sprint_issue_pairing.sprint_id as {{ dbt.type_int() }}) as sprint_id,
4142
sprint_issue_pairing.issue_id,
4243
sprint_issue_pairing.updated_at,
4344
sprint_issue_pairing.is_active,
@@ -55,7 +56,7 @@ ranked_sprint_updates as (
5556
) as row_num
5657
from sprint_issue_pairing
5758
left join sprint_activity_window
58-
on sprint_activity_window.sprint_id = sprint_issue_pairing.sprint_id
59+
on sprint_activity_window.sprint_id = cast(sprint_issue_pairing.sprint_id as {{ dbt.type_int() }})
5960
left join daily_issue_field_history
6061
on sprint_issue_pairing.issue_id = daily_issue_field_history.issue_id
6162
-- Ensure tracking starts at the correct earliest date

0 commit comments

Comments
 (0)