From 6c4b25e1433b23f80312b6077fb0e90dcc00abba Mon Sep 17 00:00:00 2001 From: Tope Folorunso Date: Sat, 7 Sep 2024 02:57:13 +0100 Subject: [PATCH 1/3] create package --- connectors/source_jira/README.md | 89 +++++++++++++- connectors/source_jira/dbt_project.yml | 2 +- .../integration_tests/dbt_project.yml | 48 ++++++++ .../integration_tests/package-lock.yml | 13 +++ .../integration_tests/packages.yml | 5 + connectors/source_jira/integration_tests/vars | 1 + .../models/fivetran_converter/comment.sql | 56 +++++++++ .../models/fivetran_converter/comment.yml | 27 +++++ .../models/fivetran_converter/component.sql | 44 +++++++ .../models/fivetran_converter/component.yml | 19 +++ .../models/fivetran_converter/field.sql | 71 +++++++++++ .../models/fivetran_converter/field.yml | 23 ++++ .../fivetran_converter/field_option.sql | 41 +++++++ .../fivetran_converter/field_option.yml | 17 +++ .../models/fivetran_converter/issue.sql | 110 ++++++++++++++++++ .../models/fivetran_converter/issue.yml | 71 +++++++++++ .../issue_field_history.sql | 44 +++++++ .../issue_field_history.yml | 20 ++++ .../models/fivetran_converter/issue_link.sql | 41 +++++++ .../models/fivetran_converter/issue_link.yml | 17 +++ .../issue_multiselect_history.sql | 44 +++++++ .../issue_multiselect_history.yml | 19 +++ .../models/fivetran_converter/project.sql | 53 +++++++++ .../models/fivetran_converter/project.yml | 25 ++++ .../models/fivetran_converter/sprint.sql | 50 ++++++++ .../models/fivetran_converter/sprint.yml | 23 ++++ .../models/fivetran_converter/status.sql | 44 +++++++ .../models/fivetran_converter/status.yml | 21 ++++ .../models/fivetran_converter/user.sql | 50 ++++++++ .../models/fivetran_converter/user.yml | 23 ++++ .../models/fivetran_converter/version.sql | 59 ++++++++++ .../models/fivetran_converter/version.yml | 29 +++++ .../source/issue_custom_field_options.yaml | 30 +++++ .../models/source/issue_remote_links.yaml | 33 ++++++ .../models/source/issue_types.yaml | 45 +++++++ .../source_jira/models/source/projects.yaml | 4 +- .../source/workflow_status_categories.yaml | 28 +++++ .../models/source/workflow_statuses.yaml | 37 ++++++ 38 files changed, 1368 insertions(+), 8 deletions(-) create mode 100644 connectors/source_jira/integration_tests/dbt_project.yml create mode 100644 connectors/source_jira/integration_tests/package-lock.yml create mode 100644 connectors/source_jira/integration_tests/packages.yml create mode 100644 connectors/source_jira/integration_tests/vars create mode 100644 connectors/source_jira/models/fivetran_converter/comment.sql create mode 100644 connectors/source_jira/models/fivetran_converter/comment.yml create mode 100644 connectors/source_jira/models/fivetran_converter/component.sql create mode 100644 connectors/source_jira/models/fivetran_converter/component.yml create mode 100644 connectors/source_jira/models/fivetran_converter/field.sql create mode 100644 connectors/source_jira/models/fivetran_converter/field.yml create mode 100644 connectors/source_jira/models/fivetran_converter/field_option.sql create mode 100644 connectors/source_jira/models/fivetran_converter/field_option.yml create mode 100644 connectors/source_jira/models/fivetran_converter/issue.sql create mode 100644 connectors/source_jira/models/fivetran_converter/issue.yml create mode 100644 connectors/source_jira/models/fivetran_converter/issue_field_history.sql create mode 100644 connectors/source_jira/models/fivetran_converter/issue_field_history.yml create mode 100644 connectors/source_jira/models/fivetran_converter/issue_link.sql create mode 100644 connectors/source_jira/models/fivetran_converter/issue_link.yml create mode 100644 connectors/source_jira/models/fivetran_converter/issue_multiselect_history.sql create mode 100644 connectors/source_jira/models/fivetran_converter/issue_multiselect_history.yml create mode 100644 connectors/source_jira/models/fivetran_converter/project.sql create mode 100644 connectors/source_jira/models/fivetran_converter/project.yml create mode 100644 connectors/source_jira/models/fivetran_converter/sprint.sql create mode 100644 connectors/source_jira/models/fivetran_converter/sprint.yml create mode 100644 connectors/source_jira/models/fivetran_converter/status.sql create mode 100644 connectors/source_jira/models/fivetran_converter/status.yml create mode 100644 connectors/source_jira/models/fivetran_converter/user.sql create mode 100644 connectors/source_jira/models/fivetran_converter/user.yml create mode 100644 connectors/source_jira/models/fivetran_converter/version.sql create mode 100644 connectors/source_jira/models/fivetran_converter/version.yml create mode 100644 connectors/source_jira/models/source/issue_custom_field_options.yaml create mode 100644 connectors/source_jira/models/source/issue_remote_links.yaml create mode 100644 connectors/source_jira/models/source/issue_types.yaml create mode 100644 connectors/source_jira/models/source/workflow_status_categories.yaml create mode 100644 connectors/source_jira/models/source/workflow_statuses.yaml diff --git a/connectors/source_jira/README.md b/connectors/source_jira/README.md index bcd6b107..54eac0eb 100644 --- a/connectors/source_jira/README.md +++ b/connectors/source_jira/README.md @@ -1,9 +1,88 @@ -# Airbyte source_jira dbt Package +# Jira Airbyte dbt Package -This package contains dbt models for Airbyte Jira source. +This package contains dbt models for Airbyte source_jira source. What it includes: -- A complete source description -- ERD model for the source -- Diagram documentation for the source +- This package contains dbt models to work with Airbyte Jira connector. +- The package is compatible with latest version of Airbyte Jira connector. +- Currently, it is limited to creating transformations compatible with [Fivetran's modeling dbt package](https://github.com/fivetran/dbt_jira/tree/main). +- In the future, specific models will be applied directly to Airbyte connector output. If you have an idea or want to propose an analytical model for this source, please refer to the contributing guide, which explains how to propose a new transformation model. +- This package was tested with BigQuery, Snowflake, and Postgres data warehouses. + +--- + +## 🎯 Intructions how to use + +### Airbyte dbt Package + +For now Airbyte dbt packages aren't versioned. You must configure using git and subdirectory. For now there isn't any transformation model directly applied to this package. But you can generate docs and tests with dbt. + +Create the following files: + +**`dbt_project.yml`** + +```yaml +vars: + using_fivetran_model: False + airbyte_database: "airbyte_db_default" + airbyte_schema: "airbyte_dbt_jira" +``` + +**`packages.yml`** + +```yaml +packages: + - git: "https://github.com/airbytehq/airbyte-dbt-models.git" + subdirectory: "connectors/source_jira" +``` + +After you can run `dbt tests` or `dbt docs generate` to have a preview of Airbyte output data. + +### Fivetran Jira Modeling dbt package + +This package transforms Airbyte connector output data, making it compatible with Fivetran's Jira dbt package. You can check the analytical models Fivetran creates [here](https://github.com/fivetran/dbt_jira/tree/main?tab=readme-ov-file#-what-does-this-dbt-package-do). The link also provides information about how the package works and what is configurable. + +Create the require files to use Airbyte and Fivetran dbt packages: + +**`packages.yml`** + +```yaml +packages: + - git: "https://github.com/airbytehq/airbyte-dbt-models.git" + subdirectory: "connectors/source_jira" + + - package: fivetran/jira + version: [">=0.5.0", "<0.6.0"] +``` + +This is a default variable definition you must configure to have the models created. + +**`dbt_project.yml`** + +```yaml +vars: + # Required by Airbyte dbt model + using_fivetran_model: True + airbyte_database: "airbyte_db_default" + airbyte_schema: "dbt_source_jira" + + # Required by Fivetran dbt model + jira_database: "airbyte_db_default" + jira_schema: "dbt_source_jira" + + jira_issue_type_identifier: "issue_types" + jira_priority_identifier: "issue_priorities" + jira_resolution_identifier: "issue_resolutions" + jira_status_category_identifier: "workflow_status_categories" + +``` + +After run `dbt run`, you can see the models being created. + +--- + +## :package: Package Maintenance + +- This package is maintained by the Airbyte Community. +- You can contribute any time please read the Contributing Guidelines or enter the Airbyte Slack Channel `#airbyte-dbt-packages` \ No newline at end of file diff --git a/connectors/source_jira/dbt_project.yml b/connectors/source_jira/dbt_project.yml index 41044465..0c247262 100644 --- a/connectors/source_jira/dbt_project.yml +++ b/connectors/source_jira/dbt_project.yml @@ -4,7 +4,7 @@ config-version: 2 version: 0.1.0 -profile: airbyte +profile: integration_tests model-paths: - models diff --git a/connectors/source_jira/integration_tests/dbt_project.yml b/connectors/source_jira/integration_tests/dbt_project.yml new file mode 100644 index 00000000..30c3dca1 --- /dev/null +++ b/connectors/source_jira/integration_tests/dbt_project.yml @@ -0,0 +1,48 @@ +name: integration_test_jira + +config-version: 2 + +version: 0.1.0 + +profile: integration_tests + +model-paths: + - models + +macro-paths: + - macros + +target-path: target + +clean-targets: + - target + - dbt_modules + - logs + +require-dbt-version: + - ">=1.0.0" + - <2.0.0 + +models: + airbyte_dbt_source_jira: + materialized: view + +schema: dbt_source_jira + staging: + materialized: view + tmp: + materialized: view + +vars: + # Required by Airbyte dbt model + using_fivetran_model: True + airbyte_database: "airbyte_db_default" + airbyte_schema: "dbt_source_jira" + + # Required by Fivetran dbt model + jira_database: "airbyte_db_default" + jira_schema: "dbt_source_jira" + + jira_issue_type_identifier: "issue_types" + jira_priority_identifier: "issue_priorities" + jira_resolution_identifier: "issue_resolutions" + jira_status_category_identifier: "workflow_status_categories" diff --git a/connectors/source_jira/integration_tests/package-lock.yml b/connectors/source_jira/integration_tests/package-lock.yml new file mode 100644 index 00000000..4472579b --- /dev/null +++ b/connectors/source_jira/integration_tests/package-lock.yml @@ -0,0 +1,13 @@ +packages: + - local: ../ + - package: fivetran/jira + version: 0.17.0 + - package: fivetran/jira_source + version: 0.7.0 + - package: fivetran/fivetran_utils + version: 0.4.10 + - package: dbt-labs/spark_utils + version: 0.3.0 + - package: dbt-labs/dbt_utils + version: 1.3.0 +sha1_hash: b216f815347320cdcdf10fdbf54ef51e49b42e2a diff --git a/connectors/source_jira/integration_tests/packages.yml b/connectors/source_jira/integration_tests/packages.yml new file mode 100644 index 00000000..421c4d5b --- /dev/null +++ b/connectors/source_jira/integration_tests/packages.yml @@ -0,0 +1,5 @@ +packages: + - local: ../ + + - package: fivetran/jira + version: [">=0.17.0", "<0.18.0"] diff --git a/connectors/source_jira/integration_tests/vars b/connectors/source_jira/integration_tests/vars new file mode 100644 index 00000000..b5526afd --- /dev/null +++ b/connectors/source_jira/integration_tests/vars @@ -0,0 +1 @@ +{airbyte_database: $AB_DB, jira_database: $AB_DB} \ No newline at end of file diff --git a/connectors/source_jira/models/fivetran_converter/comment.sql b/connectors/source_jira/models/fivetran_converter/comment.sql new file mode 100644 index 00000000..d6d6f017 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/comment.sql @@ -0,0 +1,56 @@ + +{% if target.type == "postgres" %} + + WITH TMP AS ( + SELECT + author AS author_id, + body, + created, + id, + issueId AS issue_id, + jsdPublic AS is_public, + updateAuthor AS update_author_id, + updated + FROM + {{ source('source_jira', 'issue_comments') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "bigquery" %} + + WITH TMP AS ( + SELECT + author AS author_id, + body, + created, + id, + issueId AS issue_id, + jsdPublic AS is_public, + updateAuthor AS update_author_id, + updated + FROM + {{ source('source_jira', 'issue_comments') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "snowflake" %} + + WITH TMP AS ( + SELECT + author AS author_id, + body, + created, + id, + issueId AS issue_id, + jsdPublic AS is_public, + updateAuthor AS update_author_id, + updated + FROM + {{ source('source_jira', 'issue_comments') }} + ) + + SELECT * FROM TMP + +{%endif%} diff --git a/connectors/source_jira/models/fivetran_converter/comment.yml b/connectors/source_jira/models/fivetran_converter/comment.yml new file mode 100644 index 00000000..d45b6cc4 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/comment.yml @@ -0,0 +1,27 @@ +version: 2 + +models: + - name: comment + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + identifier: "{{ var('jira_comment_identifier', 'comment') }}" + description: All fields and field values associated with comments. + config: + +enabled: "{{ var('using_fivetran_model', False) }}" + columns: + - name: id + description: "The ID of the comment" + - name: issue_id + description: "ID of the related issue" + - name: author_id + description: "The ID of the user who created the comment" + - name: body + description: "The comment text in Atlassian Document Format" + - name: update_author_id + description: "The ID of the user who updated the comment last" + - name: created + description: "The date and time at which the comment was created" + - name: updated + description: "The date and time at which the comment was updated last" + - name: is_public + description: "Whether the comment is visible in Jira Service Desk" diff --git a/connectors/source_jira/models/fivetran_converter/component.sql b/connectors/source_jira/models/fivetran_converter/component.sql new file mode 100644 index 00000000..b9d33ae2 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/component.sql @@ -0,0 +1,44 @@ + +{% if target.type == "postgres" %} + + WITH TMP AS ( + SELECT + description, + id, + name, + projectId AS project_id + FROM + {{ source('source_jira', 'issue_comments') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "bigquery" %} + + WITH TMP AS ( + SELECT + description, + id, + name, + projectId AS project_id + FROM + {{ source('source_jira', 'issue_comments') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "snowflake" %} + + WITH TMP AS ( + SELECT + description, + id, + name, + projectId AS project_id + FROM + {{ source('source_jira', 'issue_comments') }} + ) + + SELECT * FROM TMP + +{%endif%} diff --git a/connectors/source_jira/models/fivetran_converter/component.yml b/connectors/source_jira/models/fivetran_converter/component.yml new file mode 100644 index 00000000..d12092c2 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/component.yml @@ -0,0 +1,19 @@ +version: 2 + +models: + - name: component + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + identifier: "{{ var('jira_component_identifier', 'component') }}" + description: Table of project components (subsections to group issues). + config: + +enabled: "{{ var('using_fivetran_model', False) }}" + columns: + - name: id + description: ID of the component. + - name: description + description: Description given to the component. + - name: name + description: UI-facing name of the component. + - name: project_id + description: Foreign key referencing the id of the component's `project`. diff --git a/connectors/source_jira/models/fivetran_converter/field.sql b/connectors/source_jira/models/fivetran_converter/field.sql new file mode 100644 index 00000000..7b918ded --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/field.sql @@ -0,0 +1,71 @@ + +{% if target.type == "postgres" %} + + WITH TMP1 AS ( + SELECT + id, + (schema->>'type' = 'array') AS is_array, + custom AS is_custom, + name + FROM + {{ source('source_jira', 'issue_fields') }} + ), + + TMP2 AS ( + SELECT + * + FROM + TMP1 + WHERE + is_array + ) + + SELECT * FROM TMP2 + +{% elif target.type == "bigquery" %} + + WITH TMP1 AS ( + SELECT + id, + (JSON_VALUE(schema, '$.type') = 'array') AS is_array, + custom AS is_custom, + name + FROM + {{ source('source_jira', 'issue_fields') }} + ), + + TMP2 AS ( + SELECT + * + FROM + TMP1 + WHERE + is_array + ) + + SELECT * FROM TMP2 + +{% elif target.type == "snowflake" %} + + WITH TMP1 AS ( + SELECT + id, + (schema:"type"::string = 'array') AS is_array, + custom AS is_custom, + name + FROM + {{ source('source_jira', 'issue_fields') }} + ), + + TMP2 AS ( + SELECT + * + FROM + TMP1 + WHERE + is_array + ) + + SELECT * FROM TMP2 + +{%endif%} diff --git a/connectors/source_jira/models/fivetran_converter/field.yml b/connectors/source_jira/models/fivetran_converter/field.yml new file mode 100644 index 00000000..a8dabc8b --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/field.yml @@ -0,0 +1,23 @@ +version: 2 + +models: + - name: field + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + identifier: "{{ var('jira_field_identifier', 'field') }}" + description: Table of all issue fields. + config: + +enabled: "{{ var('using_fivetran_model', False) }}" + columns: + - name: id + description: > + Unique ID of the field. Default fields will have descriptive IDs, whereas custom + field IDs will be `'customfield_#####'`. + - name: is_array + description: Boolean that is true if a field can have multiple values (is mulitselect). + - name: is_custom + description: > + Boolean that is true if the field is custom to this organization, and false if + it is default to Jira. + - name: name + description: Name of the field as it appears on issue cards. diff --git a/connectors/source_jira/models/fivetran_converter/field_option.sql b/connectors/source_jira/models/fivetran_converter/field_option.sql new file mode 100644 index 00000000..d6496255 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/field_option.sql @@ -0,0 +1,41 @@ + +{% if target.type == "postgres" %} + + WITH TMP AS ( + SELECT + id, + fieldId AS parent_id, + value AS name + FROM + {{ source('source_jira', 'issue_custom_field_options') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "bigquery" %} + + WITH TMP AS ( + SELECT + id, + fieldId AS parent_id, + value AS name + FROM + {{ source('source_jira', 'issue_custom_field_options') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "snowflake" %} + + WITH TMP AS ( + SELECT + id, + fieldId AS parent_id, + value AS name + FROM + {{ source('source_jira', 'issue_custom_field_options') }} + ) + + SELECT * FROM TMP + +{%endif%} diff --git a/connectors/source_jira/models/fivetran_converter/field_option.yml b/connectors/source_jira/models/fivetran_converter/field_option.yml new file mode 100644 index 00000000..fabdc2c7 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/field_option.yml @@ -0,0 +1,17 @@ +version: 2 + +models: + - name: field_option + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + identifier: "{{ var('jira_field_option_identifier', 'field_option') }}" + description: Table of all options related to custom fields. + config: + +enabled: "{{ var('using_fivetran_model', False) }}" + 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. \ No newline at end of file diff --git a/connectors/source_jira/models/fivetran_converter/issue.sql b/connectors/source_jira/models/fivetran_converter/issue.sql new file mode 100644 index 00000000..a7f822a9 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/issue.sql @@ -0,0 +1,110 @@ + +{% if target.type == "postgres" %} + + WITH TMP AS ( + SELECT + fields->'timetracking'->>'originalEstimateSeconds' AS _original_estimate, + fields->'timetracking'->>'originalEstimateSeconds' AS original_estimate, + fields->'timetracking'->>'remainingEstimateSeconds' AS _remaining_estimate, + fields->'timetracking'->>'remainingEstimateSeconds' AS remaining_estimate, + fields->'timetracking'->>'timeSpentSeconds' AS _time_spent, + fields->'timetracking'->>'timeSpentSeconds' AS time_spent, + fields->'assignee'->>'accountId' AS assignee, + created, + fields->'creator'->>'accountId' AS creator, + fields->'description'->>'content' AS description, + renderedFields->>'duedate' AS due_date, + renderedFields->>'environment' AS environment, + id, + fields->'issuetype'->>'id' AS issue_type, + key, + projectId AS parent_id, --FIX + fields->'priority'->>'id' AS priority, + projectKey AS project, + fields->'reporter'->>'accountId' AS reporter, + fields->'resolution'->>'id' AS resolution, + fields->>'resolutiondate' AS resolved, + fields->'status'->>'id' AS status, + fields->>'statuscategorychangedate' AS status_category_changed, + fields->>'summary' AS summary, + updated, + fields->>'workratio' AS work_ratio + FROM + {{ source('source_jira', 'issues') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "bigquery" %} + + WITH TMP AS ( + SELECT + JSON_EXTRACT(fields, '$.timetracking.originalEstimateSeconds') AS _original_estimate, + JSON_EXTRACT(fields, '$.timetracking.originalEstimateSeconds') AS original_estimate, + JSON_EXTRACT(fields, '$.timetracking.remainingEstimateSeconds') AS _remaining_estimate, + JSON_EXTRACT(fields, '$.timetracking.remainingEstimateSeconds') AS remaining_estimate, + JSON_EXTRACT(fields, '$.timetracking.timeSpentSeconds') AS _time_spent, + JSON_EXTRACT(fields, '$.timetracking.timeSpentSeconds') AS time_spent, + JSON_EXTRACT_SCALAR(fields, '$.assignee.accountId') AS assignee, + created, + JSON_EXTRACT_SCALAR(fields, '$.creator.accountId') AS creator, + JSON_EXTRACT_SCALAR(fields, '$.description.content') AS description, + JSON_EXTRACT_SCALAR(renderedFields, '$.duedate') AS due_date, + JSON_EXTRACT_SCALAR(renderedFields, '$.environment') AS environment, + id, + JSON_EXTRACT_SCALAR(fields, '$.issuetype.id') AS issue_type, + key, + projectId AS parent_id, --FIX + JSON_EXTRACT_SCALAR(fields, '$.priority.id') AS priority, + projectKey AS project, + JSON_EXTRACT_SCALAR(fields, '$.reporter.accountId') AS reporter, + JSON_EXTRACT_SCALAR(fields, '$.resolution.id') AS resolution, + JSON_EXTRACT_SCALAR(fields, '$.resolutiondate') AS resolved, + JSON_EXTRACT_SCALAR(fields, '$.status.id') AS status, + JSON_EXTRACT_SCALAR(fields, '$.statuscategorychangedate') AS status_category_changed, + JSON_EXTRACT_SCALAR(fields, '$.summary') AS summary, + updated, + JSON_EXTRACT_SCALAR(fields, '$.workratio') AS work_ratio + FROM + {{ source('source_jira', 'issues') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "snowflake" %} + + WITH TMP AS ( + SELECT + fields:"timetracking"::"originalEstimateSeconds" AS _original_estimate, + fields:"timetracking"::"originalEstimateSeconds" AS original_estimate, + fields:"timetracking"::"remainingEstimateSeconds" AS _remaining_estimate, + fields:"timetracking"::"remainingEstimateSeconds" AS remaining_estimate, + fields:"timetracking"::"timeSpentSeconds" AS _time_spent, + fields:"timetracking"::"timeSpentSeconds" AS time_spent, + fields:"assignee"::"accountId" AS assignee, + created, + fields:"creator"::"accountId" AS creator, + fields:"description"::"content" AS description, + renderedFields::"duedate" AS due_date, + renderedFields::"environment" AS environment, + id, + fields:"issuetype"::"id" AS issue_type, + key, + projectId AS parent_id, --FIX + fields:"priority"::"id" AS priority, + projectKey AS project, + fields:"reporter"::"accountId" AS reporter, + fields:"resolution"::"id" AS resolution, + fields::"resolutiondate" AS resolved, + fields:"status"::"id" AS status, + fields::"statuscategorychangedate" AS status_category_changed, + fields::"summary" AS summary, + updated, + fields::"workratio" AS work_ratio + FROM + {{ source('source_jira', 'issues') }} + ) + + SELECT * FROM TMP + +{%endif%} diff --git a/connectors/source_jira/models/fivetran_converter/issue.yml b/connectors/source_jira/models/fivetran_converter/issue.yml new file mode 100644 index 00000000..f02dd66a --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/issue.yml @@ -0,0 +1,71 @@ +version: 2 + +models: + - name: issue + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + identifier: "{{ var('jira_issue_identifier', 'issue') }}" + description: Table of all issues in your organization's Jira (captures soft deletes). + config: + +enabled: "{{ var('using_fivetran_model', False) }}" + columns: + - name: id + description: Unique ID of the issue. + - name: assignee + description: Foreign key referencing the ID of the `user` currently assigned to this task. + - name: created + description: Timestamp of when the issue was created (in UTC). + - name: creator + description: Foreign key referencing the `user` who first created the issue. Cannot be changed. + - name: description + description: The issue description, if given. + - name: due_date + description: Calendar day on which the issue is due, if a due date is provided. + - name: environment + description: Text field describing the environment in which the issue occurred (ie "IE9 on Windows 7"). + - name: issue_type + description: Foreign key referencing the ID of the `issue_type`. + - name: key + description: UI-facing id of the issue. + - name: original_estimate + description: The original estimate of how long working on this issue would take, in seconds. + - name: _original_estimate + description: The original estimate of how long working on this issue would take, in seconds. + - name: parent_id + description: Self-referencing ID of the parent `issue`. + - name: priority + description: Foreign key referencing the ID of the issue's current `priority`. + - name: project + description: Foreign key referencing the ID of the `project` that the issue belongs to. + - name: remaining_estimate + description: The estimate of how much longer working on this issue will take, in seconds. + - name: remaining_estimate + description: The estimate of how much longer working on this issue will take, in seconds. + - name: reporter + description: > + Foreign key referencing the ID of the `user` who reported the issue. This differs from the `creator` column + in that the reporter can be changed in-app. + - name: resolution + description: Foreign key referencing the ID of the issue's type of `resolution`. + - name: resolved + description: > + Timestamp of when the issue was resolved (ie completed, marked as duplicate). If an + issue is marked as un-resolved, this is null. + - name: status + description: > + Foreign key referencing the ID of the issue's `status` (the step that the issue is currently at in the project's workflow). + - name: status_category_changed + description: Timestamp of when the status was last changed. + - name: summary + description: Title of the issue. + - name: time_spent + description: The time that was spent working on this issue, in seconds. + - name: _time_spent + description: The time that was spent working on this issue, in seconds. + - name: updated + description: Timestamp of when the issue was last updated in some way. + - name: work_ratio + description: > + The percentage of work that has been logged against the issue (time_spent) vs the original estimate of worktime. + Equals -1.0 when the fields required for calculation are not provided. + diff --git a/connectors/source_jira/models/fivetran_converter/issue_field_history.sql b/connectors/source_jira/models/fivetran_converter/issue_field_history.sql new file mode 100644 index 00000000..5baf9d47 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/issue_field_history.sql @@ -0,0 +1,44 @@ + +{% if target.type == "postgres" %} + + WITH TMP AS ( + SELECT + id AS field_id, + NULL AS issue_id, + NULL AS time, + name AS value + FROM + {{ source('source_jira', 'issue_fields') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "bigquery" %} + + WITH TMP AS ( + SELECT + id AS field_id, + NULL AS issue_id, + NULL AS time, + name AS value + FROM + {{ source('source_jira', 'issue_fields') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "snowflake" %} + + WITH TMP AS ( + SELECT + id AS field_id, + NULL AS issue_id, + NULL AS time, + name AS value + FROM + {{ source('source_jira', 'issue_fields') }} + ) + + SELECT * FROM TMP + +{%endif%} diff --git a/connectors/source_jira/models/fivetran_converter/issue_field_history.yml b/connectors/source_jira/models/fivetran_converter/issue_field_history.yml new file mode 100644 index 00000000..1da79d5a --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/issue_field_history.yml @@ -0,0 +1,20 @@ +version: 2 + +models: + - name: issue_field_history + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + identifier: "{{ var('jira_issue_field_history_identifier', 'issue_field_history') }}" + description: Table of every value that each **custom non-array** (not multiselect) field has been set to. + config: + +enabled: "{{ var('using_fivetran_model', False) }}" + columns: + - name: field_id + description: Foreign key referencing the ID of the `field` that was changed. + - name: issue_id + description: Foreign key referencing the ID of the `issue` whose field was updated. + - name: time + description: Timestamp of when the issue field was set to this value. + - name: value + description: Content of the value of that the field was set to. + \ No newline at end of file diff --git a/connectors/source_jira/models/fivetran_converter/issue_link.sql b/connectors/source_jira/models/fivetran_converter/issue_link.sql new file mode 100644 index 00000000..d4510112 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/issue_link.sql @@ -0,0 +1,41 @@ + +{% if target.type == "postgres" %} + + WITH TMP AS ( + SELECT + issueId AS issue_id, + NULL AS related_issue_id, + relationship + FROM + {{ source('source_jira', 'issue_remote_links') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "bigquery" %} + + WITH TMP AS ( + SELECT + issueId AS issue_id, + NULL AS related_issue_id, + relationship + FROM + {{ source('source_jira', 'issue_remote_links') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "snowflake" %} + + WITH TMP AS ( + SELECT + issueId AS issue_id, + NULL AS related_issue_id, + relationship + FROM + {{ source('source_jira', 'issue_remote_links') }} + ) + + SELECT * FROM TMP + +{%endif%} diff --git a/connectors/source_jira/models/fivetran_converter/issue_link.yml b/connectors/source_jira/models/fivetran_converter/issue_link.yml new file mode 100644 index 00000000..911c5998 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/issue_link.yml @@ -0,0 +1,17 @@ +version: 2 + +models: + - name: issue_link + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + identifier: "{{ var('jira_issue_link_identifier', 'issue_link') }}" + description: Table of relationships (links) created between issues. Issue links can include blockers, clones/duplicates, and general relationships. + config: + +enabled: "{{ var('using_fivetran_model', False) }}" + columns: + - name: issue_id + description: Foreign key referencing the ID of the `issue` that is the subject of this relationship (the linker). + - name: related_issue_id + description: Foreign key referencing the ID of the `issue` that is the object of this relationship (the linkee). + - name: relationship + description: The nature of the link between the two issues ("blocks", "is duplicated by", "relates to", etc.) diff --git a/connectors/source_jira/models/fivetran_converter/issue_multiselect_history.sql b/connectors/source_jira/models/fivetran_converter/issue_multiselect_history.sql new file mode 100644 index 00000000..5baf9d47 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/issue_multiselect_history.sql @@ -0,0 +1,44 @@ + +{% if target.type == "postgres" %} + + WITH TMP AS ( + SELECT + id AS field_id, + NULL AS issue_id, + NULL AS time, + name AS value + FROM + {{ source('source_jira', 'issue_fields') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "bigquery" %} + + WITH TMP AS ( + SELECT + id AS field_id, + NULL AS issue_id, + NULL AS time, + name AS value + FROM + {{ source('source_jira', 'issue_fields') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "snowflake" %} + + WITH TMP AS ( + SELECT + id AS field_id, + NULL AS issue_id, + NULL AS time, + name AS value + FROM + {{ source('source_jira', 'issue_fields') }} + ) + + SELECT * FROM TMP + +{%endif%} diff --git a/connectors/source_jira/models/fivetran_converter/issue_multiselect_history.yml b/connectors/source_jira/models/fivetran_converter/issue_multiselect_history.yml new file mode 100644 index 00000000..489338e4 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/issue_multiselect_history.yml @@ -0,0 +1,19 @@ +version: 2 + +models: + - name: issue_multiselect_history + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + identifier: "{{ var('jira_issue_multiselect_history_identifier', 'issue_multiselect_history') }}" + description: Table of every value that each array-type (multiselect) field has been set to. Each row will pertain to **one** value. + config: + +enabled: "{{ var('using_fivetran_model', False) }}" + columns: + - name: time + description: Timestamp of when the issue field was updated to included this value. + - name: field_id + description: Foreign key referencing the ID of the `field` that was changed. + - name: issue_id + description: Foreign key referencing the ID of the `issue` whose field was updated. + - name: value + description: Content of the value of that the field was set to. \ No newline at end of file diff --git a/connectors/source_jira/models/fivetran_converter/project.sql b/connectors/source_jira/models/fivetran_converter/project.sql new file mode 100644 index 00000000..b6030df7 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/project.sql @@ -0,0 +1,53 @@ + +{% if target.type == "postgres" %} + + WITH TMP AS ( + SELECT + description, + id, + key, + lead->>'accountId' AS lead_id, + name, + projectCategory->>'id' AS project_category_id, + NULL AS permission_scheme_id + FROM + {{ source('source_jira', 'projects') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "bigquery" %} + + WITH TMP AS ( + SELECT + description, + id, + key, + JSON_VALUE(lead, '$.accountId') AS lead_id, + name, + JSON_VALUE(projectCategory, '$.id') AS project_category_id, + NULL AS permission_scheme_id + FROM + {{ source('source_jira', 'projects') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "snowflake" %} + + WITH TMP AS ( + SELECT + description, + id, + key, + lead:"accountId"::string AS lead_id, + name, + projectCategory:"id"::string AS project_category_id, + NULL AS permission_scheme_id + FROM + {{ source('source_jira', 'projects') }} + ) + + SELECT * FROM TMP + +{%endif%} diff --git a/connectors/source_jira/models/fivetran_converter/project.yml b/connectors/source_jira/models/fivetran_converter/project.yml new file mode 100644 index 00000000..3fc9f559 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/project.yml @@ -0,0 +1,25 @@ +version: 2 + +models: + - name: project + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + identifier: "{{ var('jira_project_identifier', 'project') }}" + description: Table of all projects in your organization. + config: + +enabled: "{{ var('using_fivetran_model', False) }}" + columns: + - name: id + description: Unique ID of the project. + - name: description + description: Description of the project, if given. + - name: key + description: UI-facing ID of the project. This becomes the default prefix for tasks created within this project. + - name: lead_id + description: Foreign key referencing the ID of the `user` who leads this project. + - name: name + description: Title of the project. + - name: permission_scheme_id + description: Foreign key referencing the ID of the `permission_scheme` that the project ascribes to. + - name: project_category_id + description: Foreign key referencing the ID of the `project_category` that the project is associated with, if any. diff --git a/connectors/source_jira/models/fivetran_converter/sprint.sql b/connectors/source_jira/models/fivetran_converter/sprint.sql new file mode 100644 index 00000000..e8094e34 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/sprint.sql @@ -0,0 +1,50 @@ + +{% if target.type == "postgres" %} + + WITH TMP AS ( + SELECT + id, + boardId AS board_id, + completeDate AS complete_date, + endDate AS end_date, + name, + startDate AS start_date + FROM + {{ source('source_jira', 'sprints') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "bigquery" %} + + WITH TMP AS ( + SELECT + id, + boardId AS board_id, + completeDate AS complete_date, + endDate AS end_date, + name, + startDate AS start_date + FROM + {{ source('source_jira', 'sprints') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "snowflake" %} + + WITH TMP AS ( + SELECT + id, + boardId AS board_id, + completeDate AS complete_date, + endDate AS end_date, + name, + startDate AS start_date + FROM + {{ source('source_jira', 'sprints') }} + ) + + SELECT * FROM TMP + +{%endif%} diff --git a/connectors/source_jira/models/fivetran_converter/sprint.yml b/connectors/source_jira/models/fivetran_converter/sprint.yml new file mode 100644 index 00000000..c25a5e8e --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/sprint.yml @@ -0,0 +1,23 @@ +version: 2 + +models: + - name: sprint + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + identifier: "{{ var('jira_sprint_identifier', 'sprint') }}" + description: Table of all sprints. + config: + +enabled: "{{ var('using_fivetran_model', False) }}" + columns: + - name: id + description: Unique ID of the sprint. + - name: board_id + description: Foreign key referencing the ID of the `board` that the sprint lives in. + - name: complete_date + description: Timestamp of when the sprint was completed. + - name: end_date + description: Timestamp of when the sprint is planned to end. + - name: name + description: Title of the sprint. + - name: start_date + description: Timestamp of when the sprint began. \ No newline at end of file diff --git a/connectors/source_jira/models/fivetran_converter/status.sql b/connectors/source_jira/models/fivetran_converter/status.sql new file mode 100644 index 00000000..99d2ac87 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/status.sql @@ -0,0 +1,44 @@ + +{% if target.type == "postgres" %} + + WITH TMP AS ( + SELECT + id, + description, + name, + statusCategory->>'id' AS status_category_id + FROM + {{ source('source_jira', 'workflow_statuses') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "bigquery" %} + + WITH TMP AS ( + SELECT + id, + description, + name, + JSON_VALUE(statusCategory, '$.id') AS status_category_id + FROM + {{ source('source_jira', 'workflow_statuses') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "snowflake" %} + + WITH TMP AS ( + SELECT + id, + description, + name, + statusCategory:"id"::string AS status_category_id + FROM + {{ source('source_jira', 'workflow_statuses') }} + ) + + SELECT * FROM TMP + +{%endif%} diff --git a/connectors/source_jira/models/fivetran_converter/status.yml b/connectors/source_jira/models/fivetran_converter/status.yml new file mode 100644 index 00000000..b39c41b8 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/status.yml @@ -0,0 +1,21 @@ +version: 2 + +models: + - name: status + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + identifier: "{{ var('jira_status_identifier', 'status') }}" + description: Table of project-level statuses (which may have the same umbrella `status_category`). + config: + +enabled: "{{ var('using_fivetran_model', False) }}" + columns: + - name: id + description: Unique ID of the project status. + - name: description + description: > + Description of the project status. Different projects may all have a status called "Backlog", but their definitions + of "backlog" may differ. + - name: name + description: Title of the status. + - name: status_category_id + description: Foreign key referencing the ID of the `status_category` that this project status falls under. diff --git a/connectors/source_jira/models/fivetran_converter/user.sql b/connectors/source_jira/models/fivetran_converter/user.sql new file mode 100644 index 00000000..30fbad0c --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/user.sql @@ -0,0 +1,50 @@ + +{% if target.type == "postgres" %} + + WITH TMP AS ( + SELECT + emailAddress AS email, + accountId AS id, + locale, + name, + timeZone AS time_zone, + displayName AS username + FROM + {{ source('source_jira', 'users') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "bigquery" %} + + WITH TMP AS ( + SELECT + emailAddress AS email, + accountId AS id, + locale, + name, + timeZone AS time_zone, + displayName AS username + FROM + {{ source('source_jira', 'users') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "snowflake" %} + + WITH TMP AS ( + SELECT + emailAddress AS email, + accountId AS id, + locale, + name, + timeZone AS time_zone, + displayName AS username + FROM + {{ source('source_jira', 'users') }} + ) + + SELECT * FROM TMP + +{%endif%} diff --git a/connectors/source_jira/models/fivetran_converter/user.yml b/connectors/source_jira/models/fivetran_converter/user.yml new file mode 100644 index 00000000..f9667915 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/user.yml @@ -0,0 +1,23 @@ +version: 2 + +models: + - name: user + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + identifier: "{{ var('jira_user_identifier', 'user') }}" + description: Table of users associated with your organization. + config: + +enabled: "{{ var('using_fivetran_model', False) }}" + columns: + - name: id + description: Unique ID of the user. + - name: email + description: Email associated with the user account. + - name: locale + description: The Java locale of the user. + - name: name + description: Name of the user as it appears in the UI. + - name: time_zone + description: The user's timezone, as defined in their settings. + - name: username + description: Account username. \ No newline at end of file diff --git a/connectors/source_jira/models/fivetran_converter/version.sql b/connectors/source_jira/models/fivetran_converter/version.sql new file mode 100644 index 00000000..a06ab519 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/version.sql @@ -0,0 +1,59 @@ + +{% if target.type == "postgres" %} + + WITH TMP AS ( + SELECT + archived, + description, + id, + name, + overdue, + projectId AS project_id, + releaseDate AS release_date, + released, + startDate AS start_date + FROM + {{ source('source_jira', 'project_versions') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "bigquery" %} + + WITH TMP AS ( + SELECT + archived, + description, + id, + name, + overdue, + projectId AS project_id, + releaseDate AS release_date, + released, + startDate AS start_date + FROM + {{ source('source_jira', 'project_versions') }} + ) + + SELECT * FROM TMP + +{% elif target.type == "snowflake" %} + + WITH TMP AS ( + SELECT + archived, + description, + id, + name, + overdue, + projectId AS project_id, + releaseDate AS release_date, + released, + startDate AS start_date + FROM + {{ source('source_jira', 'project_versions') }} + ) + + SELECT * FROM TMP + +{%endif%} diff --git a/connectors/source_jira/models/fivetran_converter/version.yml b/connectors/source_jira/models/fivetran_converter/version.yml new file mode 100644 index 00000000..20da50f5 --- /dev/null +++ b/connectors/source_jira/models/fivetran_converter/version.yml @@ -0,0 +1,29 @@ +version: 2 + +models: + - name: version + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + identifier: "{{ var('jira_version_identifier', 'version') }}" + description: Table of project versions in your organization. + config: + +enabled: "{{ var('using_fivetran_model', False) }}" + columns: + - name: archived + description: Boolean that is true if the project version has been archived. + - name: description + description: The optional description given to the version. + - name: id + description: Unique ID of the version. + - name: name + description: Unique name of the version. + - name: overdue + description: Boolean that is true if the version is past its optional release date, false if it is not or if it does not have a due date. + - name: project_id + description: Foreign key referencing the `PROJECT` to which this version is attached. + - name: release_date + description: The optional release date of the version. Expressed in ISO 8601 format (yyyy-mm-dd). + - name: released + description: Boolean that is true if the version has been released. If the version is released a request to release again is ignored + - name: start_date + description: The start date of the version. Expressed in ISO 8601 format (yyyy-mm-dd). \ No newline at end of file diff --git a/connectors/source_jira/models/source/issue_custom_field_options.yaml b/connectors/source_jira/models/source/issue_custom_field_options.yaml new file mode 100644 index 00000000..3372a24d --- /dev/null +++ b/connectors/source_jira/models/source/issue_custom_field_options.yaml @@ -0,0 +1,30 @@ +version: 2 + +sources: + - name: source_jira + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + loader: airbyte + loaded_at_field: _airbyte_extracted_at + tables: + - name: issue_custom_field_options + description: "All options related to custom fields." + columns: + - name: id + description: "The ID of the custom field option." + data_type: string + - name: value + description: "The value of the custom field option." + data_type: string + - name: optionId + description: "For cascading options, the ID of the custom field option containing the cascading option." + data_type: string + - name: disabled + description: "Whether the option is disabled." + data_type: boolean + - name: fieldId + description: "The ID of the custom field to which the option belongs." + data_type: string + - name: contextId + description: "The ID of the context to which the custom field option belongs." + data_type: string diff --git a/connectors/source_jira/models/source/issue_remote_links.yaml b/connectors/source_jira/models/source/issue_remote_links.yaml new file mode 100644 index 00000000..167fc681 --- /dev/null +++ b/connectors/source_jira/models/source/issue_remote_links.yaml @@ -0,0 +1,33 @@ +version: 2 + +sources: + - name: source_jira + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + loader: airbyte + loaded_at_field: _airbyte_extracted_at + tables: + - name: issue_remote_links + description: "Details of an issue remote link." + columns: + - name: id + description: "The ID of the link." + data_type: "integer" + - name: issueId + description: "Id of the related issue." + data_type: "string" + - name: self + description: "The URL of the link." + data_type: "string" + - name: globalId + description: "The global ID of the link, such as the ID of the item on the remote system." + data_type: "string" + - name: application + description: "Details of the remote application the linked item is in." + data_type: "object" + - name: relationship + description: "Description of the relationship between the issue and the linked item." + data_type: "string" + - name: object + description: "Details of the item linked to." + data_type: "object" diff --git a/connectors/source_jira/models/source/issue_types.yaml b/connectors/source_jira/models/source/issue_types.yaml new file mode 100644 index 00000000..bd20a9a0 --- /dev/null +++ b/connectors/source_jira/models/source/issue_types.yaml @@ -0,0 +1,45 @@ +version: 2 + +sources: + - name: source_jira + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + loader: airbyte + loaded_at_field: _airbyte_extracted_at + tables: + - name: issue_types + description: "Details about an issue type." + columns: + - name: avatarId + description: "The ID of the issue type's avatar." + data_type: "integer" + - name: description + description: "The description of the issue type." + data_type: "string" + - name: entityId + description: "Unique ID for next-gen projects." + data_type: "string" + - name: hierarchyLevel + description: "Hierarchy level of the issue type." + data_type: "integer" + - name: iconUrl + description: "The URL of the issue type's avatar." + data_type: "string" + - name: id + description: "The ID of the issue type." + data_type: "string" + - name: name + description: "The name of the issue type." + data_type: "string" + - name: self + description: "The URL of these issue type details." + data_type: "string" + - name: subtask + description: "The URL of these issue type details." + data_type: "boolean" + - name: scope + description: "Details of the next-gen projects the issue type is available in." + data_type: "object" + - name: untranslatedName + description: "The untranslated name of the issue type." + data_type: "string" diff --git a/connectors/source_jira/models/source/projects.yaml b/connectors/source_jira/models/source/projects.yaml index 37fbe3eb..87e31066 100644 --- a/connectors/source_jira/models/source/projects.yaml +++ b/connectors/source_jira/models/source/projects.yaml @@ -26,8 +26,8 @@ sources: description: "A brief description of the project" data_type: string - name: lead - description: "The username of the project lead" - data_type: string + description: "The details of the project lead" + data_type: object - name: components description: "List of the components contained in the project" data_type: json diff --git a/connectors/source_jira/models/source/workflow_status_categories.yaml b/connectors/source_jira/models/source/workflow_status_categories.yaml new file mode 100644 index 00000000..70b4d738 --- /dev/null +++ b/connectors/source_jira/models/source/workflow_status_categories.yaml @@ -0,0 +1,28 @@ +version: 2 + +sources: + - name: source_jira + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + loader: airbyte + loaded_at_field: _airbyte_extracted_at + tables: + - name: workflow_status_categories + description: "Table of overarching status categories." + columns: + - name: self + description: "The URL of the status category." + data_type: "string" + - name: id + description: "The ID of the status category." + data_type: "integer" + - name: key + description: "The key of the status category." + data_type: "string" + - name: colorName + description: "The name of the color used to represent the status category." + data_type: "string" + - name: name + description: "The name of the status category." + data_type: "string" + \ No newline at end of file diff --git a/connectors/source_jira/models/source/workflow_statuses.yaml b/connectors/source_jira/models/source/workflow_statuses.yaml new file mode 100644 index 00000000..ead02ad0 --- /dev/null +++ b/connectors/source_jira/models/source/workflow_statuses.yaml @@ -0,0 +1,37 @@ +version: 2 + +sources: + - name: source_jira + schema: "{{ var('airbyte_schema', target.schema) }}" + database: "{{ var('airbyte_database', target.database) }}" + loader: airbyte + loaded_at_field: _airbyte_extracted_at + tables: + - name: workflow_statuses + description: "Table of project-level statuses (which may have the same umbrella `status_category`)." + columns: + - name: self + description: "The URL of the status." + data_type: "string" + - name: description + description: "The description of the status." + data_type: "string" + - name: iconUrl + description: "The URL of the icon used to represent the status." + data_type: "string" + - name: name + description: "The name of the status." + data_type: "string" + - name: id + description: "The ID of the status." + data_type: "string" + - name: statusCategory + description: "The category assigned to the status." + data_type: "object" + - name: scope + description: "The scope of the status." + data_type: "object" + - name: untranslatedName + description: "The untranslated name of the status." + data_type: "string" + From 820eb39a9c89dd83e63e0beffa9f79b9caf1e08a Mon Sep 17 00:00:00 2001 From: Tope Folorunso Date: Sat, 7 Sep 2024 17:16:29 +0100 Subject: [PATCH 2/3] fix --- .../integration_tests/dbt_project.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/connectors/source_jira/integration_tests/dbt_project.yml b/connectors/source_jira/integration_tests/dbt_project.yml index 30c3dca1..012ad471 100644 --- a/connectors/source_jira/integration_tests/dbt_project.yml +++ b/connectors/source_jira/integration_tests/dbt_project.yml @@ -42,7 +42,25 @@ vars: jira_database: "airbyte_db_default" jira_schema: "dbt_source_jira" + jira_comment_identifier: "comment" + jira_component_identifier: "component" + jira_field_identifier: "field" + jira_field_option_identifier: "field_option" + jira_issue_identifier: "issue" + jira_issue_field_history_identifier: "issue_field_history" + jira_issue_link_identifier: "issue_link" + jira_issue_multiselect_history_identifier: "issue_multiselect_history" jira_issue_type_identifier: "issue_types" jira_priority_identifier: "issue_priorities" + jira_project_identifier: "project" jira_resolution_identifier: "issue_resolutions" + jira_sprint_identifier: "sprint" + jira_status_identifier: "status" jira_status_category_identifier: "workflow_status_categories" + jira_user_identifier: "user" + jira_version_identifier: "version" + + jira_epic_identifier: "epic" + jira_project_board_identifier: "project_board" + jira_project_category_identifier: "project_category" + jira_user_group_identifier: "user_group" From a009bf326db5d848a0818d88fc44ab104c3debf1 Mon Sep 17 00:00:00 2001 From: Tope Folorunso <66448986+topefolorunso@users.noreply.github.com> Date: Sat, 7 Sep 2024 17:19:25 +0100 Subject: [PATCH 3/3] Update dbt_project.yml --- connectors/source_jira/integration_tests/dbt_project.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/connectors/source_jira/integration_tests/dbt_project.yml b/connectors/source_jira/integration_tests/dbt_project.yml index 012ad471..735c3b96 100644 --- a/connectors/source_jira/integration_tests/dbt_project.yml +++ b/connectors/source_jira/integration_tests/dbt_project.yml @@ -59,8 +59,3 @@ vars: jira_status_category_identifier: "workflow_status_categories" jira_user_identifier: "user" jira_version_identifier: "version" - - jira_epic_identifier: "epic" - jira_project_board_identifier: "project_board" - jira_project_category_identifier: "project_category" - jira_user_group_identifier: "user_group"