Skip to content

Commit 30260df

Browse files
Merge branch 'MagicBot/consolidate-source-package' into MagicBot/fy26-q2-updates
2 parents 7158d19 + d31fbf1 commit 30260df

74 files changed

Lines changed: 1677 additions & 98 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
1-
[PR #142](https://github.com/fivetran/dbt_jira/pull/142) includes the following updates:
1+
# dbt_jira v1.0.0
22

3-
### Under the Hood - July 2025 Updates
3+
[PR #145](https://github.com/fivetran/dbt_jira/pull/145) includes the following updates:
44

5+
## Breaking Changes
6+
7+
### Source Package Consolidation
8+
- Removed the dependency on the `fivetran/jira_source` package.
9+
- All functionality from the source package has been merged into this transformation package for improved maintainability and clarity.
10+
- If you reference `fivetran/jira_source` in your `packages.yml`, you must remove this dependency to avoid conflicts.
11+
- Any source overrides referencing the `fivetran/jira_source` package will also need to be removed or updated to reference this package.
12+
- Update any jira_source-scoped variables to be scoped to only under this package. See the [README](https://github.com/fivetran/dbt_jira/blob/main/README.md) for how to configure the build schema of staging models.
13+
- As part of the consolidation, vars are no longer used to reference staging models, and only sources are represented by vars. Staging models are now referenced directly with `ref()` in downstream models.
14+
15+
### dbt Fusion Compatibility Updates
16+
- Updated package to maintain compatibility with dbt-core versions both before and after v1.10.6, which introduced a breaking change to multi-argument test syntax (e.g., `unique_combination_of_columns`).
17+
- Temporarily removed unsupported tests to avoid errors and ensure smoother upgrades across different dbt-core versions. These tests will be reintroduced once a safe migration path is available.
18+
- Removed all `dbt_utils.unique_combination_of_columns` tests.
19+
- Removed all `accepted_values` tests.
20+
- Moved `loaded_at_field: _fivetran_synced` under the `config:` block in `src_jira.yml`.
21+
22+
## Under the Hood
523
- Updated conditions in `.github/workflows/auto-release.yml`.
624
- Added `.github/workflows/generate-docs.yml`.
7-
- Added `+docs: show: False` to `integration_tests/dbt_project.yml`.
8-
- Migrated `flags` (e.g., `send_anonymous_usage_stats`, `use_colors`) from `sample.profiles.yml` to `integration_tests/dbt_project.yml`.
9-
- Updated `maintainer_pull_request_template.md` with improved checklist.
10-
- Refreshed README tag block:
11-
- Standardized Quickstart-compatible badge set
12-
- Left-aligned and positioned below the H1 title.
13-
- Updated Python image version to `3.10.13` in `pipeline.yml`.
14-
- Added `CI_DATABRICKS_DBT_CATALOG` to:
15-
- `.buildkite/hooks/pre-command` (as an export)
16-
- `pipeline.yml` (under the `environment` block, after `CI_DATABRICKS_DBT_TOKEN`)
17-
- Added `certifi==2025.1.31` to `requirements.txt` (if missing).
18-
- Updated `.gitignore` to exclude additional DBT, Python, and system artifacts.
1925

2026
# dbt_jira v0.21.0
2127

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</p>
1717

1818
## What does this dbt package do?
19-
- Produces modeled tables that leverage Jira data from [Fivetran's connector](https://fivetran.com/docs/applications/jira) in the format described by [this ERD](https://fivetran.com/docs/applications/jira#schemainformation) and builds off the output of our [Jira source package](https://github.com/fivetran/dbt_jira_source).
19+
- Produces modeled tables that leverage Jira data from [Fivetran's connector](https://fivetran.com/docs/applications/jira) in the format described by [this ERD](https://fivetran.com/docs/applications/jira#schemainformation).
2020
- Enables you to better understand the workload, performance, and velocity of your team's work using Jira issues. It performs the following actions:
2121
- Creates a daily issue history table so you can quickly create agile reports, such as burndown charts, along any issue field.
2222
- Enriches the core issue table with relevant data regarding its workflow and current state.
@@ -72,7 +72,7 @@ Include the following jira package version in your `packages.yml` file:
7272
```yaml
7373
packages:
7474
- package: fivetran/jira
75-
version: [">=0.21.0", "<0.22.0"]
75+
version: [">=1.0.0", "<1.1.0"]
7676
7777
```
7878
### Step 3: Define database and schema variables
@@ -116,10 +116,10 @@ vars:
116116
The `jira__daily_issue_field_history` model generates historical data for the columns specified by the `issue_field_history_columns` variable. By default, the only columns tracked are `status`, `status_id`,`sprint`, `story_points` and `story_point_estimate`, but all fields found in the Jira `FIELD` table's `field_name` column can be included in this model. The most recent value of any tracked column is also captured in `jira__issue_enhanced`.
117117

118118
If you would like to change these columns, add the following configuration to your `dbt_project.yml` file. After adding the columns to your `dbt_project.yml` file, run the `dbt run --full-refresh` command to fully refresh any existing models:
119-
120-
> IMPORTANT: If you wish to use a custom field, be sure to list the `field_name` and not the `field_id`. The corresponding `field_name` can be found in the `stg_jira__field` model.
121-
122-
```yml
119+
jira:
120+
+schema: my_new_schema_name # Leave +schema: blank to use the default target_schema.
121+
staging:
122+
+schema: my_new_schema_name # Leave +schema: blank to use the default target_schema.
123123
vars:
124124
issue_field_history_columns: ['the', 'list', 'of', 'field', 'names']
125125
```
@@ -147,10 +147,10 @@ By default, this package builds the Jira staging models within a schema titled (
147147

148148
```yml
149149
models:
150-
jira_source:
151-
+schema: my_new_schema_name # leave blank for just the target_schema
152150
jira:
153-
+schema: my_new_schema_name # leave blank for just the target_schema
151+
+schema: my_new_schema_name # Leave +schema: blank to use the default target_schema.
152+
staging:
153+
+schema: my_new_schema_name # Leave +schema: blank to use the default target_schema.
154154
```
155155

156156
#### Change the source table references
@@ -187,9 +187,6 @@ This dbt package is dependent on the following dbt packages. These dependencies
187187

188188
```yml
189189
packages:
190-
- package: fivetran/jira_source
191-
version: [">=0.9.0", "<0.10.0"]
192-
193190
- package: fivetran/fivetran_utils
194191
version: [">=0.4.0", "<0.5.0"]
195192

dbt_project.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
name: 'jira'
2-
version: '0.21.0'
2+
version: '1.0.0'
33
config-version: 2
44
require-dbt-version: [">=1.3.0", "<2.0.0"]
55
vars:
66

77
jira:
8-
issue: "{{ ref('stg_jira__issue') }}"
9-
project: "{{ ref('stg_jira__project') }}"
10-
user: "{{ ref('stg_jira__user') }}"
11-
issue_type: "{{ ref('stg_jira__issue_type') }}"
12-
status: "{{ ref('stg_jira__status') }}"
13-
status_category: "{{ ref('stg_jira__status_category') }}"
14-
resolution: "{{ ref('stg_jira__resolution') }}"
15-
priority: "{{ ref('stg_jira__priority') }}"
16-
issue_multiselect_history: "{{ ref('stg_jira__issue_multiselect_history') }}"
17-
issue_field_history: "{{ ref('stg_jira__issue_field_history') }}"
18-
comment: "{{ ref('stg_jira__comment') }}"
19-
issue_link: "{{ ref('stg_jira__issue_link') }}"
20-
component: "{{ ref('stg_jira__component') }}"
21-
field: "{{ ref('stg_jira__field') }}"
22-
field_option: "{{ ref('stg_jira__field_option') }}"
23-
sprint: "{{ ref('stg_jira__sprint') }}"
24-
version: "{{ ref('stg_jira__version') }}"
8+
issue: "{{ source('jira', 'issue') }}"
9+
project: "{{ source('jira', 'project') }}"
10+
user: "{{ source('jira', 'user') }}"
11+
issue_type: "{{ source('jira', 'issue_type') }}"
12+
status: "{{ source('jira', 'status') }}"
13+
status_category: "{{ source('jira', 'status_category') }}"
14+
resolution: "{{ source('jira', 'resolution') }}"
15+
priority: "{{ source('jira', 'priority') }}"
16+
issue_multiselect_history: "{{ source('jira', 'issue_multiselect_history') }}"
17+
issue_field_history: "{{ source('jira', 'issue_field_history') }}"
18+
comment: "{{ source('jira', 'comment') }}"
19+
issue_link: "{{ source('jira', 'issue_link') }}"
20+
component: "{{ source('jira', 'component') }}"
21+
field: "{{ source('jira', 'field') }}"
22+
field_option: "{{ source('jira', 'field_option') }}"
23+
sprint: "{{ source('jira', 'sprint') }}"
24+
version: "{{ source('jira', 'version') }}"
2525
jira_issue_history_buffer: 1
2626
models:
2727
jira:
@@ -30,3 +30,6 @@ models:
3030
intermediate:
3131
+materialized: ephemeral
3232
+schema: int_jira
33+
staging:
34+
+schema: jira_source
35+
+materialized: view

integration_tests/dbt_project.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'jira_integration_tests'
2-
version: '0.21.0'
2+
version: '1.0.0'
33
config-version: 2
44
profile: 'integration_tests'
55

@@ -34,6 +34,9 @@ models:
3434
jira:
3535
+schema: "{{ 'jira_integrations_tests_sqlw' if target.name == 'databricks-sql' else 'jira' }}"
3636
# +schema: "jira_{{ var('directed_schema','dev') }}"
37+
staging:
38+
+schema: jira_source
39+
+materialized: view
3740

3841
seeds:
3942
+docs:

integration_tests/seeds/issue.csv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
id,_fivetran_deleted,_fivetran_synced,_original_estimate,_remaining_estimate,_time_spent,assignee,created,creator,description,due_date,environment,issue_type,key,last_viewed,original_estimate,parent_id,priority,project,remaining_estimate,reporter,resolution,resolved,status,status_category_changed,summary,time_spent,updated,work_ratio
2-
10011,FALSE,2020-11-06 22:23:38,,,,,2020-04-01 08:33:58,5c3326c24b248c315badf3ee,"Yes, this is an issue to test permissions",,,10103,TP-8,,,,3,10001,,5c3326c24b248c315badf3ee,,2020-05-29 11:33:53,3,2020-04-01 08:34:02,We want to test permissions,,2020-05-29 11:33:53,-1
3-
10015,FALSE,2020-11-06 22:23:41,,,,,2020-06-11 07:38:03,5ed0edbe2999b60c23255b4f,,,,10103,TP-12,,,,5,10001,,5ed0edbe2999b60c23255b4f,,2020-06-11 07:38:03,10003,2020-06-11 07:38:03,Part of test epic,,2020-06-11 07:38:03,-1
4-
10018,FALSE,2020-11-12 12:20:50,,,,,2020-11-10 19:11:45,557058:a9572f6a-3041-435a-96ed-5286e3811b33,,,,10103,TCP-1,2020-11-10 19:11:46,,,3,10005,,557058:a9572f6a-3041-435a-96ed-5286e3811b33,,2020-11-28 19:11:45,10003,2020-11-28 19:11:46,this is a story,,2020-11-28 19:11:45,-1
1+
id,_fivetran_deleted,_fivetran_synced,_original_estimate,_remaining_estimate,_time_spent,assignee,created,creator,description,due_date,environment,issue_type,key,last_viewed,original_estimate,parent_id,priority,project,remaining_estimate,reporter,resolution,resolved,status,status_category_changed,summary,time_spent,updated,work_ratio,work_type
2+
10011,FALSE,2020-11-06 22:23:38,,,,,2020-04-01 08:33:58,5c3326c24b248c315badf3ee,"Yes, this is an issue to test permissions",,,10103,TP-8,,,,3,10001,,5c3326c24b248c315badf3ee,,2020-05-29 11:33:53,3,2020-04-01 08:34:02,We want to test permissions,,2020-05-29 11:33:53,-1,10103
3+
10015,FALSE,2020-11-06 22:23:41,,,,,2020-06-11 07:38:03,5ed0edbe2999b60c23255b4f,,,,,TP-12,,,,5,10001,,5ed0edbe2999b60c23255b4f,,2020-06-11 07:38:03,10003,2020-06-11 07:38:03,Part of test epic,,2020-06-11 07:38:03,-1,10103
4+
10018,FALSE,2020-11-12 12:20:50,,,,,2020-11-10 19:11:45,557058:a9572f6a-3041-435a-96ed-5286e3811b33,,,,10103,TCP-1,2020-11-10 19:11:46,,,3,10005,,557058:a9572f6a-3041-435a-96ed-5286e3811b33,,2020-11-28 19:11:45,10003,2020-11-28 19:11:46,this is a story,,2020-11-28 19:11:45,-1,
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{% macro get_comment_columns() %}
2+
3+
{% set columns = [
4+
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
5+
{"name": "author_id", "datatype": dbt.type_string()},
6+
{"name": "body", "datatype": dbt.type_string()},
7+
{"name": "created", "datatype": dbt.type_timestamp()},
8+
{"name": "id", "datatype": dbt.type_int()},
9+
{"name": "is_public", "datatype": "boolean"},
10+
{"name": "issue_id", "datatype": dbt.type_int()},
11+
{"name": "update_author_id", "datatype": dbt.type_string()},
12+
{"name": "updated", "datatype": dbt.type_timestamp()}
13+
] %}
14+
15+
{{ return(columns) }}
16+
17+
{% endmacro %}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{% macro get_component_columns() %}
2+
3+
{% set columns = [
4+
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
5+
{"name": "description", "datatype": dbt.type_string()},
6+
{"name": "id", "datatype": dbt.type_int()},
7+
{"name": "name", "datatype": dbt.type_string()},
8+
{"name": "project_id", "datatype": dbt.type_int()}
9+
] %}
10+
11+
{{ return(columns) }}
12+
13+
{% endmacro %}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% macro get_epic_columns() %}
2+
3+
{% set columns = [
4+
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
5+
{"name": "done", "datatype": "boolean"},
6+
{"name": "id", "datatype": dbt.type_int()},
7+
{"name": "key", "datatype": dbt.type_string()},
8+
{"name": "name", "datatype": dbt.type_string()},
9+
{"name": "summary", "datatype": dbt.type_string()}
10+
] %}
11+
12+
{{ return(columns) }}
13+
14+
{% endmacro %}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{% macro get_field_columns() %}
2+
3+
{% set columns = [
4+
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
5+
{"name": "id", "datatype": dbt.type_string()},
6+
{"name": "is_array", "datatype": "boolean"},
7+
{"name": "is_custom", "datatype": "boolean"},
8+
{"name": "name", "datatype": dbt.type_string()}
9+
] %}
10+
11+
{{ return(columns) }}
12+
13+
{% endmacro %}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{% macro get_field_option_columns() %}
2+
3+
{% set columns = [
4+
{"name": "id", "datatype": dbt.type_int()},
5+
{"name": "parent_id", "datatype": dbt.type_int()},
6+
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
7+
{"name": "name", "datatype": dbt.type_string()}
8+
] %}
9+
10+
{{ return(columns) }}
11+
12+
{% endmacro %}

0 commit comments

Comments
 (0)