Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parent_id field in the field_option table #32

Merged
merged 4 commits into from
Jun 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Pull Request
**Are you a current Fivetran customer?**
<!--- Please tell us your name, title and company -->

Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# dbt_jira_source v0.4.2
## Features
- Added the `parent_id` field in the `stg_jira__field_option` model. This field is used when defining custom fields as parent and child custom fields can be created to define a variety of main categories and subcategories. ([#32](https://github.com/fivetran/dbt_jira_source/pull/32))

## Contributors
- [@sergiisolaa](https://github.com/sergiisolaa) ([#32](https://github.com/fivetran/dbt_jira_source/pull/32))

# dbt_jira_source v0.4.1
## Features
- Makes Priority data optional. If `jira_using_priorities: false` in `dbt_project.yml`, then `stg_jira__priority_tmp` and `stg_jira__priority` won't build. ([#30](https://github.com/fivetran/dbt_jira_source/pull/30))
Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'jira_source'
version: '0.4.1'
version: '0.4.2'
config-version: 2
require-dbt-version: [">=1.0.0", "<2.0.0"]

Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions docs/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/manifest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/run_results.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'jira_source_integration_tests'
version: '0.4.1'
version: '0.4.2'
config-version: 2
profile: 'integration_tests'

Expand Down
8 changes: 4 additions & 4 deletions integration_tests/seeds/field_option.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
id,_fivetran_synced,name
10104,2020-11-23 12:21:00.979,opt 2
10016,2020-11-17 12:20:52.552,To Do
10106,2020-11-17 12:20:52.227,opt 4
id,_fivetran_synced,name,parent_id
10104,2020-11-23 12:21:00.979,opt 2,10005
10016,2020-11-17 12:20:52.552,To Do,10005
10106,2020-11-17 12:20:52.227,opt 4,10005
1 change: 1 addition & 0 deletions macros/get_field_option_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

{% set columns = [
{"name": "id", "datatype": dbt_utils.type_int()},
{"name": "parent_id", "datatype": dbt_utils.type_int()},
{"name": "_fivetran_synced", "datatype": dbt_utils.type_timestamp()},
{"name": "name", "datatype": dbt_utils.type_string()}
] %}
Expand Down
2 changes: 2 additions & 0 deletions models/src_jira.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ sources:
columns:
- name: id
description: The ID of the custom field.
- name: parent_id
description: The ID of the parent custom field.
- name: name
description: Name of the field option.

Expand Down
2 changes: 2 additions & 0 deletions models/stg_jira.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ models:
description: The ID of the custom field.
tests:
- not_null
- name: parent_field_id
description: The ID of the parent custom field.
- name: field_option_name
description: Name of the field option.

Expand Down
1 change: 1 addition & 0 deletions models/stg_jira__field_option.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ final as (

select
id as field_id,
parent_id as parent_field_id,
name as field_option_name

from fields
Expand Down