diff --git a/.github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md index 768ac3f4..32206744 100644 --- a/.github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md @@ -4,48 +4,26 @@ **This PR will result in the following new package version:** -**Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:** +**Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:** + ## PR Checklist ### Basic Validation Please acknowledge that you have successfully performed the following commands locally: -- [ ] dbt compile -- [ ] dbt run –full-refresh -- [ ] dbt run -- [ ] dbt test -- [ ] dbt run –vars (if applicable) +- [ ] dbt run –full-refresh && dbt test +- [ ] dbt run (if incremental models are present) && dbt test Before marking this PR as "ready for review" the following have been applied: -- [ ] The appropriate issue has been linked and tagged -- [ ] You are assigned to the corresponding issue and this PR +- [ ] The appropriate issue has been linked, tagged, and properly assigned +- [ ] All necessary documentation and version upgrades have been applied +- [ ] docs were regenerated (unless this PR does not include any code or yml updates) - [ ] BuildKite integration tests are passing +- [ ] Detailed validation steps have been provided below ### Detailed Validation -Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review": -- [ ] You have validated these changes and assure this PR will address the respective Issue/Feature. -- [ ] You are reasonably confident these changes will not impact any other components of this package or any dependent packages. -- [ ] You have provided details below around the validation steps performed to gain confidence in these changes. +Please share any and all of your validation steps: -### Standard Updates -Please acknowledge that your PR contains the following standard updates: -- Package versioning has been appropriately indexed in the following locations: - - [ ] indexed within dbt_project.yml - - [ ] indexed within integration_tests/dbt_project.yml -- [ ] CHANGELOG has individual entries for each respective change in this PR - -- [ ] README updates have been applied (if applicable) - -- [ ] DECISIONLOG updates have been updated (if applicable) -- [ ] Appropriate yml documentation has been added (if applicable) - -### dbt Docs -Please acknowledge that after the above were all completed the below were applied to your branch: -- [ ] docs were regenerated (unless this PR does not include any code or yml updates) - ### If you had to summarize this PR in an emoji, which would it be? -:dancer: +:dancer: \ No newline at end of file diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml new file mode 100644 index 00000000..8ed58532 --- /dev/null +++ b/.github/workflows/auto-release.yml @@ -0,0 +1,13 @@ +name: 'auto release' +on: + pull_request: + types: + - closed + branches: + - main + +jobs: + call-workflow-passing-data: + if: github.event.pull_request.merged + uses: fivetran/dbt_package_automations/.github/workflows/auto-release.yml@main + secrets: inherit \ No newline at end of file diff --git a/.gitignore b/.gitignore index f6f8251d..d766802b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ dbt_modules/ logs/ .DS_Store models/intermediate/int_jira__all_field_options.sql -dbt_packages/ \ No newline at end of file +dbt_packages/ +package-lock.yml \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a9a9bae..306de113 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,19 @@ -# dbt_jira VERSION.VERSION +# dbt_jira v0.16.0 +[PR #122](https://github.com/fivetran/dbt_jira/pull/122) contains the following updates: + +## 🚨 Breaking Changes: Bug Fixes 🚨 +- The following fields in the below mentioned models have been converted to a string datatype (previously integer) to ensure classic Jira projects may link issues to epics. In classic Jira projects the epic reference is in a hyperlink form (ie. "https://ulr-here/epic-key") as opposed to an ID. As such, a string datatype is needed to successfully link issues to epics. If you are referencing these fields downstream, be sure to make any changes to account for the new datatype. + - `revised_parent_issue_id` field within the `int_jira__issue_type_parents` model + - `parent_issue_id` field within the `jira__issue_enhanced` model ## Documentation updates - Update README to highlight requirements for using custom fields with the `issue_field_history_columns` variable. +## Under the Hood +- Included auto-releaser GitHub Actions workflow to automate future releases. +- Updated the maintainer PR template to resemble the most up to date format. +- Updated `field` and `issue_field_history` seed files to ensure we have an updated test case to capture the epic-link scenario for classic Jira environments. + # dbt_jira v0.15.0 [PR #108](https://github.com/fivetran/dbt_jira/pull/108) contains the following updates: ## 🚨 Breaking Changes 🚨 diff --git a/README.md b/README.md index fac33cc2..43fe23f0 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Include the following jira package version in your `packages.yml` file: ```yaml packages: - package: fivetran/jira - version: [">=0.15.0", "<0.16.0"] + version: [">=0.16.0", "<0.17.0"] ``` ## Step 3: Define database and schema variables diff --git a/dbt_project.yml b/dbt_project.yml index 4d7dc0e1..a730aa1f 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,5 +1,5 @@ name: 'jira' -version: '0.15.0' +version: '0.16.0' config-version: 2 require-dbt-version: [">=1.3.0", "<2.0.0"] vars: diff --git a/docs/catalog.json b/docs/catalog.json index 09d090f9..0a6ef053 100644 --- a/docs/catalog.json +++ b/docs/catalog.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.5.6", "generated_at": "2023-09-19T22:45:37.431352Z", "invocation_id": "3de4d5f4-ee2f-4047-ae14-abe9b1091168", "env": {}}, "nodes": {"seed.jira_integration_tests.component": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "component", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "integer", "index": 3, "name": "description", "comment": null}, "name": {"type": "character varying(11)", "index": 4, "name": "name", "comment": null}, "project_id": {"type": "bigint", "index": 5, "name": "project_id", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.2e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 8000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 4.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 11.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.component"}, "seed.jira_integration_tests.issue_field_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "issue_field_history", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"field_id": {"type": "character varying(17)", "index": 1, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "time": {"type": "timestamp without time zone", "index": 3, "name": "time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "value": {"type": "character varying(256)", "index": 5, "name": "value", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.2e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 8000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 5.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 256.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.issue_field_history"}, "seed.jira_integration_tests.field": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "field", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "character varying(256)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "is_array": {"type": "boolean", "index": 3, "name": "is_array", "comment": null}, "is_custom": {"type": "boolean", "index": 4, "name": "is_custom", "comment": null}, "name": {"type": "character varying(17)", "index": 5, "name": "name", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.2e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 8000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 5.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 256.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.field"}, "seed.jira_integration_tests.field_option": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "field_option", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "name": {"type": "character varying(33)", "index": 3, "name": "name", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 1.6e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 6000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 5.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 33.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.field_option"}, "seed.jira_integration_tests.issue": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "issue", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "_original_estimate": {"type": "integer", "index": 4, "name": "_original_estimate", "comment": null}, "_remaining_estimate": {"type": "integer", "index": 5, "name": "_remaining_estimate", "comment": null}, "_time_spent": {"type": "integer", "index": 6, "name": "_time_spent", "comment": null}, "assignee": {"type": "character varying(256)", "index": 7, "name": "assignee", "comment": null}, "created": {"type": "timestamp without time zone", "index": 8, "name": "created", "comment": null}, "creator": {"type": "character varying(43)", "index": 9, "name": "creator", "comment": null}, "description": {"type": "character varying(41)", "index": 10, "name": "description", "comment": null}, "due_date": {"type": "integer", "index": 11, "name": "due_date", "comment": null}, "environment": {"type": "integer", "index": 12, "name": "environment", "comment": null}, "issue_type": {"type": "integer", "index": 13, "name": "issue_type", "comment": null}, "key": {"type": "character varying(5)", "index": 14, "name": "key", "comment": null}, "last_viewed": {"type": "timestamp without time zone", "index": 15, "name": "last_viewed", "comment": null}, "original_estimate": {"type": "integer", "index": 16, "name": "original_estimate", "comment": null}, "parent_id": {"type": "integer", "index": 17, "name": "parent_id", "comment": null}, "priority": {"type": "integer", "index": 18, "name": "priority", "comment": null}, "project": {"type": "integer", "index": 19, "name": "project", "comment": null}, "remaining_estimate": {"type": "integer", "index": 20, "name": "remaining_estimate", "comment": null}, "reporter": {"type": "character varying(43)", "index": 21, "name": "reporter", "comment": null}, "resolution": {"type": "integer", "index": 22, "name": "resolution", "comment": null}, "resolved": {"type": "timestamp without time zone", "index": 23, "name": "resolved", "comment": null}, "status": {"type": "integer", "index": 24, "name": "status", "comment": null}, "status_category_changed": {"type": "timestamp without time zone", "index": 25, "name": "status_category_changed", "comment": null}, "summary": {"type": "character varying(27)", "index": 26, "name": "summary", "comment": null}, "time_spent": {"type": "integer", "index": 27, "name": "time_spent", "comment": null}, "updated": {"type": "timestamp without time zone", "index": 28, "name": "updated", "comment": null}, "work_ratio": {"type": "double precision", "index": 29, "name": "work_ratio", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 8.8e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 32000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 256.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.issue"}, "seed.jira_integration_tests.comment": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "comment", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "author_id": {"type": "character varying(43)", "index": 3, "name": "author_id", "comment": null}, "body": {"type": "character varying(102)", "index": 4, "name": "body", "comment": null}, "created": {"type": "timestamp without time zone", "index": 5, "name": "created", "comment": null}, "is_public": {"type": "boolean", "index": 6, "name": "is_public", "comment": null}, "issue_id": {"type": "bigint", "index": 7, "name": "issue_id", "comment": null}, "update_author_id": {"type": "character varying(43)", "index": 8, "name": "update_author_id", "comment": null}, "updated": {"type": "timestamp without time zone", "index": 9, "name": "updated", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 3.3e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 12000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 102.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.comment"}, "seed.jira_integration_tests.issue_link": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "issue_link", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"issue_id": {"type": "integer", "index": 1, "name": "issue_id", "comment": null}, "related_issue_id": {"type": "integer", "index": 2, "name": "related_issue_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "relationship": {"type": "character varying(10)", "index": 4, "name": "relationship", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 1.9e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 7000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 10.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.issue_link"}, "seed.jira_integration_tests.epic": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "epic", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "done": {"type": "boolean", "index": 3, "name": "done", "comment": null}, "key": {"type": "character varying(5)", "index": 4, "name": "key", "comment": null}, "name": {"type": "character varying(9)", "index": 5, "name": "name", "comment": null}, "summary": {"type": "character varying(16)", "index": 6, "name": "summary", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.4e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 9000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 1.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 16.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.epic"}, "seed.jira_integration_tests.issue_type": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "issue_type", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "character varying(30)", "index": 3, "name": "description", "comment": null}, "name": {"type": "character varying(4)", "index": 4, "name": "name", "comment": null}, "subtask": {"type": "boolean", "index": 5, "name": "subtask", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.2e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 8000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 30.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.issue_type"}, "seed.jira_integration_tests.sprint": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "sprint", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "board_id": {"type": "integer", "index": 3, "name": "board_id", "comment": null}, "complete_date": {"type": "timestamp without time zone", "index": 4, "name": "complete_date", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 5, "name": "end_date", "comment": null}, "name": {"type": "character varying(15)", "index": 6, "name": "name", "comment": null}, "start_date": {"type": "timestamp without time zone", "index": 7, "name": "start_date", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.7e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 10000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 15.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.sprint"}, "seed.jira_integration_tests.project": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "project", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "integer", "index": 3, "name": "description", "comment": null}, "key": {"type": "character varying(4)", "index": 4, "name": "key", "comment": null}, "lead_id": {"type": "character varying(43)", "index": 5, "name": "lead_id", "comment": null}, "name": {"type": "character varying(25)", "index": 6, "name": "name", "comment": null}, "permission_scheme_id": {"type": "integer", "index": 7, "name": "permission_scheme_id", "comment": null}, "project_category_id": {"type": "integer", "index": 8, "name": "project_category_id", "comment": null}, "project_type_key": {"type": "character varying(8)", "index": 9, "name": "project_type_key", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 3.3e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 12000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 43.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.project"}, "seed.jira_integration_tests.priority": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "priority", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "character varying(53)", "index": 3, "name": "description", "comment": null}, "name": {"type": "character varying(7)", "index": 4, "name": "name", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 1.9e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 7000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 5.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 53.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.priority"}, "seed.jira_integration_tests.issue_multiselect_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "issue_multiselect_history", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"_fivetran_id": {"type": "character varying(28)", "index": 1, "name": "_fivetran_id", "comment": null}, "time": {"type": "timestamp without time zone", "index": 2, "name": "time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "field_id": {"type": "character varying(17)", "index": 4, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 5, "name": "issue_id", "comment": null}, "value": {"type": "character varying(256)", "index": 6, "name": "value", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.4e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 9000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 4.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 256.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.issue_multiselect_history"}, "seed.jira_integration_tests.project_board": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "project_board", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"board_id": {"type": "integer", "index": 1, "name": "board_id", "comment": null}, "project_id": {"type": "integer", "index": 2, "name": "project_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 1.6e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 6000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 2.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 0.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.project_board"}, "seed.jira_integration_tests.project_category": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "project_category", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "character varying(42)", "index": 3, "name": "description", "comment": null}, "name": {"type": "character varying(13)", "index": 4, "name": "name", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 1.9e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 7000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 1.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 42.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.project_category"}, "seed.jira_integration_tests.resolution": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "resolution", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "character varying(38)", "index": 3, "name": "description", "comment": null}, "name": {"type": "character varying(4)", "index": 4, "name": "name", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 1.9e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 7000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 1.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 38.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.resolution"}, "seed.jira_integration_tests.status": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "status", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "character varying(69)", "index": 3, "name": "description", "comment": null}, "name": {"type": "character varying(11)", "index": 4, "name": "name", "comment": null}, "status_category_id": {"type": "integer", "index": 5, "name": "status_category_id", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.2e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 8000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 69.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.status"}, "seed.jira_integration_tests.status_category": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "status_category", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "name": {"type": "character varying(11)", "index": 3, "name": "name", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 1.6e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 6000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 11.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.status_category"}, "seed.jira_integration_tests.version": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "version", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "archived": {"type": "boolean", "index": 3, "name": "archived", "comment": null}, "description": {"type": "character varying(18)", "index": 4, "name": "description", "comment": null}, "name": {"type": "character varying(11)", "index": 5, "name": "name", "comment": null}, "overdue": {"type": "boolean", "index": 6, "name": "overdue", "comment": null}, "project_id": {"type": "integer", "index": 7, "name": "project_id", "comment": null}, "release_date": {"type": "date", "index": 8, "name": "release_date", "comment": null}, "released": {"type": "boolean", "index": 9, "name": "released", "comment": null}, "start_date": {"type": "date", "index": 10, "name": "start_date", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 3.5e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 13000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 18.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.version"}, "seed.jira_integration_tests.user_group": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "user_group", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"group_name": {"type": "character varying(19)", "index": 1, "name": "group_name", "comment": null}, "user_id": {"type": "character varying(43)", "index": 2, "name": "user_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 1.6e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 6000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 43.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.user_group"}, "seed.jira_integration_tests.user": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "user", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "character varying(43)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "email": {"type": "integer", "index": 3, "name": "email", "comment": null}, "locale": {"type": "character varying(5)", "index": 4, "name": "locale", "comment": null}, "name": {"type": "character varying(22)", "index": 5, "name": "name", "comment": null}, "time_zone": {"type": "character varying(19)", "index": 6, "name": "time_zone", "comment": null}, "username": {"type": "integer", "index": 7, "name": "username", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.7e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 10000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 43.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.user"}, "model.jira_source.stg_jira__field_option": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__field_option", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"field_id": {"type": "bigint", "index": 1, "name": "field_id", "comment": null}, "parent_field_id": {"type": "integer", "index": 2, "name": "parent_field_id", "comment": null}, "field_option_name": {"type": "character varying(33)", "index": 3, "name": "field_option_name", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 3.3e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 12000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 5.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 33.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__field_option"}, "model.jira_source.stg_jira__comment": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__comment", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"author_user_id": {"type": "character varying(43)", "index": 1, "name": "author_user_id", "comment": null}, "body": {"type": "character varying(102)", "index": 2, "name": "body", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": null}, "comment_id": {"type": "bigint", "index": 4, "name": "comment_id", "comment": null}, "issue_id": {"type": "bigint", "index": 5, "name": "issue_id", "comment": null}, "is_public": {"type": "boolean", "index": 6, "name": "is_public", "comment": null}, "last_update_user_id": {"type": "character varying(43)", "index": 7, "name": "last_update_user_id", "comment": null}, "last_updated_at": {"type": "timestamp without time zone", "index": 8, "name": "last_updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_synced", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 6.6e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 24000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 102.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__comment"}, "model.jira_source.stg_jira__issue_multiselect_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_multiselect_history", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"_fivetran_id": {"type": "character varying(28)", "index": 1, "name": "_fivetran_id", "comment": null}, "field_id": {"type": "character varying(17)", "index": 2, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 3, "name": "issue_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 4, "name": "updated_at", "comment": null}, "field_value": {"type": "character varying(256)", "index": 5, "name": "field_value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 4.9e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 18000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 4.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 256.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_multiselect_history"}, "model.jira_source.stg_jira__issue_field_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_field_history", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"field_id": {"type": "character varying(17)", "index": 1, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": null}, "field_value": {"type": "character varying(256)", "index": 4, "name": "field_value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 4.4e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 16000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 5.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 256.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_field_history"}, "model.jira_source.stg_jira__component": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__component", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"component_description": {"type": "integer", "index": 1, "name": "component_description", "comment": null}, "component_id": {"type": "bigint", "index": 2, "name": "component_id", "comment": null}, "component_name": {"type": "character varying(11)", "index": 3, "name": "component_name", "comment": null}, "project_id": {"type": "bigint", "index": 4, "name": "project_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 4.4e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 16000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 4.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 11.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__component"}, "model.jira_source.stg_jira__field": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__field", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"field_id": {"type": "character varying(256)", "index": 1, "name": "field_id", "comment": null}, "is_array": {"type": "boolean", "index": 2, "name": "is_array", "comment": null}, "is_custom": {"type": "boolean", "index": 3, "name": "is_custom", "comment": null}, "field_name": {"type": "character varying(17)", "index": 4, "name": "field_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 4.4e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 16000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 5.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 256.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__field"}, "model.jira_source.stg_jira__issue_link": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_link", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"issue_id": {"type": "integer", "index": 1, "name": "issue_id", "comment": null}, "related_issue_id": {"type": "integer", "index": 2, "name": "related_issue_id", "comment": null}, "relationship": {"type": "character varying(10)", "index": 3, "name": "relationship", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 3.8e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 14000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 10.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_link"}, "model.jira_source.stg_jira__issue": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"original_estimate_seconds": {"type": "integer", "index": 1, "name": "original_estimate_seconds", "comment": null}, "remaining_estimate_seconds": {"type": "integer", "index": 2, "name": "remaining_estimate_seconds", "comment": null}, "time_spent_seconds": {"type": "integer", "index": 3, "name": "time_spent_seconds", "comment": null}, "assignee_user_id": {"type": "character varying(256)", "index": 4, "name": "assignee_user_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 5, "name": "created_at", "comment": null}, "resolved_at": {"type": "timestamp without time zone", "index": 6, "name": "resolved_at", "comment": null}, "creator_user_id": {"type": "character varying(43)", "index": 7, "name": "creator_user_id", "comment": null}, "issue_description": {"type": "character varying(41)", "index": 8, "name": "issue_description", "comment": null}, "due_date": {"type": "integer", "index": 9, "name": "due_date", "comment": null}, "environment": {"type": "integer", "index": 10, "name": "environment", "comment": null}, "issue_id": {"type": "bigint", "index": 11, "name": "issue_id", "comment": null}, "issue_type_id": {"type": "integer", "index": 12, "name": "issue_type_id", "comment": null}, "issue_key": {"type": "character varying(5)", "index": 13, "name": "issue_key", "comment": null}, "parent_issue_id": {"type": "integer", "index": 14, "name": "parent_issue_id", "comment": null}, "priority_id": {"type": "integer", "index": 15, "name": "priority_id", "comment": null}, "project_id": {"type": "integer", "index": 16, "name": "project_id", "comment": null}, "reporter_user_id": {"type": "character varying(43)", "index": 17, "name": "reporter_user_id", "comment": null}, "resolution_id": {"type": "integer", "index": 18, "name": "resolution_id", "comment": null}, "status_id": {"type": "integer", "index": 19, "name": "status_id", "comment": null}, "status_changed_at": {"type": "timestamp without time zone", "index": 20, "name": "status_changed_at", "comment": null}, "issue_name": {"type": "character varying(27)", "index": 21, "name": "issue_name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 22, "name": "updated_at", "comment": null}, "work_ratio": {"type": "double precision", "index": 23, "name": "work_ratio", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 24, "name": "_fivetran_synced", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 0.000149, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 54000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 256.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue"}, "model.jira_source.stg_jira__issue_type": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_type", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"description": {"type": "character varying(30)", "index": 1, "name": "description", "comment": null}, "issue_type_id": {"type": "integer", "index": 2, "name": "issue_type_id", "comment": null}, "issue_type_name": {"type": "character varying(4)", "index": 3, "name": "issue_type_name", "comment": null}, "is_subtask": {"type": "boolean", "index": 4, "name": "is_subtask", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 4.4e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 16000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 30.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_type"}, "model.jira_source.stg_jira__priority": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__priority", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"priority_description": {"type": "character varying(53)", "index": 1, "name": "priority_description", "comment": null}, "priority_id": {"type": "integer", "index": 2, "name": "priority_id", "comment": null}, "priority_name": {"type": "character varying(7)", "index": 3, "name": "priority_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 3.8e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 14000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 5.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 53.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__priority"}, "model.jira_source.stg_jira__project": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__project", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"project_description": {"type": "integer", "index": 1, "name": "project_description", "comment": null}, "project_id": {"type": "integer", "index": 2, "name": "project_id", "comment": null}, "project_key": {"type": "character varying(4)", "index": 3, "name": "project_key", "comment": null}, "project_lead_user_id": {"type": "character varying(43)", "index": 4, "name": "project_lead_user_id", "comment": null}, "project_name": {"type": "character varying(25)", "index": 5, "name": "project_name", "comment": null}, "project_category_id": {"type": "integer", "index": 6, "name": "project_category_id", "comment": null}, "permission_scheme_id": {"type": "integer", "index": 7, "name": "permission_scheme_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 6e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 22000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 43.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__project"}, "model.jira_source.stg_jira__resolution": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__resolution", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"resolution_description": {"type": "character varying(38)", "index": 1, "name": "resolution_description", "comment": null}, "resolution_id": {"type": "integer", "index": 2, "name": "resolution_id", "comment": null}, "resolution_name": {"type": "character varying(4)", "index": 3, "name": "resolution_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 1.9e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 7000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 1.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 38.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__resolution"}, "model.jira_source.stg_jira__sprint": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__sprint", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"sprint_id": {"type": "bigint", "index": 1, "name": "sprint_id", "comment": null}, "sprint_name": {"type": "character varying(15)", "index": 2, "name": "sprint_name", "comment": null}, "board_id": {"type": "integer", "index": 3, "name": "board_id", "comment": null}, "completed_at": {"type": "timestamp without time zone", "index": 4, "name": "completed_at", "comment": null}, "ended_at": {"type": "timestamp without time zone", "index": 5, "name": "ended_at", "comment": null}, "started_at": {"type": "timestamp without time zone", "index": 6, "name": "started_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 5.5e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 20000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 15.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__sprint"}, "model.jira_source.stg_jira__status": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__status", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"status_description": {"type": "character varying(69)", "index": 1, "name": "status_description", "comment": null}, "status_id": {"type": "integer", "index": 2, "name": "status_id", "comment": null}, "status_name": {"type": "character varying(11)", "index": 3, "name": "status_name", "comment": null}, "status_category_id": {"type": "integer", "index": 4, "name": "status_category_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 4.4e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 16000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 69.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__status"}, "model.jira_source.stg_jira__status_category": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__status_category", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"status_category_id": {"type": "integer", "index": 1, "name": "status_category_id", "comment": null}, "status_category_name": {"type": "character varying(11)", "index": 2, "name": "status_category_name", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.7e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 10000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 11.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__status_category"}, "model.jira.int_jira__agg_multiselect_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__agg_multiselect_history", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"field_id": {"type": "character varying(17)", "index": 1, "name": "field_id", "comment": null}, "field_name": {"type": "character varying(25)", "index": 2, "name": "field_name", "comment": null}, "issue_id": {"type": "bigint", "index": 3, "name": "issue_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 4, "name": "updated_at", "comment": null}, "batch_id": {"type": "character varying(32)", "index": 5, "name": "batch_id", "comment": null}, "date_day": {"type": "date", "index": 6, "name": "date_day", "comment": null}, "field_values": {"type": "character varying(65535)", "index": 7, "name": "field_values", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.7e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 10000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 1.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 65535.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.int_jira__agg_multiselect_history"}, "model.jira_source.stg_jira__user": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__user", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"email": {"type": "integer", "index": 1, "name": "email", "comment": null}, "user_id": {"type": "character varying(43)", "index": 2, "name": "user_id", "comment": null}, "locale": {"type": "character varying(5)", "index": 3, "name": "locale", "comment": null}, "user_display_name": {"type": "character varying(22)", "index": 4, "name": "user_display_name", "comment": null}, "time_zone": {"type": "character varying(19)", "index": 5, "name": "time_zone", "comment": null}, "username": {"type": "integer", "index": 6, "name": "username", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 5.5e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 20000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 43.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__user"}, "model.jira_source.stg_jira__version": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__version", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"is_archived": {"type": "boolean", "index": 1, "name": "is_archived", "comment": null}, "description": {"type": "character varying(18)", "index": 2, "name": "description", "comment": null}, "version_id": {"type": "integer", "index": 3, "name": "version_id", "comment": null}, "version_name": {"type": "character varying(11)", "index": 4, "name": "version_name", "comment": null}, "is_overdue": {"type": "boolean", "index": 5, "name": "is_overdue", "comment": null}, "project_id": {"type": "integer", "index": 6, "name": "project_id", "comment": null}, "release_date": {"type": "timestamp without time zone", "index": 7, "name": "release_date", "comment": null}, "is_released": {"type": "boolean", "index": 8, "name": "is_released", "comment": null}, "start_date": {"type": "timestamp without time zone", "index": 9, "name": "start_date", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 6.6e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 24000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 18.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__version"}, "model.jira.int_jira__issue_type_parents": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__issue_type_parents", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"original_estimate_seconds": {"type": "integer", "index": 1, "name": "original_estimate_seconds", "comment": null}, "remaining_estimate_seconds": {"type": "integer", "index": 2, "name": "remaining_estimate_seconds", "comment": null}, "time_spent_seconds": {"type": "integer", "index": 3, "name": "time_spent_seconds", "comment": null}, "assignee_user_id": {"type": "character varying(256)", "index": 4, "name": "assignee_user_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 5, "name": "created_at", "comment": null}, "resolved_at": {"type": "timestamp without time zone", "index": 6, "name": "resolved_at", "comment": null}, "creator_user_id": {"type": "character varying(43)", "index": 7, "name": "creator_user_id", "comment": null}, "issue_description": {"type": "character varying(41)", "index": 8, "name": "issue_description", "comment": null}, "due_date": {"type": "integer", "index": 9, "name": "due_date", "comment": null}, "environment": {"type": "integer", "index": 10, "name": "environment", "comment": null}, "issue_id": {"type": "bigint", "index": 11, "name": "issue_id", "comment": null}, "issue_type_id": {"type": "integer", "index": 12, "name": "issue_type_id", "comment": null}, "issue_key": {"type": "character varying(5)", "index": 13, "name": "issue_key", "comment": null}, "parent_issue_id": {"type": "integer", "index": 14, "name": "parent_issue_id", "comment": null}, "priority_id": {"type": "integer", "index": 15, "name": "priority_id", "comment": null}, "project_id": {"type": "integer", "index": 16, "name": "project_id", "comment": null}, "reporter_user_id": {"type": "character varying(43)", "index": 17, "name": "reporter_user_id", "comment": null}, "resolution_id": {"type": "integer", "index": 18, "name": "resolution_id", "comment": null}, "status_id": {"type": "integer", "index": 19, "name": "status_id", "comment": null}, "status_changed_at": {"type": "timestamp without time zone", "index": 20, "name": "status_changed_at", "comment": null}, "issue_name": {"type": "character varying(27)", "index": 21, "name": "issue_name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 22, "name": "updated_at", "comment": null}, "work_ratio": {"type": "double precision", "index": 23, "name": "work_ratio", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 24, "name": "_fivetran_synced", "comment": null}, "revised_parent_issue_id": {"type": "integer", "index": 25, "name": "revised_parent_issue_id", "comment": null}, "issue_type": {"type": "character varying(4)", "index": 26, "name": "issue_type", "comment": null}, "parent_issue_type": {"type": "character varying(4)", "index": 27, "name": "parent_issue_type", "comment": null}, "parent_issue_name": {"type": "character varying(27)", "index": 28, "name": "parent_issue_name", "comment": null}, "parent_issue_key": {"type": "character varying(5)", "index": 29, "name": "parent_issue_key", "comment": null}, "is_parent_epic": {"type": "boolean", "index": 30, "name": "is_parent_epic", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 0.000182, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 66000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 256.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.int_jira__issue_type_parents"}, "model.jira.int_jira__combine_field_histories": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__combine_field_histories", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"field_id": {"type": "character varying(17)", "index": 1, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "field_value": {"type": "character varying(65535)", "index": 3, "name": "field_value", "comment": null}, "field_name": {"type": "character varying(25)", "index": 4, "name": "field_name", "comment": null}, "valid_starting_at": {"type": "timestamp without time zone", "index": 5, "name": "valid_starting_at", "comment": null}, "valid_ending_at": {"type": "timestamp without time zone", "index": 6, "name": "valid_ending_at", "comment": null}, "valid_starting_on": {"type": "date", "index": 7, "name": "valid_starting_on", "comment": null}, "combined_history_id": {"type": "character varying(32)", "index": 8, "name": "combined_history_id", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 6e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 22000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 4.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 65535.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.int_jira__combine_field_histories"}, "model.jira.int_jira__daily_field_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__daily_field_history", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"field_id": {"type": "character varying(17)", "index": 1, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "field_name": {"type": "character varying(25)", "index": 3, "name": "field_name", "comment": null}, "field_value": {"type": "character varying(65535)", "index": 4, "name": "field_value", "comment": null}, "valid_starting_at": {"type": "timestamp without time zone", "index": 5, "name": "valid_starting_at", "comment": null}, "valid_ending_at": {"type": "timestamp without time zone", "index": 6, "name": "valid_ending_at", "comment": null}, "valid_starting_on": {"type": "date", "index": 7, "name": "valid_starting_on", "comment": null}, "issue_field_day_id": {"type": "character varying(32)", "index": 8, "name": "issue_field_day_id", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 6e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 22000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 4.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 65535.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.int_jira__daily_field_history"}, "model.jira.int_jira__pivot_daily_field_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__pivot_daily_field_history", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"valid_starting_on": {"type": "date", "index": 1, "name": "valid_starting_on", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "status": {"type": "character varying(65535)", "index": 3, "name": "status", "comment": null}, "sprint": {"type": "character varying(65535)", "index": 4, "name": "sprint", "comment": null}, "summary": {"type": "character varying(65535)", "index": 5, "name": "summary", "comment": null}, "story_points": {"type": "character varying(65535)", "index": 6, "name": "story_points", "comment": null}, "components": {"type": "character varying(65535)", "index": 7, "name": "components", "comment": null}, "issue_day_id": {"type": "character varying(32)", "index": 8, "name": "issue_day_id", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 6e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 22000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 2.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 65535.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.int_jira__pivot_daily_field_history"}, "model.jira.int_jira__field_history_scd": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__field_history_scd", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"valid_starting_on": {"type": "date", "index": 1, "name": "valid_starting_on", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "issue_day_id": {"type": "character varying(32)", "index": 3, "name": "issue_day_id", "comment": null}, "status_id": {"type": "character varying(65535)", "index": 4, "name": "status_id", "comment": null}, "status": {"type": "character varying(65535)", "index": 5, "name": "status", "comment": null}, "sprint": {"type": "character varying(65535)", "index": 6, "name": "sprint", "comment": null}, "summary": {"type": "character varying(65535)", "index": 7, "name": "summary", "comment": null}, "story_points": {"type": "character varying(65535)", "index": 8, "name": "story_points", "comment": null}, "components": {"type": "character varying(65535)", "index": 9, "name": "components", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 6.6e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(KEY(issue_id))", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY(issue_id))", "include": true, "description": "First column in the sort key."}, "skew_rows": {"id": "skew_rows", "label": "Skew Rows", "value": 100.0, "include": true, "description": "Ratio of the number of rows in the slice with the most rows to the number of rows in the slice with the fewest rows."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "sortkey_num": {"id": "sortkey_num", "label": "# Sort Keys", "value": 1.0, "include": true, "description": "Number of columns defined as sort keys."}, "skew_sortkey1": {"id": "skew_sortkey1", "label": "Sort Key Skew", "value": 1.0, "include": true, "description": "Ratio of the size of the largest non-sort key column to the size of the first column of the sort key."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 24000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 2.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "unsorted": {"id": "unsorted", "label": "Unsorted %", "value": 0.0, "include": true, "description": "Percent of unsorted rows in the table."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 65535.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.int_jira__field_history_scd"}, "model.jira.int_jira__issue_join": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__issue_join", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"issue_id": {"type": "bigint", "index": 1, "name": "issue_id", "comment": null}, "parent_issue_id": {"type": "integer", "index": 2, "name": "parent_issue_id", "comment": null}, "original_estimate_seconds": {"type": "integer", "index": 3, "name": "original_estimate_seconds", "comment": null}, "remaining_estimate_seconds": {"type": "integer", "index": 4, "name": "remaining_estimate_seconds", "comment": null}, "time_spent_seconds": {"type": "integer", "index": 5, "name": "time_spent_seconds", "comment": null}, "assignee_user_id": {"type": "character varying(256)", "index": 6, "name": "assignee_user_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 7, "name": "created_at", "comment": null}, "resolved_at": {"type": "timestamp without time zone", "index": 8, "name": "resolved_at", "comment": null}, "creator_user_id": {"type": "character varying(43)", "index": 9, "name": "creator_user_id", "comment": null}, "issue_description": {"type": "character varying(41)", "index": 10, "name": "issue_description", "comment": null}, "due_date": {"type": "integer", "index": 11, "name": "due_date", "comment": null}, "environment": {"type": "integer", "index": 12, "name": "environment", "comment": null}, "issue_type_id": {"type": "integer", "index": 13, "name": "issue_type_id", "comment": null}, "issue_key": {"type": "character varying(5)", "index": 14, "name": "issue_key", "comment": null}, "priority_id": {"type": "integer", "index": 15, "name": "priority_id", "comment": null}, "project_id": {"type": "integer", "index": 16, "name": "project_id", "comment": null}, "reporter_user_id": {"type": "character varying(43)", "index": 17, "name": "reporter_user_id", "comment": null}, "resolution_id": {"type": "integer", "index": 18, "name": "resolution_id", "comment": null}, "status_id": {"type": "integer", "index": 19, "name": "status_id", "comment": null}, "status_changed_at": {"type": "timestamp without time zone", "index": 20, "name": "status_changed_at", "comment": null}, "issue_name": {"type": "character varying(27)", "index": 21, "name": "issue_name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 22, "name": "updated_at", "comment": null}, "work_ratio": {"type": "double precision", "index": 23, "name": "work_ratio", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 24, "name": "_fivetran_synced", "comment": null}, "issue_type": {"type": "character varying(4)", "index": 25, "name": "issue_type", "comment": null}, "parent_issue_type": {"type": "character varying(4)", "index": 26, "name": "parent_issue_type", "comment": null}, "parent_issue_name": {"type": "character varying(27)", "index": 27, "name": "parent_issue_name", "comment": null}, "parent_issue_key": {"type": "character varying(5)", "index": 28, "name": "parent_issue_key", "comment": null}, "is_parent_epic": {"type": "boolean", "index": 29, "name": "is_parent_epic", "comment": null}, "assignee_name": {"type": "character varying(22)", "index": 30, "name": "assignee_name", "comment": null}, "assignee_timezone": {"type": "character varying(19)", "index": 31, "name": "assignee_timezone", "comment": null}, "assignee_email": {"type": "integer", "index": 32, "name": "assignee_email", "comment": null}, "reporter_email": {"type": "integer", "index": 33, "name": "reporter_email", "comment": null}, "reporter_name": {"type": "character varying(22)", "index": 34, "name": "reporter_name", "comment": null}, "reporter_timezone": {"type": "character varying(19)", "index": 35, "name": "reporter_timezone", "comment": null}, "project_name": {"type": "character varying(25)", "index": 36, "name": "project_name", "comment": null}, "current_status": {"type": "character varying(11)", "index": 37, "name": "current_status", "comment": null}, "current_status_category": {"type": "character varying(11)", "index": 38, "name": "current_status_category", "comment": null}, "resolution_type": {"type": "character varying(4)", "index": 39, "name": "resolution_type", "comment": null}, "current_priority": {"type": "character varying(7)", "index": 40, "name": "current_priority", "comment": null}, "current_sprint_id": {"type": "character varying(256)", "index": 41, "name": "current_sprint_id", "comment": null}, "current_sprint_name": {"type": "character varying(15)", "index": 42, "name": "current_sprint_name", "comment": null}, "count_sprint_changes": {"type": "bigint", "index": 43, "name": "count_sprint_changes", "comment": null}, "sprint_started_at": {"type": "timestamp without time zone", "index": 44, "name": "sprint_started_at", "comment": null}, "sprint_ended_at": {"type": "timestamp without time zone", "index": 45, "name": "sprint_ended_at", "comment": null}, "sprint_completed_at": {"type": "timestamp without time zone", "index": 46, "name": "sprint_completed_at", "comment": null}, "is_active_sprint": {"type": "boolean", "index": 47, "name": "is_active_sprint", "comment": null}, "first_assigned_at": {"type": "timestamp without time zone", "index": 48, "name": "first_assigned_at", "comment": null}, "last_assigned_at": {"type": "timestamp without time zone", "index": 49, "name": "last_assigned_at", "comment": null}, "first_resolved_at": {"type": "timestamp without time zone", "index": 50, "name": "first_resolved_at", "comment": null}, "fixes_versions": {"type": "character varying(65535)", "index": 51, "name": "fixes_versions", "comment": null}, "affects_versions": {"type": "character varying(65535)", "index": 52, "name": "affects_versions", "comment": null}, "conversation": {"type": "character varying(65535)", "index": 53, "name": "conversation", "comment": null}, "count_comments": {"type": "bigint", "index": 54, "name": "count_comments", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 0.000315, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 114000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 65535.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.int_jira__issue_join"}, "model.jira.int_jira__issue_calendar_spine": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__issue_calendar_spine", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "issue_day_id": {"type": "character varying(32)", "index": 3, "name": "issue_day_id", "comment": null}, "earliest_open_until_date": {"type": "date", "index": 4, "name": "earliest_open_until_date", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 3.8e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(EVEN)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 14000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 31.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 32.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.int_jira__issue_calendar_spine"}, "model.jira.jira__daily_issue_field_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira", "name": "jira__daily_issue_field_history", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "status": {"type": "character varying(11)", "index": 3, "name": "status", "comment": null}, "status_id": {"type": "character varying(65535)", "index": 4, "name": "status_id", "comment": null}, "sprint": {"type": "character varying(65535)", "index": 5, "name": "sprint", "comment": null}, "summary": {"type": "character varying(65535)", "index": 6, "name": "summary", "comment": null}, "story_points": {"type": "character varying(65535)", "index": 7, "name": "story_points", "comment": null}, "components": {"type": "character varying(65535)", "index": 8, "name": "components", "comment": null}, "issue_day_id": {"type": "character varying(32)", "index": 9, "name": "issue_day_id", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 6.6e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(KEY(issue_id))", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY(issue_id))", "include": true, "description": "First column in the sort key."}, "skew_rows": {"id": "skew_rows", "label": "Skew Rows", "value": 100.0, "include": true, "description": "Ratio of the number of rows in the slice with the most rows to the number of rows in the slice with the fewest rows."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "sortkey_num": {"id": "sortkey_num", "label": "# Sort Keys", "value": 1.0, "include": true, "description": "Number of columns defined as sort keys."}, "skew_sortkey1": {"id": "skew_sortkey1", "label": "Sort Key Skew", "value": 1.0, "include": true, "description": "Ratio of the size of the largest non-sort key column to the size of the first column of the sort key."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 24000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 31.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "unsorted": {"id": "unsorted", "label": "Unsorted %", "value": 0.0, "include": true, "description": "Percent of unsorted rows in the table."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 65535.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.jira__daily_issue_field_history"}, "model.jira.jira__issue_enhanced": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira", "name": "jira__issue_enhanced", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"issue_id": {"type": "bigint", "index": 1, "name": "issue_id", "comment": null}, "parent_issue_id": {"type": "integer", "index": 2, "name": "parent_issue_id", "comment": null}, "original_estimate_seconds": {"type": "integer", "index": 3, "name": "original_estimate_seconds", "comment": null}, "remaining_estimate_seconds": {"type": "integer", "index": 4, "name": "remaining_estimate_seconds", "comment": null}, "time_spent_seconds": {"type": "integer", "index": 5, "name": "time_spent_seconds", "comment": null}, "assignee_user_id": {"type": "character varying(256)", "index": 6, "name": "assignee_user_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 7, "name": "created_at", "comment": null}, "resolved_at": {"type": "timestamp without time zone", "index": 8, "name": "resolved_at", "comment": null}, "creator_user_id": {"type": "character varying(43)", "index": 9, "name": "creator_user_id", "comment": null}, "issue_description": {"type": "character varying(41)", "index": 10, "name": "issue_description", "comment": null}, "due_date": {"type": "integer", "index": 11, "name": "due_date", "comment": null}, "environment": {"type": "integer", "index": 12, "name": "environment", "comment": null}, "issue_type_id": {"type": "integer", "index": 13, "name": "issue_type_id", "comment": null}, "issue_key": {"type": "character varying(5)", "index": 14, "name": "issue_key", "comment": null}, "priority_id": {"type": "integer", "index": 15, "name": "priority_id", "comment": null}, "project_id": {"type": "integer", "index": 16, "name": "project_id", "comment": null}, "reporter_user_id": {"type": "character varying(43)", "index": 17, "name": "reporter_user_id", "comment": null}, "resolution_id": {"type": "integer", "index": 18, "name": "resolution_id", "comment": null}, "status_id": {"type": "integer", "index": 19, "name": "status_id", "comment": null}, "status_changed_at": {"type": "timestamp without time zone", "index": 20, "name": "status_changed_at", "comment": null}, "issue_name": {"type": "character varying(27)", "index": 21, "name": "issue_name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 22, "name": "updated_at", "comment": null}, "work_ratio": {"type": "double precision", "index": 23, "name": "work_ratio", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 24, "name": "_fivetran_synced", "comment": null}, "issue_type": {"type": "character varying(4)", "index": 25, "name": "issue_type", "comment": null}, "parent_issue_type": {"type": "character varying(4)", "index": 26, "name": "parent_issue_type", "comment": null}, "parent_issue_name": {"type": "character varying(27)", "index": 27, "name": "parent_issue_name", "comment": null}, "parent_issue_key": {"type": "character varying(5)", "index": 28, "name": "parent_issue_key", "comment": null}, "is_parent_epic": {"type": "boolean", "index": 29, "name": "is_parent_epic", "comment": null}, "assignee_name": {"type": "character varying(22)", "index": 30, "name": "assignee_name", "comment": null}, "assignee_timezone": {"type": "character varying(19)", "index": 31, "name": "assignee_timezone", "comment": null}, "assignee_email": {"type": "integer", "index": 32, "name": "assignee_email", "comment": null}, "reporter_email": {"type": "integer", "index": 33, "name": "reporter_email", "comment": null}, "reporter_name": {"type": "character varying(22)", "index": 34, "name": "reporter_name", "comment": null}, "reporter_timezone": {"type": "character varying(19)", "index": 35, "name": "reporter_timezone", "comment": null}, "project_name": {"type": "character varying(25)", "index": 36, "name": "project_name", "comment": null}, "current_status": {"type": "character varying(11)", "index": 37, "name": "current_status", "comment": null}, "current_status_category": {"type": "character varying(11)", "index": 38, "name": "current_status_category", "comment": null}, "resolution_type": {"type": "character varying(4)", "index": 39, "name": "resolution_type", "comment": null}, "current_priority": {"type": "character varying(7)", "index": 40, "name": "current_priority", "comment": null}, "current_sprint_id": {"type": "character varying(256)", "index": 41, "name": "current_sprint_id", "comment": null}, "current_sprint_name": {"type": "character varying(15)", "index": 42, "name": "current_sprint_name", "comment": null}, "count_sprint_changes": {"type": "bigint", "index": 43, "name": "count_sprint_changes", "comment": null}, "sprint_started_at": {"type": "timestamp without time zone", "index": 44, "name": "sprint_started_at", "comment": null}, "sprint_ended_at": {"type": "timestamp without time zone", "index": 45, "name": "sprint_ended_at", "comment": null}, "sprint_completed_at": {"type": "timestamp without time zone", "index": 46, "name": "sprint_completed_at", "comment": null}, "is_active_sprint": {"type": "boolean", "index": 47, "name": "is_active_sprint", "comment": null}, "first_assigned_at": {"type": "timestamp without time zone", "index": 48, "name": "first_assigned_at", "comment": null}, "last_assigned_at": {"type": "timestamp without time zone", "index": 49, "name": "last_assigned_at", "comment": null}, "first_resolved_at": {"type": "timestamp without time zone", "index": 50, "name": "first_resolved_at", "comment": null}, "fixes_versions": {"type": "character varying(65535)", "index": 51, "name": "fixes_versions", "comment": null}, "affects_versions": {"type": "character varying(65535)", "index": 52, "name": "affects_versions", "comment": null}, "conversation": {"type": "character varying(65535)", "index": 53, "name": "conversation", "comment": null}, "count_comments": {"type": "bigint", "index": 54, "name": "count_comments", "comment": null}, "open_duration_seconds": {"type": "bigint", "index": 55, "name": "open_duration_seconds", "comment": null}, "any_assignment_duration_seconds": {"type": "bigint", "index": 56, "name": "any_assignment_duration_seconds", "comment": null}, "last_assignment_duration_seconds": {"type": "bigint", "index": 57, "name": "last_assignment_duration_seconds", "comment": null}, "status": {"type": "character varying(11)", "index": 58, "name": "status", "comment": null}, "sprint": {"type": "character varying(65535)", "index": 59, "name": "sprint", "comment": null}, "summary": {"type": "character varying(65535)", "index": 60, "name": "summary", "comment": null}, "story_points": {"type": "character varying(65535)", "index": 61, "name": "story_points", "comment": null}, "components": {"type": "character varying(65535)", "index": 62, "name": "components", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 0.000359, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(KEY(issue_id))", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "skew_rows": {"id": "skew_rows", "label": "Skew Rows", "value": 2.0, "include": true, "description": "Ratio of the number of rows in the slice with the most rows to the number of rows in the slice with the fewest rows."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 130000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 65535.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.jira__issue_enhanced"}, "model.jira.jira__user_enhanced": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira", "name": "jira__user_enhanced", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"email": {"type": "integer", "index": 1, "name": "email", "comment": null}, "user_id": {"type": "character varying(43)", "index": 2, "name": "user_id", "comment": null}, "locale": {"type": "character varying(5)", "index": 3, "name": "locale", "comment": null}, "user_display_name": {"type": "character varying(22)", "index": 4, "name": "user_display_name", "comment": null}, "time_zone": {"type": "character varying(19)", "index": 5, "name": "time_zone", "comment": null}, "username": {"type": "integer", "index": 6, "name": "username", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "projects": {"type": "character varying(65535)", "index": 8, "name": "projects", "comment": null}, "count_closed_issues": {"type": "bigint", "index": 9, "name": "count_closed_issues", "comment": null}, "count_open_issues": {"type": "bigint", "index": 10, "name": "count_open_issues", "comment": null}, "avg_close_time_days": {"type": "numeric(23,0)", "index": 11, "name": "avg_close_time_days", "comment": null}, "avg_age_currently_open_days": {"type": "numeric(23,0)", "index": 12, "name": "avg_age_currently_open_days", "comment": null}, "median_close_time_days": {"type": "numeric(23,0)", "index": 13, "name": "median_close_time_days", "comment": null}, "median_age_currently_open_days": {"type": "numeric(23,0)", "index": 14, "name": "median_age_currently_open_days", "comment": null}, "avg_close_time_seconds": {"type": "numeric(23,0)", "index": 15, "name": "avg_close_time_seconds", "comment": null}, "avg_age_currently_open_seconds": {"type": "numeric(23,0)", "index": 16, "name": "avg_age_currently_open_seconds", "comment": null}, "median_close_time_seconds": {"type": "numeric(23,0)", "index": 17, "name": "median_close_time_seconds", "comment": null}, "median_age_currently_open_seconds": {"type": "numeric(23,0)", "index": 18, "name": "median_age_currently_open_seconds", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 0.000116, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(KEY(user_id))", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "skew_rows": {"id": "skew_rows", "label": "Skew Rows", "value": 2.0, "include": true, "description": "Ratio of the number of rows in the slice with the most rows to the number of rows in the slice with the fewest rows."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 42000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 65535.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.jira__user_enhanced"}, "model.jira.jira__project_enhanced": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1_jira", "name": "jira__project_enhanced", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"project_description": {"type": "integer", "index": 1, "name": "project_description", "comment": null}, "project_id": {"type": "integer", "index": 2, "name": "project_id", "comment": null}, "project_key": {"type": "character varying(4)", "index": 3, "name": "project_key", "comment": null}, "project_lead_user_id": {"type": "character varying(43)", "index": 4, "name": "project_lead_user_id", "comment": null}, "project_name": {"type": "character varying(25)", "index": 5, "name": "project_name", "comment": null}, "project_category_id": {"type": "integer", "index": 6, "name": "project_category_id", "comment": null}, "permission_scheme_id": {"type": "integer", "index": 7, "name": "permission_scheme_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}, "project_lead_user_name": {"type": "character varying(22)", "index": 9, "name": "project_lead_user_name", "comment": null}, "project_lead_email": {"type": "integer", "index": 10, "name": "project_lead_email", "comment": null}, "epics": {"type": "character varying(65535)", "index": 11, "name": "epics", "comment": null}, "components": {"type": "character varying(65535)", "index": 12, "name": "components", "comment": null}, "count_closed_issues": {"type": "bigint", "index": 13, "name": "count_closed_issues", "comment": null}, "count_open_issues": {"type": "bigint", "index": 14, "name": "count_open_issues", "comment": null}, "count_open_assigned_issues": {"type": "bigint", "index": 15, "name": "count_open_assigned_issues", "comment": null}, "avg_close_time_days": {"type": "numeric(23,0)", "index": 16, "name": "avg_close_time_days", "comment": null}, "avg_assigned_close_time_days": {"type": "numeric(23,0)", "index": 17, "name": "avg_assigned_close_time_days", "comment": null}, "avg_age_currently_open_days": {"type": "numeric(23,0)", "index": 18, "name": "avg_age_currently_open_days", "comment": null}, "avg_age_currently_open_assigned_days": {"type": "numeric(23,0)", "index": 19, "name": "avg_age_currently_open_assigned_days", "comment": null}, "median_close_time_days": {"type": "numeric(23,0)", "index": 20, "name": "median_close_time_days", "comment": null}, "median_age_currently_open_days": {"type": "numeric(23,0)", "index": 21, "name": "median_age_currently_open_days", "comment": null}, "median_assigned_close_time_days": {"type": "numeric(23,0)", "index": 22, "name": "median_assigned_close_time_days", "comment": null}, "median_age_currently_open_assigned_days": {"type": "numeric(23,0)", "index": 23, "name": "median_age_currently_open_assigned_days", "comment": null}, "avg_close_time_seconds": {"type": "numeric(23,0)", "index": 24, "name": "avg_close_time_seconds", "comment": null}, "avg_assigned_close_time_seconds": {"type": "numeric(23,0)", "index": 25, "name": "avg_assigned_close_time_seconds", "comment": null}, "avg_age_currently_open_seconds": {"type": "numeric(23,0)", "index": 26, "name": "avg_age_currently_open_seconds", "comment": null}, "avg_age_currently_open_assigned_seconds": {"type": "numeric(23,0)", "index": 27, "name": "avg_age_currently_open_assigned_seconds", "comment": null}, "median_close_time_seconds": {"type": "numeric(23,0)", "index": 28, "name": "median_close_time_seconds", "comment": null}, "median_age_currently_open_seconds": {"type": "numeric(23,0)", "index": 29, "name": "median_age_currently_open_seconds", "comment": null}, "median_assigned_close_time_seconds": {"type": "numeric(23,0)", "index": 30, "name": "median_assigned_close_time_seconds", "comment": null}, "median_age_currently_open_assigned_seconds": {"type": "numeric(23,0)", "index": 31, "name": "median_age_currently_open_assigned_seconds", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 0.000187, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(KEY(project_id))", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "skew_rows": {"id": "skew_rows", "label": "Skew Rows", "value": 2.0, "include": true, "description": "Ratio of the number of rows in the slice with the most rows to the number of rows in the slice with the fewest rows."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 0.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 68000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 65535.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.jira__project_enhanced"}, "model.jira_source.stg_jira__issue_link_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_link_tmp", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"issue_id": {"type": "integer", "index": 1, "name": "issue_id", "comment": null}, "related_issue_id": {"type": "integer", "index": 2, "name": "related_issue_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "relationship": {"type": "character varying(10)", "index": 4, "name": "relationship", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_link_tmp"}, "model.jira_source.stg_jira__issue_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_tmp", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "_original_estimate": {"type": "integer", "index": 4, "name": "_original_estimate", "comment": null}, "_remaining_estimate": {"type": "integer", "index": 5, "name": "_remaining_estimate", "comment": null}, "_time_spent": {"type": "integer", "index": 6, "name": "_time_spent", "comment": null}, "assignee": {"type": "character varying(256)", "index": 7, "name": "assignee", "comment": null}, "created": {"type": "timestamp without time zone", "index": 8, "name": "created", "comment": null}, "creator": {"type": "character varying(43)", "index": 9, "name": "creator", "comment": null}, "description": {"type": "character varying(41)", "index": 10, "name": "description", "comment": null}, "due_date": {"type": "integer", "index": 11, "name": "due_date", "comment": null}, "environment": {"type": "integer", "index": 12, "name": "environment", "comment": null}, "issue_type": {"type": "integer", "index": 13, "name": "issue_type", "comment": null}, "key": {"type": "character varying(5)", "index": 14, "name": "key", "comment": null}, "last_viewed": {"type": "timestamp without time zone", "index": 15, "name": "last_viewed", "comment": null}, "original_estimate": {"type": "integer", "index": 16, "name": "original_estimate", "comment": null}, "parent_id": {"type": "integer", "index": 17, "name": "parent_id", "comment": null}, "priority": {"type": "integer", "index": 18, "name": "priority", "comment": null}, "project": {"type": "integer", "index": 19, "name": "project", "comment": null}, "remaining_estimate": {"type": "integer", "index": 20, "name": "remaining_estimate", "comment": null}, "reporter": {"type": "character varying(43)", "index": 21, "name": "reporter", "comment": null}, "resolution": {"type": "integer", "index": 22, "name": "resolution", "comment": null}, "resolved": {"type": "timestamp without time zone", "index": 23, "name": "resolved", "comment": null}, "status": {"type": "integer", "index": 24, "name": "status", "comment": null}, "status_category_changed": {"type": "timestamp without time zone", "index": 25, "name": "status_category_changed", "comment": null}, "summary": {"type": "character varying(27)", "index": 26, "name": "summary", "comment": null}, "time_spent": {"type": "integer", "index": 27, "name": "time_spent", "comment": null}, "updated": {"type": "timestamp without time zone", "index": 28, "name": "updated", "comment": null}, "work_ratio": {"type": "double precision", "index": 29, "name": "work_ratio", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_tmp"}, "model.jira_source.stg_jira__field_option_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__field_option_tmp", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "name": {"type": "character varying(33)", "index": 3, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__field_option_tmp"}, "model.jira_source.stg_jira__issue_multiselect_history_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_multiselect_history_tmp", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"_fivetran_id": {"type": "character varying(28)", "index": 1, "name": "_fivetran_id", "comment": null}, "time": {"type": "timestamp without time zone", "index": 2, "name": "time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "field_id": {"type": "character varying(17)", "index": 4, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 5, "name": "issue_id", "comment": null}, "value": {"type": "character varying(256)", "index": 6, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_multiselect_history_tmp"}, "model.jira_source.stg_jira__issue_field_history_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_field_history_tmp", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"field_id": {"type": "character varying(17)", "index": 1, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "time": {"type": "timestamp without time zone", "index": 3, "name": "time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "value": {"type": "character varying(256)", "index": 5, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_field_history_tmp"}, "model.jira_source.stg_jira__comment_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__comment_tmp", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "author_id": {"type": "character varying(43)", "index": 3, "name": "author_id", "comment": null}, "body": {"type": "character varying(102)", "index": 4, "name": "body", "comment": null}, "created": {"type": "timestamp without time zone", "index": 5, "name": "created", "comment": null}, "is_public": {"type": "boolean", "index": 6, "name": "is_public", "comment": null}, "issue_id": {"type": "bigint", "index": 7, "name": "issue_id", "comment": null}, "update_author_id": {"type": "character varying(43)", "index": 8, "name": "update_author_id", "comment": null}, "updated": {"type": "timestamp without time zone", "index": 9, "name": "updated", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__comment_tmp"}, "model.jira_source.stg_jira__component_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__component_tmp", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "integer", "index": 3, "name": "description", "comment": null}, "name": {"type": "character varying(11)", "index": 4, "name": "name", "comment": null}, "project_id": {"type": "bigint", "index": 5, "name": "project_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__component_tmp"}, "model.jira_source.stg_jira__field_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__field_tmp", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "character varying(256)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "is_array": {"type": "boolean", "index": 3, "name": "is_array", "comment": null}, "is_custom": {"type": "boolean", "index": 4, "name": "is_custom", "comment": null}, "name": {"type": "character varying(17)", "index": 5, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__field_tmp"}, "model.jira_source.stg_jira__issue_type_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_type_tmp", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "character varying(30)", "index": 3, "name": "description", "comment": null}, "name": {"type": "character varying(4)", "index": 4, "name": "name", "comment": null}, "subtask": {"type": "boolean", "index": 5, "name": "subtask", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_type_tmp"}, "model.jira_source.stg_jira__priority_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__priority_tmp", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "character varying(53)", "index": 3, "name": "description", "comment": null}, "name": {"type": "character varying(7)", "index": 4, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__priority_tmp"}, "model.jira_source.stg_jira__project_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__project_tmp", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "integer", "index": 3, "name": "description", "comment": null}, "key": {"type": "character varying(4)", "index": 4, "name": "key", "comment": null}, "lead_id": {"type": "character varying(43)", "index": 5, "name": "lead_id", "comment": null}, "name": {"type": "character varying(25)", "index": 6, "name": "name", "comment": null}, "permission_scheme_id": {"type": "integer", "index": 7, "name": "permission_scheme_id", "comment": null}, "project_category_id": {"type": "integer", "index": 8, "name": "project_category_id", "comment": null}, "project_type_key": {"type": "character varying(8)", "index": 9, "name": "project_type_key", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__project_tmp"}, "model.jira_source.stg_jira__resolution_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__resolution_tmp", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "character varying(38)", "index": 3, "name": "description", "comment": null}, "name": {"type": "character varying(4)", "index": 4, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__resolution_tmp"}, "model.jira_source.stg_jira__sprint_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__sprint_tmp", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "board_id": {"type": "integer", "index": 3, "name": "board_id", "comment": null}, "complete_date": {"type": "timestamp without time zone", "index": 4, "name": "complete_date", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 5, "name": "end_date", "comment": null}, "name": {"type": "character varying(15)", "index": 6, "name": "name", "comment": null}, "start_date": {"type": "timestamp without time zone", "index": 7, "name": "start_date", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__sprint_tmp"}, "model.jira_source.stg_jira__status_category_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__status_category_tmp", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "name": {"type": "character varying(11)", "index": 3, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__status_category_tmp"}, "model.jira_source.stg_jira__status_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__status_tmp", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "character varying(69)", "index": 3, "name": "description", "comment": null}, "name": {"type": "character varying(11)", "index": 4, "name": "name", "comment": null}, "status_category_id": {"type": "integer", "index": 5, "name": "status_category_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__status_tmp"}, "model.jira_source.stg_jira__user_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__user_tmp", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "character varying(43)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "email": {"type": "integer", "index": 3, "name": "email", "comment": null}, "locale": {"type": "character varying(5)", "index": 4, "name": "locale", "comment": null}, "name": {"type": "character varying(22)", "index": 5, "name": "name", "comment": null}, "time_zone": {"type": "character varying(19)", "index": 6, "name": "time_zone", "comment": null}, "username": {"type": "integer", "index": 7, "name": "username", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__user_tmp"}, "model.jira_source.stg_jira__version_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__version_tmp", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "archived": {"type": "boolean", "index": 3, "name": "archived", "comment": null}, "description": {"type": "character varying(18)", "index": 4, "name": "description", "comment": null}, "name": {"type": "character varying(11)", "index": 5, "name": "name", "comment": null}, "overdue": {"type": "boolean", "index": 6, "name": "overdue", "comment": null}, "project_id": {"type": "integer", "index": 7, "name": "project_id", "comment": null}, "release_date": {"type": "date", "index": 8, "name": "release_date", "comment": null}, "released": {"type": "boolean", "index": 9, "name": "released", "comment": null}, "start_date": {"type": "date", "index": 10, "name": "start_date", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__version_tmp"}}, "sources": {"source.jira_source.jira.component": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "component", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "integer", "index": 3, "name": "description", "comment": null}, "name": {"type": "character varying(11)", "index": 4, "name": "name", "comment": null}, "project_id": {"type": "bigint", "index": 5, "name": "project_id", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.2e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 8000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 4.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 11.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.component"}, "source.jira_source.jira.issue_field_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "issue_field_history", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"field_id": {"type": "character varying(17)", "index": 1, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "time": {"type": "timestamp without time zone", "index": 3, "name": "time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "value": {"type": "character varying(256)", "index": 5, "name": "value", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.2e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 8000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 5.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 256.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.issue_field_history"}, "source.jira_source.jira.field": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "field", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "character varying(256)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "is_array": {"type": "boolean", "index": 3, "name": "is_array", "comment": null}, "is_custom": {"type": "boolean", "index": 4, "name": "is_custom", "comment": null}, "name": {"type": "character varying(17)", "index": 5, "name": "name", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.2e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 8000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 5.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 256.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.field"}, "source.jira_source.jira.field_option": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "field_option", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "name": {"type": "character varying(33)", "index": 3, "name": "name", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 1.6e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 6000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 5.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 33.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.field_option"}, "source.jira_source.jira.issue": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "issue", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "_original_estimate": {"type": "integer", "index": 4, "name": "_original_estimate", "comment": null}, "_remaining_estimate": {"type": "integer", "index": 5, "name": "_remaining_estimate", "comment": null}, "_time_spent": {"type": "integer", "index": 6, "name": "_time_spent", "comment": null}, "assignee": {"type": "character varying(256)", "index": 7, "name": "assignee", "comment": null}, "created": {"type": "timestamp without time zone", "index": 8, "name": "created", "comment": null}, "creator": {"type": "character varying(43)", "index": 9, "name": "creator", "comment": null}, "description": {"type": "character varying(41)", "index": 10, "name": "description", "comment": null}, "due_date": {"type": "integer", "index": 11, "name": "due_date", "comment": null}, "environment": {"type": "integer", "index": 12, "name": "environment", "comment": null}, "issue_type": {"type": "integer", "index": 13, "name": "issue_type", "comment": null}, "key": {"type": "character varying(5)", "index": 14, "name": "key", "comment": null}, "last_viewed": {"type": "timestamp without time zone", "index": 15, "name": "last_viewed", "comment": null}, "original_estimate": {"type": "integer", "index": 16, "name": "original_estimate", "comment": null}, "parent_id": {"type": "integer", "index": 17, "name": "parent_id", "comment": null}, "priority": {"type": "integer", "index": 18, "name": "priority", "comment": null}, "project": {"type": "integer", "index": 19, "name": "project", "comment": null}, "remaining_estimate": {"type": "integer", "index": 20, "name": "remaining_estimate", "comment": null}, "reporter": {"type": "character varying(43)", "index": 21, "name": "reporter", "comment": null}, "resolution": {"type": "integer", "index": 22, "name": "resolution", "comment": null}, "resolved": {"type": "timestamp without time zone", "index": 23, "name": "resolved", "comment": null}, "status": {"type": "integer", "index": 24, "name": "status", "comment": null}, "status_category_changed": {"type": "timestamp without time zone", "index": 25, "name": "status_category_changed", "comment": null}, "summary": {"type": "character varying(27)", "index": 26, "name": "summary", "comment": null}, "time_spent": {"type": "integer", "index": 27, "name": "time_spent", "comment": null}, "updated": {"type": "timestamp without time zone", "index": 28, "name": "updated", "comment": null}, "work_ratio": {"type": "double precision", "index": 29, "name": "work_ratio", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 8.8e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 32000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 256.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.issue"}, "source.jira_source.jira.comment": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "comment", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "author_id": {"type": "character varying(43)", "index": 3, "name": "author_id", "comment": null}, "body": {"type": "character varying(102)", "index": 4, "name": "body", "comment": null}, "created": {"type": "timestamp without time zone", "index": 5, "name": "created", "comment": null}, "is_public": {"type": "boolean", "index": 6, "name": "is_public", "comment": null}, "issue_id": {"type": "bigint", "index": 7, "name": "issue_id", "comment": null}, "update_author_id": {"type": "character varying(43)", "index": 8, "name": "update_author_id", "comment": null}, "updated": {"type": "timestamp without time zone", "index": 9, "name": "updated", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 3.3e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 12000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 102.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.comment"}, "source.jira_source.jira.issue_link": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "issue_link", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"issue_id": {"type": "integer", "index": 1, "name": "issue_id", "comment": null}, "related_issue_id": {"type": "integer", "index": 2, "name": "related_issue_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "relationship": {"type": "character varying(10)", "index": 4, "name": "relationship", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 1.9e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 7000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 10.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.issue_link"}, "source.jira_source.jira.issue_type": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "issue_type", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "character varying(30)", "index": 3, "name": "description", "comment": null}, "name": {"type": "character varying(4)", "index": 4, "name": "name", "comment": null}, "subtask": {"type": "boolean", "index": 5, "name": "subtask", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.2e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 8000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 30.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.issue_type"}, "source.jira_source.jira.sprint": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "sprint", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "board_id": {"type": "integer", "index": 3, "name": "board_id", "comment": null}, "complete_date": {"type": "timestamp without time zone", "index": 4, "name": "complete_date", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 5, "name": "end_date", "comment": null}, "name": {"type": "character varying(15)", "index": 6, "name": "name", "comment": null}, "start_date": {"type": "timestamp without time zone", "index": 7, "name": "start_date", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.7e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 10000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 15.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.sprint"}, "source.jira_source.jira.project": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "project", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "integer", "index": 3, "name": "description", "comment": null}, "key": {"type": "character varying(4)", "index": 4, "name": "key", "comment": null}, "lead_id": {"type": "character varying(43)", "index": 5, "name": "lead_id", "comment": null}, "name": {"type": "character varying(25)", "index": 6, "name": "name", "comment": null}, "permission_scheme_id": {"type": "integer", "index": 7, "name": "permission_scheme_id", "comment": null}, "project_category_id": {"type": "integer", "index": 8, "name": "project_category_id", "comment": null}, "project_type_key": {"type": "character varying(8)", "index": 9, "name": "project_type_key", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 3.3e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 12000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 43.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.project"}, "source.jira_source.jira.priority": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "priority", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "character varying(53)", "index": 3, "name": "description", "comment": null}, "name": {"type": "character varying(7)", "index": 4, "name": "name", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 1.9e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 7000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 5.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 53.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.priority"}, "source.jira_source.jira.issue_multiselect_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "issue_multiselect_history", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"_fivetran_id": {"type": "character varying(28)", "index": 1, "name": "_fivetran_id", "comment": null}, "time": {"type": "timestamp without time zone", "index": 2, "name": "time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "field_id": {"type": "character varying(17)", "index": 4, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 5, "name": "issue_id", "comment": null}, "value": {"type": "character varying(256)", "index": 6, "name": "value", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.4e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 9000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 4.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 256.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.issue_multiselect_history"}, "source.jira_source.jira.resolution": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "resolution", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "character varying(38)", "index": 3, "name": "description", "comment": null}, "name": {"type": "character varying(4)", "index": 4, "name": "name", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 1.9e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 7000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 1.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 38.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.resolution"}, "source.jira_source.jira.status": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "status", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "character varying(69)", "index": 3, "name": "description", "comment": null}, "name": {"type": "character varying(11)", "index": 4, "name": "name", "comment": null}, "status_category_id": {"type": "integer", "index": 5, "name": "status_category_id", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.2e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 8000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 69.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.status"}, "source.jira_source.jira.status_category": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "status_category", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "name": {"type": "character varying(11)", "index": 3, "name": "name", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 1.6e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 6000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 11.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.status_category"}, "source.jira_source.jira.version": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "version", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "archived": {"type": "boolean", "index": 3, "name": "archived", "comment": null}, "description": {"type": "character varying(18)", "index": 4, "name": "description", "comment": null}, "name": {"type": "character varying(11)", "index": 5, "name": "name", "comment": null}, "overdue": {"type": "boolean", "index": 6, "name": "overdue", "comment": null}, "project_id": {"type": "integer", "index": 7, "name": "project_id", "comment": null}, "release_date": {"type": "date", "index": 8, "name": "release_date", "comment": null}, "released": {"type": "boolean", "index": 9, "name": "released", "comment": null}, "start_date": {"type": "date", "index": 10, "name": "start_date", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 3.5e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 13000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 18.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.version"}, "source.jira_source.jira.user": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_1", "name": "user", "database": "redshift-test-kristin", "comment": null, "owner": "awsuser"}, "columns": {"id": {"type": "character varying(43)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "email": {"type": "integer", "index": 3, "name": "email", "comment": null}, "locale": {"type": "character varying(5)", "index": 4, "name": "locale", "comment": null}, "name": {"type": "character varying(22)", "index": 5, "name": "name", "comment": null}, "time_zone": {"type": "character varying(19)", "index": 6, "name": "time_zone", "comment": null}, "username": {"type": "integer", "index": 7, "name": "username", "comment": null}}, "stats": {"pct_used": {"id": "pct_used", "label": "Disk Utilization", "value": 2.7e-05, "include": true, "description": "Percent of available space that is used by the table."}, "diststyle": {"id": "diststyle", "label": "Dist Style", "value": "AUTO(ALL)", "include": true, "description": "Distribution style or distribution key column, if key distribution is defined."}, "sortkey1": {"id": "sortkey1", "label": "Sort Key 1", "value": "AUTO(SORTKEY)", "include": true, "description": "First column in the sort key."}, "stats_off": {"id": "stats_off", "label": "Stats Off", "value": 100.0, "include": true, "description": "Number that indicates how stale the table statistics are; 0 is current, 100 is out of date."}, "encoded": {"id": "encoded", "label": "Encoded", "value": "Y, AUTO(ENCODE)", "include": true, "description": "Indicates whether any column in the table has compression encoding defined."}, "size": {"id": "size", "label": "Approximate Size", "value": 10000000.0, "include": true, "description": "Approximate size of the table, calculated from a count of 1MB blocks"}, "rows": {"id": "rows", "label": "Approximate Row Count", "value": 3.0, "include": true, "description": "Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed."}, "max_varchar": {"id": "max_varchar", "label": "Max Varchar", "value": 43.0, "include": true, "description": "Size of the largest column that uses a VARCHAR data type."}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.user"}}, "errors": null} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.7.10", "generated_at": "2024-03-21T15:31:55.046966Z", "invocation_id": "ca58038f-9947-4199-a5f3-eec45b0edb02", "env": {}}, "nodes": {"seed.jira_integration_tests.comment": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "comment", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "author_id": {"type": "text", "index": 3, "name": "author_id", "comment": null}, "body": {"type": "text", "index": 4, "name": "body", "comment": null}, "created": {"type": "timestamp without time zone", "index": 5, "name": "created", "comment": null}, "is_public": {"type": "boolean", "index": 6, "name": "is_public", "comment": null}, "issue_id": {"type": "bigint", "index": 7, "name": "issue_id", "comment": null}, "update_author_id": {"type": "text", "index": 8, "name": "update_author_id", "comment": null}, "updated": {"type": "timestamp without time zone", "index": 9, "name": "updated", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.comment"}, "seed.jira_integration_tests.component": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "component", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "integer", "index": 3, "name": "description", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "project_id": {"type": "bigint", "index": 5, "name": "project_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.component"}, "seed.jira_integration_tests.epic": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "epic", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "done": {"type": "boolean", "index": 3, "name": "done", "comment": null}, "key": {"type": "text", "index": 4, "name": "key", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "summary": {"type": "text", "index": 6, "name": "summary", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.epic"}, "seed.jira_integration_tests.field": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "field", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "is_array": {"type": "boolean", "index": 3, "name": "is_array", "comment": null}, "is_custom": {"type": "boolean", "index": 4, "name": "is_custom", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.field"}, "seed.jira_integration_tests.field_option": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "field_option", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.field_option"}, "seed.jira_integration_tests.issue": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "issue", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "_original_estimate": {"type": "integer", "index": 4, "name": "_original_estimate", "comment": null}, "_remaining_estimate": {"type": "integer", "index": 5, "name": "_remaining_estimate", "comment": null}, "_time_spent": {"type": "integer", "index": 6, "name": "_time_spent", "comment": null}, "assignee": {"type": "character varying", "index": 7, "name": "assignee", "comment": null}, "created": {"type": "timestamp without time zone", "index": 8, "name": "created", "comment": null}, "creator": {"type": "text", "index": 9, "name": "creator", "comment": null}, "description": {"type": "text", "index": 10, "name": "description", "comment": null}, "due_date": {"type": "integer", "index": 11, "name": "due_date", "comment": null}, "environment": {"type": "integer", "index": 12, "name": "environment", "comment": null}, "issue_type": {"type": "integer", "index": 13, "name": "issue_type", "comment": null}, "key": {"type": "text", "index": 14, "name": "key", "comment": null}, "last_viewed": {"type": "timestamp without time zone", "index": 15, "name": "last_viewed", "comment": null}, "original_estimate": {"type": "integer", "index": 16, "name": "original_estimate", "comment": null}, "parent_id": {"type": "integer", "index": 17, "name": "parent_id", "comment": null}, "priority": {"type": "integer", "index": 18, "name": "priority", "comment": null}, "project": {"type": "integer", "index": 19, "name": "project", "comment": null}, "remaining_estimate": {"type": "integer", "index": 20, "name": "remaining_estimate", "comment": null}, "reporter": {"type": "text", "index": 21, "name": "reporter", "comment": null}, "resolution": {"type": "integer", "index": 22, "name": "resolution", "comment": null}, "resolved": {"type": "timestamp without time zone", "index": 23, "name": "resolved", "comment": null}, "status": {"type": "integer", "index": 24, "name": "status", "comment": null}, "status_category_changed": {"type": "timestamp without time zone", "index": 25, "name": "status_category_changed", "comment": null}, "summary": {"type": "text", "index": 26, "name": "summary", "comment": null}, "time_spent": {"type": "integer", "index": 27, "name": "time_spent", "comment": null}, "updated": {"type": "timestamp without time zone", "index": 28, "name": "updated", "comment": null}, "work_ratio": {"type": "double precision", "index": 29, "name": "work_ratio", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.issue"}, "seed.jira_integration_tests.issue_field_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "issue_field_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"field_id": {"type": "text", "index": 1, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "time": {"type": "timestamp without time zone", "index": 3, "name": "time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "value": {"type": "character varying", "index": 5, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.issue_field_history"}, "seed.jira_integration_tests.issue_link": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "issue_link", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"issue_id": {"type": "integer", "index": 1, "name": "issue_id", "comment": null}, "related_issue_id": {"type": "integer", "index": 2, "name": "related_issue_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "relationship": {"type": "text", "index": 4, "name": "relationship", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.issue_link"}, "seed.jira_integration_tests.issue_multiselect_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "issue_multiselect_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "time": {"type": "timestamp without time zone", "index": 2, "name": "time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "field_id": {"type": "text", "index": 4, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 5, "name": "issue_id", "comment": null}, "value": {"type": "character varying", "index": 6, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.issue_multiselect_history"}, "seed.jira_integration_tests.issue_type": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "issue_type", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "text", "index": 3, "name": "description", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "subtask": {"type": "boolean", "index": 5, "name": "subtask", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.issue_type"}, "seed.jira_integration_tests.priority": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "priority", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "text", "index": 3, "name": "description", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.priority"}, "seed.jira_integration_tests.project": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "project", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "integer", "index": 3, "name": "description", "comment": null}, "key": {"type": "text", "index": 4, "name": "key", "comment": null}, "lead_id": {"type": "text", "index": 5, "name": "lead_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "permission_scheme_id": {"type": "integer", "index": 7, "name": "permission_scheme_id", "comment": null}, "project_category_id": {"type": "integer", "index": 8, "name": "project_category_id", "comment": null}, "project_type_key": {"type": "text", "index": 9, "name": "project_type_key", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.project"}, "seed.jira_integration_tests.project_board": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "project_board", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"board_id": {"type": "integer", "index": 1, "name": "board_id", "comment": null}, "project_id": {"type": "integer", "index": 2, "name": "project_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.project_board"}, "seed.jira_integration_tests.project_category": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "project_category", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "text", "index": 3, "name": "description", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.project_category"}, "seed.jira_integration_tests.resolution": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "resolution", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "text", "index": 3, "name": "description", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.resolution"}, "seed.jira_integration_tests.sprint": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "sprint", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "board_id": {"type": "integer", "index": 3, "name": "board_id", "comment": null}, "complete_date": {"type": "timestamp without time zone", "index": 4, "name": "complete_date", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 5, "name": "end_date", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "start_date": {"type": "timestamp without time zone", "index": 7, "name": "start_date", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.sprint"}, "seed.jira_integration_tests.status": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "status", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "text", "index": 3, "name": "description", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "status_category_id": {"type": "integer", "index": 5, "name": "status_category_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.status"}, "seed.jira_integration_tests.status_category": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "status_category", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.status_category"}, "seed.jira_integration_tests.user": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "user", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "email": {"type": "integer", "index": 3, "name": "email", "comment": null}, "locale": {"type": "text", "index": 4, "name": "locale", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "time_zone": {"type": "text", "index": 6, "name": "time_zone", "comment": null}, "username": {"type": "integer", "index": 7, "name": "username", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.user"}, "seed.jira_integration_tests.user_group": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "user_group", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"group_name": {"type": "text", "index": 1, "name": "group_name", "comment": null}, "user_id": {"type": "text", "index": 2, "name": "user_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.user_group"}, "seed.jira_integration_tests.version": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "version", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "archived": {"type": "boolean", "index": 3, "name": "archived", "comment": null}, "description": {"type": "text", "index": 4, "name": "description", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "overdue": {"type": "boolean", "index": 6, "name": "overdue", "comment": null}, "project_id": {"type": "integer", "index": 7, "name": "project_id", "comment": null}, "release_date": {"type": "date", "index": 8, "name": "release_date", "comment": null}, "released": {"type": "boolean", "index": 9, "name": "released", "comment": null}, "start_date": {"type": "date", "index": 10, "name": "start_date", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.jira_integration_tests.version"}, "model.jira.int_jira__agg_multiselect_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__agg_multiselect_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"field_id": {"type": "text", "index": 1, "name": "field_id", "comment": null}, "field_name": {"type": "text", "index": 2, "name": "field_name", "comment": null}, "issue_id": {"type": "bigint", "index": 3, "name": "issue_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 4, "name": "updated_at", "comment": null}, "batch_id": {"type": "text", "index": 5, "name": "batch_id", "comment": null}, "date_day": {"type": "date", "index": 6, "name": "date_day", "comment": null}, "field_values": {"type": "text", "index": 7, "name": "field_values", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.int_jira__agg_multiselect_history"}, "model.jira.int_jira__combine_field_histories": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__combine_field_histories", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"field_id": {"type": "text", "index": 1, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "field_value": {"type": "character varying", "index": 3, "name": "field_value", "comment": null}, "field_name": {"type": "text", "index": 4, "name": "field_name", "comment": null}, "valid_starting_at": {"type": "timestamp without time zone", "index": 5, "name": "valid_starting_at", "comment": null}, "valid_ending_at": {"type": "timestamp without time zone", "index": 6, "name": "valid_ending_at", "comment": null}, "valid_starting_on": {"type": "date", "index": 7, "name": "valid_starting_on", "comment": null}, "combined_history_id": {"type": "text", "index": 8, "name": "combined_history_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.int_jira__combine_field_histories"}, "model.jira.int_jira__daily_field_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__daily_field_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"field_id": {"type": "text", "index": 1, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "field_name": {"type": "text", "index": 3, "name": "field_name", "comment": null}, "field_value": {"type": "character varying", "index": 4, "name": "field_value", "comment": null}, "valid_starting_at": {"type": "timestamp without time zone", "index": 5, "name": "valid_starting_at", "comment": null}, "valid_ending_at": {"type": "timestamp without time zone", "index": 6, "name": "valid_ending_at", "comment": null}, "valid_starting_on": {"type": "date", "index": 7, "name": "valid_starting_on", "comment": null}, "issue_field_day_id": {"type": "text", "index": 8, "name": "issue_field_day_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.int_jira__daily_field_history"}, "model.jira.int_jira__field_history_scd": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__field_history_scd", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"valid_starting_on": {"type": "date", "index": 1, "name": "valid_starting_on", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "issue_day_id": {"type": "text", "index": 3, "name": "issue_day_id", "comment": null}, "status_id": {"type": "text", "index": 4, "name": "status_id", "comment": null}, "status": {"type": "text", "index": 5, "name": "status", "comment": null}, "sprint": {"type": "text", "index": 6, "name": "sprint", "comment": null}, "summary": {"type": "text", "index": 7, "name": "summary", "comment": null}, "story_points": {"type": "text", "index": 8, "name": "story_points", "comment": null}, "components": {"type": "text", "index": 9, "name": "components", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.int_jira__field_history_scd"}, "model.jira.int_jira__issue_calendar_spine": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__issue_calendar_spine", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "issue_day_id": {"type": "text", "index": 3, "name": "issue_day_id", "comment": null}, "earliest_open_until_date": {"type": "date", "index": 4, "name": "earliest_open_until_date", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.int_jira__issue_calendar_spine"}, "model.jira.int_jira__issue_join": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__issue_join", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"issue_id": {"type": "bigint", "index": 1, "name": "issue_id", "comment": null}, "parent_issue_id": {"type": "text", "index": 2, "name": "parent_issue_id", "comment": null}, "original_estimate_seconds": {"type": "integer", "index": 3, "name": "original_estimate_seconds", "comment": null}, "remaining_estimate_seconds": {"type": "integer", "index": 4, "name": "remaining_estimate_seconds", "comment": null}, "time_spent_seconds": {"type": "integer", "index": 5, "name": "time_spent_seconds", "comment": null}, "assignee_user_id": {"type": "character varying", "index": 6, "name": "assignee_user_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 7, "name": "created_at", "comment": null}, "resolved_at": {"type": "timestamp without time zone", "index": 8, "name": "resolved_at", "comment": null}, "creator_user_id": {"type": "text", "index": 9, "name": "creator_user_id", "comment": null}, "issue_description": {"type": "text", "index": 10, "name": "issue_description", "comment": null}, "due_date": {"type": "integer", "index": 11, "name": "due_date", "comment": null}, "environment": {"type": "integer", "index": 12, "name": "environment", "comment": null}, "issue_type_id": {"type": "integer", "index": 13, "name": "issue_type_id", "comment": null}, "issue_key": {"type": "text", "index": 14, "name": "issue_key", "comment": null}, "priority_id": {"type": "integer", "index": 15, "name": "priority_id", "comment": null}, "project_id": {"type": "integer", "index": 16, "name": "project_id", "comment": null}, "reporter_user_id": {"type": "text", "index": 17, "name": "reporter_user_id", "comment": null}, "resolution_id": {"type": "integer", "index": 18, "name": "resolution_id", "comment": null}, "status_id": {"type": "integer", "index": 19, "name": "status_id", "comment": null}, "status_changed_at": {"type": "timestamp without time zone", "index": 20, "name": "status_changed_at", "comment": null}, "issue_name": {"type": "text", "index": 21, "name": "issue_name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 22, "name": "updated_at", "comment": null}, "work_ratio": {"type": "double precision", "index": 23, "name": "work_ratio", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 24, "name": "_fivetran_synced", "comment": null}, "issue_type": {"type": "text", "index": 25, "name": "issue_type", "comment": null}, "parent_issue_type": {"type": "text", "index": 26, "name": "parent_issue_type", "comment": null}, "parent_issue_name": {"type": "text", "index": 27, "name": "parent_issue_name", "comment": null}, "parent_issue_key": {"type": "text", "index": 28, "name": "parent_issue_key", "comment": null}, "is_parent_epic": {"type": "boolean", "index": 29, "name": "is_parent_epic", "comment": null}, "assignee_name": {"type": "text", "index": 30, "name": "assignee_name", "comment": null}, "assignee_timezone": {"type": "text", "index": 31, "name": "assignee_timezone", "comment": null}, "assignee_email": {"type": "integer", "index": 32, "name": "assignee_email", "comment": null}, "reporter_email": {"type": "integer", "index": 33, "name": "reporter_email", "comment": null}, "reporter_name": {"type": "text", "index": 34, "name": "reporter_name", "comment": null}, "reporter_timezone": {"type": "text", "index": 35, "name": "reporter_timezone", "comment": null}, "project_name": {"type": "text", "index": 36, "name": "project_name", "comment": null}, "current_status": {"type": "text", "index": 37, "name": "current_status", "comment": null}, "current_status_category": {"type": "text", "index": 38, "name": "current_status_category", "comment": null}, "resolution_type": {"type": "text", "index": 39, "name": "resolution_type", "comment": null}, "current_priority": {"type": "text", "index": 40, "name": "current_priority", "comment": null}, "current_sprint_id": {"type": "character varying", "index": 41, "name": "current_sprint_id", "comment": null}, "current_sprint_name": {"type": "text", "index": 42, "name": "current_sprint_name", "comment": null}, "count_sprint_changes": {"type": "bigint", "index": 43, "name": "count_sprint_changes", "comment": null}, "sprint_started_at": {"type": "timestamp without time zone", "index": 44, "name": "sprint_started_at", "comment": null}, "sprint_ended_at": {"type": "timestamp without time zone", "index": 45, "name": "sprint_ended_at", "comment": null}, "sprint_completed_at": {"type": "timestamp without time zone", "index": 46, "name": "sprint_completed_at", "comment": null}, "is_active_sprint": {"type": "boolean", "index": 47, "name": "is_active_sprint", "comment": null}, "first_assigned_at": {"type": "timestamp without time zone", "index": 48, "name": "first_assigned_at", "comment": null}, "last_assigned_at": {"type": "timestamp without time zone", "index": 49, "name": "last_assigned_at", "comment": null}, "first_resolved_at": {"type": "timestamp without time zone", "index": 50, "name": "first_resolved_at", "comment": null}, "fixes_versions": {"type": "text", "index": 51, "name": "fixes_versions", "comment": null}, "affects_versions": {"type": "text", "index": 52, "name": "affects_versions", "comment": null}, "conversation": {"type": "text", "index": 53, "name": "conversation", "comment": null}, "count_comments": {"type": "bigint", "index": 54, "name": "count_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.int_jira__issue_join"}, "model.jira.int_jira__issue_type_parents": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__issue_type_parents", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"original_estimate_seconds": {"type": "integer", "index": 1, "name": "original_estimate_seconds", "comment": null}, "remaining_estimate_seconds": {"type": "integer", "index": 2, "name": "remaining_estimate_seconds", "comment": null}, "time_spent_seconds": {"type": "integer", "index": 3, "name": "time_spent_seconds", "comment": null}, "assignee_user_id": {"type": "character varying", "index": 4, "name": "assignee_user_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 5, "name": "created_at", "comment": null}, "resolved_at": {"type": "timestamp without time zone", "index": 6, "name": "resolved_at", "comment": null}, "creator_user_id": {"type": "text", "index": 7, "name": "creator_user_id", "comment": null}, "issue_description": {"type": "text", "index": 8, "name": "issue_description", "comment": null}, "due_date": {"type": "integer", "index": 9, "name": "due_date", "comment": null}, "environment": {"type": "integer", "index": 10, "name": "environment", "comment": null}, "issue_id": {"type": "bigint", "index": 11, "name": "issue_id", "comment": null}, "issue_type_id": {"type": "integer", "index": 12, "name": "issue_type_id", "comment": null}, "issue_key": {"type": "text", "index": 13, "name": "issue_key", "comment": null}, "parent_issue_id": {"type": "integer", "index": 14, "name": "parent_issue_id", "comment": null}, "priority_id": {"type": "integer", "index": 15, "name": "priority_id", "comment": null}, "project_id": {"type": "integer", "index": 16, "name": "project_id", "comment": null}, "reporter_user_id": {"type": "text", "index": 17, "name": "reporter_user_id", "comment": null}, "resolution_id": {"type": "integer", "index": 18, "name": "resolution_id", "comment": null}, "status_id": {"type": "integer", "index": 19, "name": "status_id", "comment": null}, "status_changed_at": {"type": "timestamp without time zone", "index": 20, "name": "status_changed_at", "comment": null}, "issue_name": {"type": "text", "index": 21, "name": "issue_name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 22, "name": "updated_at", "comment": null}, "work_ratio": {"type": "double precision", "index": 23, "name": "work_ratio", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 24, "name": "_fivetran_synced", "comment": null}, "revised_parent_issue_id": {"type": "text", "index": 25, "name": "revised_parent_issue_id", "comment": null}, "issue_type": {"type": "text", "index": 26, "name": "issue_type", "comment": null}, "parent_issue_type": {"type": "text", "index": 27, "name": "parent_issue_type", "comment": null}, "parent_issue_name": {"type": "text", "index": 28, "name": "parent_issue_name", "comment": null}, "parent_issue_key": {"type": "text", "index": 29, "name": "parent_issue_key", "comment": null}, "is_parent_epic": {"type": "boolean", "index": 30, "name": "is_parent_epic", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.int_jira__issue_type_parents"}, "model.jira.int_jira__pivot_daily_field_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__pivot_daily_field_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"valid_starting_on": {"type": "date", "index": 1, "name": "valid_starting_on", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "status": {"type": "text", "index": 3, "name": "status", "comment": null}, "sprint": {"type": "text", "index": 4, "name": "sprint", "comment": null}, "summary": {"type": "text", "index": 5, "name": "summary", "comment": null}, "story_points": {"type": "text", "index": 6, "name": "story_points", "comment": null}, "components": {"type": "text", "index": 7, "name": "components", "comment": null}, "issue_day_id": {"type": "text", "index": 8, "name": "issue_day_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.int_jira__pivot_daily_field_history"}, "model.jira.jira__daily_issue_field_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira", "name": "jira__daily_issue_field_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "status": {"type": "text", "index": 3, "name": "status", "comment": null}, "status_id": {"type": "text", "index": 4, "name": "status_id", "comment": null}, "sprint": {"type": "text", "index": 5, "name": "sprint", "comment": null}, "summary": {"type": "text", "index": 6, "name": "summary", "comment": null}, "story_points": {"type": "text", "index": 7, "name": "story_points", "comment": null}, "components": {"type": "text", "index": 8, "name": "components", "comment": null}, "issue_day_id": {"type": "text", "index": 9, "name": "issue_day_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.jira__daily_issue_field_history"}, "model.jira.jira__issue_enhanced": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira", "name": "jira__issue_enhanced", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"issue_id": {"type": "bigint", "index": 1, "name": "issue_id", "comment": null}, "parent_issue_id": {"type": "text", "index": 2, "name": "parent_issue_id", "comment": null}, "original_estimate_seconds": {"type": "integer", "index": 3, "name": "original_estimate_seconds", "comment": null}, "remaining_estimate_seconds": {"type": "integer", "index": 4, "name": "remaining_estimate_seconds", "comment": null}, "time_spent_seconds": {"type": "integer", "index": 5, "name": "time_spent_seconds", "comment": null}, "assignee_user_id": {"type": "character varying", "index": 6, "name": "assignee_user_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 7, "name": "created_at", "comment": null}, "resolved_at": {"type": "timestamp without time zone", "index": 8, "name": "resolved_at", "comment": null}, "creator_user_id": {"type": "text", "index": 9, "name": "creator_user_id", "comment": null}, "issue_description": {"type": "text", "index": 10, "name": "issue_description", "comment": null}, "due_date": {"type": "integer", "index": 11, "name": "due_date", "comment": null}, "environment": {"type": "integer", "index": 12, "name": "environment", "comment": null}, "issue_type_id": {"type": "integer", "index": 13, "name": "issue_type_id", "comment": null}, "issue_key": {"type": "text", "index": 14, "name": "issue_key", "comment": null}, "priority_id": {"type": "integer", "index": 15, "name": "priority_id", "comment": null}, "project_id": {"type": "integer", "index": 16, "name": "project_id", "comment": null}, "reporter_user_id": {"type": "text", "index": 17, "name": "reporter_user_id", "comment": null}, "resolution_id": {"type": "integer", "index": 18, "name": "resolution_id", "comment": null}, "status_id": {"type": "integer", "index": 19, "name": "status_id", "comment": null}, "status_changed_at": {"type": "timestamp without time zone", "index": 20, "name": "status_changed_at", "comment": null}, "issue_name": {"type": "text", "index": 21, "name": "issue_name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 22, "name": "updated_at", "comment": null}, "work_ratio": {"type": "double precision", "index": 23, "name": "work_ratio", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 24, "name": "_fivetran_synced", "comment": null}, "issue_type": {"type": "text", "index": 25, "name": "issue_type", "comment": null}, "parent_issue_type": {"type": "text", "index": 26, "name": "parent_issue_type", "comment": null}, "parent_issue_name": {"type": "text", "index": 27, "name": "parent_issue_name", "comment": null}, "parent_issue_key": {"type": "text", "index": 28, "name": "parent_issue_key", "comment": null}, "is_parent_epic": {"type": "boolean", "index": 29, "name": "is_parent_epic", "comment": null}, "assignee_name": {"type": "text", "index": 30, "name": "assignee_name", "comment": null}, "assignee_timezone": {"type": "text", "index": 31, "name": "assignee_timezone", "comment": null}, "assignee_email": {"type": "integer", "index": 32, "name": "assignee_email", "comment": null}, "reporter_email": {"type": "integer", "index": 33, "name": "reporter_email", "comment": null}, "reporter_name": {"type": "text", "index": 34, "name": "reporter_name", "comment": null}, "reporter_timezone": {"type": "text", "index": 35, "name": "reporter_timezone", "comment": null}, "project_name": {"type": "text", "index": 36, "name": "project_name", "comment": null}, "current_status": {"type": "text", "index": 37, "name": "current_status", "comment": null}, "current_status_category": {"type": "text", "index": 38, "name": "current_status_category", "comment": null}, "resolution_type": {"type": "text", "index": 39, "name": "resolution_type", "comment": null}, "current_priority": {"type": "text", "index": 40, "name": "current_priority", "comment": null}, "current_sprint_id": {"type": "character varying", "index": 41, "name": "current_sprint_id", "comment": null}, "current_sprint_name": {"type": "text", "index": 42, "name": "current_sprint_name", "comment": null}, "count_sprint_changes": {"type": "bigint", "index": 43, "name": "count_sprint_changes", "comment": null}, "sprint_started_at": {"type": "timestamp without time zone", "index": 44, "name": "sprint_started_at", "comment": null}, "sprint_ended_at": {"type": "timestamp without time zone", "index": 45, "name": "sprint_ended_at", "comment": null}, "sprint_completed_at": {"type": "timestamp without time zone", "index": 46, "name": "sprint_completed_at", "comment": null}, "is_active_sprint": {"type": "boolean", "index": 47, "name": "is_active_sprint", "comment": null}, "first_assigned_at": {"type": "timestamp without time zone", "index": 48, "name": "first_assigned_at", "comment": null}, "last_assigned_at": {"type": "timestamp without time zone", "index": 49, "name": "last_assigned_at", "comment": null}, "first_resolved_at": {"type": "timestamp without time zone", "index": 50, "name": "first_resolved_at", "comment": null}, "fixes_versions": {"type": "text", "index": 51, "name": "fixes_versions", "comment": null}, "affects_versions": {"type": "text", "index": 52, "name": "affects_versions", "comment": null}, "conversation": {"type": "text", "index": 53, "name": "conversation", "comment": null}, "count_comments": {"type": "bigint", "index": 54, "name": "count_comments", "comment": null}, "open_duration_seconds": {"type": "double precision", "index": 55, "name": "open_duration_seconds", "comment": null}, "any_assignment_duration_seconds": {"type": "double precision", "index": 56, "name": "any_assignment_duration_seconds", "comment": null}, "last_assignment_duration_seconds": {"type": "double precision", "index": 57, "name": "last_assignment_duration_seconds", "comment": null}, "status": {"type": "text", "index": 58, "name": "status", "comment": null}, "sprint": {"type": "text", "index": 59, "name": "sprint", "comment": null}, "summary": {"type": "text", "index": 60, "name": "summary", "comment": null}, "story_points": {"type": "text", "index": 61, "name": "story_points", "comment": null}, "components": {"type": "text", "index": 62, "name": "components", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.jira__issue_enhanced"}, "model.jira.jira__project_enhanced": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira", "name": "jira__project_enhanced", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"project_description": {"type": "integer", "index": 1, "name": "project_description", "comment": null}, "project_id": {"type": "integer", "index": 2, "name": "project_id", "comment": null}, "project_key": {"type": "text", "index": 3, "name": "project_key", "comment": null}, "project_lead_user_id": {"type": "text", "index": 4, "name": "project_lead_user_id", "comment": null}, "project_name": {"type": "text", "index": 5, "name": "project_name", "comment": null}, "project_category_id": {"type": "integer", "index": 6, "name": "project_category_id", "comment": null}, "permission_scheme_id": {"type": "integer", "index": 7, "name": "permission_scheme_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}, "project_lead_user_name": {"type": "text", "index": 9, "name": "project_lead_user_name", "comment": null}, "project_lead_email": {"type": "integer", "index": 10, "name": "project_lead_email", "comment": null}, "epics": {"type": "text", "index": 11, "name": "epics", "comment": null}, "components": {"type": "text", "index": 12, "name": "components", "comment": null}, "count_closed_issues": {"type": "bigint", "index": 13, "name": "count_closed_issues", "comment": null}, "count_open_issues": {"type": "bigint", "index": 14, "name": "count_open_issues", "comment": null}, "count_open_assigned_issues": {"type": "bigint", "index": 15, "name": "count_open_assigned_issues", "comment": null}, "avg_close_time_days": {"type": "numeric", "index": 16, "name": "avg_close_time_days", "comment": null}, "avg_assigned_close_time_days": {"type": "numeric", "index": 17, "name": "avg_assigned_close_time_days", "comment": null}, "avg_age_currently_open_days": {"type": "numeric", "index": 18, "name": "avg_age_currently_open_days", "comment": null}, "avg_age_currently_open_assigned_days": {"type": "numeric", "index": 19, "name": "avg_age_currently_open_assigned_days", "comment": null}, "median_close_time_days": {"type": "numeric", "index": 20, "name": "median_close_time_days", "comment": null}, "median_age_currently_open_days": {"type": "numeric", "index": 21, "name": "median_age_currently_open_days", "comment": null}, "median_assigned_close_time_days": {"type": "numeric", "index": 22, "name": "median_assigned_close_time_days", "comment": null}, "median_age_currently_open_assigned_days": {"type": "numeric", "index": 23, "name": "median_age_currently_open_assigned_days", "comment": null}, "avg_close_time_seconds": {"type": "numeric", "index": 24, "name": "avg_close_time_seconds", "comment": null}, "avg_assigned_close_time_seconds": {"type": "numeric", "index": 25, "name": "avg_assigned_close_time_seconds", "comment": null}, "avg_age_currently_open_seconds": {"type": "numeric", "index": 26, "name": "avg_age_currently_open_seconds", "comment": null}, "avg_age_currently_open_assigned_seconds": {"type": "numeric", "index": 27, "name": "avg_age_currently_open_assigned_seconds", "comment": null}, "median_close_time_seconds": {"type": "numeric", "index": 28, "name": "median_close_time_seconds", "comment": null}, "median_age_currently_open_seconds": {"type": "numeric", "index": 29, "name": "median_age_currently_open_seconds", "comment": null}, "median_assigned_close_time_seconds": {"type": "numeric", "index": 30, "name": "median_assigned_close_time_seconds", "comment": null}, "median_age_currently_open_assigned_seconds": {"type": "numeric", "index": 31, "name": "median_age_currently_open_assigned_seconds", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.jira__project_enhanced"}, "model.jira.jira__user_enhanced": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira", "name": "jira__user_enhanced", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"email": {"type": "integer", "index": 1, "name": "email", "comment": null}, "user_id": {"type": "text", "index": 2, "name": "user_id", "comment": null}, "locale": {"type": "text", "index": 3, "name": "locale", "comment": null}, "user_display_name": {"type": "text", "index": 4, "name": "user_display_name", "comment": null}, "time_zone": {"type": "text", "index": 5, "name": "time_zone", "comment": null}, "username": {"type": "integer", "index": 6, "name": "username", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "projects": {"type": "text", "index": 8, "name": "projects", "comment": null}, "count_closed_issues": {"type": "bigint", "index": 9, "name": "count_closed_issues", "comment": null}, "count_open_issues": {"type": "bigint", "index": 10, "name": "count_open_issues", "comment": null}, "avg_close_time_days": {"type": "numeric", "index": 11, "name": "avg_close_time_days", "comment": null}, "avg_age_currently_open_days": {"type": "numeric", "index": 12, "name": "avg_age_currently_open_days", "comment": null}, "median_close_time_days": {"type": "numeric", "index": 13, "name": "median_close_time_days", "comment": null}, "median_age_currently_open_days": {"type": "numeric", "index": 14, "name": "median_age_currently_open_days", "comment": null}, "avg_close_time_seconds": {"type": "numeric", "index": 15, "name": "avg_close_time_seconds", "comment": null}, "avg_age_currently_open_seconds": {"type": "numeric", "index": 16, "name": "avg_age_currently_open_seconds", "comment": null}, "median_close_time_seconds": {"type": "numeric", "index": 17, "name": "median_close_time_seconds", "comment": null}, "median_age_currently_open_seconds": {"type": "numeric", "index": 18, "name": "median_age_currently_open_seconds", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira.jira__user_enhanced"}, "model.jira_source.stg_jira__comment": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__comment", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"author_user_id": {"type": "text", "index": 1, "name": "author_user_id", "comment": null}, "body": {"type": "text", "index": 2, "name": "body", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": null}, "comment_id": {"type": "bigint", "index": 4, "name": "comment_id", "comment": null}, "issue_id": {"type": "bigint", "index": 5, "name": "issue_id", "comment": null}, "is_public": {"type": "boolean", "index": 6, "name": "is_public", "comment": null}, "last_update_user_id": {"type": "text", "index": 7, "name": "last_update_user_id", "comment": null}, "last_updated_at": {"type": "timestamp without time zone", "index": 8, "name": "last_updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__comment"}, "model.jira_source.stg_jira__comment_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__comment_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "author_id": {"type": "text", "index": 3, "name": "author_id", "comment": null}, "body": {"type": "text", "index": 4, "name": "body", "comment": null}, "created": {"type": "timestamp without time zone", "index": 5, "name": "created", "comment": null}, "is_public": {"type": "boolean", "index": 6, "name": "is_public", "comment": null}, "issue_id": {"type": "bigint", "index": 7, "name": "issue_id", "comment": null}, "update_author_id": {"type": "text", "index": 8, "name": "update_author_id", "comment": null}, "updated": {"type": "timestamp without time zone", "index": 9, "name": "updated", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__comment_tmp"}, "model.jira_source.stg_jira__component": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__component", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"component_description": {"type": "integer", "index": 1, "name": "component_description", "comment": null}, "component_id": {"type": "bigint", "index": 2, "name": "component_id", "comment": null}, "component_name": {"type": "text", "index": 3, "name": "component_name", "comment": null}, "project_id": {"type": "bigint", "index": 4, "name": "project_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__component"}, "model.jira_source.stg_jira__component_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__component_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "integer", "index": 3, "name": "description", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "project_id": {"type": "bigint", "index": 5, "name": "project_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__component_tmp"}, "model.jira_source.stg_jira__field": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__field", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"field_id": {"type": "text", "index": 1, "name": "field_id", "comment": null}, "is_array": {"type": "boolean", "index": 2, "name": "is_array", "comment": null}, "is_custom": {"type": "boolean", "index": 3, "name": "is_custom", "comment": null}, "field_name": {"type": "text", "index": 4, "name": "field_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__field"}, "model.jira_source.stg_jira__field_option": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__field_option", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"field_id": {"type": "bigint", "index": 1, "name": "field_id", "comment": null}, "parent_field_id": {"type": "integer", "index": 2, "name": "parent_field_id", "comment": null}, "field_option_name": {"type": "text", "index": 3, "name": "field_option_name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__field_option"}, "model.jira_source.stg_jira__field_option_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__field_option_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__field_option_tmp"}, "model.jira_source.stg_jira__field_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__field_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "is_array": {"type": "boolean", "index": 3, "name": "is_array", "comment": null}, "is_custom": {"type": "boolean", "index": 4, "name": "is_custom", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__field_tmp"}, "model.jira_source.stg_jira__issue": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"original_estimate_seconds": {"type": "integer", "index": 1, "name": "original_estimate_seconds", "comment": null}, "remaining_estimate_seconds": {"type": "integer", "index": 2, "name": "remaining_estimate_seconds", "comment": null}, "time_spent_seconds": {"type": "integer", "index": 3, "name": "time_spent_seconds", "comment": null}, "assignee_user_id": {"type": "character varying", "index": 4, "name": "assignee_user_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 5, "name": "created_at", "comment": null}, "resolved_at": {"type": "timestamp without time zone", "index": 6, "name": "resolved_at", "comment": null}, "creator_user_id": {"type": "text", "index": 7, "name": "creator_user_id", "comment": null}, "issue_description": {"type": "text", "index": 8, "name": "issue_description", "comment": null}, "due_date": {"type": "integer", "index": 9, "name": "due_date", "comment": null}, "environment": {"type": "integer", "index": 10, "name": "environment", "comment": null}, "issue_id": {"type": "bigint", "index": 11, "name": "issue_id", "comment": null}, "issue_type_id": {"type": "integer", "index": 12, "name": "issue_type_id", "comment": null}, "issue_key": {"type": "text", "index": 13, "name": "issue_key", "comment": null}, "parent_issue_id": {"type": "integer", "index": 14, "name": "parent_issue_id", "comment": null}, "priority_id": {"type": "integer", "index": 15, "name": "priority_id", "comment": null}, "project_id": {"type": "integer", "index": 16, "name": "project_id", "comment": null}, "reporter_user_id": {"type": "text", "index": 17, "name": "reporter_user_id", "comment": null}, "resolution_id": {"type": "integer", "index": 18, "name": "resolution_id", "comment": null}, "status_id": {"type": "integer", "index": 19, "name": "status_id", "comment": null}, "status_changed_at": {"type": "timestamp without time zone", "index": 20, "name": "status_changed_at", "comment": null}, "issue_name": {"type": "text", "index": 21, "name": "issue_name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 22, "name": "updated_at", "comment": null}, "work_ratio": {"type": "double precision", "index": 23, "name": "work_ratio", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 24, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue"}, "model.jira_source.stg_jira__issue_field_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_field_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"field_id": {"type": "text", "index": 1, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": null}, "field_value": {"type": "character varying", "index": 4, "name": "field_value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_field_history"}, "model.jira_source.stg_jira__issue_field_history_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_field_history_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"field_id": {"type": "text", "index": 1, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "time": {"type": "timestamp without time zone", "index": 3, "name": "time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "value": {"type": "character varying", "index": 5, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_field_history_tmp"}, "model.jira_source.stg_jira__issue_link": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_link", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"issue_id": {"type": "integer", "index": 1, "name": "issue_id", "comment": null}, "related_issue_id": {"type": "integer", "index": 2, "name": "related_issue_id", "comment": null}, "relationship": {"type": "text", "index": 3, "name": "relationship", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_link"}, "model.jira_source.stg_jira__issue_link_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_link_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"issue_id": {"type": "integer", "index": 1, "name": "issue_id", "comment": null}, "related_issue_id": {"type": "integer", "index": 2, "name": "related_issue_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "relationship": {"type": "text", "index": 4, "name": "relationship", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_link_tmp"}, "model.jira_source.stg_jira__issue_multiselect_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_multiselect_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "field_id": {"type": "text", "index": 2, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 3, "name": "issue_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 4, "name": "updated_at", "comment": null}, "field_value": {"type": "character varying", "index": 5, "name": "field_value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_multiselect_history"}, "model.jira_source.stg_jira__issue_multiselect_history_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_multiselect_history_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "time": {"type": "timestamp without time zone", "index": 2, "name": "time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "field_id": {"type": "text", "index": 4, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 5, "name": "issue_id", "comment": null}, "value": {"type": "character varying", "index": 6, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_multiselect_history_tmp"}, "model.jira_source.stg_jira__issue_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "_original_estimate": {"type": "integer", "index": 4, "name": "_original_estimate", "comment": null}, "_remaining_estimate": {"type": "integer", "index": 5, "name": "_remaining_estimate", "comment": null}, "_time_spent": {"type": "integer", "index": 6, "name": "_time_spent", "comment": null}, "assignee": {"type": "character varying", "index": 7, "name": "assignee", "comment": null}, "created": {"type": "timestamp without time zone", "index": 8, "name": "created", "comment": null}, "creator": {"type": "text", "index": 9, "name": "creator", "comment": null}, "description": {"type": "text", "index": 10, "name": "description", "comment": null}, "due_date": {"type": "integer", "index": 11, "name": "due_date", "comment": null}, "environment": {"type": "integer", "index": 12, "name": "environment", "comment": null}, "issue_type": {"type": "integer", "index": 13, "name": "issue_type", "comment": null}, "key": {"type": "text", "index": 14, "name": "key", "comment": null}, "last_viewed": {"type": "timestamp without time zone", "index": 15, "name": "last_viewed", "comment": null}, "original_estimate": {"type": "integer", "index": 16, "name": "original_estimate", "comment": null}, "parent_id": {"type": "integer", "index": 17, "name": "parent_id", "comment": null}, "priority": {"type": "integer", "index": 18, "name": "priority", "comment": null}, "project": {"type": "integer", "index": 19, "name": "project", "comment": null}, "remaining_estimate": {"type": "integer", "index": 20, "name": "remaining_estimate", "comment": null}, "reporter": {"type": "text", "index": 21, "name": "reporter", "comment": null}, "resolution": {"type": "integer", "index": 22, "name": "resolution", "comment": null}, "resolved": {"type": "timestamp without time zone", "index": 23, "name": "resolved", "comment": null}, "status": {"type": "integer", "index": 24, "name": "status", "comment": null}, "status_category_changed": {"type": "timestamp without time zone", "index": 25, "name": "status_category_changed", "comment": null}, "summary": {"type": "text", "index": 26, "name": "summary", "comment": null}, "time_spent": {"type": "integer", "index": 27, "name": "time_spent", "comment": null}, "updated": {"type": "timestamp without time zone", "index": 28, "name": "updated", "comment": null}, "work_ratio": {"type": "double precision", "index": 29, "name": "work_ratio", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_tmp"}, "model.jira_source.stg_jira__issue_type": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_type", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"description": {"type": "text", "index": 1, "name": "description", "comment": null}, "issue_type_id": {"type": "integer", "index": 2, "name": "issue_type_id", "comment": null}, "issue_type_name": {"type": "text", "index": 3, "name": "issue_type_name", "comment": null}, "is_subtask": {"type": "boolean", "index": 4, "name": "is_subtask", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_type"}, "model.jira_source.stg_jira__issue_type_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_type_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "text", "index": 3, "name": "description", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "subtask": {"type": "boolean", "index": 5, "name": "subtask", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__issue_type_tmp"}, "model.jira_source.stg_jira__priority": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__priority", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"priority_description": {"type": "text", "index": 1, "name": "priority_description", "comment": null}, "priority_id": {"type": "integer", "index": 2, "name": "priority_id", "comment": null}, "priority_name": {"type": "text", "index": 3, "name": "priority_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__priority"}, "model.jira_source.stg_jira__priority_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__priority_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "text", "index": 3, "name": "description", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__priority_tmp"}, "model.jira_source.stg_jira__project": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__project", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"project_description": {"type": "integer", "index": 1, "name": "project_description", "comment": null}, "project_id": {"type": "integer", "index": 2, "name": "project_id", "comment": null}, "project_key": {"type": "text", "index": 3, "name": "project_key", "comment": null}, "project_lead_user_id": {"type": "text", "index": 4, "name": "project_lead_user_id", "comment": null}, "project_name": {"type": "text", "index": 5, "name": "project_name", "comment": null}, "project_category_id": {"type": "integer", "index": 6, "name": "project_category_id", "comment": null}, "permission_scheme_id": {"type": "integer", "index": 7, "name": "permission_scheme_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__project"}, "model.jira_source.stg_jira__project_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__project_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "integer", "index": 3, "name": "description", "comment": null}, "key": {"type": "text", "index": 4, "name": "key", "comment": null}, "lead_id": {"type": "text", "index": 5, "name": "lead_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "permission_scheme_id": {"type": "integer", "index": 7, "name": "permission_scheme_id", "comment": null}, "project_category_id": {"type": "integer", "index": 8, "name": "project_category_id", "comment": null}, "project_type_key": {"type": "text", "index": 9, "name": "project_type_key", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__project_tmp"}, "model.jira_source.stg_jira__resolution": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__resolution", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"resolution_description": {"type": "text", "index": 1, "name": "resolution_description", "comment": null}, "resolution_id": {"type": "integer", "index": 2, "name": "resolution_id", "comment": null}, "resolution_name": {"type": "text", "index": 3, "name": "resolution_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__resolution"}, "model.jira_source.stg_jira__resolution_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__resolution_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "text", "index": 3, "name": "description", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__resolution_tmp"}, "model.jira_source.stg_jira__sprint": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__sprint", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"sprint_id": {"type": "bigint", "index": 1, "name": "sprint_id", "comment": null}, "sprint_name": {"type": "text", "index": 2, "name": "sprint_name", "comment": null}, "board_id": {"type": "integer", "index": 3, "name": "board_id", "comment": null}, "completed_at": {"type": "timestamp without time zone", "index": 4, "name": "completed_at", "comment": null}, "ended_at": {"type": "timestamp without time zone", "index": 5, "name": "ended_at", "comment": null}, "started_at": {"type": "timestamp without time zone", "index": 6, "name": "started_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__sprint"}, "model.jira_source.stg_jira__sprint_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__sprint_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "board_id": {"type": "integer", "index": 3, "name": "board_id", "comment": null}, "complete_date": {"type": "timestamp without time zone", "index": 4, "name": "complete_date", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 5, "name": "end_date", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "start_date": {"type": "timestamp without time zone", "index": 7, "name": "start_date", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__sprint_tmp"}, "model.jira_source.stg_jira__status": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__status", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"status_description": {"type": "text", "index": 1, "name": "status_description", "comment": null}, "status_id": {"type": "integer", "index": 2, "name": "status_id", "comment": null}, "status_name": {"type": "text", "index": 3, "name": "status_name", "comment": null}, "status_category_id": {"type": "integer", "index": 4, "name": "status_category_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__status"}, "model.jira_source.stg_jira__status_category": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__status_category", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"status_category_id": {"type": "integer", "index": 1, "name": "status_category_id", "comment": null}, "status_category_name": {"type": "text", "index": 2, "name": "status_category_name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__status_category"}, "model.jira_source.stg_jira__status_category_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__status_category_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__status_category_tmp"}, "model.jira_source.stg_jira__status_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__status_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "text", "index": 3, "name": "description", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "status_category_id": {"type": "integer", "index": 5, "name": "status_category_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__status_tmp"}, "model.jira_source.stg_jira__user": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__user", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"email": {"type": "integer", "index": 1, "name": "email", "comment": null}, "user_id": {"type": "text", "index": 2, "name": "user_id", "comment": null}, "locale": {"type": "text", "index": 3, "name": "locale", "comment": null}, "user_display_name": {"type": "text", "index": 4, "name": "user_display_name", "comment": null}, "time_zone": {"type": "text", "index": 5, "name": "time_zone", "comment": null}, "username": {"type": "integer", "index": 6, "name": "username", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__user"}, "model.jira_source.stg_jira__user_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__user_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "email": {"type": "integer", "index": 3, "name": "email", "comment": null}, "locale": {"type": "text", "index": 4, "name": "locale", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "time_zone": {"type": "text", "index": 6, "name": "time_zone", "comment": null}, "username": {"type": "integer", "index": 7, "name": "username", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__user_tmp"}, "model.jira_source.stg_jira__version": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__version", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"is_archived": {"type": "boolean", "index": 1, "name": "is_archived", "comment": null}, "description": {"type": "text", "index": 2, "name": "description", "comment": null}, "version_id": {"type": "integer", "index": 3, "name": "version_id", "comment": null}, "version_name": {"type": "text", "index": 4, "name": "version_name", "comment": null}, "is_overdue": {"type": "boolean", "index": 5, "name": "is_overdue", "comment": null}, "project_id": {"type": "integer", "index": 6, "name": "project_id", "comment": null}, "release_date": {"type": "timestamp without time zone", "index": 7, "name": "release_date", "comment": null}, "is_released": {"type": "boolean", "index": 8, "name": "is_released", "comment": null}, "start_date": {"type": "timestamp without time zone", "index": 9, "name": "start_date", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__version"}, "model.jira_source.stg_jira__version_tmp": {"metadata": {"type": "VIEW", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__version_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "archived": {"type": "boolean", "index": 3, "name": "archived", "comment": null}, "description": {"type": "text", "index": 4, "name": "description", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "overdue": {"type": "boolean", "index": 6, "name": "overdue", "comment": null}, "project_id": {"type": "integer", "index": 7, "name": "project_id", "comment": null}, "release_date": {"type": "date", "index": 8, "name": "release_date", "comment": null}, "released": {"type": "boolean", "index": 9, "name": "released", "comment": null}, "start_date": {"type": "date", "index": 10, "name": "start_date", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.jira_source.stg_jira__version_tmp"}}, "sources": {"source.jira_source.jira.comment": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "comment", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "author_id": {"type": "text", "index": 3, "name": "author_id", "comment": null}, "body": {"type": "text", "index": 4, "name": "body", "comment": null}, "created": {"type": "timestamp without time zone", "index": 5, "name": "created", "comment": null}, "is_public": {"type": "boolean", "index": 6, "name": "is_public", "comment": null}, "issue_id": {"type": "bigint", "index": 7, "name": "issue_id", "comment": null}, "update_author_id": {"type": "text", "index": 8, "name": "update_author_id", "comment": null}, "updated": {"type": "timestamp without time zone", "index": 9, "name": "updated", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.comment"}, "source.jira_source.jira.component": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "component", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "integer", "index": 3, "name": "description", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "project_id": {"type": "bigint", "index": 5, "name": "project_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.component"}, "source.jira_source.jira.field": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "field", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "is_array": {"type": "boolean", "index": 3, "name": "is_array", "comment": null}, "is_custom": {"type": "boolean", "index": 4, "name": "is_custom", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.field"}, "source.jira_source.jira.field_option": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "field_option", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.field_option"}, "source.jira_source.jira.issue": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "issue", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "_original_estimate": {"type": "integer", "index": 4, "name": "_original_estimate", "comment": null}, "_remaining_estimate": {"type": "integer", "index": 5, "name": "_remaining_estimate", "comment": null}, "_time_spent": {"type": "integer", "index": 6, "name": "_time_spent", "comment": null}, "assignee": {"type": "character varying", "index": 7, "name": "assignee", "comment": null}, "created": {"type": "timestamp without time zone", "index": 8, "name": "created", "comment": null}, "creator": {"type": "text", "index": 9, "name": "creator", "comment": null}, "description": {"type": "text", "index": 10, "name": "description", "comment": null}, "due_date": {"type": "integer", "index": 11, "name": "due_date", "comment": null}, "environment": {"type": "integer", "index": 12, "name": "environment", "comment": null}, "issue_type": {"type": "integer", "index": 13, "name": "issue_type", "comment": null}, "key": {"type": "text", "index": 14, "name": "key", "comment": null}, "last_viewed": {"type": "timestamp without time zone", "index": 15, "name": "last_viewed", "comment": null}, "original_estimate": {"type": "integer", "index": 16, "name": "original_estimate", "comment": null}, "parent_id": {"type": "integer", "index": 17, "name": "parent_id", "comment": null}, "priority": {"type": "integer", "index": 18, "name": "priority", "comment": null}, "project": {"type": "integer", "index": 19, "name": "project", "comment": null}, "remaining_estimate": {"type": "integer", "index": 20, "name": "remaining_estimate", "comment": null}, "reporter": {"type": "text", "index": 21, "name": "reporter", "comment": null}, "resolution": {"type": "integer", "index": 22, "name": "resolution", "comment": null}, "resolved": {"type": "timestamp without time zone", "index": 23, "name": "resolved", "comment": null}, "status": {"type": "integer", "index": 24, "name": "status", "comment": null}, "status_category_changed": {"type": "timestamp without time zone", "index": 25, "name": "status_category_changed", "comment": null}, "summary": {"type": "text", "index": 26, "name": "summary", "comment": null}, "time_spent": {"type": "integer", "index": 27, "name": "time_spent", "comment": null}, "updated": {"type": "timestamp without time zone", "index": 28, "name": "updated", "comment": null}, "work_ratio": {"type": "double precision", "index": 29, "name": "work_ratio", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.issue"}, "source.jira_source.jira.issue_field_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "issue_field_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"field_id": {"type": "text", "index": 1, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 2, "name": "issue_id", "comment": null}, "time": {"type": "timestamp without time zone", "index": 3, "name": "time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "value": {"type": "character varying", "index": 5, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.issue_field_history"}, "source.jira_source.jira.issue_link": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "issue_link", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"issue_id": {"type": "integer", "index": 1, "name": "issue_id", "comment": null}, "related_issue_id": {"type": "integer", "index": 2, "name": "related_issue_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "relationship": {"type": "text", "index": 4, "name": "relationship", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.issue_link"}, "source.jira_source.jira.issue_multiselect_history": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "issue_multiselect_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "time": {"type": "timestamp without time zone", "index": 2, "name": "time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "field_id": {"type": "text", "index": 4, "name": "field_id", "comment": null}, "issue_id": {"type": "bigint", "index": 5, "name": "issue_id", "comment": null}, "value": {"type": "character varying", "index": 6, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.issue_multiselect_history"}, "source.jira_source.jira.issue_type": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "issue_type", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "text", "index": 3, "name": "description", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "subtask": {"type": "boolean", "index": 5, "name": "subtask", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.issue_type"}, "source.jira_source.jira.priority": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "priority", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "text", "index": 3, "name": "description", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.priority"}, "source.jira_source.jira.project": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "project", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "integer", "index": 3, "name": "description", "comment": null}, "key": {"type": "text", "index": 4, "name": "key", "comment": null}, "lead_id": {"type": "text", "index": 5, "name": "lead_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "permission_scheme_id": {"type": "integer", "index": 7, "name": "permission_scheme_id", "comment": null}, "project_category_id": {"type": "integer", "index": 8, "name": "project_category_id", "comment": null}, "project_type_key": {"type": "text", "index": 9, "name": "project_type_key", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.project"}, "source.jira_source.jira.resolution": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "resolution", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "text", "index": 3, "name": "description", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.resolution"}, "source.jira_source.jira.sprint": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "sprint", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "board_id": {"type": "integer", "index": 3, "name": "board_id", "comment": null}, "complete_date": {"type": "timestamp without time zone", "index": 4, "name": "complete_date", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 5, "name": "end_date", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "start_date": {"type": "timestamp without time zone", "index": 7, "name": "start_date", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.sprint"}, "source.jira_source.jira.status": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "status", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "description": {"type": "text", "index": 3, "name": "description", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "status_category_id": {"type": "integer", "index": 5, "name": "status_category_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.status"}, "source.jira_source.jira.status_category": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "status_category", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.status_category"}, "source.jira_source.jira.user": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "user", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "email": {"type": "integer", "index": 3, "name": "email", "comment": null}, "locale": {"type": "text", "index": 4, "name": "locale", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "time_zone": {"type": "text", "index": 6, "name": "time_zone", "comment": null}, "username": {"type": "integer", "index": 7, "name": "username", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.user"}, "source.jira_source.jira.version": {"metadata": {"type": "BASE TABLE", "schema": "jira_integrations_tests_33", "name": "version", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "archived": {"type": "boolean", "index": 3, "name": "archived", "comment": null}, "description": {"type": "text", "index": 4, "name": "description", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "overdue": {"type": "boolean", "index": 6, "name": "overdue", "comment": null}, "project_id": {"type": "integer", "index": 7, "name": "project_id", "comment": null}, "release_date": {"type": "date", "index": 8, "name": "release_date", "comment": null}, "released": {"type": "boolean", "index": 9, "name": "released", "comment": null}, "start_date": {"type": "date", "index": 10, "name": "start_date", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.jira_source.jira.version"}}, "errors": null} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 5631ac61..ca1e6f88 100644 --- a/docs/index.html +++ b/docs/index.html @@ -24,7 +24,7 @@
icons
- diff --git a/docs/manifest.json b/docs/manifest.json index 1610b1d0..b9a39b7a 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v9.json", "dbt_version": "1.5.6", "generated_at": "2023-09-19T22:45:17.075383Z", "invocation_id": "3de4d5f4-ee2f-4047-ae14-abe9b1091168", "env": {}, "project_id": "5f759e264a5963f1044a1500d3c2f166", "user_id": "8268eefe-e8f7-472e-ab2a-a92f0135d76d", "send_anonymous_usage_stats": true, "adapter_type": "redshift"}, "nodes": {"seed.jira_integration_tests.issue_link": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "issue_link", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "issue_link.csv", "original_file_path": "seeds/issue_link.csv", "unique_id": "seed.jira_integration_tests.issue_link", "fqn": ["jira_integration_tests", "issue_link"], "alias": "issue_link", "checksum": {"name": "sha256", "checksum": "312367c7b35868eceb3a002ba6b94c5cecbfe639dc0ca20da132ee8bf813ef36"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1695163462.419374, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"issue_link\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.issue_type": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "issue_type", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "issue_type.csv", "original_file_path": "seeds/issue_type.csv", "unique_id": "seed.jira_integration_tests.issue_type", "fqn": ["jira_integration_tests", "issue_type"], "alias": "issue_type", "checksum": {"name": "sha256", "checksum": "9344e04a1519453df3001300b845a3febed8ec3c6adb9dc4a57be4695abfe24a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1695163462.426286, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"issue_type\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.project_board": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "project_board", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "project_board.csv", "original_file_path": "seeds/project_board.csv", "unique_id": "seed.jira_integration_tests.project_board", "fqn": ["jira_integration_tests", "project_board"], "alias": "project_board", "checksum": {"name": "sha256", "checksum": "bcbdbd043112e24554554ccc7203522657dc21fde3882f34f946384d05cbbd63"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1695163462.428038, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"project_board\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.resolution": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "resolution", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "resolution.csv", "original_file_path": "seeds/resolution.csv", "unique_id": "seed.jira_integration_tests.resolution", "fqn": ["jira_integration_tests", "resolution"], "alias": "resolution", "checksum": {"name": "sha256", "checksum": "86c776b9cdb4865f4e446010c04dea71cfd63de917fb14cff8237b707c493600"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1695163462.42977, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"resolution\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.version": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "version", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "version.csv", "original_file_path": "seeds/version.csv", "unique_id": "seed.jira_integration_tests.version", "fqn": ["jira_integration_tests", "version"], "alias": "version", "checksum": {"name": "sha256", "checksum": "9d4a930396e2d9bef0d8ddfe95be3d37fa0d9d6d4da794ea3c8db3033803f1d5"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1695163462.431617, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"version\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.status": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "status", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "status.csv", "original_file_path": "seeds/status.csv", "unique_id": "seed.jira_integration_tests.status", "fqn": ["jira_integration_tests", "status"], "alias": "status", "checksum": {"name": "sha256", "checksum": "8151fe8575891a3f2b4dde0458a53bc2955d011e755d0e7e81e95110e36d324b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1695163462.433325, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"status\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.user_group": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "user_group", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "user_group.csv", "original_file_path": "seeds/user_group.csv", "unique_id": "seed.jira_integration_tests.user_group", "fqn": ["jira_integration_tests", "user_group"], "alias": "user_group", "checksum": {"name": "sha256", "checksum": "7fd3cb7309fa49d028293f7f3c8c4f0eb205d0a290db961630238c0fb575b97f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1695163462.435023, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"user_group\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.component": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "component", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "component.csv", "original_file_path": "seeds/component.csv", "unique_id": "seed.jira_integration_tests.component", "fqn": ["jira_integration_tests", "component"], "alias": "component", "checksum": {"name": "sha256", "checksum": "31d1c1e8028eb23e7d394de3280fca30c98405d19a73d7e13f5f66f3859c1d7b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "bigint", "project_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}", "project_id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"}}, "created_at": 1695163462.436872, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"component\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.project": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "project", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "project.csv", "original_file_path": "seeds/project.csv", "unique_id": "seed.jira_integration_tests.project", "fqn": ["jira_integration_tests", "project"], "alias": "project", "checksum": {"name": "sha256", "checksum": "775af5e807b5cd3c6f1e3f675747350d5b168d7139268f4d8c3a054971443365"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1695163462.4386072, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"project\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.issue_multiselect_history": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "issue_multiselect_history", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "issue_multiselect_history.csv", "original_file_path": "seeds/issue_multiselect_history.csv", "unique_id": "seed.jira_integration_tests.issue_multiselect_history", "fqn": ["jira_integration_tests", "issue_multiselect_history"], "alias": "issue_multiselect_history", "checksum": {"name": "sha256", "checksum": "5bcb65e84d671b5bbe1936c059e86c03e51c0fe8f8bf0bb022f9a2e0a2e85ee3"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "time": "timestamp", "issue_id": "bigint", "value": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"time": "timestamp", "issue_id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}", "value": "{{ 'string' if target.name in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1695163462.440327, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"issue_multiselect_history\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.comment": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "comment", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "comment.csv", "original_file_path": "seeds/comment.csv", "unique_id": "seed.jira_integration_tests.comment", "fqn": ["jira_integration_tests", "comment"], "alias": "comment", "checksum": {"name": "sha256", "checksum": "6935f79d9f0e496a33d3a3d2fe79b130ffffc4631a10b0607b25ef73c01bd036"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "bigint", "created": "timestamp", "issue_id": "bigint", "updated": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}", "created": "timestamp", "issue_id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}", "updated": "timestamp"}}, "created_at": 1695163462.4420831, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"comment\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.issue": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "issue", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "issue.csv", "original_file_path": "seeds/issue.csv", "unique_id": "seed.jira_integration_tests.issue", "fqn": ["jira_integration_tests", "issue"], "alias": "issue", "checksum": {"name": "sha256", "checksum": "5049afd8b9527c788c9dbffd893865f84d72cea3467bed648ae06f2400782c85"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "bigint", "created": "timestamp", "work_ratio": "float", "resolved": "timestamp", "updated": "timestamp", "assignee": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}", "created": "timestamp", "work_ratio": "float", "resolved": "timestamp", "updated": "timestamp", "assignee": "{{ 'string' if target.name in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1695163462.44396, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"issue\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.sprint": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "sprint", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "sprint.csv", "original_file_path": "seeds/sprint.csv", "unique_id": "seed.jira_integration_tests.sprint", "fqn": ["jira_integration_tests", "sprint"], "alias": "sprint", "checksum": {"name": "sha256", "checksum": "bf7457f18bc5e4324d86754429e6a5d22477179a5f12b5dde1e70ba474858aaa"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "bigint", "complete_date": "timestamp", "end_date": "timestamp", "start_date": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}", "complete_date": "timestamp", "end_date": "timestamp", "start_date": "timestamp"}}, "created_at": 1695163462.445726, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"sprint\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.field_option": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "field_option", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "field_option.csv", "original_file_path": "seeds/field_option.csv", "unique_id": "seed.jira_integration_tests.field_option", "fqn": ["jira_integration_tests", "field_option"], "alias": "field_option", "checksum": {"name": "sha256", "checksum": "244566dcb2b76ecb13c849a94dfcc4f90f81ebb18ec7035b133ab110f6bebe5e"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"}}, "created_at": 1695163462.447477, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"field_option\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.epic": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "epic", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "epic.csv", "original_file_path": "seeds/epic.csv", "unique_id": "seed.jira_integration_tests.epic", "fqn": ["jira_integration_tests", "epic"], "alias": "epic", "checksum": {"name": "sha256", "checksum": "1ead0f0e22b5ec22e64a1d66ef3168474b40bfc36d1b1f4620a508a2c3df5ecc"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"}}, "created_at": 1695163462.4493408, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"epic\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.field": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "field", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "field.csv", "original_file_path": "seeds/field.csv", "unique_id": "seed.jira_integration_tests.field", "fqn": ["jira_integration_tests", "field"], "alias": "field", "checksum": {"name": "sha256", "checksum": "4e191d7319962bdd57ff2ba85140779a0677d581dd4dd5ec90a345d5ff973855"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"id": "{{ 'string' if target.name in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1695163462.451085, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"field\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.user": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "user", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "user.csv", "original_file_path": "seeds/user.csv", "unique_id": "seed.jira_integration_tests.user", "fqn": ["jira_integration_tests", "user"], "alias": "user", "checksum": {"name": "sha256", "checksum": "b75650429987423d1a8641f89c134178419589280941f32938d658f91355c060"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1695163462.4528089, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"user\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.priority": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "priority", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "priority.csv", "original_file_path": "seeds/priority.csv", "unique_id": "seed.jira_integration_tests.priority", "fqn": ["jira_integration_tests", "priority"], "alias": "priority", "checksum": {"name": "sha256", "checksum": "b19c19420674ce84b71591bfab9aedd574d9c2626a49e27d68b307b16cff9832"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1695163462.4546292, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"priority\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.status_category": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "status_category", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "status_category.csv", "original_file_path": "seeds/status_category.csv", "unique_id": "seed.jira_integration_tests.status_category", "fqn": ["jira_integration_tests", "status_category"], "alias": "status_category", "checksum": {"name": "sha256", "checksum": "a51b50ed4dfe4e40dc90ec2eef680d51fe14af805a63f369f9521a9ca3fed9fd"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1695163462.456325, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"status_category\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.issue_field_history": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "issue_field_history", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "issue_field_history.csv", "original_file_path": "seeds/issue_field_history.csv", "unique_id": "seed.jira_integration_tests.issue_field_history", "fqn": ["jira_integration_tests", "issue_field_history"], "alias": "issue_field_history", "checksum": {"name": "sha256", "checksum": "5d55568a17b63625814f1296b9863cfe2f54e1dfaca656e90c10909723123fce"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "time": "timestamp", "issue_id": "bigint", "value": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"time": "timestamp", "issue_id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}", "value": "{{ 'string' if target.name in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1695163462.458051, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"issue_field_history\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.project_category": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "project_category", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "project_category.csv", "original_file_path": "seeds/project_category.csv", "unique_id": "seed.jira_integration_tests.project_category", "fqn": ["jira_integration_tests", "project_category"], "alias": "project_category", "checksum": {"name": "sha256", "checksum": "815d04bd97ee55374555b17b08ecf47b6a16b095893071b61d57947418019e51"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1695163462.45989, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"project_category\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "model.jira.jira__daily_issue_field_history": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira", "name": "jira__daily_issue_field_history", "resource_type": "model", "package_name": "jira", "path": "jira__daily_issue_field_history.sql", "original_file_path": "models/jira__daily_issue_field_history.sql", "unique_id": "model.jira.jira__daily_issue_field_history", "fqn": ["jira", "jira__daily_issue_field_history"], "alias": "jira__daily_issue_field_history", "checksum": {"name": "sha256", "checksum": "91d23fbdbbb913c6ca01b3bb7f0cd65c87f32f98a2a9b0bd39732be413c7cb4c"}, "config": {"enabled": true, "alias": null, "schema": "jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "issue_day_id", "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta", "post-hook": [], "pre-hook": []}, "tags": [], "description": "Each record represents a snapshot of an issue's selected fields (as specified in the `issue_history_columns` variable + sprint and status by default) on a given day. Each issue will have a record for every day in which it was open and/or being updated. For currently open issues, the latest date will be the current date, and for closed issues, this will be the last time the issue was resolved OR updated in any way (plus a configurable buffer afterward, set to a month by default). Note: this is an incremental model.\n", "columns": {"date_day": {"name": "date_day", "description": "Date on which the issue had these field values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` with these values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_day_id": {"name": "issue_day_id", "description": "Surrogate key hashed on `date_day` and `issue_id`", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint": {"name": "sprint", "description": "The ID of the sprint that an issue is slotted into on a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "The ID of the status that an issue has on a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "The name of the status that an issue has on a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "jira", "partition_by": {"field": "date_day", "data_type": "date"}, "unique_key": "issue_day_id", "incremental_strategy": "delete+insert", "file_format": "delta"}, "created_at": 1695163462.956016, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__daily_issue_field_history\"", "raw_code": "{{\n config(\n materialized='incremental',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='issue_day_id',\n incremental_strategy = 'merge' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n-- grab column names that were pivoted out\n{%- set pivot_data_columns = adapter.get_columns_in_relation(ref('int_jira__field_history_scd')) -%}\n\n-- in intermediate/field_history/\nwith pivoted_daily_history as (\n\n select * \n from {{ ref('int_jira__field_history_scd') }}\n\n {% if is_incremental() %}\n \n where valid_starting_on >= (select max(date_day) from {{ this }} )\n\n-- If no issue fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist \n-- those values into the future.\n\n), most_recent_data as ( \n select \n *\n from {{ this }}\n where date_day = (select max(date_day) from {{ this }} )\n\n{% endif %}\n\n), field_option as (\n \n select *\n from {{ var('field_option') }}\n),\n\nstatuses as (\n \n select *\n from {{ var('status') }}\n),\n\nissue_types as (\n \n select *\n from {{ var('issue_type') }}\n),\n\n{% if var('jira_using_components', True) %}\ncomponents as (\n\n select * \n from {{ var('component') }}\n),\n{% endif %}\n\n-- in intermediate/field_history/\ncalendar as (\n\n select *\n from {{ ref('int_jira__issue_calendar_spine') }}\n\n {% if is_incremental() %}\n where date_day >= (select max(date_day) from {{ this }} )\n {% endif %}\n),\n\njoined as (\n\n select\n calendar.date_day,\n calendar.issue_id\n\n {% if is_incremental() %} \n {% for col in pivot_data_columns %}\n {% if col.name|lower == 'components' and var('jira_using_components', True) %}\n , coalesce(pivoted_daily_history.components, most_recent_data.components) as components\n\n {% elif col.name|lower not in ['issue_day_id', 'issue_id', 'valid_starting_on', 'components'] %} \n , coalesce(pivoted_daily_history.{{ col.name }}, most_recent_data.{{ col.name }}) as {{ col.name }}\n\n {% endif %}\n {% endfor %} \n\n {% else %}\n {% for col in pivot_data_columns %}\n {% if col.name|lower == 'components' and var('jira_using_components', True) %}\n , pivoted_daily_history.components \n\n {% elif col.name|lower not in ['issue_day_id', 'issue_id', 'valid_starting_on', 'components'] %} \n , pivoted_daily_history.{{ col.name }}\n\n {% endif %}\n {% endfor %} \n {% endif %}\n \n from calendar\n left join pivoted_daily_history \n on calendar.issue_id = pivoted_daily_history.issue_id\n and calendar.date_day = pivoted_daily_history.valid_starting_on\n \n {% if is_incremental() %}\n left join most_recent_data\n on calendar.issue_id = most_recent_data.issue_id\n and calendar.date_day = most_recent_data.date_day\n {% endif %}\n),\n\nset_values as (\n select\n date_day,\n issue_id,\n joined.status_id,\n sum( case when joined.status_id is null then 0 else 1 end) over ( partition by issue_id\n order by date_day rows unbounded preceding) as status_id_field_partition\n\n -- list of exception columns\n {% set exception_cols = ['issue_id', 'issue_day_id', 'valid_starting_on', 'status', 'status_id', 'components', 'issue_type'] %}\n\n {% for col in pivot_data_columns %}\n {% if col.name|lower == 'components' and var('jira_using_components', True) %}\n , coalesce(components.component_name, joined.components) as components\n , sum(case when joined.components is null then 0 else 1 end) over (partition by issue_id order by date_day rows unbounded preceding) as component_field_partition\n\n {% elif col.name|lower == 'issue_type' %}\n , coalesce(issue_types.issue_type_name, joined.issue_type) as issue_type\n , sum(case when joined.issue_type is null then 0 else 1 end) over (partition by issue_id order by date_day rows unbounded preceding) as issue_type_field_partition\n\n {% elif col.name|lower not in exception_cols %}\n , coalesce(field_option_{{ col.name }}.field_option_name, joined.{{ col.name }}) as {{ col.name }}\n -- create a batch/partition once a new value is provided\n , sum( case when joined.{{ col.name }} is null then 0 else 1 end) over ( partition by issue_id\n order by date_day rows unbounded preceding) as {{ col.name }}_field_partition\n\n {% endif %}\n {% endfor %}\n\n from joined\n\n {% for col in pivot_data_columns %}\n {% if col.name|lower == 'components' and var('jira_using_components', True) %}\n left join components \n on cast(components.component_id as {{ dbt.type_string() }}) = joined.components\n \n {% elif col.name|lower == 'issue_type' %}\n left join issue_types \n on cast(issue_types.issue_type_id as {{ dbt.type_string() }}) = joined.issue_type\n\n {% elif col.name|lower not in exception_cols %}\n left join field_option as field_option_{{ col.name }}\n on cast(field_option_{{ col.name }}.field_id as {{ dbt.type_string() }}) = joined.{{ col.name }}\n\n {% endif %}\n {% endfor %}\n),\n\nfill_values as (\n\n select \n date_day,\n issue_id,\n first_value( status_id ) over (\n partition by issue_id, status_id_field_partition \n order by date_day asc rows between unbounded preceding and current row) as status_id\n\n {% for col in pivot_data_columns %}\n {% if col.name|lower == 'components' and var('jira_using_components', True) %}\n , first_value(components) over (\n partition by issue_id, component_field_partition \n order by date_day asc rows between unbounded preceding and current row) as components\n\n {% elif col.name|lower not in ['issue_id', 'issue_day_id', 'valid_starting_on', 'status', 'status_id', 'components'] %}\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by issue_id, {{ col.name }}_field_partition \n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n\n {% endif %}\n {% endfor %}\n\n from set_values\n),\n\nfix_null_values as (\n\n select \n date_day,\n issue_id\n\n {% for col in pivot_data_columns %}\n {% if col.name|lower == 'components' and var('jira_using_components', True) %}\n , case when components = 'is_null' then null else components end as components\n\n {% elif col.name|lower not in ['issue_id','issue_day_id','valid_starting_on', 'status', 'components'] %}\n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when {{ col.name }} = 'is_null' then null else {{ col.name }} end as {{ col.name }}\n\n {% endif %}\n {% endfor %}\n\n from fill_values\n\n),\n\nsurrogate_key as (\n\n select\n fix_null_values.date_day,\n fix_null_values.issue_id,\n statuses.status_name as status\n\n {% for col in pivot_data_columns %}\n {% if col.name|lower == 'components' and var('jira_using_components', True) %}\n , fix_null_values.components as components\n\n {% elif col.name|lower not in ['issue_id','issue_day_id','valid_starting_on', 'status', 'components'] %} \n , fix_null_values.{{ col.name }} as {{ col.name }}\n\n {% endif %}\n {% endfor %}\n\n , {{ dbt_utils.generate_surrogate_key(['date_day','issue_id']) }} as issue_day_id\n\n from fix_null_values\n\n left join statuses\n on cast(statuses.status_id as {{ dbt.type_string() }}) = fix_null_values.status_id\n)\n\nselect *\nfrom surrogate_key", "language": "sql", "refs": [{"name": "int_jira__field_history_scd", "package": null, "version": null}, {"name": "int_jira__field_history_scd", "package": null, "version": null}, {"name": "stg_jira__field_option", "package": null, "version": null}, {"name": "stg_jira__status", "package": null, "version": null}, {"name": "stg_jira__issue_type", "package": null, "version": null}, {"name": "stg_jira__component", "package": null, "version": null}, {"name": "int_jira__issue_calendar_spine", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.generate_surrogate_key", "macro.dbt.type_string"], "nodes": ["model.jira.int_jira__field_history_scd", "model.jira.int_jira__field_history_scd", "model.jira_source.stg_jira__field_option", "model.jira_source.stg_jira__status", "model.jira_source.stg_jira__issue_type", "model.jira_source.stg_jira__component", "model.jira.int_jira__issue_calendar_spine"]}, "compiled_path": "target/compiled/jira/models/jira__daily_issue_field_history.sql", "compiled": true, "compiled_code": "\n\n-- grab column names that were pivoted out-- in intermediate/field_history/\nwith pivoted_daily_history as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__field_history_scd\"\n\n \n \n where valid_starting_on >= (select max(date_day) from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__daily_issue_field_history\" )\n\n-- If no issue fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist \n-- those values into the future.\n\n), most_recent_data as ( \n select \n *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__daily_issue_field_history\"\n where date_day = (select max(date_day) from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__daily_issue_field_history\" )\n\n\n\n), field_option as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field_option\"\n),\n\nstatuses as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__status\"\n),\n\nissue_types as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_type\"\n),\n\n\ncomponents as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__component\"\n),\n\n\n-- in intermediate/field_history/\ncalendar as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_calendar_spine\"\n\n \n where date_day >= (select max(date_day) from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__daily_issue_field_history\" )\n \n),\n\njoined as (\n\n select\n calendar.date_day,\n calendar.issue_id\n\n \n \n \n \n \n \n \n \n \n , coalesce(pivoted_daily_history.status_id, most_recent_data.status_id) as status_id\n\n \n \n \n , coalesce(pivoted_daily_history.status, most_recent_data.status) as status\n\n \n \n \n , coalesce(pivoted_daily_history.sprint, most_recent_data.sprint) as sprint\n\n \n \n \n , coalesce(pivoted_daily_history.summary, most_recent_data.summary) as summary\n\n \n \n \n , coalesce(pivoted_daily_history.story_points, most_recent_data.story_points) as story_points\n\n \n \n \n , coalesce(pivoted_daily_history.components, most_recent_data.components) as components\n\n \n \n\n \n \n from calendar\n left join pivoted_daily_history \n on calendar.issue_id = pivoted_daily_history.issue_id\n and calendar.date_day = pivoted_daily_history.valid_starting_on\n \n \n left join most_recent_data\n on calendar.issue_id = most_recent_data.issue_id\n and calendar.date_day = most_recent_data.date_day\n \n),\n\nset_values as (\n select\n date_day,\n issue_id,\n joined.status_id,\n sum( case when joined.status_id is null then 0 else 1 end) over ( partition by issue_id\n order by date_day rows unbounded preceding) as status_id_field_partition\n\n -- list of exception columns\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n , coalesce(field_option_sprint.field_option_name, joined.sprint) as sprint\n -- create a batch/partition once a new value is provided\n , sum( case when joined.sprint is null then 0 else 1 end) over ( partition by issue_id\n order by date_day rows unbounded preceding) as sprint_field_partition\n\n \n \n \n , coalesce(field_option_summary.field_option_name, joined.summary) as summary\n -- create a batch/partition once a new value is provided\n , sum( case when joined.summary is null then 0 else 1 end) over ( partition by issue_id\n order by date_day rows unbounded preceding) as summary_field_partition\n\n \n \n \n , coalesce(field_option_story_points.field_option_name, joined.story_points) as story_points\n -- create a batch/partition once a new value is provided\n , sum( case when joined.story_points is null then 0 else 1 end) over ( partition by issue_id\n order by date_day rows unbounded preceding) as story_points_field_partition\n\n \n \n \n , coalesce(components.component_name, joined.components) as components\n , sum(case when joined.components is null then 0 else 1 end) over (partition by issue_id order by date_day rows unbounded preceding) as component_field_partition\n\n \n \n\n from joined\n\n \n \n \n \n \n \n \n \n \n \n \n \n left join field_option as field_option_sprint\n on cast(field_option_sprint.field_id as TEXT) = joined.sprint\n\n \n \n \n left join field_option as field_option_summary\n on cast(field_option_summary.field_id as TEXT) = joined.summary\n\n \n \n \n left join field_option as field_option_story_points\n on cast(field_option_story_points.field_id as TEXT) = joined.story_points\n\n \n \n \n left join components \n on cast(components.component_id as TEXT) = joined.components\n \n \n \n),\n\nfill_values as (\n\n select \n date_day,\n issue_id,\n first_value( status_id ) over (\n partition by issue_id, status_id_field_partition \n order by date_day asc rows between unbounded preceding and current row) as status_id\n\n \n \n \n \n \n \n \n \n \n \n \n \n -- grab the value that started this batch/partition\n , first_value( sprint ) over (\n partition by issue_id, sprint_field_partition \n order by date_day asc rows between unbounded preceding and current row) as sprint\n\n \n \n \n -- grab the value that started this batch/partition\n , first_value( summary ) over (\n partition by issue_id, summary_field_partition \n order by date_day asc rows between unbounded preceding and current row) as summary\n\n \n \n \n -- grab the value that started this batch/partition\n , first_value( story_points ) over (\n partition by issue_id, story_points_field_partition \n order by date_day asc rows between unbounded preceding and current row) as story_points\n\n \n \n \n , first_value(components) over (\n partition by issue_id, component_field_partition \n order by date_day asc rows between unbounded preceding and current row) as components\n\n \n \n\n from set_values\n),\n\nfix_null_values as (\n\n select \n date_day,\n issue_id\n\n \n \n \n \n \n \n \n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when status_id = 'is_null' then null else status_id end as status_id\n\n \n \n \n \n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when sprint = 'is_null' then null else sprint end as sprint\n\n \n \n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when summary = 'is_null' then null else summary end as summary\n\n \n \n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when story_points = 'is_null' then null else story_points end as story_points\n\n \n \n \n , case when components = 'is_null' then null else components end as components\n\n \n \n\n from fill_values\n\n),\n\nsurrogate_key as (\n\n select\n fix_null_values.date_day,\n fix_null_values.issue_id,\n statuses.status_name as status\n\n \n \n \n \n \n \n \n \n , fix_null_values.status_id as status_id\n\n \n \n \n \n \n , fix_null_values.sprint as sprint\n\n \n \n \n , fix_null_values.summary as summary\n\n \n \n \n , fix_null_values.story_points as story_points\n\n \n \n \n , fix_null_values.components as components\n\n \n \n\n , md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as issue_day_id\n\n from fix_null_values\n\n left join statuses\n on cast(statuses.status_id as TEXT) = fix_null_values.status_id\n)\n\nselect *\nfrom surrogate_key", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.jira__user_enhanced": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira", "name": "jira__user_enhanced", "resource_type": "model", "package_name": "jira", "path": "jira__user_enhanced.sql", "original_file_path": "models/jira__user_enhanced.sql", "unique_id": "model.jira.jira__user_enhanced", "fqn": ["jira", "jira__user_enhanced"], "alias": "jira__user_enhanced", "checksum": {"name": "sha256", "checksum": "6f7332740533b307bc99ce9cf8fc6cf3e91cd88860b14b2c986ec56f0826fdbf"}, "config": {"enabled": true, "alias": null, "schema": "jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of users enriched with their projects, and the volume and velocity of their issues.\n", "columns": {"user_id": {"name": "user_id", "description": "Unique ID of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "Email associated with the user acccount.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "locale": {"name": "locale", "description": "The Java locale of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "user_display_name": {"name": "user_display_name", "description": "Name of the user as it appears in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_zone": {"name": "time_zone", "description": "The user's timezone, as defined in their settings.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "username": {"name": "username", "description": "Account username.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "projects": {"name": "projects", "description": "Comma-separated list of projects on which the user has been assigned to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_closed_issues": {"name": "count_closed_issues", "description": "The number of issues that the user has closed (while being assigned to).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_open_issues": {"name": "count_open_issues", "description": "The number of currently open issues that the user is assigned to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_close_time_seconds": {"name": "avg_close_time_seconds", "description": "The average time taken to close issues since assignment, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_seconds": {"name": "avg_age_currently_open_seconds", "description": "Tjhe average age of a user's currently open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_close_time_seconds": {"name": "median_close_time_seconds", "description": "The median time taken to close issues since assignment, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_seconds": {"name": "median_age_currently_open_seconds", "description": "The median age of a user's currently open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_close_time_days": {"name": "avg_close_time_days", "description": "The average time taken to close issues since assignment, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_days": {"name": "avg_age_currently_open_days", "description": "The average age of a user's currently open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_close_time_days": {"name": "median_close_time_days", "description": "The median time taken to close issues since assignment, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_days": {"name": "median_age_currently_open_days", "description": "The median age of a user's currently open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira"}, "created_at": 1695163462.974117, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__user_enhanced\"", "raw_code": "with jira_user as (\n\n select *\n from {{ var('user') }}\n),\n\nuser_metrics as (\n\n select *\n from {{ ref('int_jira__user_metrics') }}\n),\n\nissue as (\n\n select *\n from {{ ref('jira__issue_enhanced') }} \n),\n\nuser_project as (\n\n select \n assignee_user_id,\n project_name\n\n from issue\n group by 1,2\n\n),\n\nagg_user_projects as (\n\n select \n assignee_user_id,\n {{ fivetran_utils.string_agg( \"project_name\", \"', '\" ) }} as projects\n\n from user_project\n group by 1\n),\n\nuser_join as (\n\n select\n jira_user.*,\n agg_user_projects.projects, -- projects they've worked on issues for\n coalesce(user_metrics.count_closed_issues, 0) as count_closed_issues,\n coalesce(user_metrics.count_open_issues, 0) as count_open_issues,\n\n -- days\n user_metrics.avg_close_time_days,\n user_metrics.avg_age_currently_open_days,\n \n user_metrics.median_close_time_days,\n user_metrics.median_age_currently_open_days,\n\n -- seconds\n user_metrics.avg_close_time_seconds,\n user_metrics.avg_age_currently_open_seconds,\n \n user_metrics.median_close_time_seconds,\n user_metrics.median_age_currently_open_seconds\n\n from jira_user \n left join user_metrics on jira_user.user_id = user_metrics.user_id\n left join agg_user_projects on jira_user.user_id = agg_user_projects.assignee_user_id\n)\n\nselect * from user_join", "language": "sql", "refs": [{"name": "stg_jira__user", "package": null, "version": null}, {"name": "int_jira__user_metrics", "package": null, "version": null}, {"name": "jira__issue_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.fivetran_utils.string_agg"], "nodes": ["model.jira_source.stg_jira__user", "model.jira.int_jira__user_metrics", "model.jira.jira__issue_enhanced"]}, "compiled_path": "target/compiled/jira/models/jira__user_enhanced.sql", "compiled": true, "compiled_code": "with __dbt__cte__int_jira__user_metrics as (\nwith issue as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\" \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then last_assignment_duration_seconds end )\n over ( partition by assignee_user_id )\n\n as numeric(28,6)), 0) as median_close_time_seconds,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then last_assignment_duration_seconds end )\n over ( partition by assignee_user_id )\n\n as numeric(28,6)), 0) as median_age_currently_open_seconds\n\n from issue\n\n \n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics\n),jira_user as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\n),\n\nuser_metrics as (\n\n select *\n from __dbt__cte__int_jira__user_metrics\n),\n\nissue as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\" \n),\n\nuser_project as (\n\n select \n assignee_user_id,\n project_name\n\n from issue\n group by 1,2\n\n),\n\nagg_user_projects as (\n\n select \n assignee_user_id,\n \n listagg(project_name, ', ')\n\n as projects\n\n from user_project\n group by 1\n),\n\nuser_join as (\n\n select\n jira_user.*,\n agg_user_projects.projects, -- projects they've worked on issues for\n coalesce(user_metrics.count_closed_issues, 0) as count_closed_issues,\n coalesce(user_metrics.count_open_issues, 0) as count_open_issues,\n\n -- days\n user_metrics.avg_close_time_days,\n user_metrics.avg_age_currently_open_days,\n \n user_metrics.median_close_time_days,\n user_metrics.median_age_currently_open_days,\n\n -- seconds\n user_metrics.avg_close_time_seconds,\n user_metrics.avg_age_currently_open_seconds,\n \n user_metrics.median_close_time_seconds,\n user_metrics.median_age_currently_open_seconds\n\n from jira_user \n left join user_metrics on jira_user.user_id = user_metrics.user_id\n left join agg_user_projects on jira_user.user_id = agg_user_projects.assignee_user_id\n)\n\nselect * from user_join", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__user_metrics", "sql": " __dbt__cte__int_jira__user_metrics as (\nwith issue as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\" \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then last_assignment_duration_seconds end )\n over ( partition by assignee_user_id )\n\n as numeric(28,6)), 0) as median_close_time_seconds,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then last_assignment_duration_seconds end )\n over ( partition by assignee_user_id )\n\n as numeric(28,6)), 0) as median_age_currently_open_seconds\n\n from issue\n\n \n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics\n)"}], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.jira__issue_enhanced": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira", "name": "jira__issue_enhanced", "resource_type": "model", "package_name": "jira", "path": "jira__issue_enhanced.sql", "original_file_path": "models/jira__issue_enhanced.sql", "unique_id": "model.jira.jira__issue_enhanced", "fqn": ["jira", "jira__issue_enhanced"], "alias": "jira__issue_enhanced", "checksum": {"name": "sha256", "checksum": "3911ef6e5f3db8553093420c2190db79cb30bda524e3a086eaf852b79004ab6b"}, "config": {"enabled": true, "alias": null, "schema": "jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "The core issue table, enhanced with current-status attributes from foreign-key-related tables, and metrics regarding resolutions and assignments.\n", "columns": {"issue_id": {"name": "issue_id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_name": {"name": "issue_name", "description": "Title of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue was last updated in some way.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type": {"name": "issue_type", "description": "Name of the issue type (ie Epic, Task, Subtask, any custom types).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the issue was created (in UTC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_description": {"name": "issue_description", "description": "The issue description, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "Calendar day on which the issue is due, if a due date is provided.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "environment": {"name": "environment", "description": "Text field describing the environment in which the issue occurred (ie \"IE9 on Windows 7\").", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_user_id": {"name": "assignee_user_id", "description": "Foreign key referencing the ID of the `user` currently assigned to this task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_name": {"name": "assignee_name", "description": "User display name of the person currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_user_id": {"name": "reporter_user_id", "description": "Foreign key referencing the ID of the `user` who reported the issue. This differs from the `issue.creator` column in that the reporter can be changed in-app, though it is initialized as the creator.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_name": {"name": "reporter_name", "description": "User display name of the person who reported the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_timezone": {"name": "assignee_timezone", "description": "Timezone of the user currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_email": {"name": "assignee_email", "description": "Email associated with the user currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_key": {"name": "issue_key", "description": "UI-facing id of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_id": {"name": "parent_issue_id", "description": "Self-referencing ID of the parent `issue`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_name": {"name": "parent_issue_name", "description": "Title of the parent issue/epic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_key": {"name": "parent_issue_key", "description": "Issue key of the sub-issue's parent/epic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_type": {"name": "parent_issue_type", "description": "Name of the type of issue that the parent is.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_priority": {"name": "current_priority", "description": "Name of the issue's current priority as it appears in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the `project` that the issue belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_name": {"name": "project_name", "description": "Title of the issue's project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_type": {"name": "resolution_type", "description": "Display name of the type of resolution that closed the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolved_at": {"name": "resolved_at", "description": "Timestamp of when the issue was resolved (ie completed, marked as duplicate). If an issue is un-resolved, this will be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_status": {"name": "current_status", "description": "Title of the category of status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_changed_at": {"name": "status_changed_at", "description": "Timestamp of when the status was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_sprint_id": {"name": "current_sprint_id", "description": "Foreign key referencing the current `sprint` associate with the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_sprint_name": {"name": "current_sprint_name", "description": "Title of the current sprint associated with the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_sprint_changes": {"name": "count_sprint_changes", "description": "The total number of sprints that the issue has belonged to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_active_sprint": {"name": "is_active_sprint", "description": "Yes, if the sprint started after the current time and if the sprint ends in the future.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_completed_at": {"name": "sprint_completed_at", "description": "Timestamp of when the sprint was completed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_ended_at": {"name": "sprint_ended_at", "description": "Timestamp of when the sprint is planned to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_started_at": {"name": "sprint_started_at", "description": "Timestamp of when the sprint began.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint": {"name": "sprint", "description": "List of associated sprint IDs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "ID of the associated status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "original_estimate_seconds": {"name": "original_estimate_seconds", "description": "The original estimate of how long working on this issue would take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "remaining_estimate_seconds": {"name": "remaining_estimate_seconds", "description": "The estimate of how much longer working on this issue will take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_spent_seconds": {"name": "time_spent_seconds", "description": "The time that was spent working on this issue, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "work_ratio": {"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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "conversation": {"name": "conversation", "description": "Line-separated list of comments made on this issue, including the timestamp and author name of each comment.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_comments": {"name": "count_comments", "description": "The number of comments made on this issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_assigned_at": {"name": "first_assigned_at", "description": "Timestamp of when the issue was first assigned to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_assigned_at": {"name": "last_assigned_at", "description": "Timestamp of when the issue was last assigned to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_resolved_at": {"name": "first_resolved_at", "description": "Timestamp of when the issue was first resolved.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "open_duration_seconds": {"name": "open_duration_seconds", "description": "The number of seconds that the issue has spent open (until resolution, or the current timestamp).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "any_assignment_duration_seconds": {"name": "any_assignment_duration_seconds", "description": "The number of seconds that the issue has spent assigned (until resolution, or the current timestamp).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_assignment_duration_seconds": {"name": "last_assignment_duration_seconds", "description": "The number of seconds that the issue has spent assigned to the current/most recent user (until resolution, or the current timestamp).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "creator_user_id": {"name": "creator_user_id", "description": "Foreign key referencing the `user` who first created the issue. Cannot be changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type_id": {"name": "issue_type_id", "description": "Foreign key referencing the ID of the `issue_type`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority_id": {"name": "priority_id", "description": "Foreign key referencing the ID of the issue's current `priority`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_id": {"name": "resolution_id", "description": "Foreign key referencing the ID of the issue's type of `resolution`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Foreign key referencing the ID of the issue's `status` (the step that the issue is currently at in the project's workflow).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_parent_epic": {"name": "is_parent_epic", "description": "Boolean that is true if the parent is an epic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_email": {"name": "reporter_email", "description": "Email associated with the user who reported this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_timezone": {"name": "reporter_timezone", "description": "Timezone of the user currently who reported this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "affects_versions": {"name": "affects_versions", "description": "Comma-separated list of the names of project versions that this issue affects.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fixes_versions": {"name": "fixes_versions", "description": "Comma-separated list of the names of project versions that this issue fixes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_status_category": {"name": "current_status_category", "description": "Title of the umbrella status category that the issue is currently in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira"}, "created_at": 1695163462.9658391, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\"", "raw_code": "with issue as (\n\n select *\n from {{ ref('int_jira__issue_join' ) }}\n),\n\n{%- set pivot_data_columns = adapter.get_columns_in_relation(ref('jira__daily_issue_field_history')) -%}\n\n{%- set issue_data_columns = adapter.get_columns_in_relation(ref('int_jira__issue_join' )) -%}\n{%- set issue_data_columns_clean = [] -%}\n\n{%- for k in issue_data_columns -%}\n {{ issue_data_columns_clean.append(k.name|lower)|default(\"\", True) }}\n{%- endfor -%}\n\ndaily_issue_field_history as (\n \n select\n *,\n row_number() over (partition by issue_id order by date_day desc) = 1 as latest_record\n from {{ ref('jira__daily_issue_field_history')}}\n\n),\n\nlatest_issue_field_history as (\n \n select\n *\n from daily_issue_field_history\n where latest_record\n),\n\nfinal as (\n\n select \n \n issue.*,\n\n {{ dbt.datediff('created_at', \"coalesce(resolved_at, \" ~ dbt.current_timestamp_backcompat() ~ ')', 'second') }} open_duration_seconds,\n\n -- this will be null if no one has been assigned\n {{ dbt.datediff('first_assigned_at', \"coalesce(resolved_at, \" ~ dbt.current_timestamp_backcompat() ~ ')', 'second') }} any_assignment_duration_seconds,\n\n -- if an issue is not currently assigned this will not be null\n {{ dbt.datediff('last_assigned_at', \"coalesce(resolved_at, \" ~ dbt.current_timestamp_backcompat() ~ ')', 'second') }} last_assignment_duration_seconds \n\n {% for col in pivot_data_columns if col.name|lower not in issue_data_columns_clean %} \n {%- if col.name|lower not in ['issue_day_id','issue_id','latest_record', 'date_day'] -%}\n , {{ col.name }}\n {%- endif -%}\n {% endfor %}\n\n from issue\n \n left join latest_issue_field_history \n on issue.issue_id = latest_issue_field_history.issue_id\n \n)\n\nselect *\nfrom final", "language": "sql", "refs": [{"name": "int_jira__issue_join", "package": null, "version": null}, {"name": "jira__daily_issue_field_history", "package": null, "version": null}, {"name": "int_jira__issue_join", "package": null, "version": null}, {"name": "jira__daily_issue_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.current_timestamp_backcompat", "macro.dbt.datediff"], "nodes": ["model.jira.int_jira__issue_join", "model.jira.jira__daily_issue_field_history", "model.jira.int_jira__issue_join", "model.jira.jira__daily_issue_field_history"]}, "compiled_path": "target/compiled/jira/models/jira__issue_enhanced.sql", "compiled": true, "compiled_code": "with issue as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_join\"\n),daily_issue_field_history as (\n \n select\n *,\n row_number() over (partition by issue_id order by date_day desc) = 1 as latest_record\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__daily_issue_field_history\"\n\n),\n\nlatest_issue_field_history as (\n \n select\n *\n from daily_issue_field_history\n where latest_record\n),\n\nfinal as (\n\n select \n \n issue.*,\n\n datediff(\n second,\n created_at,\n coalesce(resolved_at, getdate())\n ) open_duration_seconds,\n\n -- this will be null if no one has been assigned\n datediff(\n second,\n first_assigned_at,\n coalesce(resolved_at, getdate())\n ) any_assignment_duration_seconds,\n\n -- if an issue is not currently assigned this will not be null\n datediff(\n second,\n last_assigned_at,\n coalesce(resolved_at, getdate())\n ) last_assignment_duration_seconds \n\n , status, sprint, summary, story_points, components\n\n from issue\n \n left join latest_issue_field_history \n on issue.issue_id = latest_issue_field_history.issue_id\n \n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.jira__project_enhanced": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira", "name": "jira__project_enhanced", "resource_type": "model", "package_name": "jira", "path": "jira__project_enhanced.sql", "original_file_path": "models/jira__project_enhanced.sql", "unique_id": "model.jira.jira__project_enhanced", "fqn": ["jira", "jira__project_enhanced"], "alias": "jira__project_enhanced", "checksum": {"name": "sha256", "checksum": "214672c28dde6208559758526fd1c6881211d5668b061387a02b196173a461d0"}, "config": {"enabled": true, "alias": null, "schema": "jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of projects enriched with data about its lead, epics, components, and volume and velocity of worktime.\n", "columns": {"project_id": {"name": "project_id", "description": "Unique ID of the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_description": {"name": "project_description", "description": "Description of the project, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_key": {"name": "project_key", "description": "UI-facing ID of the project. This becomes the default prefix for tasks created within this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_lead_user_id": {"name": "project_lead_user_id", "description": "Foreign key referencing the ID of the `user` who leads this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_name": {"name": "project_name", "description": "Title of the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "permission_scheme_id": {"name": "permission_scheme_id", "description": "Foreign key referencing the ID of the `permission_scheme` that the project ascribes to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_category_id": {"name": "project_category_id", "description": "Foreign key referencing the ID of the `project_category` that the project is associated with, if any.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_lead_user_name": {"name": "project_lead_user_name", "description": "User display name of the person leading this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_lead_email": {"name": "project_lead_email", "description": "Email associated with the project lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "epics": {"name": "epics", "description": "Comma-separated list of epics worked on in this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "components": {"name": "components", "description": "Comma-separated list of components of this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_closed_issues": {"name": "count_closed_issues", "description": "The number of issues closed in this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_open_issues": {"name": "count_open_issues", "description": "The number of currently un-resolved issues in the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_open_assigned_issues": {"name": "count_open_assigned_issues", "description": "The number of currently open and currently assigned issues in the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_close_time_seconds": {"name": "avg_close_time_seconds", "description": "The average time taken to close issues, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_assigned_close_time_seconds": {"name": "avg_assigned_close_time_seconds", "description": "The average time taken to close issues from their first assignment, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_seconds": {"name": "avg_age_currently_open_seconds", "description": "The average age of any currently-open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_assigned_seconds": {"name": "avg_age_currently_open_assigned_seconds", "description": "The average age of any currently-open issues, from their first assignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_close_time_seconds": {"name": "median_close_time_seconds", "description": "The median time taken to close issues, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_seconds": {"name": "median_age_currently_open_seconds", "description": "The median age of any currently-open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_assigned_close_time_seconds": {"name": "median_assigned_close_time_seconds", "description": "The median time taken to close issues from their first assignment, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_assigned_seconds": {"name": "median_age_currently_open_assigned_seconds", "description": "The median age of any currently-open issues, from their first assignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_close_time_days": {"name": "avg_close_time_days", "description": "The average time taken to close issues, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_assigned_close_time_days": {"name": "avg_assigned_close_time_days", "description": "The average time taken to close issues from their first assignment, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_days": {"name": "avg_age_currently_open_days", "description": "The average age of any currently-open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_assigned_days": {"name": "avg_age_currently_open_assigned_days", "description": "The average age of any currently-open issues, from their first assignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_close_time_days": {"name": "median_close_time_days", "description": "The median time taken to close issues, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_days": {"name": "median_age_currently_open_days", "description": "The median age of any currently-open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_assigned_close_time_days": {"name": "median_assigned_close_time_days", "description": "The median time taken to close issues from their first assignment, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_assigned_days": {"name": "median_age_currently_open_assigned_days", "description": "The median age of any currently-open issues, from their first assignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira"}, "created_at": 1695163462.9710422, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__project_enhanced\"", "raw_code": "with project as (\n\n select *\n from {{ var('project') }}\n),\n\nproject_metrics as (\n\n select * \n from {{ ref('int_jira__project_metrics') }}\n),\n\n-- user is reserved in AWS\njira_user as (\n-- to grab the project lead\n select *\n from {{ var('user') }}\n),\n\nagg_epics as (\n\n select \n project_id,\n {{ fivetran_utils.string_agg( \"issue_name\", \"', '\" ) }} as epics\n\n from {{ ref('jira__issue_enhanced') }}\n where lower(issue_type) = 'epic'\n -- should we limit to active epics?\n group by 1\n\n),\n\n{% if var('jira_using_components', True) %}\n\nagg_components as (\n -- i'm just aggregating the components here, but perhaps pivoting out components (and epics) \n -- into columns where the values are the number of issues completed and/or open would be more valuable\n select \n project_id,\n {{ fivetran_utils.string_agg( \"component_name\", \"', '\" ) }} as components\n\n from {{ var('component') }}\n\n group by 1\n),\n\n{% endif %}\n\nproject_join as (\n\n select\n project.*,\n jira_user.user_display_name as project_lead_user_name,\n jira_user.email as project_lead_email,\n agg_epics.epics,\n \n {% if var('jira_using_components', True) %}\n agg_components.components,\n {% endif %}\n\n coalesce(project_metrics.count_closed_issues, 0) as count_closed_issues,\n coalesce(project_metrics.count_open_issues, 0) as count_open_issues,\n coalesce(project_metrics.count_open_assigned_issues, 0) as count_open_assigned_issues,\n\n -- days\n project_metrics.avg_close_time_days,\n project_metrics.avg_assigned_close_time_days,\n\n project_metrics.avg_age_currently_open_days,\n project_metrics.avg_age_currently_open_assigned_days,\n\n project_metrics.median_close_time_days, \n project_metrics.median_age_currently_open_days,\n project_metrics.median_assigned_close_time_days,\n project_metrics.median_age_currently_open_assigned_days,\n\n -- seconds\n project_metrics.avg_close_time_seconds,\n project_metrics.avg_assigned_close_time_seconds,\n\n project_metrics.avg_age_currently_open_seconds,\n project_metrics.avg_age_currently_open_assigned_seconds,\n\n project_metrics.median_close_time_seconds, \n project_metrics.median_age_currently_open_seconds,\n project_metrics.median_assigned_close_time_seconds,\n project_metrics.median_age_currently_open_assigned_seconds\n\n from project\n left join project_metrics on project.project_id = project_metrics.project_id\n left join jira_user on project.project_lead_user_id = jira_user.user_id\n left join agg_epics on project.project_id = agg_epics.project_id \n \n {% if var('jira_using_components', True) %}\n left join agg_components on project.project_id = agg_components.project_id \n {% endif %}\n\n)\n\nselect * from project_join", "language": "sql", "refs": [{"name": "stg_jira__project", "package": null, "version": null}, {"name": "int_jira__project_metrics", "package": null, "version": null}, {"name": "stg_jira__user", "package": null, "version": null}, {"name": "jira__issue_enhanced", "package": null, "version": null}, {"name": "stg_jira__component", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.fivetran_utils.string_agg"], "nodes": ["model.jira_source.stg_jira__project", "model.jira.int_jira__project_metrics", "model.jira_source.stg_jira__user", "model.jira.jira__issue_enhanced", "model.jira_source.stg_jira__component"]}, "compiled_path": "target/compiled/jira/models/jira__project_enhanced.sql", "compiled": true, "compiled_code": "with __dbt__cte__int_jira__project_metrics as (\nwith issue as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\"\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then open_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then open_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_age_currently_open_seconds,\n\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then any_assignment_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_assigned_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then any_assignment_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n \n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as numeric(28,6) ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as numeric(28,6) ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics\n),project as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__project\"\n),\n\nproject_metrics as (\n\n select * \n from __dbt__cte__int_jira__project_metrics\n),\n\n-- user is reserved in AWS\njira_user as (\n-- to grab the project lead\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\n),\n\nagg_epics as (\n\n select \n project_id,\n \n listagg(issue_name, ', ')\n\n as epics\n\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\"\n where lower(issue_type) = 'epic'\n -- should we limit to active epics?\n group by 1\n\n),\n\n\n\nagg_components as (\n -- i'm just aggregating the components here, but perhaps pivoting out components (and epics) \n -- into columns where the values are the number of issues completed and/or open would be more valuable\n select \n project_id,\n \n listagg(component_name, ', ')\n\n as components\n\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__component\"\n\n group by 1\n),\n\n\n\nproject_join as (\n\n select\n project.*,\n jira_user.user_display_name as project_lead_user_name,\n jira_user.email as project_lead_email,\n agg_epics.epics,\n \n \n agg_components.components,\n \n\n coalesce(project_metrics.count_closed_issues, 0) as count_closed_issues,\n coalesce(project_metrics.count_open_issues, 0) as count_open_issues,\n coalesce(project_metrics.count_open_assigned_issues, 0) as count_open_assigned_issues,\n\n -- days\n project_metrics.avg_close_time_days,\n project_metrics.avg_assigned_close_time_days,\n\n project_metrics.avg_age_currently_open_days,\n project_metrics.avg_age_currently_open_assigned_days,\n\n project_metrics.median_close_time_days, \n project_metrics.median_age_currently_open_days,\n project_metrics.median_assigned_close_time_days,\n project_metrics.median_age_currently_open_assigned_days,\n\n -- seconds\n project_metrics.avg_close_time_seconds,\n project_metrics.avg_assigned_close_time_seconds,\n\n project_metrics.avg_age_currently_open_seconds,\n project_metrics.avg_age_currently_open_assigned_seconds,\n\n project_metrics.median_close_time_seconds, \n project_metrics.median_age_currently_open_seconds,\n project_metrics.median_assigned_close_time_seconds,\n project_metrics.median_age_currently_open_assigned_seconds\n\n from project\n left join project_metrics on project.project_id = project_metrics.project_id\n left join jira_user on project.project_lead_user_id = jira_user.user_id\n left join agg_epics on project.project_id = agg_epics.project_id \n \n \n left join agg_components on project.project_id = agg_components.project_id \n \n\n)\n\nselect * from project_join", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__project_metrics", "sql": " __dbt__cte__int_jira__project_metrics as (\nwith issue as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\"\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then open_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then open_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_age_currently_open_seconds,\n\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then any_assignment_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_assigned_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then any_assignment_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n \n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as numeric(28,6) ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as numeric(28,6) ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics\n)"}], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__issue_type_parents": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__issue_type_parents", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__issue_type_parents.sql", "original_file_path": "models/intermediate/int_jira__issue_type_parents.sql", "unique_id": "model.jira.int_jira__issue_type_parents", "fqn": ["jira", "intermediate", "int_jira__issue_type_parents"], "alias": "int_jira__issue_type_parents", "checksum": {"name": "sha256", "checksum": "133bbab4e576ac2c0703aaa6b78743fb36bdc0cefbf1f3ecb1ee2c2a91c81cbf"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table relating issues with data regarding their parent issues (which may be epics). Contains all columns present in `stg_jira__issue`.\n", "columns": {"issue_id": {"name": "issue_id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_id": {"name": "parent_issue_id", "description": "Unique ID of the parent issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "revised_parent_issue_id": {"name": "revised_parent_issue_id", "description": "Unique ID of the parent issue, coalesced with the ID of any linked epics (in classic projects).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type": {"name": "issue_type", "description": "Name of the issue type (ie Epic, Task, Subtask, any custom types).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_name": {"name": "issue_name", "description": "Title of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_key": {"name": "issue_key", "description": "UI-facing id of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_type": {"name": "parent_issue_type", "description": "Name of the parent issue type (ie Epic, Task, Subtask, any custom types).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_name": {"name": "parent_issue_name", "description": "Title of the parent issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_key": {"name": "parent_issue_key", "description": "UI-facing id of the parent issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_parent_epic": {"name": "is_parent_epic", "description": "Boolean that is true if the parent is an epic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_user_id": {"name": "assignee_user_id", "description": "Foreign key referencing the ID of the `user` currently assigned to this task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the issue was created (in UTC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "creator_user_id": {"name": "creator_user_id", "description": "Foreign key referencing the `user` who first created the issue. Cannot be changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_description": {"name": "issue_description", "description": "The issue description, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "Calendar day on which the issue is due, if a due date is provided.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "environment": {"name": "environment", "description": "Text field describing the environment in which the issue occurred (ie \"IE9 on Windows 7\").", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type_id": {"name": "issue_type_id", "description": "Foreign key referencing the ID of the `issue_type`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "original_estimate_seconds": {"name": "original_estimate_seconds", "description": "The original estimate of how long working on this issue would take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority_id": {"name": "priority_id", "description": "Foreign key referencing the ID of the issue's current `priority`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the ID of the `project` that the issue belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "remaining_estimate_seconds": {"name": "remaining_estimate_seconds", "description": "The estimate of how much longer working on this issue will take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_user_id": {"name": "reporter_user_id", "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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_id": {"name": "resolution_id", "description": "Foreign key referencing the ID of the issue's type of `resolution`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolved_at": {"name": "resolved_at", "description": "Timestamp of when the issue was resolved (ie completed, marked as duplicate). If an issue is un-resolved, this will be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Foreign key referencing the ID of the issue's `status` (the step that the issue is currently at in the project's workflow).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_changed_at": {"name": "status_changed_at", "description": "Timestamp of when the status was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_spent_seconds": {"name": "time_spent_seconds", "description": "The time that was spent working on this issue, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue was last updated in some way.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "work_ratio": {"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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "int_jira"}, "created_at": 1695163463.017993, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_type_parents\"", "raw_code": "{{\n config(\n materialized='table'\n )\n}}\n-- needs to be a view to use the dbt_utils.star macro in int_jira__issue_users\n\nwith issue as (\n\n select * \n from {{ var('issue') }}\n \n),\n\nissue_type as (\n\n select *\n from {{ var('issue_type') }}\n), \n-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\n\nissues_w_epics as (\n\n select * \n from {{ ref('int_jira__issue_epic')}}\n\n), \n\nissue_enriched_with_epics as (\n\n select\n \n issue.*,\n coalesce(parent_issue_id, epic_issue_id) as revised_parent_issue_id\n \n from issue\n \n left join issues_w_epics on issues_w_epics.issue_id = issue.issue_id\n\n), \n\nissue_w_types as (\n\n select \n\n issue_enriched_with_epics.*,\n issue_type.issue_type_name as issue_type\n \n from issue_enriched_with_epics \n \n left join issue_type on issue_type.issue_type_id = issue_enriched_with_epics.issue_type_id\n),\n\nadd_parent_info as (\n\n select\n issue_w_types.*,\n parent.issue_type as parent_issue_type,\n parent.issue_name as parent_issue_name,\n parent.issue_key as parent_issue_key,\n lower(coalesce(parent.issue_type, '')) = 'epic' as is_parent_epic\n\n from\n issue_w_types\n\n -- do a left join so we can grab all issue types from this table in `issue_join`\n left join issue_w_types as parent on issue_w_types.revised_parent_issue_id = parent.issue_id\n\n)\n\nselect * \nfrom add_parent_info", "language": "sql", "refs": [{"name": "stg_jira__issue", "package": null, "version": null}, {"name": "stg_jira__issue_type", "package": null, "version": null}, {"name": "int_jira__issue_epic", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": [], "nodes": ["model.jira_source.stg_jira__issue", "model.jira_source.stg_jira__issue_type", "model.jira.int_jira__issue_epic"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__issue_type_parents.sql", "compiled": true, "compiled_code": "\n-- needs to be a view to use the dbt_utils.star macro in int_jira__issue_users\n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_epic as (\n-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\nwith epic_field_history as (\n\n select *\n from __dbt__cte__int_jira__issue_field_history\n where lower(field_name) like 'epic%link'\n \n),\n\norder_epic_links as (\n\n select\n issue_id,\n cast(field_value as INT ) as epic_issue_id,\n\n row_number() over (\n partition by issue_id order by updated_at desc\n ) as row_num\n\n from epic_field_history\n),\n\nlast_epic_link as (\n\n select \n issue_id, \n epic_issue_id \n \n from order_epic_links\n where row_num = 1\n)\n\nselect *\nfrom last_epic_link\n),issue as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue\"\n \n),\n\nissue_type as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_type\"\n), \n-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\n\nissues_w_epics as (\n\n select * \n from __dbt__cte__int_jira__issue_epic\n\n), \n\nissue_enriched_with_epics as (\n\n select\n \n issue.*,\n coalesce(parent_issue_id, epic_issue_id) as revised_parent_issue_id\n \n from issue\n \n left join issues_w_epics on issues_w_epics.issue_id = issue.issue_id\n\n), \n\nissue_w_types as (\n\n select \n\n issue_enriched_with_epics.*,\n issue_type.issue_type_name as issue_type\n \n from issue_enriched_with_epics \n \n left join issue_type on issue_type.issue_type_id = issue_enriched_with_epics.issue_type_id\n),\n\nadd_parent_info as (\n\n select\n issue_w_types.*,\n parent.issue_type as parent_issue_type,\n parent.issue_name as parent_issue_name,\n parent.issue_key as parent_issue_key,\n lower(coalesce(parent.issue_type, '')) = 'epic' as is_parent_epic\n\n from\n issue_w_types\n\n -- do a left join so we can grab all issue types from this table in `issue_join`\n left join issue_w_types as parent on issue_w_types.revised_parent_issue_id = parent.issue_id\n\n)\n\nselect * \nfrom add_parent_info", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_epic", "sql": " __dbt__cte__int_jira__issue_epic as (\n-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\nwith epic_field_history as (\n\n select *\n from __dbt__cte__int_jira__issue_field_history\n where lower(field_name) like 'epic%link'\n \n),\n\norder_epic_links as (\n\n select\n issue_id,\n cast(field_value as INT ) as epic_issue_id,\n\n row_number() over (\n partition by issue_id order by updated_at desc\n ) as row_num\n\n from epic_field_history\n),\n\nlast_epic_link as (\n\n select \n issue_id, \n epic_issue_id \n \n from order_epic_links\n where row_num = 1\n)\n\nselect *\nfrom last_epic_link\n)"}], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__issue_epic": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__issue_epic", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__issue_epic.sql", "original_file_path": "models/intermediate/int_jira__issue_epic.sql", "unique_id": "model.jira.int_jira__issue_epic", "fqn": ["jira", "intermediate", "int_jira__issue_epic"], "alias": "int_jira__issue_epic", "checksum": {"name": "sha256", "checksum": "8d030e0a6202fd0a0585f2107853532835c36e2f95a008dc3742c613cb679b03"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table associating **classic-project** issues with the epics they are linked to. This is necessary because issue-epic relationships are represented differently in next-gen vs classic projects. In next-gen projects, epics are stored as an issue's parent issue, whereas in classic projects epics are captured in the 'epic link' field in `issue_field_history`. Next-gen issues will not appear in this table.\n", "columns": {"issue_id": {"name": "issue_id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "epic_issue_id": {"name": "epic_issue_id", "description": "Unique ID of the epic associated with this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira"}, "created_at": 1695163463.0110478, "relation_name": null, "raw_code": "-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\nwith epic_field_history as (\n\n select *\n from {{ ref('int_jira__issue_field_history') }}\n where lower(field_name) like 'epic%link'\n \n),\n\norder_epic_links as (\n\n select\n issue_id,\n cast(field_value as {{ dbt.type_int() }} ) as epic_issue_id,\n\n row_number() over (\n partition by issue_id order by updated_at desc\n ) as row_num\n\n from epic_field_history\n),\n\nlast_epic_link as (\n\n select \n issue_id, \n epic_issue_id \n \n from order_epic_links\n where row_num = 1\n)\n\nselect *\nfrom last_epic_link", "language": "sql", "refs": [{"name": "int_jira__issue_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.type_int"], "nodes": ["model.jira.int_jira__issue_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__issue_epic.sql", "compiled": true, "compiled_code": "-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n),epic_field_history as (\n\n select *\n from __dbt__cte__int_jira__issue_field_history\n where lower(field_name) like 'epic%link'\n \n),\n\norder_epic_links as (\n\n select\n issue_id,\n cast(field_value as INT ) as epic_issue_id,\n\n row_number() over (\n partition by issue_id order by updated_at desc\n ) as row_num\n\n from epic_field_history\n),\n\nlast_epic_link as (\n\n select \n issue_id, \n epic_issue_id \n \n from order_epic_links\n where row_num = 1\n)\n\nselect *\nfrom last_epic_link", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__user_metrics": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__user_metrics", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__user_metrics.sql", "original_file_path": "models/intermediate/int_jira__user_metrics.sql", "unique_id": "model.jira.int_jira__user_metrics", "fqn": ["jira", "intermediate", "int_jira__user_metrics"], "alias": "int_jira__user_metrics", "checksum": {"name": "sha256", "checksum": "27f13c63391f270b80286ca2f76421e83092f5511701120a88866bb7440ee196"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table calculating issue-related metrics per user.", "columns": {"user_id": {"name": "user_id", "description": "Unique ID of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_closed_issues": {"name": "count_closed_issues", "description": "The number of issues that the user has closed (while being assigned to).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_open_issues": {"name": "count_open_issues", "description": "The number of currently open issues that the user is assigned to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_close_time_seconds": {"name": "avg_close_time_seconds", "description": "The average time taken to close issues since assignment, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_seconds": {"name": "avg_age_currently_open_seconds", "description": "The average age of a user's currently open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_close_time_seconds": {"name": "median_close_time_seconds", "description": "The median time taken to close issues since assignment, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_seconds": {"name": "median_age_currently_open_seconds", "description": "The median age of a user's currently open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_close_time_days": {"name": "avg_close_time_days", "description": "The average time taken to close issues since assignment, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_days": {"name": "avg_age_currently_open_days", "description": "The average age of a user's currently open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_close_time_days": {"name": "median_close_time_days", "description": "The median time taken to close issues since assignment, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_days": {"name": "median_age_currently_open_days", "description": "The median age of a user's currently open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira"}, "created_at": 1695163463.0095081, "relation_name": null, "raw_code": "with issue as (\n\n select *\n from {{ ref('jira__issue_enhanced') }} \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( {{ fivetran_utils.percentile(percentile_field='case when resolved_at is not null then last_assignment_duration_seconds end', \n partition_field='assignee_user_id', percent='0.5') }} as {{ dbt.type_numeric() }}), 0) as median_close_time_seconds,\n round( cast( {{ fivetran_utils.percentile(percentile_field='case when resolved_at is null then last_assignment_duration_seconds end', \n partition_field='assignee_user_id', percent='0.5') }} as {{ dbt.type_numeric() }}), 0) as median_age_currently_open_seconds\n\n from issue\n\n {% if target.type == 'postgres' %} group by 1 {% endif %}\n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as {{ dbt.type_numeric() }} ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as {{ dbt.type_numeric() }} ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics", "language": "sql", "refs": [{"name": "jira__issue_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.fivetran_utils.percentile", "macro.dbt.type_numeric"], "nodes": ["model.jira.jira__issue_enhanced"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__user_metrics.sql", "compiled": true, "compiled_code": "with issue as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\" \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then last_assignment_duration_seconds end )\n over ( partition by assignee_user_id )\n\n as numeric(28,6)), 0) as median_close_time_seconds,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then last_assignment_duration_seconds end )\n over ( partition by assignee_user_id )\n\n as numeric(28,6)), 0) as median_age_currently_open_seconds\n\n from issue\n\n \n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__issue_join": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__issue_join", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__issue_join.sql", "original_file_path": "models/intermediate/int_jira__issue_join.sql", "unique_id": "model.jira.int_jira__issue_join", "fqn": ["jira", "intermediate", "int_jira__issue_join"], "alias": "int_jira__issue_join", "checksum": {"name": "sha256", "checksum": "e2341a474736d8b1aa18864caa56c4b69aacd3f0f42ad2fd6a23014021f6307d"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "The core issue table, enhanced with current-status attributes from foreign-key-related tables, and metrics regarding resolutions and assignments.\n", "columns": {"issue_id": {"name": "issue_id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_name": {"name": "issue_name", "description": "Title of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue was last updated in some way.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type": {"name": "issue_type", "description": "Name of the issue type (ie Epic, Task, Subtask, any custom types).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type_id": {"name": "issue_type_id", "description": "Foreign key referencing the ID of the `issue_type`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the issue was created (in UTC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_description": {"name": "issue_description", "description": "The issue description, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "Calendar day on which the issue is due, if a due date is provided.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "environment": {"name": "environment", "description": "Text field describing the environment in which the issue occurred (ie \"IE9 on Windows 7\").", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_user_id": {"name": "assignee_user_id", "description": "Foreign key referencing the ID of the `user` currently assigned to this task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_name": {"name": "assignee_name", "description": "User display name of the person currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_user_id": {"name": "reporter_user_id", "description": "Foreign key referencing the ID of the `user` who reported the issue. This differs from the `issue.creator` column in that the reporter can be changed in-app, though it is initialized as the creator.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_name": {"name": "reporter_name", "description": "User display name of the person who reported the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_timezone": {"name": "assignee_timezone", "description": "Timezone of the user currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_email": {"name": "assignee_email", "description": "Email associated with the user currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_key": {"name": "issue_key", "description": "UI-facing id of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_id": {"name": "parent_issue_id", "description": "Self-referencing ID of the parent `issue`, which may be an epic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_name": {"name": "parent_issue_name", "description": "Title of the parent issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_key": {"name": "parent_issue_key", "description": "Issue key of the sub-issue's parent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_type": {"name": "parent_issue_type", "description": "Name of the type of issue that the parent is.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_priority": {"name": "current_priority", "description": "Name of the issue's current priority as it appears in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority_id": {"name": "priority_id", "description": "Foreign key referencing the ID of the issue's current `priority`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the `project` that the issue belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_name": {"name": "project_name", "description": "Title of the issue's project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_type": {"name": "resolution_type", "description": "Display name of the type of resolution that closed the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolved_at": {"name": "resolved_at", "description": "Timestamp of when the issue was resolved (ie completed, marked as duplicate). If an issue is un-resolved, this will be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_id": {"name": "resolution_id", "description": "Foreign key referencing the ID of the issue's type of `resolution`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_status": {"name": "current_status", "description": "Title of the category of status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Foreign key referencing the ID of the issue's `status` (the step that the issue is currently at in the project's workflow).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_changed_at": {"name": "status_changed_at", "description": "Timestamp of when the status was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_sprint_id": {"name": "current_sprint_id", "description": "Foreign key referencing the `sprint` that the issue is currently in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_sprint_name": {"name": "current_sprint_name", "description": "Title of the issue's sprint.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_sprint_changes": {"name": "count_sprint_changes", "description": "The total number of sprints that the issue has belonged to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_active_sprint": {"name": "is_active_sprint", "description": "Yes, if the sprint started after the current time and if the sprint ends in the future.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_completed_at": {"name": "sprint_completed_at", "description": "Timestamp of when the sprint was completed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_ended_at": {"name": "sprint_ended_at", "description": "Timestamp of when the sprint is planned to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_started_at": {"name": "sprint_started_at", "description": "Timestamp of when the sprint began.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "original_estimate_seconds": {"name": "original_estimate_seconds", "description": "The original estimate of how long working on this issue would take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "remaining_estimate_seconds": {"name": "remaining_estimate_seconds", "description": "The estimate of how much longer working on this issue will take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_spent_seconds": {"name": "time_spent_seconds", "description": "The time that was spent working on this issue, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "work_ratio": {"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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "conversation": {"name": "conversation", "description": "Line-separated list of comments made on this issue, including the timestamp and author name of each comment.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_comments": {"name": "count_comments", "description": "The number of comments made on this issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_assigned_at": {"name": "first_assigned_at", "description": "Timestamp of when the issue was first assigned to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_assigned_at": {"name": "last_assigned_at", "description": "Timestamp of when the issue was last assigned to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_resolved_at": {"name": "first_resolved_at", "description": "Timestamp of when the issue was first resolved.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_email": {"name": "reporter_email", "description": "Email associated with the user who reported this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_timezone": {"name": "reporter_timezone", "description": "Timezone of the user currently who reported this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_parent_epic": {"name": "is_parent_epic", "description": "Boolean that is true if the parent is an epic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "creator_user_id": {"name": "creator_user_id", "description": "Foreign key referencing the `user` who first created the issue. Cannot be changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "affects_versions": {"name": "affects_versions", "description": "Comma-separated list of the names of project versions that this issue affects.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fixes_versions": {"name": "fixes_versions", "description": "Comma-separated list of the names of project versions that this issue fixes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_status_category": {"name": "current_status_category", "description": "Title of the umbrella status category that the issue is currently in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "int_jira"}, "created_at": 1695163463.0037608, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_join\"", "raw_code": "{{\n config(\n materialized = 'table'\n )\n}}\n\nwith issue as (\n\n select *\n from {{ ref('int_jira__issue_users') }}\n\n),\n\nproject as (\n\n select * \n from {{ var('project') }}\n),\n\nstatus as (\n\n select * \n from {{ var('status') }}\n),\n\nstatus_category as (\n\n select * \n from {{ var('status_category') }}\n),\n\nresolution as (\n\n select * \n from {{ var('resolution') }}\n),\n\n{% if var('jira_using_priorities', True) %}\npriority as (\n\n select * \n from {{ var('priority') }}\n),\n{% endif %}\n\n{% if var('jira_using_sprints', True) %}\nissue_sprint as (\n\n select *\n from {{ ref('int_jira__issue_sprint') }}\n),\n{% endif %}\n\n{% if var('jira_include_comments', True) %}\nissue_comments as (\n\n select * \n from {{ ref('int_jira__issue_comments') }}\n),\n{% endif %}\n\nissue_assignments_and_resolutions as (\n \n select *\n from {{ ref('int_jira__issue_assign_resolution')}}\n\n),\n\n{% if var('jira_using_versions', True) %}\nissue_versions as (\n\n select *\n from {{ ref('int_jira__issue_versions') }}\n),\n{% endif %}\n\njoin_issue as (\n\n select\n issue.* \n\n ,project.project_name as project_name\n\n ,status.status_name as current_status\n ,status_category.status_category_name as current_status_category \n ,resolution.resolution_name as resolution_type\n {% if var('jira_using_priorities', True) %}\n ,priority.priority_name as current_priority\n\t{% endif %}\n\n {% if var('jira_using_sprints', True) %}\n ,issue_sprint.current_sprint_id\n ,issue_sprint.current_sprint_name\n ,coalesce(issue_sprint.count_sprint_changes, 0) as count_sprint_changes\n ,issue_sprint.sprint_started_at\n ,issue_sprint.sprint_ended_at\n ,issue_sprint.sprint_completed_at\n ,coalesce(issue_sprint.sprint_started_at <= {{ dbt.current_timestamp_backcompat() }}\n and coalesce(issue_sprint.sprint_completed_at, {{ dbt.current_timestamp_backcompat() }}) >= {{ dbt.current_timestamp_backcompat() }} \n , false) as is_active_sprint -- If sprint doesn't have a start date, default to false. If it does have a start date, but no completed date, this means that the sprint is active. The ended_at timestamp is irrelevant here.\n {% endif %}\n\n ,issue_assignments_and_resolutions.first_assigned_at\n ,issue_assignments_and_resolutions.last_assigned_at\n ,issue_assignments_and_resolutions.first_resolved_at\n\n {% if var('jira_using_versions', True) %}\n ,issue_versions.fixes_versions\n ,issue_versions.affects_versions\n {% endif %}\n\n {% if var('jira_include_comments', True) %}\n ,issue_comments.conversation\n ,coalesce(issue_comments.count_comments, 0) as count_comments\n {% endif %}\n \n from issue\n left join project on project.project_id = issue.project_id\n left join status on status.status_id = issue.status_id\n left join status_category on status.status_category_id = status_category.status_category_id\n left join resolution on resolution.resolution_id = issue.resolution_id\n\t{% if var('jira_using_priorities', True) %}\n left join priority on priority.priority_id = issue.priority_id\n\t{% endif %}\n left join issue_assignments_and_resolutions on issue_assignments_and_resolutions.issue_id = issue.issue_id\n\n {% if var('jira_using_versions', True) %}\n left join issue_versions on issue_versions.issue_id = issue.issue_id\n {% endif %}\n \n {% if var('jira_using_sprints', True) %}\n left join issue_sprint on issue_sprint.issue_id = issue.issue_id\n {% endif %}\n\n {% if var('jira_include_comments', True) %}\n left join issue_comments on issue_comments.issue_id = issue.issue_id\n {% endif %}\n)\n\nselect * \nfrom join_issue", "language": "sql", "refs": [{"name": "int_jira__issue_users", "package": null, "version": null}, {"name": "stg_jira__project", "package": null, "version": null}, {"name": "stg_jira__status", "package": null, "version": null}, {"name": "stg_jira__status_category", "package": null, "version": null}, {"name": "stg_jira__resolution", "package": null, "version": null}, {"name": "stg_jira__priority", "package": null, "version": null}, {"name": "int_jira__issue_sprint", "package": null, "version": null}, {"name": "int_jira__issue_comments", "package": null, "version": null}, {"name": "int_jira__issue_assign_resolution", "package": null, "version": null}, {"name": "int_jira__issue_versions", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.current_timestamp_backcompat"], "nodes": ["model.jira.int_jira__issue_users", "model.jira_source.stg_jira__project", "model.jira_source.stg_jira__status", "model.jira_source.stg_jira__status_category", "model.jira_source.stg_jira__resolution", "model.jira_source.stg_jira__priority", "model.jira.int_jira__issue_sprint", "model.jira.int_jira__issue_comments", "model.jira.int_jira__issue_assign_resolution", "model.jira.int_jira__issue_versions"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__issue_join.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_jira__issue_users as (\n-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n \n\n select\n issue_id,\n coalesce(revised_parent_issue_id, parent_issue_id) as parent_issue_id,\n\n \"original_estimate_seconds\",\n \"remaining_estimate_seconds\",\n \"time_spent_seconds\",\n \"assignee_user_id\",\n \"created_at\",\n \"resolved_at\",\n \"creator_user_id\",\n \"issue_description\",\n \"due_date\",\n \"environment\",\n \"issue_type_id\",\n \"issue_key\",\n \"priority_id\",\n \"project_id\",\n \"reporter_user_id\",\n \"resolution_id\",\n \"status_id\",\n \"status_changed_at\",\n \"issue_name\",\n \"updated_at\",\n \"work_ratio\",\n \"_fivetran_synced\",\n \"issue_type\",\n \"parent_issue_type\",\n \"parent_issue_name\",\n \"parent_issue_key\",\n \"is_parent_epic\"\n\n\n \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_type_parents\"\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join\n), __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_sprint as (\n\n\nwith sprint as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__sprint\"\n\n),\n\nfield_history as (\n\n -- sprints don't appear to be capable of multiselect in the UI...\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n),\n\nsprint_field_history as (\n\n select \n field_history.*,\n sprint.*,\n row_number() over (\n partition by field_history.issue_id \n order by field_history.updated_at desc, sprint.started_at desc \n ) as row_num\n from field_history\n join sprint on field_history.field_value = cast(sprint.sprint_id as TEXT)\n where lower(field_history.field_name) = 'sprint'\n),\n\n\nlast_sprint as (\n\n select *\n from sprint_field_history\n \n where row_num = 1\n\n), \n\nsprint_rollovers as (\n\n select \n issue_id,\n count(distinct case when field_value is not null then field_value end) as count_sprint_changes\n \n from sprint_field_history\n group by 1\n\n),\n\nissue_sprint as (\n\n select \n last_sprint.issue_id,\n last_sprint.field_value as current_sprint_id,\n last_sprint.sprint_name as current_sprint_name,\n last_sprint.board_id,\n last_sprint.started_at as sprint_started_at,\n last_sprint.ended_at as sprint_ended_at,\n last_sprint.completed_at as sprint_completed_at,\n coalesce(sprint_rollovers.count_sprint_changes, 0) as count_sprint_changes\n\n from \n last_sprint \n left join sprint_rollovers on sprint_rollovers.issue_id = last_sprint.issue_id\n \n)\n\nselect * from issue_sprint\n), __dbt__cte__int_jira__issue_comments as (\n\n\nwith comment as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__comment\"\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n \n listagg(comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body, '\\n')\n\n as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments\n), __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_assign_resolution as (\nwith issue_field_history as (\n \n select *\n from __dbt__cte__int_jira__issue_field_history\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates\n), __dbt__cte__int_jira__issue_versions as (\n\n\nwith version as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__version\"\n),\n\nversion_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as INT) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n \n listagg(version.version_name, ', ')\n\n as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final\n),issue as (\n\n select *\n from __dbt__cte__int_jira__issue_users\n\n),\n\nproject as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__project\"\n),\n\nstatus as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__status\"\n),\n\nstatus_category as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__status_category\"\n),\n\nresolution as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__resolution\"\n),\n\n\npriority as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__priority\"\n),\n\n\n\nissue_sprint as (\n\n select *\n from __dbt__cte__int_jira__issue_sprint\n),\n\n\n\nissue_comments as (\n\n select * \n from __dbt__cte__int_jira__issue_comments\n),\n\n\nissue_assignments_and_resolutions as (\n \n select *\n from __dbt__cte__int_jira__issue_assign_resolution\n\n),\n\n\nissue_versions as (\n\n select *\n from __dbt__cte__int_jira__issue_versions\n),\n\n\njoin_issue as (\n\n select\n issue.* \n\n ,project.project_name as project_name\n\n ,status.status_name as current_status\n ,status_category.status_category_name as current_status_category \n ,resolution.resolution_name as resolution_type\n \n ,priority.priority_name as current_priority\n\t\n\n \n ,issue_sprint.current_sprint_id\n ,issue_sprint.current_sprint_name\n ,coalesce(issue_sprint.count_sprint_changes, 0) as count_sprint_changes\n ,issue_sprint.sprint_started_at\n ,issue_sprint.sprint_ended_at\n ,issue_sprint.sprint_completed_at\n ,coalesce(issue_sprint.sprint_started_at <= getdate()\n and coalesce(issue_sprint.sprint_completed_at, getdate()) >= getdate() \n , false) as is_active_sprint -- If sprint doesn't have a start date, default to false. If it does have a start date, but no completed date, this means that the sprint is active. The ended_at timestamp is irrelevant here.\n \n\n ,issue_assignments_and_resolutions.first_assigned_at\n ,issue_assignments_and_resolutions.last_assigned_at\n ,issue_assignments_and_resolutions.first_resolved_at\n\n \n ,issue_versions.fixes_versions\n ,issue_versions.affects_versions\n \n\n \n ,issue_comments.conversation\n ,coalesce(issue_comments.count_comments, 0) as count_comments\n \n \n from issue\n left join project on project.project_id = issue.project_id\n left join status on status.status_id = issue.status_id\n left join status_category on status.status_category_id = status_category.status_category_id\n left join resolution on resolution.resolution_id = issue.resolution_id\n\t\n left join priority on priority.priority_id = issue.priority_id\n\t\n left join issue_assignments_and_resolutions on issue_assignments_and_resolutions.issue_id = issue.issue_id\n\n \n left join issue_versions on issue_versions.issue_id = issue.issue_id\n \n \n \n left join issue_sprint on issue_sprint.issue_id = issue.issue_id\n \n\n \n left join issue_comments on issue_comments.issue_id = issue.issue_id\n \n)\n\nselect * \nfrom join_issue", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_users", "sql": " __dbt__cte__int_jira__issue_users as (\n-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n \n\n select\n issue_id,\n coalesce(revised_parent_issue_id, parent_issue_id) as parent_issue_id,\n\n \"original_estimate_seconds\",\n \"remaining_estimate_seconds\",\n \"time_spent_seconds\",\n \"assignee_user_id\",\n \"created_at\",\n \"resolved_at\",\n \"creator_user_id\",\n \"issue_description\",\n \"due_date\",\n \"environment\",\n \"issue_type_id\",\n \"issue_key\",\n \"priority_id\",\n \"project_id\",\n \"reporter_user_id\",\n \"resolution_id\",\n \"status_id\",\n \"status_changed_at\",\n \"issue_name\",\n \"updated_at\",\n \"work_ratio\",\n \"_fivetran_synced\",\n \"issue_type\",\n \"parent_issue_type\",\n \"parent_issue_name\",\n \"parent_issue_key\",\n \"is_parent_epic\"\n\n\n \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_type_parents\"\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join\n)"}, {"id": "model.jira.int_jira__issue_multiselect_history", "sql": " __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_sprint", "sql": " __dbt__cte__int_jira__issue_sprint as (\n\n\nwith sprint as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__sprint\"\n\n),\n\nfield_history as (\n\n -- sprints don't appear to be capable of multiselect in the UI...\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n),\n\nsprint_field_history as (\n\n select \n field_history.*,\n sprint.*,\n row_number() over (\n partition by field_history.issue_id \n order by field_history.updated_at desc, sprint.started_at desc \n ) as row_num\n from field_history\n join sprint on field_history.field_value = cast(sprint.sprint_id as TEXT)\n where lower(field_history.field_name) = 'sprint'\n),\n\n\nlast_sprint as (\n\n select *\n from sprint_field_history\n \n where row_num = 1\n\n), \n\nsprint_rollovers as (\n\n select \n issue_id,\n count(distinct case when field_value is not null then field_value end) as count_sprint_changes\n \n from sprint_field_history\n group by 1\n\n),\n\nissue_sprint as (\n\n select \n last_sprint.issue_id,\n last_sprint.field_value as current_sprint_id,\n last_sprint.sprint_name as current_sprint_name,\n last_sprint.board_id,\n last_sprint.started_at as sprint_started_at,\n last_sprint.ended_at as sprint_ended_at,\n last_sprint.completed_at as sprint_completed_at,\n coalesce(sprint_rollovers.count_sprint_changes, 0) as count_sprint_changes\n\n from \n last_sprint \n left join sprint_rollovers on sprint_rollovers.issue_id = last_sprint.issue_id\n \n)\n\nselect * from issue_sprint\n)"}, {"id": "model.jira.int_jira__issue_comments", "sql": " __dbt__cte__int_jira__issue_comments as (\n\n\nwith comment as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__comment\"\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n \n listagg(comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body, '\\n')\n\n as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments\n)"}, {"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_assign_resolution", "sql": " __dbt__cte__int_jira__issue_assign_resolution as (\nwith issue_field_history as (\n \n select *\n from __dbt__cte__int_jira__issue_field_history\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates\n)"}, {"id": "model.jira.int_jira__issue_versions", "sql": " __dbt__cte__int_jira__issue_versions as (\n\n\nwith version as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__version\"\n),\n\nversion_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as INT) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n \n listagg(version.version_name, ', ')\n\n as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__issue_assign_resolution": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__issue_assign_resolution", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__issue_assign_resolution.sql", "original_file_path": "models/intermediate/int_jira__issue_assign_resolution.sql", "unique_id": "model.jira.int_jira__issue_assign_resolution", "fqn": ["jira", "intermediate", "int_jira__issue_assign_resolution"], "alias": "int_jira__issue_assign_resolution", "checksum": {"name": "sha256", "checksum": "dfb7de85baf9a3c025c42a119b3b72d723e07a91e884bf1f53615e68285ff6cb"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table grabbing dates related to the assignment and resolution of issues.", "columns": {"first_assigned_at": {"name": "first_assigned_at", "description": "Timestamp of when the issue was first assigned to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_assigned_at": {"name": "last_assigned_at", "description": "Timestamp of when the issue was last assigned to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_resolved_at": {"name": "first_resolved_at", "description": "Timestamp of when the issue was first resolved.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` that was assigned or resolved.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira"}, "created_at": 1695163463.0345228, "relation_name": null, "raw_code": "with issue_field_history as (\n \n select *\n from {{ ref('int_jira__issue_field_history') }}\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates", "language": "sql", "refs": [{"name": "int_jira__issue_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": [], "nodes": ["model.jira.int_jira__issue_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__issue_assign_resolution.sql", "compiled": true, "compiled_code": "with __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n),issue_field_history as (\n \n select *\n from __dbt__cte__int_jira__issue_field_history\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__issue_versions": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__issue_versions", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__issue_versions.sql", "original_file_path": "models/intermediate/int_jira__issue_versions.sql", "unique_id": "model.jira.int_jira__issue_versions", "fqn": ["jira", "intermediate", "int_jira__issue_versions"], "alias": "int_jira__issue_versions", "checksum": {"name": "sha256", "checksum": "d4f8c46a4d4cb7b328602ff032618139bc7fe834f102395d67846a1d1b8810a4"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table associating issues with the versions that they fix and/or affect. \n", "columns": {"issue_id": {"name": "issue_id", "description": "Foreign key referencing the `issue` tagged with these versions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "affects_versions": {"name": "affects_versions", "description": "Comma-separated list of the names of project versions that this issue affects.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fixes_versions": {"name": "fixes_versions", "description": "Comma-separated list of the names of project versions that this issue fixes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira", "enabled": true}, "created_at": 1695163463.036509, "relation_name": null, "raw_code": "{{ config(enabled=var('jira_using_versions', True)) }}\n\nwith version as (\n\n select *\n from {{ var('version') }}\n),\n\nversion_history as (\n\n select *\n from {{ ref('int_jira__issue_multiselect_history') }}\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as {{ dbt.type_int() }}) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n {{ fivetran_utils.string_agg('version.version_name', \"', '\") }} as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final", "language": "sql", "refs": [{"name": "stg_jira__version", "package": null, "version": null}, {"name": "int_jira__issue_multiselect_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.fivetran_utils.string_agg"], "nodes": ["model.jira_source.stg_jira__version", "model.jira.int_jira__issue_multiselect_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__issue_versions.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n),version as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__version\"\n),\n\nversion_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as INT) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n \n listagg(version.version_name, ', ')\n\n as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_multiselect_history", "sql": " __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__issue_users": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__issue_users", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__issue_users.sql", "original_file_path": "models/intermediate/int_jira__issue_users.sql", "unique_id": "model.jira.int_jira__issue_users", "fqn": ["jira", "intermediate", "int_jira__issue_users"], "alias": "int_jira__issue_users", "checksum": {"name": "sha256", "checksum": "c5ea290253d25de1e667a1a8927e5917262f85819fbe634a303e1522bcdd13c1"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table relating issues to attributes about their assignees and reporters. Builds off of the `int_jira__issue_type_parents` model.\n", "columns": {"issue_id": {"name": "issue_id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_name": {"name": "assignee_name", "description": "User display name of the person currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_name": {"name": "reporter_name", "description": "User display name of the person who reported the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_timezone": {"name": "assignee_timezone", "description": "Timezone of the user currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_email": {"name": "assignee_email", "description": "Email associated with the user currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_email": {"name": "reporter_email", "description": "Email associated with the user who reported this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_timezone": {"name": "reporter_timezone", "description": "Timezone of the user currently who reported this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_id": {"name": "parent_issue_id", "description": "Unique ID of the parent issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type": {"name": "issue_type", "description": "Name of the issue type (ie Epic, Task, Subtask, any custom types).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_name": {"name": "issue_name", "description": "Title of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_key": {"name": "issue_key", "description": "UI-facing id of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_type": {"name": "parent_issue_type", "description": "Name of the parent issue type (ie Epic, Task, Subtask, any custom types).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_name": {"name": "parent_issue_name", "description": "Title of the parent issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_key": {"name": "parent_issue_key", "description": "UI-facing id of the parent issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_parent_epic": {"name": "is_parent_epic", "description": "Boolean that is true if the parent is an epic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_user_id": {"name": "assignee_user_id", "description": "Foreign key referencing the ID of the `user` currently assigned to this task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the issue was created (in UTC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "creator_user_id": {"name": "creator_user_id", "description": "Foreign key referencing the `user` who first created the issue. Cannot be changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_description": {"name": "issue_description", "description": "The issue description, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "Calendar day on which the issue is due, if a due date is provided.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "environment": {"name": "environment", "description": "Text field describing the environment in which the issue occurred (ie \"IE9 on Windows 7\").", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type_id": {"name": "issue_type_id", "description": "Foreign key referencing the ID of the `issue_type`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "original_estimate_seconds": {"name": "original_estimate_seconds", "description": "The original estimate of how long working on this issue would take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority_id": {"name": "priority_id", "description": "Foreign key referencing the ID of the issue's current `priority`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the ID of the `project` that the issue belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "remaining_estimate_seconds": {"name": "remaining_estimate_seconds", "description": "The estimate of how much longer working on this issue will take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_user_id": {"name": "reporter_user_id", "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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_id": {"name": "resolution_id", "description": "Foreign key referencing the ID of the issue's type of `resolution`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolved_at": {"name": "resolved_at", "description": "Timestamp of when the issue was resolved (ie completed, marked as duplicate). If an issue is un-resolved, this will be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Foreign key referencing the ID of the issue's `status` (the step that the issue is currently at in the project's workflow).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_changed_at": {"name": "status_changed_at", "description": "Timestamp of when the status was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_spent_seconds": {"name": "time_spent_seconds", "description": "The time that was spent working on this issue, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue was last updated in some way.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "work_ratio": {"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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira"}, "created_at": 1695163463.024071, "relation_name": null, "raw_code": "-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n {% set except_columns = [\"revised_parent_issue_id\", \"parent_issue_id\", \"issue_id\"] %}\n\n select\n issue_id,\n coalesce(revised_parent_issue_id, parent_issue_id) as parent_issue_id,\n\n {{ dbt_utils.star(from=ref('int_jira__issue_type_parents'), \n except=except_columns) }}\n\n\n \n from {{ ref('int_jira__issue_type_parents') }}\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from {{ var('user') }}\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join", "language": "sql", "refs": [{"name": "int_jira__issue_type_parents", "package": null, "version": null}, {"name": "int_jira__issue_type_parents", "package": null, "version": null}, {"name": "stg_jira__user", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": ["model.jira.int_jira__issue_type_parents", "model.jira.int_jira__issue_type_parents", "model.jira_source.stg_jira__user"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__issue_users.sql", "compiled": true, "compiled_code": "-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n \n\n select\n issue_id,\n coalesce(revised_parent_issue_id, parent_issue_id) as parent_issue_id,\n\n \"original_estimate_seconds\",\n \"remaining_estimate_seconds\",\n \"time_spent_seconds\",\n \"assignee_user_id\",\n \"created_at\",\n \"resolved_at\",\n \"creator_user_id\",\n \"issue_description\",\n \"due_date\",\n \"environment\",\n \"issue_type_id\",\n \"issue_key\",\n \"priority_id\",\n \"project_id\",\n \"reporter_user_id\",\n \"resolution_id\",\n \"status_id\",\n \"status_changed_at\",\n \"issue_name\",\n \"updated_at\",\n \"work_ratio\",\n \"_fivetran_synced\",\n \"issue_type\",\n \"parent_issue_type\",\n \"parent_issue_name\",\n \"parent_issue_key\",\n \"is_parent_epic\"\n\n\n \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_type_parents\"\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__issue_sprint": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__issue_sprint", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__issue_sprint.sql", "original_file_path": "models/intermediate/int_jira__issue_sprint.sql", "unique_id": "model.jira.int_jira__issue_sprint", "fqn": ["jira", "intermediate", "int_jira__issue_sprint"], "alias": "int_jira__issue_sprint", "checksum": {"name": "sha256", "checksum": "db877518ad36ad7d838a637fa39dcadaa99b94fe8abf8787ac2f1c00cbefd97c"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table relating issues to the sprints they currently belong to.", "columns": {"issue_id": {"name": "issue_id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_sprint_id": {"name": "current_sprint_id", "description": "Unique ID of the sprint.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_sprint_name": {"name": "current_sprint_name", "description": "Title of the sprint.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "board_id": {"name": "board_id", "description": "Foreign key referencing the ID of the `board` that the sprint lives in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_started_at": {"name": "sprint_started_at", "description": "Timestamp of when the sprint began.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_ended_at": {"name": "sprint_ended_at", "description": "Timestamp of when the sprint is planned to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_completed_at": {"name": "sprint_completed_at", "description": "Timestamp of when the sprint was completed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_sprint_changes": {"name": "count_sprint_changes", "description": "The total number of sprints that the issue has belonged to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira", "enabled": true}, "created_at": 1695163463.0126379, "relation_name": null, "raw_code": "{{ config(enabled=var('jira_using_sprints', True)) }}\n\nwith sprint as (\n\n select * \n from {{ var('sprint') }}\n\n),\n\nfield_history as (\n\n -- sprints don't appear to be capable of multiselect in the UI...\n select *\n from {{ ref('int_jira__issue_multiselect_history') }}\n\n),\n\nsprint_field_history as (\n\n select \n field_history.*,\n sprint.*,\n row_number() over (\n partition by field_history.issue_id \n order by field_history.updated_at desc, sprint.started_at desc \n ) as row_num\n from field_history\n join sprint on field_history.field_value = cast(sprint.sprint_id as {{ dbt.type_string() }})\n where lower(field_history.field_name) = 'sprint'\n),\n\n\nlast_sprint as (\n\n select *\n from sprint_field_history\n \n where row_num = 1\n\n), \n\nsprint_rollovers as (\n\n select \n issue_id,\n count(distinct case when field_value is not null then field_value end) as count_sprint_changes\n \n from sprint_field_history\n group by 1\n\n),\n\nissue_sprint as (\n\n select \n last_sprint.issue_id,\n last_sprint.field_value as current_sprint_id,\n last_sprint.sprint_name as current_sprint_name,\n last_sprint.board_id,\n last_sprint.started_at as sprint_started_at,\n last_sprint.ended_at as sprint_ended_at,\n last_sprint.completed_at as sprint_completed_at,\n coalesce(sprint_rollovers.count_sprint_changes, 0) as count_sprint_changes\n\n from \n last_sprint \n left join sprint_rollovers on sprint_rollovers.issue_id = last_sprint.issue_id\n \n)\n\nselect * from issue_sprint", "language": "sql", "refs": [{"name": "stg_jira__sprint", "package": null, "version": null}, {"name": "int_jira__issue_multiselect_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.type_string"], "nodes": ["model.jira_source.stg_jira__sprint", "model.jira.int_jira__issue_multiselect_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__issue_sprint.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n),sprint as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__sprint\"\n\n),\n\nfield_history as (\n\n -- sprints don't appear to be capable of multiselect in the UI...\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n),\n\nsprint_field_history as (\n\n select \n field_history.*,\n sprint.*,\n row_number() over (\n partition by field_history.issue_id \n order by field_history.updated_at desc, sprint.started_at desc \n ) as row_num\n from field_history\n join sprint on field_history.field_value = cast(sprint.sprint_id as TEXT)\n where lower(field_history.field_name) = 'sprint'\n),\n\n\nlast_sprint as (\n\n select *\n from sprint_field_history\n \n where row_num = 1\n\n), \n\nsprint_rollovers as (\n\n select \n issue_id,\n count(distinct case when field_value is not null then field_value end) as count_sprint_changes\n \n from sprint_field_history\n group by 1\n\n),\n\nissue_sprint as (\n\n select \n last_sprint.issue_id,\n last_sprint.field_value as current_sprint_id,\n last_sprint.sprint_name as current_sprint_name,\n last_sprint.board_id,\n last_sprint.started_at as sprint_started_at,\n last_sprint.ended_at as sprint_ended_at,\n last_sprint.completed_at as sprint_completed_at,\n coalesce(sprint_rollovers.count_sprint_changes, 0) as count_sprint_changes\n\n from \n last_sprint \n left join sprint_rollovers on sprint_rollovers.issue_id = last_sprint.issue_id\n \n)\n\nselect * from issue_sprint", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_multiselect_history", "sql": " __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__issue_comments": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__issue_comments", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__issue_comments.sql", "original_file_path": "models/intermediate/int_jira__issue_comments.sql", "unique_id": "model.jira.int_jira__issue_comments", "fqn": ["jira", "intermediate", "int_jira__issue_comments"], "alias": "int_jira__issue_comments", "checksum": {"name": "sha256", "checksum": "7775067304651e37ed93c0ec86a2f54c83c24d31ab5205e16b0a075b58b84dfe"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table aggregating issue comments into conversations.", "columns": {"issue_id": {"name": "issue_id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "conversation": {"name": "conversation", "description": "Line-separated list of comments made on this issue, including the timestamp and author name of each comment.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_comments": {"name": "count_comments", "description": "The number of comments made on this issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira", "enabled": true}, "created_at": 1695163463.0103989, "relation_name": null, "raw_code": "{{ config(enabled=var('jira_include_comments', True)) }}\n\nwith comment as (\n\n select *\n from {{ var('comment') }}\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from {{ var('user') }}\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n {{ fivetran_utils.string_agg( \"comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body\", \"'\\\\n'\" ) }} as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments", "language": "sql", "refs": [{"name": "stg_jira__comment", "package": null, "version": null}, {"name": "stg_jira__user", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.fivetran_utils.string_agg"], "nodes": ["model.jira_source.stg_jira__comment", "model.jira_source.stg_jira__user"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__issue_comments.sql", "compiled": true, "compiled_code": "\n\nwith comment as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__comment\"\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n \n listagg(comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body, '\\n')\n\n as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__project_metrics": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__project_metrics", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__project_metrics.sql", "original_file_path": "models/intermediate/int_jira__project_metrics.sql", "unique_id": "model.jira.int_jira__project_metrics", "fqn": ["jira", "intermediate", "int_jira__project_metrics"], "alias": "int_jira__project_metrics", "checksum": {"name": "sha256", "checksum": "67da27ce216c6bf42dd56d65afaaa732571f82e27aae73934ad43f73f86b6178"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table calculating issue-related metrics per project.", "columns": {"project_id": {"name": "project_id", "description": "Unique ID of the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_closed_issues": {"name": "count_closed_issues", "description": "The number of issues closed in this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_open_issues": {"name": "count_open_issues", "description": "The number of currently un-resolved issues in the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_open_assigned_issues": {"name": "count_open_assigned_issues", "description": "The number of currently open and currently assigned issues in the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_close_time_seconds": {"name": "avg_close_time_seconds", "description": "The average time taken to close issues, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_assigned_close_time_seconds": {"name": "avg_assigned_close_time_seconds", "description": "The average time taken to close issues from their first assignment, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_seconds": {"name": "avg_age_currently_open_seconds", "description": "The average age of any currently-open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_assigned_seconds": {"name": "avg_age_currently_open_assigned_seconds", "description": "The average age of any currently-open issues, from their first assignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_close_time_seconds": {"name": "median_close_time_seconds", "description": "The median time taken to close issues, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_seconds": {"name": "median_age_currently_open_seconds", "description": "The median age of any currently-open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_assigned_close_time_seconds": {"name": "median_assigned_close_time_seconds", "description": "The median time taken to close issues from their first assignment, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_assigned_seconds": {"name": "median_age_currently_open_assigned_seconds", "description": "The median age of any currently-open issues, from their first assignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_close_time_days": {"name": "avg_close_time_days", "description": "The average time taken to close issues, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_assigned_close_time_days": {"name": "avg_assigned_close_time_days", "description": "The average time taken to close issues from their first assignment, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_days": {"name": "avg_age_currently_open_days", "description": "The average age of any currently-open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_assigned_days": {"name": "avg_age_currently_open_assigned_days", "description": "The average age of any currently-open issues, from their first assignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_close_time_days": {"name": "median_close_time_days", "description": "The median time taken to close issues, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_days": {"name": "median_age_currently_open_days", "description": "The median age of any currently-open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_assigned_close_time_days": {"name": "median_assigned_close_time_days", "description": "The median time taken to close issues from their first assignment, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_assigned_days": {"name": "median_age_currently_open_assigned_days", "description": "The median age of any currently-open issues, from their first assignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira"}, "created_at": 1695163463.007345, "relation_name": null, "raw_code": "with issue as (\n\n select * \n from {{ ref('jira__issue_enhanced') }}\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( {{ fivetran_utils.percentile(percentile_field='case when resolved_at is not null then open_duration_seconds end', \n partition_field='project_id', percent='0.5') }} as {{ dbt.type_numeric() }} ), 0) as median_close_time_seconds,\n round( cast({{ fivetran_utils.percentile(percentile_field='case when resolved_at is null then open_duration_seconds end', \n partition_field='project_id', percent='0.5') }} as {{ dbt.type_numeric() }} ), 0) as median_age_currently_open_seconds,\n\n round( cast({{ fivetran_utils.percentile(percentile_field='case when resolved_at is not null then any_assignment_duration_seconds end', \n partition_field='project_id', percent='0.5') }} as {{ dbt.type_numeric() }} ), 0) as median_assigned_close_time_seconds,\n round( cast({{ fivetran_utils.percentile(percentile_field='case when resolved_at is null then any_assignment_duration_seconds end', \n partition_field='project_id', percent='0.5') }} as {{ dbt.type_numeric() }} ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n {% if target.type == 'postgres' %} group by project_id {% endif %}\n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as {{ dbt.type_numeric() }} ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as {{ dbt.type_numeric() }} ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as {{ dbt.type_numeric() }} ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as {{ dbt.type_numeric() }} ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics", "language": "sql", "refs": [{"name": "jira__issue_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.fivetran_utils.percentile", "macro.dbt.type_numeric"], "nodes": ["model.jira.jira__issue_enhanced"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__project_metrics.sql", "compiled": true, "compiled_code": "with issue as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\"\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then open_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then open_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_age_currently_open_seconds,\n\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then any_assignment_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_assigned_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then any_assignment_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n \n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as numeric(28,6) ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as numeric(28,6) ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__issue_multiselect_history": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__issue_multiselect_history", "resource_type": "model", "package_name": "jira", "path": "intermediate/field_history/int_jira__issue_multiselect_history.sql", "original_file_path": "models/intermediate/field_history/int_jira__issue_multiselect_history.sql", "unique_id": "model.jira.int_jira__issue_multiselect_history", "fqn": ["jira", "intermediate", "field_history", "int_jira__issue_multiselect_history"], "alias": "int_jira__issue_multiselect_history", "checksum": {"name": "sha256", "checksum": "58dd631d9f703aaf2571578adb22943919b6d52c39b10de180aa76eff513d76e"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of every value that each array-type (multiselect) field has been set to. Each row will pertain to **one** value. This model serves to append the `field_name` to each record.\n", "columns": {"_fivetran_id": {"name": "_fivetran_id", "description": "Fivetran-generated ID hashed on field, issue, and value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue field was updated to included this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_id": {"name": "field_id", "description": "Foreign key referencing the ID of the `field` that was changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_value": {"name": "field_value", "description": "Content of the value of that the field was set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_name": {"name": "field_name", "description": "Name of the field as it appears on issue cards.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira"}, "created_at": 1695163463.033559, "relation_name": null, "raw_code": "with issue_multiselect_history as (\n\n select *\n from {{ var('issue_multiselect_history') }}\n \n), \n\nfields as (\n \n select *\n from {{ var('field') }}\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined", "language": "sql", "refs": [{"name": "stg_jira__issue_multiselect_history", "package": null, "version": null}, {"name": "stg_jira__field", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": [], "nodes": ["model.jira_source.stg_jira__issue_multiselect_history", "model.jira_source.stg_jira__field"]}, "compiled_path": "target/compiled/jira/models/intermediate/field_history/int_jira__issue_multiselect_history.sql", "compiled": true, "compiled_code": "with issue_multiselect_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__pivot_daily_field_history": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__pivot_daily_field_history", "resource_type": "model", "package_name": "jira", "path": "intermediate/field_history/int_jira__pivot_daily_field_history.sql", "original_file_path": "models/intermediate/field_history/int_jira__pivot_daily_field_history.sql", "unique_id": "model.jira.int_jira__pivot_daily_field_history", "fqn": ["jira", "intermediate", "field_history", "int_jira__pivot_daily_field_history"], "alias": "int_jira__pivot_daily_field_history", "checksum": {"name": "sha256", "checksum": "a6f55597ea7b9e244ce56fa39acfacc44cb41e5fd27a9ebf4ee4b514a10551d6"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "issue_day_id", "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "partition_by": {"field": "valid_starting_on", "data_type": "date"}, "file_format": "delta", "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table pivoting out the fields in `int_jira__daily_field_history` into columns, in which the value of each field column is the latest value updated a given day.\n", "columns": {"valid_starting_on": {"name": "valid_starting_on", "description": "Calendar date of when the field was changed to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint": {"name": "sprint", "description": "The ID of the sprint that an issue is slotted into on a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "The ID of the status that an issue has on a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_day_id": {"name": "issue_day_id", "description": "Unique ID hashed on `valid_starting_on` and `issue_field_history`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "int_jira", "partition_by": {"field": "valid_starting_on", "data_type": "date"}, "unique_key": "issue_day_id", "incremental_strategy": "delete+insert", "file_format": "delta"}, "created_at": 1695163463.031106, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__pivot_daily_field_history\"", "raw_code": "{{\n config(\n materialized='incremental',\n partition_by = {'field': 'valid_starting_on', 'data_type': 'date'}\n if target.type not in ['spark','databricks'] else ['valid_starting_on'],\n unique_key='issue_day_id',\n incremental_strategy = 'merge' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n-- latest value per issue field (already limited included fields to sprint, status, and var(issue_field_history_columns))\nwith daily_field_history as (\n\n select * \n from {{ ref('int_jira__daily_field_history') }}\n\n {% if is_incremental() %}\n where valid_starting_on >= (select max(valid_starting_on) from {{ this }} )\n {% endif %}\n),\n\npivot_out as (\n\n -- pivot out default columns (status and sprint) and others specified in the var(issue_field_history_columns)\n -- only days on which a field value was actively changed will have a non-null value. the nulls will need to \n -- be backfilled in the final jira__daily_issue_field_history model\n select \n valid_starting_on, \n issue_id,\n max(case when lower(field_id) = 'status' then field_value end) as status,\n max(case when lower(field_name) = 'sprint' then field_value end) as sprint\n\n {% for col in var('issue_field_history_columns', []) -%}\n ,\n max(case when lower(field_name) = '{{ col|lower }}' then field_value end) as {{ dbt_utils.slugify(col) | replace(' ', '_') | lower }}\n {% endfor -%}\n\n from daily_field_history\n\n group by 1,2\n),\n\nsurrogate_key as (\n\n select \n *,\n {{ dbt_utils.generate_surrogate_key(['valid_starting_on','issue_id']) }} as issue_day_id\n\n from pivot_out\n)\n\nselect * from surrogate_key", "language": "sql", "refs": [{"name": "int_jira__daily_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.slugify", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.jira.int_jira__daily_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/field_history/int_jira__pivot_daily_field_history.sql", "compiled": true, "compiled_code": "\n\n-- latest value per issue field (already limited included fields to sprint, status, and var(issue_field_history_columns))\nwith daily_field_history as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__daily_field_history\"\n\n \n where valid_starting_on >= (select max(valid_starting_on) from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__pivot_daily_field_history\" )\n \n),\n\npivot_out as (\n\n -- pivot out default columns (status and sprint) and others specified in the var(issue_field_history_columns)\n -- only days on which a field value was actively changed will have a non-null value. the nulls will need to \n -- be backfilled in the final jira__daily_issue_field_history model\n select \n valid_starting_on, \n issue_id,\n max(case when lower(field_id) = 'status' then field_value end) as status,\n max(case when lower(field_name) = 'sprint' then field_value end) as sprint\n\n ,\n max(case when lower(field_name) = 'summary' then field_value end) as summary\n ,\n max(case when lower(field_name) = 'story points' then field_value end) as story_points\n ,\n max(case when lower(field_name) = 'components' then field_value end) as components\n from daily_field_history\n\n group by 1,2\n),\n\nsurrogate_key as (\n\n select \n *,\n md5(cast(coalesce(cast(valid_starting_on as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as issue_day_id\n\n from pivot_out\n)\n\nselect * from surrogate_key", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__issue_calendar_spine": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__issue_calendar_spine", "resource_type": "model", "package_name": "jira", "path": "intermediate/field_history/int_jira__issue_calendar_spine.sql", "original_file_path": "models/intermediate/field_history/int_jira__issue_calendar_spine.sql", "unique_id": "model.jira.int_jira__issue_calendar_spine", "fqn": ["jira", "intermediate", "field_history", "int_jira__issue_calendar_spine"], "alias": "int_jira__issue_calendar_spine", "checksum": {"name": "sha256", "checksum": "bbd5267be5180bf3eda82de804c7159fd925ddb90864ae3cfb081f29f81ff952"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "issue_day_id", "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta", "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table relating every issue to every day it was open (plus a buffer of one month, in case the issue is re-opened, as this model is materialized incrementally).\n", "columns": {"date_day": {"name": "date_day", "description": "Calendar date on which the issue was open.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the unique ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_day_id": {"name": "issue_day_id", "description": "Unique ID hashed on `date_day` and `issue_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "earliest_open_until_date": {"name": "earliest_open_until_date", "description": "Used for incremental materialization logic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "int_jira", "partition_by": {"field": "date_day", "data_type": "date"}, "unique_key": "issue_day_id", "incremental_strategy": "delete+insert", "file_format": "delta"}, "created_at": 1695163463.0283258, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_calendar_spine\"", "raw_code": "{{\n config(\n materialized='incremental',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='issue_day_id',\n incremental_strategy = 'merge' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\nwith spine as (\n\n {% if execute %}\n {% set first_date_query %}\n -- start at the first created issue\n select min( created ) as min_date from {{ source('jira','issue') }}\n {% endset %}\n {% set first_date = run_query(first_date_query).columns[0][0]|string %}\n \n {% else %} {% set first_date = \"2016-01-01\" %}\n {% endif %}\n\n\n select * \n from (\n {{\n dbt_utils.date_spine(\n datepart = \"day\", \n start_date = \"cast('\" ~ first_date[0:10] ~ \"' as date)\", \n end_date = dbt.dateadd(\"week\", 1, dbt.current_timestamp_in_utc_backcompat())\n ) \n }} \n ) as date_spine\n\n {% if is_incremental() %}\n -- compare to the earliest possible open_until date so that if a resolved issue is updated after a long period of inactivity, we don't need a full refresh\n -- essentially we need to be able to backfill\n where cast( date_day as date) >= (select min(earliest_open_until_date) from {{ this }} )\n {% endif %}\n),\n\nissue_history_scd as (\n \n select *\n from {{ ref('int_jira__field_history_scd') }}\n),\n\nissue_dates as (\n\n select\n issue_history_scd.issue_id,\n cast( {{ dbt.date_trunc('day', 'issue.created_at') }} as date) as created_on,\n -- resolved_at will become null if an issue is marked as un-resolved. if this sorta thing happens often, you may want to run full-refreshes of the field_history models often\n -- if it's not resolved include everything up to today. if it is, look at the last time it was updated \n cast({{ dbt.date_trunc('day', 'case when issue.resolved_at is null then ' ~ dbt.current_timestamp_in_utc_backcompat() ~ ' else cast(issue_history_scd.valid_starting_on as ' ~ dbt.type_timestamp() ~ ') end') }} as date) as open_until\n from issue_history_scd\n left join {{ var('issue') }} as issue\n on issue_history_scd.issue_id = issue.issue_id\n),\n\nissue_spine as (\n\n select \n cast(spine.date_day as date) as date_day,\n issue_dates.issue_id,\n -- will take the table-wide min of this in the incremental block at the top of this model\n min(issue_dates.open_until) as earliest_open_until_date\n\n from spine \n join issue_dates on\n issue_dates.created_on <= spine.date_day\n and {{ dbt.dateadd('month', var('jira_issue_history_buffer', 1), 'issue_dates.open_until') }} >= spine.date_day\n -- if we cut off issues, we're going to have to do a full refresh to catch issues that have been un-resolved\n\n group by 1,2\n),\n\nsurrogate_key as (\n\n select \n date_day,\n issue_id,\n {{ dbt_utils.generate_surrogate_key(['date_day','issue_id']) }} as issue_day_id,\n earliest_open_until_date\n\n from issue_spine\n\n where date_day <= cast( {{ dbt.date_trunc('day',dbt.current_timestamp_in_utc_backcompat()) }} as date)\n)\nselect * from surrogate_key", "language": "sql", "refs": [{"name": "int_jira__field_history_scd", "package": null, "version": null}, {"name": "stg_jira__issue", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.current_timestamp_in_utc_backcompat", "macro.dbt.dateadd", "macro.dbt_utils.date_spine", "macro.dbt.is_incremental", "macro.dbt.date_trunc", "macro.dbt.type_timestamp", "macro.dbt_utils.generate_surrogate_key", "macro.dbt.run_query"], "nodes": ["model.jira.int_jira__field_history_scd", "model.jira_source.stg_jira__issue"]}, "compiled_path": "target/compiled/jira/models/intermediate/field_history/int_jira__issue_calendar_spine.sql", "compiled": true, "compiled_code": "\n\nwith spine as (\n\n \n \n \n \n \n\n\n select * \n from (\n \n\n\n\n\n\nwith rawdata as (\n\n \n\n \n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n \n p0.generated_number * power(2, 0)\n + \n \n p1.generated_number * power(2, 1)\n + \n \n p2.generated_number * power(2, 2)\n + \n \n p3.generated_number * power(2, 3)\n + \n \n p4.generated_number * power(2, 4)\n + \n \n p5.generated_number * power(2, 5)\n + \n \n p6.generated_number * power(2, 6)\n + \n \n p7.generated_number * power(2, 7)\n + \n \n p8.generated_number * power(2, 8)\n + \n \n p9.generated_number * power(2, 9)\n + \n \n p10.generated_number * power(2, 10)\n \n \n + 1\n as generated_number\n\n from\n\n \n p as p0\n cross join \n \n p as p1\n cross join \n \n p as p2\n cross join \n \n p as p3\n cross join \n \n p as p4\n cross join \n \n p as p5\n cross join \n \n p as p6\n cross join \n \n p as p7\n cross join \n \n p as p8\n cross join \n \n p as p9\n cross join \n \n p as p10\n \n \n\n )\n\n select *\n from unioned\n where generated_number <= 1273\n order by generated_number\n\n\n\n),\n\nall_periods as (\n\n select (\n \n\n dateadd(\n day,\n row_number() over (order by 1) - 1,\n cast('2020-04-01' as date)\n )\n\n\n ) as date_day\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_day <= \n\n dateadd(\n week,\n 1,\n getdate()\n )\n\n\n\n)\n\nselect * from filtered\n\n \n ) as date_spine\n\n \n -- compare to the earliest possible open_until date so that if a resolved issue is updated after a long period of inactivity, we don't need a full refresh\n -- essentially we need to be able to backfill\n where cast( date_day as date) >= (select min(earliest_open_until_date) from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_calendar_spine\" )\n \n),\n\nissue_history_scd as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__field_history_scd\"\n),\n\nissue_dates as (\n\n select\n issue_history_scd.issue_id,\n cast( date_trunc('day', issue.created_at) as date) as created_on,\n -- resolved_at will become null if an issue is marked as un-resolved. if this sorta thing happens often, you may want to run full-refreshes of the field_history models often\n -- if it's not resolved include everything up to today. if it is, look at the last time it was updated \n cast(date_trunc('day', case when issue.resolved_at is null then getdate() else cast(issue_history_scd.valid_starting_on as TIMESTAMP) end) as date) as open_until\n from issue_history_scd\n left join \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue\" as issue\n on issue_history_scd.issue_id = issue.issue_id\n),\n\nissue_spine as (\n\n select \n cast(spine.date_day as date) as date_day,\n issue_dates.issue_id,\n -- will take the table-wide min of this in the incremental block at the top of this model\n min(issue_dates.open_until) as earliest_open_until_date\n\n from spine \n join issue_dates on\n issue_dates.created_on <= spine.date_day\n and \n\n dateadd(\n month,\n 1,\n issue_dates.open_until\n )\n\n >= spine.date_day\n -- if we cut off issues, we're going to have to do a full refresh to catch issues that have been un-resolved\n\n group by 1,2\n),\n\nsurrogate_key as (\n\n select \n date_day,\n issue_id,\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as issue_day_id,\n earliest_open_until_date\n\n from issue_spine\n\n where date_day <= cast( date_trunc('day', getdate()) as date)\n)\nselect * from surrogate_key", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__agg_multiselect_history": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__agg_multiselect_history", "resource_type": "model", "package_name": "jira", "path": "intermediate/field_history/int_jira__agg_multiselect_history.sql", "original_file_path": "models/intermediate/field_history/int_jira__agg_multiselect_history.sql", "unique_id": "model.jira.int_jira__agg_multiselect_history", "fqn": ["jira", "intermediate", "field_history", "int_jira__agg_multiselect_history"], "alias": "int_jira__agg_multiselect_history", "checksum": {"name": "sha256", "checksum": "ac596d51d82bf11d5f85d83b7f1b14024d9673e04cea0fce13ed730fbbc0b60f"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "batch_id", "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta", "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table aggregating batches of multiselect field values, which are split out individually in `issue_multiselect_history`. This is necessary to combine the 2 issue field history tables together.\n", "columns": {"field_id": {"name": "field_id", "description": "Foreign key referencing the ID of the `field` that was changed.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue field was updated to included this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "batch_id": {"name": "batch_id", "description": "Unique key hashed on field_id, issue_id, and updated_at.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_values": {"name": "field_values", "description": "Comma-separated list of the batch's values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Calendar date on which the batch of values was applied to the issue field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_name": {"name": "field_name", "description": "Name of the field as it appears on issue cards.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "int_jira", "partition_by": {"field": "date_day", "data_type": "date"}, "unique_key": "batch_id", "incremental_strategy": "delete+insert", "file_format": "delta"}, "created_at": 1695163463.025569, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__agg_multiselect_history\"", "raw_code": "{{\n config(\n materialized='incremental',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='batch_id',\n incremental_strategy = 'merge' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n-- issue_multiselect_history splits out an array-type field into multiple rows with unique individual values\n-- to combine with issue_field_history we need to aggregate the multiselect field values.\n\nwith issue_multiselect_history as (\n\n select *\n from {{ ref('int_jira__issue_multiselect_history') }}\n\n {% if is_incremental() %}\n -- always refresh the most recent day of data\n where cast(updated_at as date) >= {{ dbt.dateadd('day', -1, '(select max(date_day) from ' ~ this ~ ')') }}\n {% endif %}\n\n),\n\n-- each field value has its own row, but each batch of values for that field has the same timestamp\nbatch_updates as (\n\n select \n *,\n {{ dbt_utils.generate_surrogate_key([var('jira_field_grain', 'field_id'), 'issue_id', 'updated_at']) }} as batch_id\n\n from issue_multiselect_history \n),\n\nconsolidate_batches as (\n\n select \n field_id,\n field_name,\n issue_id,\n updated_at,\n batch_id,\n cast( {{ dbt.date_trunc('day', 'updated_at') }} as date) as date_day,\n\n -- if the field refers to an object captured in a table elsewhere (ie sprint, users, field_option for custom fields),\n -- the value is actually a foreign key to that table. \n {{ fivetran_utils.string_agg('batch_updates.field_value', \"', '\") }} as field_values \n\n from batch_updates\n\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom consolidate_batches", "language": "sql", "refs": [{"name": "int_jira__issue_multiselect_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.generate_surrogate_key", "macro.dbt.date_trunc", "macro.fivetran_utils.string_agg", "macro.dbt.dateadd"], "nodes": ["model.jira.int_jira__issue_multiselect_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/field_history/int_jira__agg_multiselect_history.sql", "compiled": true, "compiled_code": "\n\n-- issue_multiselect_history splits out an array-type field into multiple rows with unique individual values\n-- to combine with issue_field_history we need to aggregate the multiselect field values.\n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n),issue_multiselect_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n \n -- always refresh the most recent day of data\n where cast(updated_at as date) >= \n\n dateadd(\n day,\n -1,\n (select max(date_day) from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__agg_multiselect_history\")\n )\n\n\n \n\n),\n\n-- each field value has its own row, but each batch of values for that field has the same timestamp\nbatch_updates as (\n\n select \n *,\n md5(cast(coalesce(cast(field_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(updated_at as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as batch_id\n\n from issue_multiselect_history \n),\n\nconsolidate_batches as (\n\n select \n field_id,\n field_name,\n issue_id,\n updated_at,\n batch_id,\n cast( date_trunc('day', updated_at) as date) as date_day,\n\n -- if the field refers to an object captured in a table elsewhere (ie sprint, users, field_option for custom fields),\n -- the value is actually a foreign key to that table. \n \n listagg(batch_updates.field_value, ', ')\n\n as field_values \n\n from batch_updates\n\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom consolidate_batches", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_multiselect_history", "sql": " __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__field_history_scd": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__field_history_scd", "resource_type": "model", "package_name": "jira", "path": "intermediate/field_history/int_jira__field_history_scd.sql", "original_file_path": "models/intermediate/field_history/int_jira__field_history_scd.sql", "unique_id": "model.jira.int_jira__field_history_scd", "fqn": ["jira", "intermediate", "field_history", "int_jira__field_history_scd"], "alias": "int_jira__field_history_scd", "checksum": {"name": "sha256", "checksum": "b85132de5613eaf47fd7c8726a80a037dc9fb3806ea42c480ff2aaabf05aa3c2"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Slowly-changing-dimension model that fills values from differnt fields in the pivoted daily history model. Note: this is the singular field history-related model that is not incremental (materialized as table)\n", "columns": {"valid_starting_on": {"name": "valid_starting_on", "description": "Calendar date of when the field was changed to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint": {"name": "sprint", "description": "The ID of the sprint that an issue is slotted into on a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "The ID of the status that an issue has on a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_day_id": {"name": "issue_day_id", "description": "Unique ID hashed on `valid_starting_on` and `issue_field_history`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "int_jira"}, "created_at": 1695163463.0356338, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__field_history_scd\"", "raw_code": "{{ config( materialized='table') }}\n\n{%- set issue_columns = adapter.get_columns_in_relation(ref('int_jira__pivot_daily_field_history')) -%}\n\nwith change_data as (\n\n select *\n from {{ ref('int_jira__pivot_daily_field_history') }}\n\n), set_values as (\n\n select \n valid_starting_on, \n issue_id,\n issue_day_id,\n status as status_id,\n sum( case when status is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as status_id_field_partition\n\n {% for col in issue_columns if col.name|lower not in ['valid_starting_on','issue_id','issue_day_id'] %} \n , {{ col.name }}\n -- create a batch/partition once a new value is provided\n , sum( case when {{ col.name }} is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as {{ col.name }}_field_partition\n\n {% endfor %}\n \n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes field values if that field was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid \n select \n valid_starting_on, \n issue_id,\n issue_day_id,\n first_value( status ) over (\n partition by issue_id, status_id_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as status_id\n \n {% for col in issue_columns if col.name|lower not in ['valid_starting_on','issue_id','issue_day_id'] %} \n\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by issue_id, {{ col.name }}_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as {{ col.name }}\n\n {% endfor %}\n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "language": "sql", "refs": [{"name": "int_jira__pivot_daily_field_history", "package": null, "version": null}, {"name": "int_jira__pivot_daily_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": [], "nodes": ["model.jira.int_jira__pivot_daily_field_history", "model.jira.int_jira__pivot_daily_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/field_history/int_jira__field_history_scd.sql", "compiled": true, "compiled_code": "with change_data as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__pivot_daily_field_history\"\n\n), set_values as (\n\n select \n valid_starting_on, \n issue_id,\n issue_day_id,\n status as status_id,\n sum( case when status is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as status_id_field_partition\n\n \n , status\n -- create a batch/partition once a new value is provided\n , sum( case when status is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as status_field_partition\n\n \n , sprint\n -- create a batch/partition once a new value is provided\n , sum( case when sprint is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as sprint_field_partition\n\n \n , summary\n -- create a batch/partition once a new value is provided\n , sum( case when summary is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as summary_field_partition\n\n \n , story_points\n -- create a batch/partition once a new value is provided\n , sum( case when story_points is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as story_points_field_partition\n\n \n , components\n -- create a batch/partition once a new value is provided\n , sum( case when components is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as components_field_partition\n\n \n \n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes field values if that field was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid \n select \n valid_starting_on, \n issue_id,\n issue_day_id,\n first_value( status ) over (\n partition by issue_id, status_id_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as status_id\n \n \n\n -- grab the value that started this batch/partition\n , first_value( status ) over (\n partition by issue_id, status_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as status\n\n \n\n -- grab the value that started this batch/partition\n , first_value( sprint ) over (\n partition by issue_id, sprint_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as sprint\n\n \n\n -- grab the value that started this batch/partition\n , first_value( summary ) over (\n partition by issue_id, summary_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as summary\n\n \n\n -- grab the value that started this batch/partition\n , first_value( story_points ) over (\n partition by issue_id, story_points_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as story_points\n\n \n\n -- grab the value that started this batch/partition\n , first_value( components ) over (\n partition by issue_id, components_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as components\n\n \n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__combine_field_histories": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__combine_field_histories", "resource_type": "model", "package_name": "jira", "path": "intermediate/field_history/int_jira__combine_field_histories.sql", "original_file_path": "models/intermediate/field_history/int_jira__combine_field_histories.sql", "unique_id": "model.jira.int_jira__combine_field_histories", "fqn": ["jira", "intermediate", "field_history", "int_jira__combine_field_histories"], "alias": "int_jira__combine_field_histories", "checksum": {"name": "sha256", "checksum": "fd22ab106ece79d6e5b3db018884b200e6f6731ec774a23cf0e674e158e32861"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "combined_history_id", "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "partition_by": {"field": "valid_starting_on", "data_type": "date"}, "file_format": "delta", "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table combining `issue_field_history` with the aggregated `issue_multiselect_history`.", "columns": {"field_id": {"name": "field_id", "description": "Foreign key referencing the unique ID of the `field` that was changed.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_value": {"name": "field_value", "description": "A singular or comma-separated list of field values, depending on if the field is an array type. Note: these values are IDs referencing either `field_option`, `sprint`, `issue` (ie for epics), `user` (ie for assignees), etc. This depends on what the field is (the value could also be a date, a freeform description, etc).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "valid_starting_at": {"name": "valid_starting_at", "description": "Timestamp of when the field was updated to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "valid_ending_at": {"name": "valid_ending_at", "description": "Timestamp of when the field was updated to a new value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "valid_starting_on": {"name": "valid_starting_on", "description": "Calendar date of when the field was changed to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "combined_history_id": {"name": "combined_history_id", "description": "Unique ID hashed on `field_id`, `issue_id`, and `valid_starting_at`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_name": {"name": "field_name", "description": "Name of the field as it appears on issue cards.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "int_jira", "partition_by": {"field": "valid_starting_on", "data_type": "date"}, "unique_key": "combined_history_id", "incremental_strategy": "delete+insert", "file_format": "delta"}, "created_at": 1695163463.0271711, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__combine_field_histories\"", "raw_code": "{{\n config(\n materialized='incremental',\n partition_by = {'field': 'valid_starting_on', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['valid_starting_on'],\n unique_key='combined_history_id',\n incremental_strategy = 'merge' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\nwith issue_field_history as (\n\n select * from {{ ref('int_jira__issue_field_history') }}\n\n {% if is_incremental() %}\n where cast( updated_at as date) >= (select max(valid_starting_on) from {{ this }} )\n {% endif %}\n),\n\nissue_multiselect_batch_history as (\n\n select * from {{ ref('int_jira__agg_multiselect_history') }}\n\n {% if is_incremental() %}\n where cast( updated_at as date) >= (select max(valid_starting_on) from {{ this }} )\n {% endif %}\n),\n\ncombine_field_history as (\n-- combining all the field histories together\n select \n field_id,\n issue_id,\n updated_at,\n field_value,\n field_name\n\n from issue_field_history\n\n union all\n\n select \n field_id,\n issue_id,\n updated_at,\n field_values as field_value, -- this is an aggregated list but we'll just call it field_value\n field_name\n\n from issue_multiselect_batch_history\n),\n\nget_valid_dates as (\n\n\n select \n field_id,\n issue_id,\n field_value,\n field_name,\n updated_at as valid_starting_at,\n\n -- this value is valid until the next value is updated\n lead(updated_at, 1) over(partition by issue_id, {{ var('jira_field_grain', 'field_id') }} order by updated_at asc) as valid_ending_at, \n\n cast( {{ dbt.date_trunc('day', 'updated_at') }} as date) as valid_starting_on\n\n from combine_field_history\n\n),\n\nsurrogate_key as (\n\n select \n *,\n {{ dbt_utils.generate_surrogate_key(['field_id', 'issue_id', 'valid_starting_at']) }} as combined_history_id\n\n from get_valid_dates\n\n)\n\nselect * from surrogate_key", "language": "sql", "refs": [{"name": "int_jira__issue_field_history", "package": null, "version": null}, {"name": "int_jira__agg_multiselect_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt.date_trunc", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.jira.int_jira__issue_field_history", "model.jira.int_jira__agg_multiselect_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/field_history/int_jira__combine_field_histories.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n),issue_field_history as (\n\n select * from __dbt__cte__int_jira__issue_field_history\n\n \n where cast( updated_at as date) >= (select max(valid_starting_on) from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__combine_field_histories\" )\n \n),\n\nissue_multiselect_batch_history as (\n\n select * from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__agg_multiselect_history\"\n\n \n where cast( updated_at as date) >= (select max(valid_starting_on) from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__combine_field_histories\" )\n \n),\n\ncombine_field_history as (\n-- combining all the field histories together\n select \n field_id,\n issue_id,\n updated_at,\n field_value,\n field_name\n\n from issue_field_history\n\n union all\n\n select \n field_id,\n issue_id,\n updated_at,\n field_values as field_value, -- this is an aggregated list but we'll just call it field_value\n field_name\n\n from issue_multiselect_batch_history\n),\n\nget_valid_dates as (\n\n\n select \n field_id,\n issue_id,\n field_value,\n field_name,\n updated_at as valid_starting_at,\n\n -- this value is valid until the next value is updated\n lead(updated_at, 1) over(partition by issue_id, field_id order by updated_at asc) as valid_ending_at, \n\n cast( date_trunc('day', updated_at) as date) as valid_starting_on\n\n from combine_field_history\n\n),\n\nsurrogate_key as (\n\n select \n *,\n md5(cast(coalesce(cast(field_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(valid_starting_at as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as combined_history_id\n\n from get_valid_dates\n\n)\n\nselect * from surrogate_key", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__issue_field_history": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__issue_field_history", "resource_type": "model", "package_name": "jira", "path": "intermediate/field_history/int_jira__issue_field_history.sql", "original_file_path": "models/intermediate/field_history/int_jira__issue_field_history.sql", "unique_id": "model.jira.int_jira__issue_field_history", "fqn": ["jira", "intermediate", "field_history", "int_jira__issue_field_history"], "alias": "int_jira__issue_field_history", "checksum": {"name": "sha256", "checksum": "9af932ec0b9725d5db555ea44bbfeac1fd0495f0d40797bddbca3a9ce7f59ac7"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of every value that each **custom non-array** (not multiselect) field has been set to. This model serves to append the `field_name` to each record.\n", "columns": {"field_id": {"name": "field_id", "description": "Foreign key referencing the ID of the `field` that was changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue field was set to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_value": {"name": "field_value", "description": "Content of the value of that the field was set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_name": {"name": "field_name", "description": "Name of the field as it appears on issue cards.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira"}, "created_at": 1695163463.032219, "relation_name": null, "raw_code": "with field_history as (\n\n select *\n from {{ var('issue_field_history') }}\n \n), \n\nfields as (\n \n select *\n from {{ var('field') }}\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined", "language": "sql", "refs": [{"name": "stg_jira__issue_field_history", "package": null, "version": null}, {"name": "stg_jira__field", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": [], "nodes": ["model.jira_source.stg_jira__issue_field_history", "model.jira_source.stg_jira__field"]}, "compiled_path": "target/compiled/jira/models/intermediate/field_history/int_jira__issue_field_history.sql", "compiled": true, "compiled_code": "with field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira.int_jira__daily_field_history": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_int_jira", "name": "int_jira__daily_field_history", "resource_type": "model", "package_name": "jira", "path": "intermediate/field_history/int_jira__daily_field_history.sql", "original_file_path": "models/intermediate/field_history/int_jira__daily_field_history.sql", "unique_id": "model.jira.int_jira__daily_field_history", "fqn": ["jira", "intermediate", "field_history", "int_jira__daily_field_history"], "alias": "int_jira__daily_field_history", "checksum": {"name": "sha256", "checksum": "a4e680ff834f7230296e589fed89eaaefb81506974cc041442e4733a9c931e01"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "issue_field_day_id", "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "partition_by": {"field": "valid_starting_on", "data_type": "date"}, "file_format": "delta", "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table in which each row represents the latest field value (for `sprint`, `status` and any columns specified by `issue_field_history_columns`) actively changed on a given day for each issue.\n", "columns": {"field_id": {"name": "field_id", "description": "Foreign key referencing the unique ID of the `field` that was changed.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_value": {"name": "field_value", "description": "A singular or comma-separated list of field values, depending on if the field is an array type. Note: these values are IDs referencing either `field_option`, `sprint`, `issue` (ie for epics), `user` (ie for assignees), etc. This depends on what the field is (the value could also be a date, a freeform description, etc).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_name": {"name": "field_name", "description": "Name of the field as it appears on issue cards.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "valid_starting_at": {"name": "valid_starting_at", "description": "Timestamp of when the field was updated to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "valid_ending_at": {"name": "valid_ending_at", "description": "Timestamp of when the field was updated to a new value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "valid_starting_on": {"name": "valid_starting_on", "description": "Calendar date of when the field was changed to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_field_day_id": {"name": "issue_field_day_id", "description": "Unique ID hashed on `field_id`, `issue_id`, and `valid_starting_on`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "int_jira", "partition_by": {"field": "valid_starting_on", "data_type": "date"}, "unique_key": "issue_field_day_id", "incremental_strategy": "delete+insert", "file_format": "delta"}, "created_at": 1695163463.0299149, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__daily_field_history\"", "raw_code": "{{\n config(\n materialized='incremental',\n partition_by = {'field': 'valid_starting_on', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['valid_starting_on'],\n unique_key='issue_field_day_id',\n incremental_strategy = 'merge' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\nwith combined_field_histories as (\n\n select * \n from {{ ref('int_jira__combine_field_histories') }}\n\n {% if is_incremental() %}\n where valid_starting_on >= (select max(valid_starting_on) from {{ this }} )\n {% endif %}\n),\n\n\nlimit_to_relevant_fields as (\n\n-- let's remove unncessary rows moving forward and grab field names \n select \n combined_field_histories.*\n\n from combined_field_histories\n\n where lower(field_id) = 'status' \n or lower(field_name) in ('sprint'\n {%- for col in var('issue_field_history_columns', []) -%}\n ,'{{ (col|lower) }}'\n {%- endfor -%} )\n \n),\n\norder_daily_values as (\n\n select \n *,\n\n -- want to grab last value for an issue's field for each day\n row_number() over (\n partition by valid_starting_on, issue_id, {{ var('jira_field_grain', 'field_id') }}\n order by valid_starting_at desc\n ) as row_num\n\n from limit_to_relevant_fields\n),\n\n-- only looking at the latest value for each day\nget_latest_daily_value as (\n\n select * \n from order_daily_values\n\n where row_num = 1\n), \n\nfinal as (\n\n select\n field_id,\n issue_id,\n field_name,\n\n -- doing this to figure out what values are actually null and what needs to be backfilled in jira__daily_issue_field_history\n case when field_value is null then 'is_null' else field_value end as field_value,\n valid_starting_at,\n valid_ending_at, \n valid_starting_on,\n\n {{ dbt_utils.generate_surrogate_key([var('jira_field_grain', 'field_id'),'issue_id', 'valid_starting_on']) }} as issue_field_day_id\n \n from get_latest_daily_value\n)\n\nselect * from final", "language": "sql", "refs": [{"name": "int_jira__combine_field_histories", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.jira.int_jira__combine_field_histories"]}, "compiled_path": "target/compiled/jira/models/intermediate/field_history/int_jira__daily_field_history.sql", "compiled": true, "compiled_code": "\n\nwith combined_field_histories as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__combine_field_histories\"\n\n \n where valid_starting_on >= (select max(valid_starting_on) from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__daily_field_history\" )\n \n),\n\n\nlimit_to_relevant_fields as (\n\n-- let's remove unncessary rows moving forward and grab field names \n select \n combined_field_histories.*\n\n from combined_field_histories\n\n where lower(field_id) = 'status' \n or lower(field_name) in ('sprint','summary','story points','components')\n \n),\n\norder_daily_values as (\n\n select \n *,\n\n -- want to grab last value for an issue's field for each day\n row_number() over (\n partition by valid_starting_on, issue_id, field_id\n order by valid_starting_at desc\n ) as row_num\n\n from limit_to_relevant_fields\n),\n\n-- only looking at the latest value for each day\nget_latest_daily_value as (\n\n select * \n from order_daily_values\n\n where row_num = 1\n), \n\nfinal as (\n\n select\n field_id,\n issue_id,\n field_name,\n\n -- doing this to figure out what values are actually null and what needs to be backfilled in jira__daily_issue_field_history\n case when field_value is null then 'is_null' else field_value end as field_value,\n valid_starting_at,\n valid_ending_at, \n valid_starting_on,\n\n md5(cast(coalesce(cast(field_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(valid_starting_on as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as issue_field_day_id\n \n from get_latest_daily_value\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__comment": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__comment", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__comment.sql", "original_file_path": "models/stg_jira__comment.sql", "unique_id": "model.jira_source.stg_jira__comment", "fqn": ["jira_source", "stg_jira__comment"], "alias": "stg_jira__comment", "checksum": {"name": "sha256", "checksum": "fa341c67127360137d40d0172515c1d2daee1fa728ba23273dc0155ab463a02d"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of comments made on issues.", "columns": {"comment_id": {"name": "comment_id", "description": "Unique ID of the comment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "author_user_id": {"name": "author_user_id", "description": "Foreign key referencing the `user` id of the comment's author.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "body": {"name": "body", "description": "Content of the comment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the comment was created. TODO - get timezone clarification", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_public": {"name": "is_public", "description": "Boolean that is true if the comment is visible to all users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the id of the `issue` that was commented on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_update_user_id": {"name": "last_update_user_id", "description": "Foreign key referencing the id of the `user` who last updated this comment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_updated_at": {"name": "last_updated_at", "description": "Timestamp of when the comment was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1695163463.0981262, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__comment\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__comment_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__comment_tmp')),\n staging_columns=get_comment_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n author_id as author_user_id,\n body,\n cast(created as {{ dbt.type_timestamp() }}) as created_at,\n id as comment_id,\n issue_id,\n is_public,\n update_author_id as last_update_user_id,\n cast(updated as {{ dbt.type_timestamp() }}) as last_updated_at,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__comment_tmp", "package": null, "version": null}, {"name": "stg_jira__comment_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_comment_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp"], "nodes": ["model.jira_source.stg_jira__comment_tmp", "model.jira_source.stg_jira__comment_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__comment.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__comment_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n author_id\n \n as \n \n author_id\n \n, \n \n \n body\n \n as \n \n body\n \n, \n \n \n created\n \n as \n \n created\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_public\n \n as \n \n is_public\n \n, \n \n \n issue_id\n \n as \n \n issue_id\n \n, \n \n \n update_author_id\n \n as \n \n update_author_id\n \n, \n \n \n updated\n \n as \n \n updated\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n author_id as author_user_id,\n body,\n cast(created as TIMESTAMP) as created_at,\n id as comment_id,\n issue_id,\n is_public,\n update_author_id as last_update_user_id,\n cast(updated as TIMESTAMP) as last_updated_at,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__project": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__project", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__project.sql", "original_file_path": "models/stg_jira__project.sql", "unique_id": "model.jira_source.stg_jira__project", "fqn": ["jira_source", "stg_jira__project"], "alias": "stg_jira__project", "checksum": {"name": "sha256", "checksum": "b79355d418e10ba5291f50718372e85750c439981b28e786fd401fe7d51bd6fb"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of all projects in your organization.", "columns": {"project_id": {"name": "project_id", "description": "Unique ID of the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_description": {"name": "project_description", "description": "Description of the project, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_key": {"name": "project_key", "description": "UI-facing ID of the project. This becomes the default prefix for tasks created within this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_lead_user_id": {"name": "project_lead_user_id", "description": "Foreign key referencing the ID of the `user` who leads this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_name": {"name": "project_name", "description": "Title of the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "permission_scheme_id": {"name": "permission_scheme_id", "description": "Foreign key referencing the ID of the `permission_scheme` that the project ascribes to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_category_id": {"name": "project_category_id", "description": "Foreign key referencing the ID of the `project_category` that the project is associated with, if any.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1695163463.1116102, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__project\"", "raw_code": "with base as (\n \n select *\n from {{ ref('stg_jira__project_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__project_tmp')),\n staging_columns=get_project_columns()\n )\n }}\n from base\n\n),\n\nfinal as (\n\n select \n description as project_description,\n id as project_id,\n key as project_key,\n lead_id as project_lead_user_id,\n name as project_name,\n project_category_id,\n permission_scheme_id,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__project_tmp", "package": null, "version": null}, {"name": "stg_jira__project_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_project_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__project_tmp", "model.jira_source.stg_jira__project_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__project.sql", "compiled": true, "compiled_code": "with base as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__project_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n key\n \n as \n \n key\n \n, \n \n \n lead_id\n \n as \n \n lead_id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n permission_scheme_id\n \n as \n \n permission_scheme_id\n \n, \n \n \n project_category_id\n \n as \n \n project_category_id\n \n\n\n\n from base\n\n),\n\nfinal as (\n\n select \n description as project_description,\n id as project_id,\n key as project_key,\n lead_id as project_lead_user_id,\n name as project_name,\n project_category_id,\n permission_scheme_id,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__issue_field_history": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_field_history", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__issue_field_history.sql", "original_file_path": "models/stg_jira__issue_field_history.sql", "unique_id": "model.jira_source.stg_jira__issue_field_history", "fqn": ["jira_source", "stg_jira__issue_field_history"], "alias": "stg_jira__issue_field_history", "checksum": {"name": "sha256", "checksum": "fcf7634e1e37282dd645903f1dfef83c567b4cb60c51588d12f64e9ccb75cf3a"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of every value that each **custom non-array** (not multiselect) field has been set to.", "columns": {"field_id": {"name": "field_id", "description": "Foreign key referencing the ID of the `field` that was changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue field was set to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_value": {"name": "field_value", "description": "Content of the value of that the field was set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1695163463.107141, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__issue_field_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__issue_field_history_tmp')),\n staging_columns=get_issue_field_history_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n cast(field_id as {{ dbt.type_string() }}) as field_id,\n issue_id,\n {% if target.type == 'snowflake' -%}\n cast(\"TIME\" as {{ dbt.type_timestamp() }})\n {% elif target.type == 'redshift' -%}\n cast(\"time\" as {{ dbt.type_timestamp() }})\n {% else -%}\n cast(time as {{ dbt.type_timestamp() }})\n {% endif %} as updated_at,\n value as field_value,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__issue_field_history_tmp", "package": null, "version": null}, {"name": "stg_jira__issue_field_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_issue_field_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_string", "macro.dbt.type_timestamp"], "nodes": ["model.jira_source.stg_jira__issue_field_history_tmp", "model.jira_source.stg_jira__issue_field_history_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__issue_field_history.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n field_id\n \n as \n \n field_id\n \n, \n \n \n issue_id\n \n as \n \n issue_id\n \n, \n \n \n value\n \n as \n \n value\n \n, \n \n \n \n \n \"time\"\n \n \n \n as \n \n \n \n \"time\"\n \n \n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n cast(field_id as TEXT) as field_id,\n issue_id,\n cast(\"time\" as TIMESTAMP)\n as updated_at,\n value as field_value,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__version": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__version", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__version.sql", "original_file_path": "models/stg_jira__version.sql", "unique_id": "model.jira_source.stg_jira__version", "fqn": ["jira_source", "stg_jira__version"], "alias": "stg_jira__version", "checksum": {"name": "sha256", "checksum": "434f782b5a4f48238db3a2d933d43ca785164c5998ea04976d668ec08e6e72eb"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of project versions in your organization.", "columns": {"is_archived": {"name": "is_archived", "description": "Boolean that is true if the project version has been archived.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "The optional description given to the version.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "version_id": {"name": "version_id", "description": "Unique ID of the version.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "version_name": {"name": "version_name", "description": "Unique name of the version.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_overdue": {"name": "is_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.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the `PROJECT` to which this version is attached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "release_date": {"name": "release_date", "description": "The optional release date of the version. Expressed in ISO 8601 format (yyyy-mm-dd).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_released": {"name": "is_released", "description": "Boolean that is true if the version has been released. If the version is released a request to release again is ignored", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "start_date": {"name": "start_date", "description": "The start date of the version. Expressed in ISO 8601 format (yyyy-mm-dd).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source", "enabled": true}, "created_at": 1695163463.118476, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__version\"", "raw_code": "{{ config(enabled=var('jira_using_versions', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_jira__version_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__version_tmp')),\n staging_columns=get_version_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n archived as is_archived,\n description,\n id as version_id,\n name as version_name,\n overdue as is_overdue,\n project_id,\n cast(release_date as {{ dbt.type_timestamp() }}) as release_date,\n released as is_released,\n cast(start_date as {{ dbt.type_timestamp() }}) as start_date\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__version_tmp", "package": null, "version": null}, {"name": "stg_jira__version_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_version_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp"], "nodes": ["model.jira_source.stg_jira__version_tmp", "model.jira_source.stg_jira__version_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__version.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__version_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n archived\n \n as \n \n archived\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n overdue\n \n as \n \n overdue\n \n, \n \n \n project_id\n \n as \n \n project_id\n \n, \n \n \n release_date\n \n as \n \n release_date\n \n, \n \n \n released\n \n as \n \n released\n \n, \n \n \n start_date\n \n as \n \n start_date\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n archived as is_archived,\n description,\n id as version_id,\n name as version_name,\n overdue as is_overdue,\n project_id,\n cast(release_date as TIMESTAMP) as release_date,\n released as is_released,\n cast(start_date as TIMESTAMP) as start_date\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__sprint": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__sprint", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__sprint.sql", "original_file_path": "models/stg_jira__sprint.sql", "unique_id": "model.jira_source.stg_jira__sprint", "fqn": ["jira_source", "stg_jira__sprint"], "alias": "stg_jira__sprint", "checksum": {"name": "sha256", "checksum": "b4084b61bc03413dbf58fe8746462aee01f531417e1988f0019cb52d96700a9e"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of all sprints.", "columns": {"sprint_id": {"name": "sprint_id", "description": "Unique ID of the sprint.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "board_id": {"name": "board_id", "description": "Foreign key referencing the ID of the `board` that the sprint lives in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "completed_at": {"name": "completed_at", "description": "Timestamp of when the sprint was completed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "ended_at": {"name": "ended_at", "description": "Timestamp of when the sprint is planned to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_name": {"name": "sprint_name", "description": "Title of the sprint.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "started_at": {"name": "started_at", "description": "Timestamp of when the sprint began.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source", "enabled": true}, "created_at": 1695163463.113771, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__sprint\"", "raw_code": "{{ config(enabled=var('jira_using_sprints', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_jira__sprint_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__sprint_tmp')),\n staging_columns=get_sprint_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n id as sprint_id,\n name as sprint_name,\n board_id,\n cast(complete_date as {{ dbt.type_timestamp() }}) as completed_at,\n cast(end_date as {{ dbt.type_timestamp() }}) as ended_at,\n cast(start_date as {{ dbt.type_timestamp() }}) as started_at,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__sprint_tmp", "package": null, "version": null}, {"name": "stg_jira__sprint_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_sprint_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp"], "nodes": ["model.jira_source.stg_jira__sprint_tmp", "model.jira_source.stg_jira__sprint_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__sprint.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__sprint_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n board_id\n \n as \n \n board_id\n \n, \n \n \n complete_date\n \n as \n \n complete_date\n \n, \n \n \n end_date\n \n as \n \n end_date\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n start_date\n \n as \n \n start_date\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n id as sprint_id,\n name as sprint_name,\n board_id,\n cast(complete_date as TIMESTAMP) as completed_at,\n cast(end_date as TIMESTAMP) as ended_at,\n cast(start_date as TIMESTAMP) as started_at,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__field_option": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__field_option", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__field_option.sql", "original_file_path": "models/stg_jira__field_option.sql", "unique_id": "model.jira_source.stg_jira__field_option", "fqn": ["jira_source", "stg_jira__field_option"], "alias": "stg_jira__field_option", "checksum": {"name": "sha256", "checksum": "e7c7ad10cee2d5593f5be8c482bce4f0e4aac610ab4ee178b8ab73c3e0a16738"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of all options related to custom fields.", "columns": {"field_id": {"name": "field_id", "description": "The ID of the custom field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_field_id": {"name": "parent_field_id", "description": "The ID of the parent custom field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_option_name": {"name": "field_option_name", "description": "Name of the field option.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1695163463.100969, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field_option\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__field_option_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__field_option_tmp')),\n staging_columns=get_field_option_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n id as field_id,\n parent_id as parent_field_id,\n name as field_option_name\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__field_option_tmp", "package": null, "version": null}, {"name": "stg_jira__field_option_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_field_option_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__field_option_tmp", "model.jira_source.stg_jira__field_option_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__field_option.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field_option_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n id\n \n as \n \n id\n \n, \n cast(null as INT) as \n \n parent_id\n \n , \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n name\n \n as \n \n name\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n id as field_id,\n parent_id as parent_field_id,\n name as field_option_name\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__field": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__field", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__field.sql", "original_file_path": "models/stg_jira__field.sql", "unique_id": "model.jira_source.stg_jira__field", "fqn": ["jira_source", "stg_jira__field"], "alias": "stg_jira__field", "checksum": {"name": "sha256", "checksum": "33c7c1d6d05d2e5c1d8d76552859b08fea705f306452653addd7e8cbb2b4b386"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of all issue fields.", "columns": {"field_id": {"name": "field_id", "description": "Unique ID of the field. Default fields will have descriptive IDs, whereas custom field IDs will be `'customfield_#####'`.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_array": {"name": "is_array", "description": "Boolean that is true if a field can have multiple values (is mulitselect).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_custom": {"name": "is_custom", "description": "Boolean that is true if the field is custom to this organization, and false if it is default to Jira.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_name": {"name": "field_name", "description": "Name of the field as it appears on issue cards.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1695163463.1001658, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__field_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__field_tmp')),\n staging_columns=get_field_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n cast(id as {{ dbt.type_string() }}) as field_id,\n is_array,\n is_custom,\n name as field_name,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__field_tmp", "package": null, "version": null}, {"name": "stg_jira__field_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_field_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_string"], "nodes": ["model.jira_source.stg_jira__field_tmp", "model.jira_source.stg_jira__field_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__field.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_array\n \n as \n \n is_array\n \n, \n \n \n is_custom\n \n as \n \n is_custom\n \n, \n \n \n name\n \n as \n \n name\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n cast(id as TEXT) as field_id,\n is_array,\n is_custom,\n name as field_name,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__resolution": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__resolution", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__resolution.sql", "original_file_path": "models/stg_jira__resolution.sql", "unique_id": "model.jira_source.stg_jira__resolution", "fqn": ["jira_source", "stg_jira__resolution"], "alias": "stg_jira__resolution", "checksum": {"name": "sha256", "checksum": "d3166819dd7a36ee0cabef9cc658eaf00f35770a7a2decdce0ef635afee78537"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table storing the types of resolutions used by your organization.", "columns": {"resolution_id": {"name": "resolution_id", "description": "Unique ID of the resolution type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_description": {"name": "resolution_description", "description": "Description given to the resolution.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_name": {"name": "resolution_name", "description": "Display name of the resolution.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1695163463.112423, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__resolution\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__resolution_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__resolution_tmp')),\n staging_columns=get_resolution_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n description as resolution_description,\n id as resolution_id,\n name as resolution_name,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__resolution_tmp", "package": null, "version": null}, {"name": "stg_jira__resolution_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_resolution_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__resolution_tmp", "model.jira_source.stg_jira__resolution_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__resolution.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__resolution_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n description as resolution_description,\n id as resolution_id,\n name as resolution_name,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__status": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__status", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__status.sql", "original_file_path": "models/stg_jira__status.sql", "unique_id": "model.jira_source.stg_jira__status", "fqn": ["jira_source", "stg_jira__status"], "alias": "stg_jira__status", "checksum": {"name": "sha256", "checksum": "648c813903f25664f0814e811e0d78023933601777f17ad4ee32a831477bc6e6"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of project-level statuses (which may have the same umbrella `status_category`).", "columns": {"status_id": {"name": "status_id", "description": "Unique ID of the project status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_description": {"name": "status_description", "description": "Description of the project status. Different projects may all have a status called \"Backlog\", but their definitions of \"backlog\" may differ.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_name": {"name": "status_name", "description": "Title of the status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_category_id": {"name": "status_category_id", "description": "Foreign key referencing the ID of the `status_category` that this project status falls under.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1695163463.114739, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__status\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__status_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__status_tmp')),\n staging_columns=get_status_columns()\n )\n }}\n from base\n),\n\nfinal as (\n\n select\n description as status_description,\n id as status_id,\n name as status_name,\n status_category_id,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__status_tmp", "package": null, "version": null}, {"name": "stg_jira__status_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_status_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__status_tmp", "model.jira_source.stg_jira__status_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__status.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__status_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n status_category_id\n \n as \n \n status_category_id\n \n\n\n\n from base\n),\n\nfinal as (\n\n select\n description as status_description,\n id as status_id,\n name as status_name,\n status_category_id,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__issue": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__issue.sql", "original_file_path": "models/stg_jira__issue.sql", "unique_id": "model.jira_source.stg_jira__issue", "fqn": ["jira_source", "stg_jira__issue"], "alias": "stg_jira__issue", "checksum": {"name": "sha256", "checksum": "170eb579c650ace587974f1d0bce133fccad8f95b433491804d5a79537a9a825"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of all issues in your organization's Jira (captures soft deletes).", "columns": {"issue_id": {"name": "issue_id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_user_id": {"name": "assignee_user_id", "description": "Foreign key referencing the ID of the `user` currently assigned to this task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the issue was created (in UTC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "creator_user_id": {"name": "creator_user_id", "description": "Foreign key referencing the `user` who first created the issue. Cannot be changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_description": {"name": "issue_description", "description": "The issue description, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "Calendar day on which the issue is due, if a due date is provided.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "environment": {"name": "environment", "description": "Text field describing the environment in which the issue occurred (ie \"IE9 on Windows 7\").", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type_id": {"name": "issue_type_id", "description": "Foreign key referencing the ID of the `issue_type`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_key": {"name": "issue_key", "description": "UI-facing id of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "original_estimate_seconds": {"name": "original_estimate_seconds", "description": "The original estimate of how long working on this issue would take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_id": {"name": "parent_issue_id", "description": "Self-referencing ID of the parent `issue`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority_id": {"name": "priority_id", "description": "Foreign key referencing the ID of the issue's current `priority`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the ID of the `project` that the issue belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "remaining_estimate_seconds": {"name": "remaining_estimate_seconds", "description": "The estimate of how much longer working on this issue will take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_user_id": {"name": "reporter_user_id", "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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_id": {"name": "resolution_id", "description": "Foreign key referencing the ID of the issue's type of `resolution`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolved_at": {"name": "resolved_at", "description": "Timestamp of when the issue was resolved (ie completed, marked as duplicate). If an issue is un-resolved, this will be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Foreign key referencing the ID of the issue's `status` (the step that the issue is currently at in the project's workflow).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_changed_at": {"name": "status_changed_at", "description": "Timestamp of when the status was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_name": {"name": "issue_name", "description": "Title of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_spent_seconds": {"name": "time_spent_seconds", "description": "The time that was spent working on this issue, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue was last updated in some way.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "work_ratio": {"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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1695163463.106143, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue\"", "raw_code": "with base as (\n \n select * \n from {{ ref('stg_jira__issue_tmp') }}\n where not coalesce(_fivetran_deleted, false)\n),\n\nfields as (\n\n select \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__issue_tmp')),\n staging_columns=get_issue_columns()\n )\n }}\n from base\n),\n\nfinal as (\n\n select\n coalesce(original_estimate, _original_estimate) as original_estimate_seconds,\n coalesce(remaining_estimate, _remaining_estimate) as remaining_estimate_seconds,\n coalesce(time_spent, _time_spent) as time_spent_seconds,\n assignee as assignee_user_id,\n cast(created as {{ dbt.type_timestamp() }}) as created_at,\n cast(resolved as {{ dbt.type_timestamp() }}) as resolved_at,\n creator as creator_user_id,\n description as issue_description,\n due_date,\n environment,\n id as issue_id,\n issue_type as issue_type_id,\n key as issue_key,\n parent_id as parent_issue_id,\n priority as priority_id,\n project as project_id,\n reporter as reporter_user_id,\n resolution as resolution_id,\n status as status_id,\n cast(status_category_changed as {{ dbt.type_timestamp() }}) as status_changed_at,\n summary as issue_name,\n cast(updated as {{ dbt.type_timestamp() }}) as updated_at,\n work_ratio,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__issue_tmp", "package": null, "version": null}, {"name": "stg_jira__issue_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_issue_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp"], "nodes": ["model.jira_source.stg_jira__issue_tmp", "model.jira_source.stg_jira__issue_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__issue.sql", "compiled": true, "compiled_code": "with base as (\n \n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_tmp\"\n where not coalesce(_fivetran_deleted, false)\n),\n\nfields as (\n\n select \n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _original_estimate\n \n as \n \n _original_estimate\n \n, \n \n \n _remaining_estimate\n \n as \n \n _remaining_estimate\n \n, \n \n \n _time_spent\n \n as \n \n _time_spent\n \n, \n \n \n assignee\n \n as \n \n assignee\n \n, \n \n \n created\n \n as \n \n created\n \n, \n \n \n creator\n \n as \n \n creator\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n due_date\n \n as \n \n due_date\n \n, \n \n \n environment\n \n as \n \n environment\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n issue_type\n \n as \n \n issue_type\n \n, \n \n \n key\n \n as \n \n key\n \n, \n \n \n original_estimate\n \n as \n \n original_estimate\n \n, \n \n \n parent_id\n \n as \n \n parent_id\n \n, \n \n \n priority\n \n as \n \n priority\n \n, \n \n \n project\n \n as \n \n project\n \n, \n \n \n remaining_estimate\n \n as \n \n remaining_estimate\n \n, \n \n \n reporter\n \n as \n \n reporter\n \n, \n \n \n resolution\n \n as \n \n resolution\n \n, \n \n \n resolved\n \n as \n \n resolved\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n status_category_changed\n \n as \n \n status_category_changed\n \n, \n \n \n summary\n \n as \n \n summary\n \n, \n \n \n time_spent\n \n as \n \n time_spent\n \n, \n \n \n updated\n \n as \n \n updated\n \n, \n \n \n work_ratio\n \n as \n \n work_ratio\n \n\n\n\n from base\n),\n\nfinal as (\n\n select\n coalesce(original_estimate, _original_estimate) as original_estimate_seconds,\n coalesce(remaining_estimate, _remaining_estimate) as remaining_estimate_seconds,\n coalesce(time_spent, _time_spent) as time_spent_seconds,\n assignee as assignee_user_id,\n cast(created as TIMESTAMP) as created_at,\n cast(resolved as TIMESTAMP) as resolved_at,\n creator as creator_user_id,\n description as issue_description,\n due_date,\n environment,\n id as issue_id,\n issue_type as issue_type_id,\n key as issue_key,\n parent_id as parent_issue_id,\n priority as priority_id,\n project as project_id,\n reporter as reporter_user_id,\n resolution as resolution_id,\n status as status_id,\n cast(status_category_changed as TIMESTAMP) as status_changed_at,\n summary as issue_name,\n cast(updated as TIMESTAMP) as updated_at,\n work_ratio,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__status_category": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__status_category", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__status_category.sql", "original_file_path": "models/stg_jira__status_category.sql", "unique_id": "model.jira_source.stg_jira__status_category", "fqn": ["jira_source", "stg_jira__status_category"], "alias": "stg_jira__status_category", "checksum": {"name": "sha256", "checksum": "0538d696e06e0ae46775aa83259452432eb850d0c075429b2bda9ab6dcd6fc0a"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of umbrella status categories.", "columns": {"status_category_id": {"name": "status_category_id", "description": "Unique ID of the status category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_category_name": {"name": "status_category_name", "description": "Title of the status category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1695163463.115392, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__status_category\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__status_category_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__status_category_tmp')),\n staging_columns=get_status_category_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n id as status_category_id,\n name as status_category_name\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__status_category_tmp", "package": null, "version": null}, {"name": "stg_jira__status_category_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_status_category_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__status_category_tmp", "model.jira_source.stg_jira__status_category_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__status_category.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__status_category_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n id as status_category_id,\n name as status_category_name\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__issue_multiselect_history": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_multiselect_history", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__issue_multiselect_history.sql", "original_file_path": "models/stg_jira__issue_multiselect_history.sql", "unique_id": "model.jira_source.stg_jira__issue_multiselect_history", "fqn": ["jira_source", "stg_jira__issue_multiselect_history"], "alias": "stg_jira__issue_multiselect_history", "checksum": {"name": "sha256", "checksum": "38851dbe46150dd061aeef1b0ab2b8644c4f4e0f61121cb079e69448d16e6c12"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of every value that each array-type (multiselect) field has been set to. Each row will pertain to **one** value.\n", "columns": {"_fivetran_id": {"name": "_fivetran_id", "description": "Fivetran-generated ID hashed on field, issue, and value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue field was updated to included this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_id": {"name": "field_id", "description": "Foreign key referencing the ID of the `field` that was changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_value": {"name": "field_value", "description": "Content of the value of that the field was set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1695163463.108332, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__issue_multiselect_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__issue_multiselect_history_tmp')),\n staging_columns=get_issue_multiselect_history_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n _fivetran_id,\n cast(field_id as {{ dbt.type_string() }}) as field_id,\n issue_id,\n {% if target.type == 'snowflake' %}\n cast(\"TIME\" as {{ dbt.type_timestamp() }})\n {% elif target.type == 'redshift' %}\n cast(\"time\" as {{ dbt.type_timestamp() }})\n {% else %}\n cast(time as {{ dbt.type_timestamp() }})\n {% endif %} as updated_at,\n value as field_value,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__issue_multiselect_history_tmp", "package": null, "version": null}, {"name": "stg_jira__issue_multiselect_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_issue_multiselect_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_string", "macro.dbt.type_timestamp"], "nodes": ["model.jira_source.stg_jira__issue_multiselect_history_tmp", "model.jira_source.stg_jira__issue_multiselect_history_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__issue_multiselect_history.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_id\n \n as \n \n _fivetran_id\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n field_id\n \n as \n \n field_id\n \n, \n \n \n issue_id\n \n as \n \n issue_id\n \n, \n \n \n value\n \n as \n \n value\n \n, \n \n \n \n \n \"time\"\n \n \n \n as \n \n \n \n \"time\"\n \n \n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n _fivetran_id,\n cast(field_id as TEXT) as field_id,\n issue_id,\n \n cast(\"time\" as TIMESTAMP)\n as updated_at,\n value as field_value,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__issue_type": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_type", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__issue_type.sql", "original_file_path": "models/stg_jira__issue_type.sql", "unique_id": "model.jira_source.stg_jira__issue_type", "fqn": ["jira_source", "stg_jira__issue_type"], "alias": "stg_jira__issue_type", "checksum": {"name": "sha256", "checksum": "605f5eb9aee0eca280a7c9186d69c378ee3649cd35e495ed387e0a8c19b9cb64"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table containing information about issue types. Issue types can have identical names in different projects, but they may have differing descriptions.\n", "columns": {"issue_type_id": {"name": "issue_type_id", "description": "Unique ID of the issue type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Project-level description given to the issue type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type_name": {"name": "issue_type_name", "description": "Name of the issue type (ie Epic, Task, Subtask, any custom types)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_subtask": {"name": "is_subtask", "description": "Boolean that is true if this type of issue is a subtask.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1695163463.109296, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_type\"", "raw_code": "with base as (\n\n select * from \n {{ ref('stg_jira__issue_type_tmp') }}\n),\n\nfields as (\n\n select \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__issue_type_tmp')),\n staging_columns=get_issue_type_columns()\n )\n }}\n from base\n),\n\nfinal as (\n\n select\n description,\n id as issue_type_id,\n name as issue_type_name,\n subtask as is_subtask,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__issue_type_tmp", "package": null, "version": null}, {"name": "stg_jira__issue_type_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_issue_type_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__issue_type_tmp", "model.jira_source.stg_jira__issue_type_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__issue_type.sql", "compiled": true, "compiled_code": "with base as (\n\n select * from \n \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_type_tmp\"\n),\n\nfields as (\n\n select \n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n subtask\n \n as \n \n subtask\n \n\n\n\n from base\n),\n\nfinal as (\n\n select\n description,\n id as issue_type_id,\n name as issue_type_name,\n subtask as is_subtask,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__issue_link": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_link", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__issue_link.sql", "original_file_path": "models/stg_jira__issue_link.sql", "unique_id": "model.jira_source.stg_jira__issue_link", "fqn": ["jira_source", "stg_jira__issue_link"], "alias": "stg_jira__issue_link", "checksum": {"name": "sha256", "checksum": "fc0c48e8a36c14a9eefcb66e9c39e9723f507f4c2b6f2c92c872dad2b81e66ed"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of relationships (links) created between issues. Issue links can include blockers, clones/duplicates, and general relationships.\n", "columns": {"issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` that is the subject of this relationship (the linker).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "related_issue_id": {"name": "related_issue_id", "description": "Foreign key referencing the ID of the `issue` that is the object of this relationship (the linkee).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "relationship": {"name": "relationship", "description": "The nature of the link between the two issues (\"blocks\", \"is duplicated by\", \"relates to\", etc.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1695163463.101741, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_link\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__issue_link_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__issue_link_tmp')),\n staging_columns=get_issue_link_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n issue_id,\n related_issue_id,\n relationship,\n _fivetran_synced \n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__issue_link_tmp", "package": null, "version": null}, {"name": "stg_jira__issue_link_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_issue_link_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__issue_link_tmp", "model.jira_source.stg_jira__issue_link_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__issue_link.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_link_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n issue_id\n \n as \n \n issue_id\n \n, \n \n \n related_issue_id\n \n as \n \n related_issue_id\n \n, \n \n \n relationship\n \n as \n \n relationship\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n issue_id,\n related_issue_id,\n relationship,\n _fivetran_synced \n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__component": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__component", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__component.sql", "original_file_path": "models/stg_jira__component.sql", "unique_id": "model.jira_source.stg_jira__component", "fqn": ["jira_source", "stg_jira__component"], "alias": "stg_jira__component", "checksum": {"name": "sha256", "checksum": "22f31e1f8c71e992171ead7a23e0c61d654dab19ebec7e227c741a704887783d"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of project components (subsections to group issues).", "columns": {"component_id": {"name": "component_id", "description": "ID of the component.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "component_description": {"name": "component_description", "description": "Description given to the component.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "component_name": {"name": "component_name", "description": "UI-facing name of the component.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the id of the component's `project`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source", "enabled": true}, "created_at": 1695163463.0991218, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__component\"", "raw_code": "{{ config(enabled=var('jira_using_components', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_jira__component_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__component_tmp')),\n staging_columns=get_component_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n description as component_description,\n id as component_id,\n name as component_name,\n project_id,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__component_tmp", "package": null, "version": null}, {"name": "stg_jira__component_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_component_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__component_tmp", "model.jira_source.stg_jira__component_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__component.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__component_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n project_id\n \n as \n \n project_id\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n description as component_description,\n id as component_id,\n name as component_name,\n project_id,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__user": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__user", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__user.sql", "original_file_path": "models/stg_jira__user.sql", "unique_id": "model.jira_source.stg_jira__user", "fqn": ["jira_source", "stg_jira__user"], "alias": "stg_jira__user", "checksum": {"name": "sha256", "checksum": "95b85f878a0a0784390ff0c1738c4bf709902531870b71fee4165f1628d4faa3"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of users associated with your organization.", "columns": {"user_id": {"name": "user_id", "description": "Unique ID of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "Email associated with the user acccount.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "locale": {"name": "locale", "description": "The Java locale of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "user_display_name": {"name": "user_display_name", "description": "Name of the user as it appears in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_zone": {"name": "time_zone", "description": "The user's timezone, as defined in their settings.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "username": {"name": "username", "description": "Account username.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1695163463.1167328, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__user_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__user_tmp')),\n staging_columns=get_user_columns()\n )\n }}\n from base\n),\n\nfinal as (\n\n select \n email,\n id as user_id,\n locale,\n name as user_display_name,\n time_zone,\n username,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__user_tmp", "package": null, "version": null}, {"name": "stg_jira__user_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_user_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__user_tmp", "model.jira_source.stg_jira__user_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__user.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n locale\n \n as \n \n locale\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n time_zone\n \n as \n \n time_zone\n \n, \n \n \n username\n \n as \n \n username\n \n\n\n\n from base\n),\n\nfinal as (\n\n select \n email,\n id as user_id,\n locale,\n name as user_display_name,\n time_zone,\n username,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__priority": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__priority", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__priority.sql", "original_file_path": "models/stg_jira__priority.sql", "unique_id": "model.jira_source.stg_jira__priority", "fqn": ["jira_source", "stg_jira__priority"], "alias": "stg_jira__priority", "checksum": {"name": "sha256", "checksum": "e6627a12758dece0969f5a6a38eb6370b52aa55b1f958539729945d64ea44ea0"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Table of issue priority levels (global).", "columns": {"priority_id": {"name": "priority_id", "description": "Unique ID of the priority level.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority_description": {"name": "priority_description", "description": "Description of the priority level.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority_name": {"name": "priority_name", "description": "Name of the priority as it appears in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source", "enabled": true}, "created_at": 1695163463.11011, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__priority\"", "raw_code": "{{ config(enabled=var('jira_using_priorities', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_jira__priority_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__priority_tmp')),\n staging_columns=get_priority_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n description as priority_description,\n id as priority_id,\n name as priority_name,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__priority_tmp", "package": null, "version": null}, {"name": "stg_jira__priority_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_priority_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__priority_tmp", "model.jira_source.stg_jira__priority_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__priority.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__priority_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n description as priority_description,\n id as priority_id,\n name as priority_name,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__version_tmp": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__version_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__version_tmp.sql", "original_file_path": "models/tmp/stg_jira__version_tmp.sql", "unique_id": "model.jira_source.stg_jira__version_tmp", "fqn": ["jira_source", "tmp", "stg_jira__version_tmp"], "alias": "stg_jira__version_tmp", "checksum": {"name": "sha256", "checksum": "4e16bea890df92fe2393d1e151479ee51ed270f40d9b4ba3f922d858787c347e"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source", "enabled": true}, "created_at": 1695163462.8745651, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__version_tmp\"", "raw_code": "{{ config(enabled=var('jira_using_versions', True)) }}\n\nselect * \nfrom {{ var('version') }}", "language": "sql", "refs": [], "sources": [["jira", "version"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.version"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__version_tmp.sql", "compiled": true, "compiled_code": "\n\nselect * \nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1\".\"version\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__status_category_tmp": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__status_category_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__status_category_tmp.sql", "original_file_path": "models/tmp/stg_jira__status_category_tmp.sql", "unique_id": "model.jira_source.stg_jira__status_category_tmp", "fqn": ["jira_source", "tmp", "stg_jira__status_category_tmp"], "alias": "stg_jira__status_category_tmp", "checksum": {"name": "sha256", "checksum": "ce976a7afa132349c28940f9d387b3e635c9a6dd2576844347910580ea592a4b"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1695163462.8793821, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__status_category_tmp\"", "raw_code": "select * \nfrom {{ var('status_category') }}", "language": "sql", "refs": [], "sources": [["jira", "status_category"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.status_category"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__status_category_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1\".\"status_category\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__field_option_tmp": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__field_option_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__field_option_tmp.sql", "original_file_path": "models/tmp/stg_jira__field_option_tmp.sql", "unique_id": "model.jira_source.stg_jira__field_option_tmp", "fqn": ["jira_source", "tmp", "stg_jira__field_option_tmp"], "alias": "stg_jira__field_option_tmp", "checksum": {"name": "sha256", "checksum": "cb1e64625d369889104ada54bf610b9aa36e1623853ae29ae24bd8f5bb4b2437"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1695163462.8833122, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field_option_tmp\"", "raw_code": "select * \nfrom {{ var('field_option') }}", "language": "sql", "refs": [], "sources": [["jira", "field_option"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.field_option"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__field_option_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1\".\"field_option\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__issue_multiselect_history_tmp": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_multiselect_history_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__issue_multiselect_history_tmp.sql", "original_file_path": "models/tmp/stg_jira__issue_multiselect_history_tmp.sql", "unique_id": "model.jira_source.stg_jira__issue_multiselect_history_tmp", "fqn": ["jira_source", "tmp", "stg_jira__issue_multiselect_history_tmp"], "alias": "stg_jira__issue_multiselect_history_tmp", "checksum": {"name": "sha256", "checksum": "faf8d7e362472ef899552eba8ee39c1fa8a1b803f64a639d6f481400861bc24a"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1695163462.887213, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history_tmp\"", "raw_code": "select * \nfrom {{ var('issue_multiselect_history') }}", "language": "sql", "refs": [], "sources": [["jira", "issue_multiselect_history"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.issue_multiselect_history"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__issue_multiselect_history_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1\".\"issue_multiselect_history\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__issue_type_tmp": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_type_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__issue_type_tmp.sql", "original_file_path": "models/tmp/stg_jira__issue_type_tmp.sql", "unique_id": "model.jira_source.stg_jira__issue_type_tmp", "fqn": ["jira_source", "tmp", "stg_jira__issue_type_tmp"], "alias": "stg_jira__issue_type_tmp", "checksum": {"name": "sha256", "checksum": "166aa9a9ce724421198262fb67dd01b9130712cada1defcd20a991308676e5d0"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1695163462.891371, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_type_tmp\"", "raw_code": "select * \nfrom {{ var('issue_type') }}", "language": "sql", "refs": [], "sources": [["jira", "issue_type"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.issue_type"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__issue_type_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1\".\"issue_type\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__sprint_tmp": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__sprint_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__sprint_tmp.sql", "original_file_path": "models/tmp/stg_jira__sprint_tmp.sql", "unique_id": "model.jira_source.stg_jira__sprint_tmp", "fqn": ["jira_source", "tmp", "stg_jira__sprint_tmp"], "alias": "stg_jira__sprint_tmp", "checksum": {"name": "sha256", "checksum": "a21fcc01937bc59051bdd08532e3cf8535b078b2204f659f9ef98817dfb0c463"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source", "enabled": true}, "created_at": 1695163462.8954198, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__sprint_tmp\"", "raw_code": "{{ config(enabled=var('jira_using_sprints', True)) }}\n\nselect * \nfrom {{ var('sprint') }}", "language": "sql", "refs": [], "sources": [["jira", "sprint"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.sprint"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__sprint_tmp.sql", "compiled": true, "compiled_code": "\n\nselect * \nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1\".\"sprint\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__status_tmp": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__status_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__status_tmp.sql", "original_file_path": "models/tmp/stg_jira__status_tmp.sql", "unique_id": "model.jira_source.stg_jira__status_tmp", "fqn": ["jira_source", "tmp", "stg_jira__status_tmp"], "alias": "stg_jira__status_tmp", "checksum": {"name": "sha256", "checksum": "206c9a7f6e35d22a162df8e6d1ae4c121382af956e056ca619faff9986ab16b3"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1695163462.8995972, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__status_tmp\"", "raw_code": "select * \nfrom {{ var('status') }}", "language": "sql", "refs": [], "sources": [["jira", "status"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.status"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__status_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1\".\"status\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__project_tmp": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__project_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__project_tmp.sql", "original_file_path": "models/tmp/stg_jira__project_tmp.sql", "unique_id": "model.jira_source.stg_jira__project_tmp", "fqn": ["jira_source", "tmp", "stg_jira__project_tmp"], "alias": "stg_jira__project_tmp", "checksum": {"name": "sha256", "checksum": "776cf64136ff22eaa9fddcb5b4aadd58e5b295800ffd8b3a2c3871ed22531599"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1695163462.904402, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__project_tmp\"", "raw_code": "select * \nfrom {{ var('project') }}", "language": "sql", "refs": [], "sources": [["jira", "project"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.project"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__project_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1\".\"project\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__comment_tmp": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__comment_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__comment_tmp.sql", "original_file_path": "models/tmp/stg_jira__comment_tmp.sql", "unique_id": "model.jira_source.stg_jira__comment_tmp", "fqn": ["jira_source", "tmp", "stg_jira__comment_tmp"], "alias": "stg_jira__comment_tmp", "checksum": {"name": "sha256", "checksum": "50e78fc23c6041b43d46c0adf7f6cf3c1e2375ef3410fbdd2f527028d9830880"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1695163462.9082959, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__comment_tmp\"", "raw_code": "select * \nfrom {{ var('comment') }}", "language": "sql", "refs": [], "sources": [["jira", "comment"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.comment"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__comment_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1\".\"comment\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__issue_field_history_tmp": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_field_history_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__issue_field_history_tmp.sql", "original_file_path": "models/tmp/stg_jira__issue_field_history_tmp.sql", "unique_id": "model.jira_source.stg_jira__issue_field_history_tmp", "fqn": ["jira_source", "tmp", "stg_jira__issue_field_history_tmp"], "alias": "stg_jira__issue_field_history_tmp", "checksum": {"name": "sha256", "checksum": "037b5bef93c17b862d1969a35a66f10feb507b34d943b093c13ace0298b5d855"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1695163462.912191, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history_tmp\"", "raw_code": "select * \nfrom {{ var('issue_field_history') }}", "language": "sql", "refs": [], "sources": [["jira", "issue_field_history"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.issue_field_history"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__issue_field_history_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1\".\"issue_field_history\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__issue_link_tmp": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_link_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__issue_link_tmp.sql", "original_file_path": "models/tmp/stg_jira__issue_link_tmp.sql", "unique_id": "model.jira_source.stg_jira__issue_link_tmp", "fqn": ["jira_source", "tmp", "stg_jira__issue_link_tmp"], "alias": "stg_jira__issue_link_tmp", "checksum": {"name": "sha256", "checksum": "deb68ea3ff7d2f0d254d06e07829733756ce80efb7af5209e5ae43840b8e254a"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1695163462.916126, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_link_tmp\"", "raw_code": "select * \nfrom {{ var('issue_link') }}", "language": "sql", "refs": [], "sources": [["jira", "issue_link"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.issue_link"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__issue_link_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1\".\"issue_link\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__field_tmp": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__field_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__field_tmp.sql", "original_file_path": "models/tmp/stg_jira__field_tmp.sql", "unique_id": "model.jira_source.stg_jira__field_tmp", "fqn": ["jira_source", "tmp", "stg_jira__field_tmp"], "alias": "stg_jira__field_tmp", "checksum": {"name": "sha256", "checksum": "aa842b8fc7fa2e61d4b04634ddae4948afce86a6c1ba37197e01c5baeef8f374"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1695163462.920105, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field_tmp\"", "raw_code": "select * \nfrom {{ var('field') }}", "language": "sql", "refs": [], "sources": [["jira", "field"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.field"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__field_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1\".\"field\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__user_tmp": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__user_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__user_tmp.sql", "original_file_path": "models/tmp/stg_jira__user_tmp.sql", "unique_id": "model.jira_source.stg_jira__user_tmp", "fqn": ["jira_source", "tmp", "stg_jira__user_tmp"], "alias": "stg_jira__user_tmp", "checksum": {"name": "sha256", "checksum": "c6665b2e96c3536ab07cdc0fe31225a7be4766df0c7c353e3ade197bc8498279"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1695163462.924721, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user_tmp\"", "raw_code": "select * \nfrom {{ var('user') }}", "language": "sql", "refs": [], "sources": [["jira", "user"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.user"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__user_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1\".\"user\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__issue_tmp": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__issue_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__issue_tmp.sql", "original_file_path": "models/tmp/stg_jira__issue_tmp.sql", "unique_id": "model.jira_source.stg_jira__issue_tmp", "fqn": ["jira_source", "tmp", "stg_jira__issue_tmp"], "alias": "stg_jira__issue_tmp", "checksum": {"name": "sha256", "checksum": "2f84522aea28fb2bef123eff34648c4777747064de156efaad69c053d3b06092"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1695163462.92861, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_tmp\"", "raw_code": "select * \nfrom {{ var('issue') }}", "language": "sql", "refs": [], "sources": [["jira", "issue"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.issue"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__issue_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1\".\"issue\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__priority_tmp": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__priority_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__priority_tmp.sql", "original_file_path": "models/tmp/stg_jira__priority_tmp.sql", "unique_id": "model.jira_source.stg_jira__priority_tmp", "fqn": ["jira_source", "tmp", "stg_jira__priority_tmp"], "alias": "stg_jira__priority_tmp", "checksum": {"name": "sha256", "checksum": "fbf5591edc6a4fe1924c3bbe137b6f3fc42854924553faa1192f73b72e0a6aeb"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source", "enabled": true}, "created_at": 1695163462.932589, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__priority_tmp\"", "raw_code": "{{ config(enabled=var('jira_using_priorities', True)) }}\n\nselect * from {{ var('priority') }}", "language": "sql", "refs": [], "sources": [["jira", "priority"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.priority"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__priority_tmp.sql", "compiled": true, "compiled_code": "\n\nselect * from \"redshift-test-kristin\".\"jira_integrations_tests_1\".\"priority\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__component_tmp": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__component_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__component_tmp.sql", "original_file_path": "models/tmp/stg_jira__component_tmp.sql", "unique_id": "model.jira_source.stg_jira__component_tmp", "fqn": ["jira_source", "tmp", "stg_jira__component_tmp"], "alias": "stg_jira__component_tmp", "checksum": {"name": "sha256", "checksum": "968da15f4a8dbb9e51d593dd0a95ff6081d5b2e3d8f0eb8daedaf2c283decd3c"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source", "enabled": true}, "created_at": 1695163462.936725, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__component_tmp\"", "raw_code": "{{ config(enabled=var('jira_using_components', True)) }}\n\nselect * \nfrom {{ var('component') }}", "language": "sql", "refs": [], "sources": [["jira", "component"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.component"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__component_tmp.sql", "compiled": true, "compiled_code": "\n\nselect * \nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1\".\"component\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "model.jira_source.stg_jira__resolution_tmp": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_jira_source", "name": "stg_jira__resolution_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__resolution_tmp.sql", "original_file_path": "models/tmp/stg_jira__resolution_tmp.sql", "unique_id": "model.jira_source.stg_jira__resolution_tmp", "fqn": ["jira_source", "tmp", "stg_jira__resolution_tmp"], "alias": "stg_jira__resolution_tmp", "checksum": {"name": "sha256", "checksum": "4254df90446b8911d6664fb429ae20adfb05cfe415bed40e5563a5d5bb63786a"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1695163462.940866, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__resolution_tmp\"", "raw_code": "select * \nfrom {{ var('resolution') }}", "language": "sql", "refs": [], "sources": [["jira", "resolution"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.resolution"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__resolution_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1\".\"resolution\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null}, "test.jira.unique_jira__daily_issue_field_history_issue_day_id.75c24d3154": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_day_id", "model": "{{ get_where_subquery(ref('jira__daily_issue_field_history')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_jira__daily_issue_field_history_issue_day_id", "resource_type": "test", "package_name": "jira", "path": "unique_jira__daily_issue_field_history_issue_day_id.sql", "original_file_path": "models/jira.yml", "unique_id": "test.jira.unique_jira__daily_issue_field_history_issue_day_id.75c24d3154", "fqn": ["jira", "unique_jira__daily_issue_field_history_issue_day_id"], "alias": "unique_jira__daily_issue_field_history_issue_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163462.983796, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "jira__daily_issue_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.jira__daily_issue_field_history"]}, "compiled_path": "target/compiled/jira/models/jira.yml/unique_jira__daily_issue_field_history_issue_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_day_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__daily_issue_field_history\"\nwhere issue_day_id is not null\ngroup by issue_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_day_id", "file_key_name": "models.jira__daily_issue_field_history", "attached_node": "model.jira.jira__daily_issue_field_history"}, "test.jira.not_null_jira__daily_issue_field_history_issue_day_id.d13b058bcd": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_day_id", "model": "{{ get_where_subquery(ref('jira__daily_issue_field_history')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_jira__daily_issue_field_history_issue_day_id", "resource_type": "test", "package_name": "jira", "path": "not_null_jira__daily_issue_field_history_issue_day_id.sql", "original_file_path": "models/jira.yml", "unique_id": "test.jira.not_null_jira__daily_issue_field_history_issue_day_id.d13b058bcd", "fqn": ["jira", "not_null_jira__daily_issue_field_history_issue_day_id"], "alias": "not_null_jira__daily_issue_field_history_issue_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163462.9852648, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "jira__daily_issue_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.jira__daily_issue_field_history"]}, "compiled_path": "target/compiled/jira/models/jira.yml/not_null_jira__daily_issue_field_history_issue_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_day_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__daily_issue_field_history\"\nwhere issue_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_day_id", "file_key_name": "models.jira__daily_issue_field_history", "attached_node": "model.jira.jira__daily_issue_field_history"}, "test.jira.unique_jira__issue_enhanced_issue_id.fec6e723ee": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('jira__issue_enhanced')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_jira__issue_enhanced_issue_id", "resource_type": "test", "package_name": "jira", "path": "unique_jira__issue_enhanced_issue_id.sql", "original_file_path": "models/jira.yml", "unique_id": "test.jira.unique_jira__issue_enhanced_issue_id.fec6e723ee", "fqn": ["jira", "unique_jira__issue_enhanced_issue_id"], "alias": "unique_jira__issue_enhanced_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163462.986759, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "jira__issue_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.jira__issue_enhanced"]}, "compiled_path": "target/compiled/jira/models/jira.yml/unique_jira__issue_enhanced_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\"\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.jira__issue_enhanced", "attached_node": "model.jira.jira__issue_enhanced"}, "test.jira.not_null_jira__issue_enhanced_issue_id.6b18e0db38": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('jira__issue_enhanced')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_jira__issue_enhanced_issue_id", "resource_type": "test", "package_name": "jira", "path": "not_null_jira__issue_enhanced_issue_id.sql", "original_file_path": "models/jira.yml", "unique_id": "test.jira.not_null_jira__issue_enhanced_issue_id.6b18e0db38", "fqn": ["jira", "not_null_jira__issue_enhanced_issue_id"], "alias": "not_null_jira__issue_enhanced_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163462.988127, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "jira__issue_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.jira__issue_enhanced"]}, "compiled_path": "target/compiled/jira/models/jira.yml/not_null_jira__issue_enhanced_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\"\nwhere issue_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.jira__issue_enhanced", "attached_node": "model.jira.jira__issue_enhanced"}, "test.jira.unique_jira__project_enhanced_project_id.c18e39faef": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "project_id", "model": "{{ get_where_subquery(ref('jira__project_enhanced')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_jira__project_enhanced_project_id", "resource_type": "test", "package_name": "jira", "path": "unique_jira__project_enhanced_project_id.sql", "original_file_path": "models/jira.yml", "unique_id": "test.jira.unique_jira__project_enhanced_project_id.c18e39faef", "fqn": ["jira", "unique_jira__project_enhanced_project_id"], "alias": "unique_jira__project_enhanced_project_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163462.989492, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "jira__project_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.jira__project_enhanced"]}, "compiled_path": "target/compiled/jira/models/jira.yml/unique_jira__project_enhanced_project_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n project_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__project_enhanced\"\nwhere project_id is not null\ngroup by project_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "project_id", "file_key_name": "models.jira__project_enhanced", "attached_node": "model.jira.jira__project_enhanced"}, "test.jira.not_null_jira__project_enhanced_project_id.4f7c58f1d4": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "project_id", "model": "{{ get_where_subquery(ref('jira__project_enhanced')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_jira__project_enhanced_project_id", "resource_type": "test", "package_name": "jira", "path": "not_null_jira__project_enhanced_project_id.sql", "original_file_path": "models/jira.yml", "unique_id": "test.jira.not_null_jira__project_enhanced_project_id.4f7c58f1d4", "fqn": ["jira", "not_null_jira__project_enhanced_project_id"], "alias": "not_null_jira__project_enhanced_project_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163462.9908538, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "jira__project_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.jira__project_enhanced"]}, "compiled_path": "target/compiled/jira/models/jira.yml/not_null_jira__project_enhanced_project_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect project_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__project_enhanced\"\nwhere project_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "project_id", "file_key_name": "models.jira__project_enhanced", "attached_node": "model.jira.jira__project_enhanced"}, "test.jira.unique_jira__user_enhanced_user_id.c9ee73454a": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('jira__user_enhanced')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_jira__user_enhanced_user_id", "resource_type": "test", "package_name": "jira", "path": "unique_jira__user_enhanced_user_id.sql", "original_file_path": "models/jira.yml", "unique_id": "test.jira.unique_jira__user_enhanced_user_id.c9ee73454a", "fqn": ["jira", "unique_jira__user_enhanced_user_id"], "alias": "unique_jira__user_enhanced_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163462.9923341, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "jira__user_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.jira__user_enhanced"]}, "compiled_path": "target/compiled/jira/models/jira.yml/unique_jira__user_enhanced_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n user_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__user_enhanced\"\nwhere user_id is not null\ngroup by user_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "user_id", "file_key_name": "models.jira__user_enhanced", "attached_node": "model.jira.jira__user_enhanced"}, "test.jira.not_null_jira__user_enhanced_user_id.aecc00744a": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('jira__user_enhanced')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_jira__user_enhanced_user_id", "resource_type": "test", "package_name": "jira", "path": "not_null_jira__user_enhanced_user_id.sql", "original_file_path": "models/jira.yml", "unique_id": "test.jira.not_null_jira__user_enhanced_user_id.aecc00744a", "fqn": ["jira", "not_null_jira__user_enhanced_user_id"], "alias": "not_null_jira__user_enhanced_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163462.9936829, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "jira__user_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.jira__user_enhanced"]}, "compiled_path": "target/compiled/jira/models/jira.yml/not_null_jira__user_enhanced_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect user_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__user_enhanced\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "user_id", "file_key_name": "models.jira__user_enhanced", "attached_node": "model.jira.jira__user_enhanced"}, "test.jira.unique_int_jira__issue_join_issue_id.0bd360ec4b": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_join')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_int_jira__issue_join_issue_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__issue_join_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__issue_join_issue_id.0bd360ec4b", "fqn": ["jira", "intermediate", "unique_int_jira__issue_join_issue_id"], "alias": "unique_int_jira__issue_join_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.037179, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_join", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_join"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__issue_join_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_join\"\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_join", "attached_node": "model.jira.int_jira__issue_join"}, "test.jira.not_null_int_jira__issue_join_issue_id.53391b21a6": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_join')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_int_jira__issue_join_issue_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__issue_join_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__issue_join_issue_id.53391b21a6", "fqn": ["jira", "intermediate", "not_null_int_jira__issue_join_issue_id"], "alias": "not_null_int_jira__issue_join_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.0385978, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_join", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_join"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__issue_join_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_join\"\nwhere issue_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_join", "attached_node": "model.jira.int_jira__issue_join"}, "test.jira.unique_int_jira__project_metrics_project_id.154ccc194e": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "project_id", "model": "{{ get_where_subquery(ref('int_jira__project_metrics')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_int_jira__project_metrics_project_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__project_metrics_project_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__project_metrics_project_id.154ccc194e", "fqn": ["jira", "intermediate", "unique_int_jira__project_metrics_project_id"], "alias": "unique_int_jira__project_metrics_project_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.039983, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__project_metrics", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__project_metrics"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__project_metrics_project_id.sql", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__project_metrics as (\nwith issue as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\"\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then open_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then open_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_age_currently_open_seconds,\n\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then any_assignment_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_assigned_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then any_assignment_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n \n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as numeric(28,6) ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as numeric(28,6) ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics\n)select\n project_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__project_metrics\nwhere project_id is not null\ngroup by project_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__project_metrics", "sql": " __dbt__cte__int_jira__project_metrics as (\nwith issue as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\"\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then open_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then open_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_age_currently_open_seconds,\n\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then any_assignment_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_assigned_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then any_assignment_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n \n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as numeric(28,6) ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as numeric(28,6) ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics\n)"}], "contract": {"enforced": false, "checksum": null}, "column_name": "project_id", "file_key_name": "models.int_jira__project_metrics", "attached_node": "model.jira.int_jira__project_metrics"}, "test.jira.not_null_int_jira__project_metrics_project_id.1542338148": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "project_id", "model": "{{ get_where_subquery(ref('int_jira__project_metrics')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_int_jira__project_metrics_project_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__project_metrics_project_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__project_metrics_project_id.1542338148", "fqn": ["jira", "intermediate", "not_null_int_jira__project_metrics_project_id"], "alias": "not_null_int_jira__project_metrics_project_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.041492, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__project_metrics", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__project_metrics"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__project_metrics_project_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__project_metrics as (\nwith issue as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\"\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then open_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then open_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_age_currently_open_seconds,\n\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then any_assignment_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_assigned_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then any_assignment_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n \n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as numeric(28,6) ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as numeric(28,6) ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics\n)select project_id\nfrom __dbt__cte__int_jira__project_metrics\nwhere project_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__project_metrics", "sql": " __dbt__cte__int_jira__project_metrics as (\nwith issue as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\"\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then open_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then open_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_age_currently_open_seconds,\n\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then any_assignment_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_assigned_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then any_assignment_duration_seconds end )\n over ( partition by project_id )\n\n as numeric(28,6) ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n \n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as numeric(28,6) ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as numeric(28,6) ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics\n)"}], "contract": {"enforced": false, "checksum": null}, "column_name": "project_id", "file_key_name": "models.int_jira__project_metrics", "attached_node": "model.jira.int_jira__project_metrics"}, "test.jira.unique_int_jira__user_metrics_user_id.c042bcdd66": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('int_jira__user_metrics')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_int_jira__user_metrics_user_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__user_metrics_user_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__user_metrics_user_id.c042bcdd66", "fqn": ["jira", "intermediate", "unique_int_jira__user_metrics_user_id"], "alias": "unique_int_jira__user_metrics_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.042855, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__user_metrics", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__user_metrics"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__user_metrics_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__user_metrics as (\nwith issue as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\" \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then last_assignment_duration_seconds end )\n over ( partition by assignee_user_id )\n\n as numeric(28,6)), 0) as median_close_time_seconds,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then last_assignment_duration_seconds end )\n over ( partition by assignee_user_id )\n\n as numeric(28,6)), 0) as median_age_currently_open_seconds\n\n from issue\n\n \n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics\n)select\n user_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__user_metrics\nwhere user_id is not null\ngroup by user_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__user_metrics", "sql": " __dbt__cte__int_jira__user_metrics as (\nwith issue as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\" \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then last_assignment_duration_seconds end )\n over ( partition by assignee_user_id )\n\n as numeric(28,6)), 0) as median_close_time_seconds,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then last_assignment_duration_seconds end )\n over ( partition by assignee_user_id )\n\n as numeric(28,6)), 0) as median_age_currently_open_seconds\n\n from issue\n\n \n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics\n)"}], "contract": {"enforced": false, "checksum": null}, "column_name": "user_id", "file_key_name": "models.int_jira__user_metrics", "attached_node": "model.jira.int_jira__user_metrics"}, "test.jira.not_null_int_jira__user_metrics_user_id.2143177b14": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('int_jira__user_metrics')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_int_jira__user_metrics_user_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__user_metrics_user_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__user_metrics_user_id.2143177b14", "fqn": ["jira", "intermediate", "not_null_int_jira__user_metrics_user_id"], "alias": "not_null_int_jira__user_metrics_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.044209, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__user_metrics", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__user_metrics"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__user_metrics_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__user_metrics as (\nwith issue as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\" \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then last_assignment_duration_seconds end )\n over ( partition by assignee_user_id )\n\n as numeric(28,6)), 0) as median_close_time_seconds,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then last_assignment_duration_seconds end )\n over ( partition by assignee_user_id )\n\n as numeric(28,6)), 0) as median_age_currently_open_seconds\n\n from issue\n\n \n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics\n)select user_id\nfrom __dbt__cte__int_jira__user_metrics\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__user_metrics", "sql": " __dbt__cte__int_jira__user_metrics as (\nwith issue as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira\".\"jira__issue_enhanced\" \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then last_assignment_duration_seconds end )\n over ( partition by assignee_user_id )\n\n as numeric(28,6)), 0) as median_close_time_seconds,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then last_assignment_duration_seconds end )\n over ( partition by assignee_user_id )\n\n as numeric(28,6)), 0) as median_age_currently_open_seconds\n\n from issue\n\n \n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics\n)"}], "contract": {"enforced": false, "checksum": null}, "column_name": "user_id", "file_key_name": "models.int_jira__user_metrics", "attached_node": "model.jira.int_jira__user_metrics"}, "test.jira.unique_int_jira__issue_comments_issue_id.26e3f11046": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_comments')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_int_jira__issue_comments_issue_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__issue_comments_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__issue_comments_issue_id.26e3f11046", "fqn": ["jira", "intermediate", "unique_int_jira__issue_comments_issue_id"], "alias": "unique_int_jira__issue_comments_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.04572, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_comments", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_comments"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__issue_comments_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__issue_comments as (\n\n\nwith comment as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__comment\"\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n \n listagg(comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body, '\\n')\n\n as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments\n)select\n issue_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__issue_comments\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_comments", "sql": " __dbt__cte__int_jira__issue_comments as (\n\n\nwith comment as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__comment\"\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n \n listagg(comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body, '\\n')\n\n as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments\n)"}], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_comments", "attached_node": "model.jira.int_jira__issue_comments"}, "test.jira.not_null_int_jira__issue_comments_issue_id.9f16878e45": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_comments')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_int_jira__issue_comments_issue_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__issue_comments_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__issue_comments_issue_id.9f16878e45", "fqn": ["jira", "intermediate", "not_null_int_jira__issue_comments_issue_id"], "alias": "not_null_int_jira__issue_comments_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.0470889, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_comments", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_comments"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__issue_comments_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__issue_comments as (\n\n\nwith comment as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__comment\"\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n \n listagg(comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body, '\\n')\n\n as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments\n)select issue_id\nfrom __dbt__cte__int_jira__issue_comments\nwhere issue_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_comments", "sql": " __dbt__cte__int_jira__issue_comments as (\n\n\nwith comment as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__comment\"\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n \n listagg(comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body, '\\n')\n\n as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments\n)"}], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_comments", "attached_node": "model.jira.int_jira__issue_comments"}, "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_epic_issue_id__epic_issue_id.9ddee9201b": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["issue_id", "epic_issue_id"], "model": "{{ get_where_subquery(ref('int_jira__issue_epic')) }}"}, "namespace": "dbt_utils"}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_int_jira__issue_epic_issue_id__epic_issue_id", "resource_type": "test", "package_name": "jira", "path": "dbt_utils_unique_combination_o_4f049bddcf29586e6c474b917f4874cb.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_epic_issue_id__epic_issue_id.9ddee9201b", "fqn": ["jira", "intermediate", "dbt_utils_unique_combination_of_columns_int_jira__issue_epic_issue_id__epic_issue_id"], "alias": "dbt_utils_unique_combination_o_4f049bddcf29586e6c474b917f4874cb", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_4f049bddcf29586e6c474b917f4874cb", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_4f049bddcf29586e6c474b917f4874cb"}, "created_at": 1695163463.048465, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_4f049bddcf29586e6c474b917f4874cb\") }}", "language": "sql", "refs": [{"name": "int_jira__issue_epic", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_epic"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/dbt_utils_unique_combination_o_4f049bddcf29586e6c474b917f4874cb.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_epic as (\n-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\nwith epic_field_history as (\n\n select *\n from __dbt__cte__int_jira__issue_field_history\n where lower(field_name) like 'epic%link'\n \n),\n\norder_epic_links as (\n\n select\n issue_id,\n cast(field_value as INT ) as epic_issue_id,\n\n row_number() over (\n partition by issue_id order by updated_at desc\n ) as row_num\n\n from epic_field_history\n),\n\nlast_epic_link as (\n\n select \n issue_id, \n epic_issue_id \n \n from order_epic_links\n where row_num = 1\n)\n\nselect *\nfrom last_epic_link\n),validation_errors as (\n\n select\n issue_id, epic_issue_id\n from __dbt__cte__int_jira__issue_epic\n group by issue_id, epic_issue_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_epic", "sql": " __dbt__cte__int_jira__issue_epic as (\n-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\nwith epic_field_history as (\n\n select *\n from __dbt__cte__int_jira__issue_field_history\n where lower(field_name) like 'epic%link'\n \n),\n\norder_epic_links as (\n\n select\n issue_id,\n cast(field_value as INT ) as epic_issue_id,\n\n row_number() over (\n partition by issue_id order by updated_at desc\n ) as row_num\n\n from epic_field_history\n),\n\nlast_epic_link as (\n\n select \n issue_id, \n epic_issue_id \n \n from order_epic_links\n where row_num = 1\n)\n\nselect *\nfrom last_epic_link\n)"}], "contract": {"enforced": false, "checksum": null}, "column_name": null, "file_key_name": "models.int_jira__issue_epic", "attached_node": "model.jira.int_jira__issue_epic"}, "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_sprint_issue_id__current_sprint_id.aafda24567": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["issue_id", "current_sprint_id"], "model": "{{ get_where_subquery(ref('int_jira__issue_sprint')) }}"}, "namespace": "dbt_utils"}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_int_jira__issue_sprint_issue_id__current_sprint_id", "resource_type": "test", "package_name": "jira", "path": "dbt_utils_unique_combination_o_61e230a0d389713fafe23af01c58f2d3.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_sprint_issue_id__current_sprint_id.aafda24567", "fqn": ["jira", "intermediate", "dbt_utils_unique_combination_of_columns_int_jira__issue_sprint_issue_id__current_sprint_id"], "alias": "dbt_utils_unique_combination_o_61e230a0d389713fafe23af01c58f2d3", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_61e230a0d389713fafe23af01c58f2d3", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_61e230a0d389713fafe23af01c58f2d3"}, "created_at": 1695163463.056075, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_61e230a0d389713fafe23af01c58f2d3\") }}", "language": "sql", "refs": [{"name": "int_jira__issue_sprint", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_sprint"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/dbt_utils_unique_combination_o_61e230a0d389713fafe23af01c58f2d3.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_sprint as (\n\n\nwith sprint as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__sprint\"\n\n),\n\nfield_history as (\n\n -- sprints don't appear to be capable of multiselect in the UI...\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n),\n\nsprint_field_history as (\n\n select \n field_history.*,\n sprint.*,\n row_number() over (\n partition by field_history.issue_id \n order by field_history.updated_at desc, sprint.started_at desc \n ) as row_num\n from field_history\n join sprint on field_history.field_value = cast(sprint.sprint_id as TEXT)\n where lower(field_history.field_name) = 'sprint'\n),\n\n\nlast_sprint as (\n\n select *\n from sprint_field_history\n \n where row_num = 1\n\n), \n\nsprint_rollovers as (\n\n select \n issue_id,\n count(distinct case when field_value is not null then field_value end) as count_sprint_changes\n \n from sprint_field_history\n group by 1\n\n),\n\nissue_sprint as (\n\n select \n last_sprint.issue_id,\n last_sprint.field_value as current_sprint_id,\n last_sprint.sprint_name as current_sprint_name,\n last_sprint.board_id,\n last_sprint.started_at as sprint_started_at,\n last_sprint.ended_at as sprint_ended_at,\n last_sprint.completed_at as sprint_completed_at,\n coalesce(sprint_rollovers.count_sprint_changes, 0) as count_sprint_changes\n\n from \n last_sprint \n left join sprint_rollovers on sprint_rollovers.issue_id = last_sprint.issue_id\n \n)\n\nselect * from issue_sprint\n),validation_errors as (\n\n select\n issue_id, current_sprint_id\n from __dbt__cte__int_jira__issue_sprint\n group by issue_id, current_sprint_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_multiselect_history", "sql": " __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_sprint", "sql": " __dbt__cte__int_jira__issue_sprint as (\n\n\nwith sprint as (\n\n select * \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__sprint\"\n\n),\n\nfield_history as (\n\n -- sprints don't appear to be capable of multiselect in the UI...\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n),\n\nsprint_field_history as (\n\n select \n field_history.*,\n sprint.*,\n row_number() over (\n partition by field_history.issue_id \n order by field_history.updated_at desc, sprint.started_at desc \n ) as row_num\n from field_history\n join sprint on field_history.field_value = cast(sprint.sprint_id as TEXT)\n where lower(field_history.field_name) = 'sprint'\n),\n\n\nlast_sprint as (\n\n select *\n from sprint_field_history\n \n where row_num = 1\n\n), \n\nsprint_rollovers as (\n\n select \n issue_id,\n count(distinct case when field_value is not null then field_value end) as count_sprint_changes\n \n from sprint_field_history\n group by 1\n\n),\n\nissue_sprint as (\n\n select \n last_sprint.issue_id,\n last_sprint.field_value as current_sprint_id,\n last_sprint.sprint_name as current_sprint_name,\n last_sprint.board_id,\n last_sprint.started_at as sprint_started_at,\n last_sprint.ended_at as sprint_ended_at,\n last_sprint.completed_at as sprint_completed_at,\n coalesce(sprint_rollovers.count_sprint_changes, 0) as count_sprint_changes\n\n from \n last_sprint \n left join sprint_rollovers on sprint_rollovers.issue_id = last_sprint.issue_id\n \n)\n\nselect * from issue_sprint\n)"}], "contract": {"enforced": false, "checksum": null}, "column_name": null, "file_key_name": "models.int_jira__issue_sprint", "attached_node": "model.jira.int_jira__issue_sprint"}, "test.jira.unique_int_jira__issue_type_parents_issue_id.c07f8c6af3": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_type_parents')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_int_jira__issue_type_parents_issue_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__issue_type_parents_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__issue_type_parents_issue_id.c07f8c6af3", "fqn": ["jira", "intermediate", "unique_int_jira__issue_type_parents_issue_id"], "alias": "unique_int_jira__issue_type_parents_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.059237, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_type_parents", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_type_parents"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__issue_type_parents_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_type_parents\"\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_type_parents", "attached_node": "model.jira.int_jira__issue_type_parents"}, "test.jira.not_null_int_jira__issue_type_parents_issue_id.8dd98255b0": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_type_parents')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_int_jira__issue_type_parents_issue_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__issue_type_parents_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__issue_type_parents_issue_id.8dd98255b0", "fqn": ["jira", "intermediate", "not_null_int_jira__issue_type_parents_issue_id"], "alias": "not_null_int_jira__issue_type_parents_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.0607371, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_type_parents", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_type_parents"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__issue_type_parents_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_type_parents\"\nwhere issue_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_type_parents", "attached_node": "model.jira.int_jira__issue_type_parents"}, "test.jira.unique_int_jira__issue_users_issue_id.e3a5962431": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_users')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_int_jira__issue_users_issue_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__issue_users_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__issue_users_issue_id.e3a5962431", "fqn": ["jira", "intermediate", "unique_int_jira__issue_users_issue_id"], "alias": "unique_int_jira__issue_users_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.062119, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_users", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_users"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__issue_users_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__issue_users as (\n-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n \n\n select\n issue_id,\n coalesce(revised_parent_issue_id, parent_issue_id) as parent_issue_id,\n\n \"original_estimate_seconds\",\n \"remaining_estimate_seconds\",\n \"time_spent_seconds\",\n \"assignee_user_id\",\n \"created_at\",\n \"resolved_at\",\n \"creator_user_id\",\n \"issue_description\",\n \"due_date\",\n \"environment\",\n \"issue_type_id\",\n \"issue_key\",\n \"priority_id\",\n \"project_id\",\n \"reporter_user_id\",\n \"resolution_id\",\n \"status_id\",\n \"status_changed_at\",\n \"issue_name\",\n \"updated_at\",\n \"work_ratio\",\n \"_fivetran_synced\",\n \"issue_type\",\n \"parent_issue_type\",\n \"parent_issue_name\",\n \"parent_issue_key\",\n \"is_parent_epic\"\n\n\n \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_type_parents\"\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join\n)select\n issue_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__issue_users\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_users", "sql": " __dbt__cte__int_jira__issue_users as (\n-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n \n\n select\n issue_id,\n coalesce(revised_parent_issue_id, parent_issue_id) as parent_issue_id,\n\n \"original_estimate_seconds\",\n \"remaining_estimate_seconds\",\n \"time_spent_seconds\",\n \"assignee_user_id\",\n \"created_at\",\n \"resolved_at\",\n \"creator_user_id\",\n \"issue_description\",\n \"due_date\",\n \"environment\",\n \"issue_type_id\",\n \"issue_key\",\n \"priority_id\",\n \"project_id\",\n \"reporter_user_id\",\n \"resolution_id\",\n \"status_id\",\n \"status_changed_at\",\n \"issue_name\",\n \"updated_at\",\n \"work_ratio\",\n \"_fivetran_synced\",\n \"issue_type\",\n \"parent_issue_type\",\n \"parent_issue_name\",\n \"parent_issue_key\",\n \"is_parent_epic\"\n\n\n \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_type_parents\"\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join\n)"}], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_users", "attached_node": "model.jira.int_jira__issue_users"}, "test.jira.not_null_int_jira__issue_users_issue_id.480b7b6beb": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_users')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_int_jira__issue_users_issue_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__issue_users_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__issue_users_issue_id.480b7b6beb", "fqn": ["jira", "intermediate", "not_null_int_jira__issue_users_issue_id"], "alias": "not_null_int_jira__issue_users_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.063495, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_users", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_users"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__issue_users_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__issue_users as (\n-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n \n\n select\n issue_id,\n coalesce(revised_parent_issue_id, parent_issue_id) as parent_issue_id,\n\n \"original_estimate_seconds\",\n \"remaining_estimate_seconds\",\n \"time_spent_seconds\",\n \"assignee_user_id\",\n \"created_at\",\n \"resolved_at\",\n \"creator_user_id\",\n \"issue_description\",\n \"due_date\",\n \"environment\",\n \"issue_type_id\",\n \"issue_key\",\n \"priority_id\",\n \"project_id\",\n \"reporter_user_id\",\n \"resolution_id\",\n \"status_id\",\n \"status_changed_at\",\n \"issue_name\",\n \"updated_at\",\n \"work_ratio\",\n \"_fivetran_synced\",\n \"issue_type\",\n \"parent_issue_type\",\n \"parent_issue_name\",\n \"parent_issue_key\",\n \"is_parent_epic\"\n\n\n \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_type_parents\"\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join\n)select issue_id\nfrom __dbt__cte__int_jira__issue_users\nwhere issue_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_users", "sql": " __dbt__cte__int_jira__issue_users as (\n-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n \n\n select\n issue_id,\n coalesce(revised_parent_issue_id, parent_issue_id) as parent_issue_id,\n\n \"original_estimate_seconds\",\n \"remaining_estimate_seconds\",\n \"time_spent_seconds\",\n \"assignee_user_id\",\n \"created_at\",\n \"resolved_at\",\n \"creator_user_id\",\n \"issue_description\",\n \"due_date\",\n \"environment\",\n \"issue_type_id\",\n \"issue_key\",\n \"priority_id\",\n \"project_id\",\n \"reporter_user_id\",\n \"resolution_id\",\n \"status_id\",\n \"status_changed_at\",\n \"issue_name\",\n \"updated_at\",\n \"work_ratio\",\n \"_fivetran_synced\",\n \"issue_type\",\n \"parent_issue_type\",\n \"parent_issue_name\",\n \"parent_issue_key\",\n \"is_parent_epic\"\n\n\n \n from \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_type_parents\"\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join\n)"}], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_users", "attached_node": "model.jira.int_jira__issue_users"}, "test.jira.unique_int_jira__agg_multiselect_history_batch_id.14b3dea579": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "batch_id", "model": "{{ get_where_subquery(ref('int_jira__agg_multiselect_history')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_int_jira__agg_multiselect_history_batch_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__agg_multiselect_history_batch_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__agg_multiselect_history_batch_id.14b3dea579", "fqn": ["jira", "intermediate", "unique_int_jira__agg_multiselect_history_batch_id"], "alias": "unique_int_jira__agg_multiselect_history_batch_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.064855, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__agg_multiselect_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__agg_multiselect_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__agg_multiselect_history_batch_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n batch_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__agg_multiselect_history\"\nwhere batch_id is not null\ngroup by batch_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "batch_id", "file_key_name": "models.int_jira__agg_multiselect_history", "attached_node": "model.jira.int_jira__agg_multiselect_history"}, "test.jira.not_null_int_jira__agg_multiselect_history_batch_id.7d6d2460a8": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "batch_id", "model": "{{ get_where_subquery(ref('int_jira__agg_multiselect_history')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_int_jira__agg_multiselect_history_batch_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__agg_multiselect_history_batch_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__agg_multiselect_history_batch_id.7d6d2460a8", "fqn": ["jira", "intermediate", "not_null_int_jira__agg_multiselect_history_batch_id"], "alias": "not_null_int_jira__agg_multiselect_history_batch_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.06635, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__agg_multiselect_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__agg_multiselect_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__agg_multiselect_history_batch_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect batch_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__agg_multiselect_history\"\nwhere batch_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "batch_id", "file_key_name": "models.int_jira__agg_multiselect_history", "attached_node": "model.jira.int_jira__agg_multiselect_history"}, "test.jira.unique_int_jira__combine_field_histories_combined_history_id.5b6b492428": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "combined_history_id", "model": "{{ get_where_subquery(ref('int_jira__combine_field_histories')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_int_jira__combine_field_histories_combined_history_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__combine_field_histories_combined_history_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__combine_field_histories_combined_history_id.5b6b492428", "fqn": ["jira", "intermediate", "unique_int_jira__combine_field_histories_combined_history_id"], "alias": "unique_int_jira__combine_field_histories_combined_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.067725, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__combine_field_histories", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__combine_field_histories"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__combine_field_histories_combined_history_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n combined_history_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__combine_field_histories\"\nwhere combined_history_id is not null\ngroup by combined_history_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "combined_history_id", "file_key_name": "models.int_jira__combine_field_histories", "attached_node": "model.jira.int_jira__combine_field_histories"}, "test.jira.not_null_int_jira__combine_field_histories_combined_history_id.943e81a794": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "combined_history_id", "model": "{{ get_where_subquery(ref('int_jira__combine_field_histories')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_int_jira__combine_field_histories_combined_history_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__combine_field_histories_combined_history_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__combine_field_histories_combined_history_id.943e81a794", "fqn": ["jira", "intermediate", "not_null_int_jira__combine_field_histories_combined_history_id"], "alias": "not_null_int_jira__combine_field_histories_combined_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.06908, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__combine_field_histories", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__combine_field_histories"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__combine_field_histories_combined_history_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect combined_history_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__combine_field_histories\"\nwhere combined_history_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "combined_history_id", "file_key_name": "models.int_jira__combine_field_histories", "attached_node": "model.jira.int_jira__combine_field_histories"}, "test.jira.unique_int_jira__issue_calendar_spine_issue_day_id.c49483d2e5": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_day_id", "model": "{{ get_where_subquery(ref('int_jira__issue_calendar_spine')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_int_jira__issue_calendar_spine_issue_day_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__issue_calendar_spine_issue_day_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__issue_calendar_spine_issue_day_id.c49483d2e5", "fqn": ["jira", "intermediate", "unique_int_jira__issue_calendar_spine_issue_day_id"], "alias": "unique_int_jira__issue_calendar_spine_issue_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.070571, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_calendar_spine", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_calendar_spine"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__issue_calendar_spine_issue_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_day_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_calendar_spine\"\nwhere issue_day_id is not null\ngroup by issue_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_day_id", "file_key_name": "models.int_jira__issue_calendar_spine", "attached_node": "model.jira.int_jira__issue_calendar_spine"}, "test.jira.not_null_int_jira__issue_calendar_spine_issue_day_id.a9512b8e8a": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_day_id", "model": "{{ get_where_subquery(ref('int_jira__issue_calendar_spine')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_int_jira__issue_calendar_spine_issue_day_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__issue_calendar_spine_issue_day_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__issue_calendar_spine_issue_day_id.a9512b8e8a", "fqn": ["jira", "intermediate", "not_null_int_jira__issue_calendar_spine_issue_day_id"], "alias": "not_null_int_jira__issue_calendar_spine_issue_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.071934, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_calendar_spine", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_calendar_spine"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__issue_calendar_spine_issue_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_day_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__issue_calendar_spine\"\nwhere issue_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_day_id", "file_key_name": "models.int_jira__issue_calendar_spine", "attached_node": "model.jira.int_jira__issue_calendar_spine"}, "test.jira.unique_int_jira__daily_field_history_issue_field_day_id.bfd34ced78": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_field_day_id", "model": "{{ get_where_subquery(ref('int_jira__daily_field_history')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_int_jira__daily_field_history_issue_field_day_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__daily_field_history_issue_field_day_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__daily_field_history_issue_field_day_id.bfd34ced78", "fqn": ["jira", "intermediate", "unique_int_jira__daily_field_history_issue_field_day_id"], "alias": "unique_int_jira__daily_field_history_issue_field_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.073292, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__daily_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__daily_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__daily_field_history_issue_field_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_field_day_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__daily_field_history\"\nwhere issue_field_day_id is not null\ngroup by issue_field_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_field_day_id", "file_key_name": "models.int_jira__daily_field_history", "attached_node": "model.jira.int_jira__daily_field_history"}, "test.jira.not_null_int_jira__daily_field_history_issue_field_day_id.c910c3df84": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_field_day_id", "model": "{{ get_where_subquery(ref('int_jira__daily_field_history')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_int_jira__daily_field_history_issue_field_day_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__daily_field_history_issue_field_day_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__daily_field_history_issue_field_day_id.c910c3df84", "fqn": ["jira", "intermediate", "not_null_int_jira__daily_field_history_issue_field_day_id"], "alias": "not_null_int_jira__daily_field_history_issue_field_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.07465, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__daily_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__daily_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__daily_field_history_issue_field_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_field_day_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__daily_field_history\"\nwhere issue_field_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_field_day_id", "file_key_name": "models.int_jira__daily_field_history", "attached_node": "model.jira.int_jira__daily_field_history"}, "test.jira.unique_int_jira__pivot_daily_field_history_issue_day_id.46c6f9a842": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_day_id", "model": "{{ get_where_subquery(ref('int_jira__pivot_daily_field_history')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_int_jira__pivot_daily_field_history_issue_day_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__pivot_daily_field_history_issue_day_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__pivot_daily_field_history_issue_day_id.46c6f9a842", "fqn": ["jira", "intermediate", "unique_int_jira__pivot_daily_field_history_issue_day_id"], "alias": "unique_int_jira__pivot_daily_field_history_issue_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.076137, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__pivot_daily_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__pivot_daily_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__pivot_daily_field_history_issue_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_day_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__pivot_daily_field_history\"\nwhere issue_day_id is not null\ngroup by issue_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_day_id", "file_key_name": "models.int_jira__pivot_daily_field_history", "attached_node": "model.jira.int_jira__pivot_daily_field_history"}, "test.jira.not_null_int_jira__pivot_daily_field_history_issue_day_id.b697c971fd": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_day_id", "model": "{{ get_where_subquery(ref('int_jira__pivot_daily_field_history')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_int_jira__pivot_daily_field_history_issue_day_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__pivot_daily_field_history_issue_day_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__pivot_daily_field_history_issue_day_id.b697c971fd", "fqn": ["jira", "intermediate", "not_null_int_jira__pivot_daily_field_history_issue_day_id"], "alias": "not_null_int_jira__pivot_daily_field_history_issue_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.077494, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__pivot_daily_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__pivot_daily_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__pivot_daily_field_history_issue_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_day_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__pivot_daily_field_history\"\nwhere issue_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_day_id", "file_key_name": "models.int_jira__pivot_daily_field_history", "attached_node": "model.jira.int_jira__pivot_daily_field_history"}, "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_field_history_field_id__issue_id__updated_at.34d1b3eaa1": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["field_id", "issue_id", "updated_at"], "model": "{{ get_where_subquery(ref('int_jira__issue_field_history')) }}"}, "namespace": "dbt_utils"}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_int_jira__issue_field_history_field_id__issue_id__updated_at", "resource_type": "test", "package_name": "jira", "path": "dbt_utils_unique_combination_o_6a26d6675a6f68d7ad230e5b0d114426.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_field_history_field_id__issue_id__updated_at.34d1b3eaa1", "fqn": ["jira", "intermediate", "dbt_utils_unique_combination_of_columns_int_jira__issue_field_history_field_id__issue_id__updated_at"], "alias": "dbt_utils_unique_combination_o_6a26d6675a6f68d7ad230e5b0d114426", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_6a26d6675a6f68d7ad230e5b0d114426", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_6a26d6675a6f68d7ad230e5b0d114426"}, "created_at": 1695163463.078857, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_6a26d6675a6f68d7ad230e5b0d114426\") }}", "language": "sql", "refs": [{"name": "int_jira__issue_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/dbt_utils_unique_combination_o_6a26d6675a6f68d7ad230e5b0d114426.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n),validation_errors as (\n\n select\n field_id, issue_id, updated_at\n from __dbt__cte__int_jira__issue_field_history\n group by field_id, issue_id, updated_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}], "contract": {"enforced": false, "checksum": null}, "column_name": null, "file_key_name": "models.int_jira__issue_field_history", "attached_node": "model.jira.int_jira__issue_field_history"}, "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_multiselect_history__fivetran_id__updated_at.aad394167d": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["_fivetran_id", "updated_at"], "model": "{{ get_where_subquery(ref('int_jira__issue_multiselect_history')) }}"}, "namespace": "dbt_utils"}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_int_jira__issue_multiselect_history__fivetran_id__updated_at", "resource_type": "test", "package_name": "jira", "path": "dbt_utils_unique_combination_o_3302141fdcb5257bdeed7d73028a6b10.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_multiselect_history__fivetran_id__updated_at.aad394167d", "fqn": ["jira", "intermediate", "dbt_utils_unique_combination_of_columns_int_jira__issue_multiselect_history__fivetran_id__updated_at"], "alias": "dbt_utils_unique_combination_o_3302141fdcb5257bdeed7d73028a6b10", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_3302141fdcb5257bdeed7d73028a6b10", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_3302141fdcb5257bdeed7d73028a6b10"}, "created_at": 1695163463.082411, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_3302141fdcb5257bdeed7d73028a6b10\") }}", "language": "sql", "refs": [{"name": "int_jira__issue_multiselect_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_multiselect_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/dbt_utils_unique_combination_o_3302141fdcb5257bdeed7d73028a6b10.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n),validation_errors as (\n\n select\n _fivetran_id, updated_at\n from __dbt__cte__int_jira__issue_multiselect_history\n group by _fivetran_id, updated_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_multiselect_history", "sql": " __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}], "contract": {"enforced": false, "checksum": null}, "column_name": null, "file_key_name": "models.int_jira__issue_multiselect_history", "attached_node": "model.jira.int_jira__issue_multiselect_history"}, "test.jira.unique_int_jira__issue_assign_resolution_issue_id.f41f7c00ab": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_assign_resolution')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_int_jira__issue_assign_resolution_issue_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__issue_assign_resolution_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__issue_assign_resolution_issue_id.f41f7c00ab", "fqn": ["jira", "intermediate", "unique_int_jira__issue_assign_resolution_issue_id"], "alias": "unique_int_jira__issue_assign_resolution_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.085557, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_assign_resolution", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_assign_resolution"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__issue_assign_resolution_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_assign_resolution as (\nwith issue_field_history as (\n \n select *\n from __dbt__cte__int_jira__issue_field_history\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates\n)select\n issue_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__issue_assign_resolution\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_assign_resolution", "sql": " __dbt__cte__int_jira__issue_assign_resolution as (\nwith issue_field_history as (\n \n select *\n from __dbt__cte__int_jira__issue_field_history\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates\n)"}], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_assign_resolution", "attached_node": "model.jira.int_jira__issue_assign_resolution"}, "test.jira.not_null_int_jira__issue_assign_resolution_issue_id.b3af89c733": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_assign_resolution')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_int_jira__issue_assign_resolution_issue_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__issue_assign_resolution_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__issue_assign_resolution_issue_id.b3af89c733", "fqn": ["jira", "intermediate", "not_null_int_jira__issue_assign_resolution_issue_id"], "alias": "not_null_int_jira__issue_assign_resolution_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.086933, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_assign_resolution", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_assign_resolution"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__issue_assign_resolution_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_assign_resolution as (\nwith issue_field_history as (\n \n select *\n from __dbt__cte__int_jira__issue_field_history\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates\n)select issue_id\nfrom __dbt__cte__int_jira__issue_assign_resolution\nwhere issue_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_assign_resolution", "sql": " __dbt__cte__int_jira__issue_assign_resolution as (\nwith issue_field_history as (\n \n select *\n from __dbt__cte__int_jira__issue_field_history\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates\n)"}], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_assign_resolution", "attached_node": "model.jira.int_jira__issue_assign_resolution"}, "test.jira.unique_int_jira__field_history_scd_issue_day_id.21b932e949": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_day_id", "model": "{{ get_where_subquery(ref('int_jira__field_history_scd')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_int_jira__field_history_scd_issue_day_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__field_history_scd_issue_day_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__field_history_scd_issue_day_id.21b932e949", "fqn": ["jira", "intermediate", "unique_int_jira__field_history_scd_issue_day_id"], "alias": "unique_int_jira__field_history_scd_issue_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.088446, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__field_history_scd", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__field_history_scd"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__field_history_scd_issue_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_day_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__field_history_scd\"\nwhere issue_day_id is not null\ngroup by issue_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_day_id", "file_key_name": "models.int_jira__field_history_scd", "attached_node": "model.jira.int_jira__field_history_scd"}, "test.jira.not_null_int_jira__field_history_scd_issue_day_id.327ac0856c": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_day_id", "model": "{{ get_where_subquery(ref('int_jira__field_history_scd')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_int_jira__field_history_scd_issue_day_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__field_history_scd_issue_day_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__field_history_scd_issue_day_id.327ac0856c", "fqn": ["jira", "intermediate", "not_null_int_jira__field_history_scd_issue_day_id"], "alias": "not_null_int_jira__field_history_scd_issue_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.089823, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__field_history_scd", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__field_history_scd"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__field_history_scd_issue_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_day_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_int_jira\".\"int_jira__field_history_scd\"\nwhere issue_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_day_id", "file_key_name": "models.int_jira__field_history_scd", "attached_node": "model.jira.int_jira__field_history_scd"}, "test.jira.unique_int_jira__issue_versions_issue_id.e2a88132de": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_versions')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_int_jira__issue_versions_issue_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__issue_versions_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__issue_versions_issue_id.e2a88132de", "fqn": ["jira", "intermediate", "unique_int_jira__issue_versions_issue_id"], "alias": "unique_int_jira__issue_versions_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.091191, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_versions", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_versions"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__issue_versions_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_versions as (\n\n\nwith version as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__version\"\n),\n\nversion_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as INT) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n \n listagg(version.version_name, ', ')\n\n as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final\n)select\n issue_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__issue_versions\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_multiselect_history", "sql": " __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_versions", "sql": " __dbt__cte__int_jira__issue_versions as (\n\n\nwith version as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__version\"\n),\n\nversion_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as INT) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n \n listagg(version.version_name, ', ')\n\n as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_versions", "attached_node": "model.jira.int_jira__issue_versions"}, "test.jira.not_null_int_jira__issue_versions_issue_id.54c4cd445e": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_versions')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_int_jira__issue_versions_issue_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__issue_versions_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__issue_versions_issue_id.54c4cd445e", "fqn": ["jira", "intermediate", "not_null_int_jira__issue_versions_issue_id"], "alias": "not_null_int_jira__issue_versions_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.0925481, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_versions", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_versions"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__issue_versions_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_versions as (\n\n\nwith version as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__version\"\n),\n\nversion_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as INT) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n \n listagg(version.version_name, ', ')\n\n as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final\n)select issue_id\nfrom __dbt__cte__int_jira__issue_versions\nwhere issue_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_multiselect_history", "sql": " __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_versions", "sql": " __dbt__cte__int_jira__issue_versions as (\n\n\nwith version as (\n\n select *\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__version\"\n),\n\nversion_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as INT) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n \n listagg(version.version_name, ', ')\n\n as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_versions", "attached_node": "model.jira.int_jira__issue_versions"}, "test.jira_source.unique_stg_jira__comment_comment_id.004104fac5": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "comment_id", "model": "{{ get_where_subquery(ref('stg_jira__comment')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_stg_jira__comment_comment_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__comment_comment_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__comment_comment_id.004104fac5", "fqn": ["jira_source", "unique_stg_jira__comment_comment_id"], "alias": "unique_stg_jira__comment_comment_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.119222, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__comment", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__comment"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__comment_comment_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n comment_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__comment\"\nwhere comment_id is not null\ngroup by comment_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "comment_id", "file_key_name": "models.stg_jira__comment", "attached_node": "model.jira_source.stg_jira__comment"}, "test.jira_source.not_null_stg_jira__comment_comment_id.5dec28a22a": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "comment_id", "model": "{{ get_where_subquery(ref('stg_jira__comment')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_stg_jira__comment_comment_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__comment_comment_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__comment_comment_id.5dec28a22a", "fqn": ["jira_source", "not_null_stg_jira__comment_comment_id"], "alias": "not_null_stg_jira__comment_comment_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.120642, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__comment", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__comment"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__comment_comment_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect comment_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__comment\"\nwhere comment_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "comment_id", "file_key_name": "models.stg_jira__comment", "attached_node": "model.jira_source.stg_jira__comment"}, "test.jira_source.unique_stg_jira__component_component_id.1773ebe913": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "component_id", "model": "{{ get_where_subquery(ref('stg_jira__component')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_stg_jira__component_component_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__component_component_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__component_component_id.1773ebe913", "fqn": ["jira_source", "unique_stg_jira__component_component_id"], "alias": "unique_stg_jira__component_component_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.122012, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__component", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__component"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__component_component_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n component_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__component\"\nwhere component_id is not null\ngroup by component_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "component_id", "file_key_name": "models.stg_jira__component", "attached_node": "model.jira_source.stg_jira__component"}, "test.jira_source.not_null_stg_jira__component_component_id.2f017ad5ad": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "component_id", "model": "{{ get_where_subquery(ref('stg_jira__component')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_stg_jira__component_component_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__component_component_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__component_component_id.2f017ad5ad", "fqn": ["jira_source", "not_null_stg_jira__component_component_id"], "alias": "not_null_stg_jira__component_component_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.123379, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__component", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__component"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__component_component_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect component_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__component\"\nwhere component_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "component_id", "file_key_name": "models.stg_jira__component", "attached_node": "model.jira_source.stg_jira__component"}, "test.jira_source.unique_stg_jira__field_field_id.df7b462fff": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "field_id", "model": "{{ get_where_subquery(ref('stg_jira__field')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_stg_jira__field_field_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__field_field_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__field_field_id.df7b462fff", "fqn": ["jira_source", "unique_stg_jira__field_field_id"], "alias": "unique_stg_jira__field_field_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.124884, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__field", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__field"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__field_field_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n field_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\nwhere field_id is not null\ngroup by field_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "field_id", "file_key_name": "models.stg_jira__field", "attached_node": "model.jira_source.stg_jira__field"}, "test.jira_source.not_null_stg_jira__field_field_id.34424f1c2b": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "field_id", "model": "{{ get_where_subquery(ref('stg_jira__field')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_stg_jira__field_field_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__field_field_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__field_field_id.34424f1c2b", "fqn": ["jira_source", "not_null_stg_jira__field_field_id"], "alias": "not_null_stg_jira__field_field_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.1262321, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__field", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__field"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__field_field_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect field_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field\"\nwhere field_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "field_id", "file_key_name": "models.stg_jira__field", "attached_node": "model.jira_source.stg_jira__field"}, "test.jira_source.not_null_stg_jira__field_option_field_id.1b1f37b358": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "field_id", "model": "{{ get_where_subquery(ref('stg_jira__field_option')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_stg_jira__field_option_field_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__field_option_field_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__field_option_field_id.1b1f37b358", "fqn": ["jira_source", "not_null_stg_jira__field_option_field_id"], "alias": "not_null_stg_jira__field_option_field_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.127594, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__field_option", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__field_option"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__field_option_field_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect field_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__field_option\"\nwhere field_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "field_id", "file_key_name": "models.stg_jira__field_option", "attached_node": "model.jira_source.stg_jira__field_option"}, "test.jira_source.unique_stg_jira__issue_issue_id.7bb0ee7230": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('stg_jira__issue')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_stg_jira__issue_issue_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__issue_issue_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__issue_issue_id.7bb0ee7230", "fqn": ["jira_source", "unique_stg_jira__issue_issue_id"], "alias": "unique_stg_jira__issue_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.129096, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__issue", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__issue"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__issue_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue\"\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.stg_jira__issue", "attached_node": "model.jira_source.stg_jira__issue"}, "test.jira_source.not_null_stg_jira__issue_issue_id.13a4fbe132": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('stg_jira__issue')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_stg_jira__issue_issue_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__issue_issue_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__issue_issue_id.13a4fbe132", "fqn": ["jira_source", "not_null_stg_jira__issue_issue_id"], "alias": "not_null_stg_jira__issue_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.1304488, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__issue", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__issue"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__issue_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue\"\nwhere issue_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.stg_jira__issue", "attached_node": "model.jira_source.stg_jira__issue"}, "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_field_history_field_id__issue_id__updated_at.c01ecbb82c": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["field_id", "issue_id", "updated_at"], "model": "{{ get_where_subquery(ref('stg_jira__issue_field_history')) }}"}, "namespace": "dbt_utils"}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_stg_jira__issue_field_history_field_id__issue_id__updated_at", "resource_type": "test", "package_name": "jira_source", "path": "dbt_utils_unique_combination_o_ad5994a65a5d4b3bfa1a17202d1e378f.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_field_history_field_id__issue_id__updated_at.c01ecbb82c", "fqn": ["jira_source", "dbt_utils_unique_combination_of_columns_stg_jira__issue_field_history_field_id__issue_id__updated_at"], "alias": "dbt_utils_unique_combination_o_ad5994a65a5d4b3bfa1a17202d1e378f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_ad5994a65a5d4b3bfa1a17202d1e378f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_ad5994a65a5d4b3bfa1a17202d1e378f"}, "created_at": 1695163463.1318169, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_ad5994a65a5d4b3bfa1a17202d1e378f\") }}", "language": "sql", "refs": [{"name": "stg_jira__issue_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__issue_field_history"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/dbt_utils_unique_combination_o_ad5994a65a5d4b3bfa1a17202d1e378f.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n field_id, issue_id, updated_at\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_field_history\"\n group by field_id, issue_id, updated_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": null, "file_key_name": "models.stg_jira__issue_field_history", "attached_node": "model.jira_source.stg_jira__issue_field_history"}, "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_multiselect_history__fivetran_id__updated_at.4dd2d1c5a8": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["_fivetran_id", "updated_at"], "model": "{{ get_where_subquery(ref('stg_jira__issue_multiselect_history')) }}"}, "namespace": "dbt_utils"}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_stg_jira__issue_multiselect_history__fivetran_id__updated_at", "resource_type": "test", "package_name": "jira_source", "path": "dbt_utils_unique_combination_o_69e37ee91ecaf0ffc104992c26624396.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_multiselect_history__fivetran_id__updated_at.4dd2d1c5a8", "fqn": ["jira_source", "dbt_utils_unique_combination_of_columns_stg_jira__issue_multiselect_history__fivetran_id__updated_at"], "alias": "dbt_utils_unique_combination_o_69e37ee91ecaf0ffc104992c26624396", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_69e37ee91ecaf0ffc104992c26624396", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_69e37ee91ecaf0ffc104992c26624396"}, "created_at": 1695163463.1351879, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_69e37ee91ecaf0ffc104992c26624396\") }}", "language": "sql", "refs": [{"name": "stg_jira__issue_multiselect_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__issue_multiselect_history"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/dbt_utils_unique_combination_o_69e37ee91ecaf0ffc104992c26624396.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n _fivetran_id, updated_at\n from \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_multiselect_history\"\n group by _fivetran_id, updated_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": null, "file_key_name": "models.stg_jira__issue_multiselect_history", "attached_node": "model.jira_source.stg_jira__issue_multiselect_history"}, "test.jira_source.unique_stg_jira__issue_type_issue_type_id.a89d34aa41": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_type_id", "model": "{{ get_where_subquery(ref('stg_jira__issue_type')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_stg_jira__issue_type_issue_type_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__issue_type_issue_type_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__issue_type_issue_type_id.a89d34aa41", "fqn": ["jira_source", "unique_stg_jira__issue_type_issue_type_id"], "alias": "unique_stg_jira__issue_type_issue_type_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.1383228, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__issue_type", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__issue_type"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__issue_type_issue_type_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_type_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_type\"\nwhere issue_type_id is not null\ngroup by issue_type_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_type_id", "file_key_name": "models.stg_jira__issue_type", "attached_node": "model.jira_source.stg_jira__issue_type"}, "test.jira_source.not_null_stg_jira__issue_type_issue_type_id.57419fc343": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_type_id", "model": "{{ get_where_subquery(ref('stg_jira__issue_type')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_stg_jira__issue_type_issue_type_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__issue_type_issue_type_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__issue_type_issue_type_id.57419fc343", "fqn": ["jira_source", "not_null_stg_jira__issue_type_issue_type_id"], "alias": "not_null_stg_jira__issue_type_issue_type_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.1397052, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__issue_type", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__issue_type"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__issue_type_issue_type_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_type_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__issue_type\"\nwhere issue_type_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "issue_type_id", "file_key_name": "models.stg_jira__issue_type", "attached_node": "model.jira_source.stg_jira__issue_type"}, "test.jira_source.unique_stg_jira__priority_priority_id.79b77ea5d2": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "priority_id", "model": "{{ get_where_subquery(ref('stg_jira__priority')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_stg_jira__priority_priority_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__priority_priority_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__priority_priority_id.79b77ea5d2", "fqn": ["jira_source", "unique_stg_jira__priority_priority_id"], "alias": "unique_stg_jira__priority_priority_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.1412039, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__priority", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__priority"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__priority_priority_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n priority_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__priority\"\nwhere priority_id is not null\ngroup by priority_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "priority_id", "file_key_name": "models.stg_jira__priority", "attached_node": "model.jira_source.stg_jira__priority"}, "test.jira_source.not_null_stg_jira__priority_priority_id.ec0c873363": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "priority_id", "model": "{{ get_where_subquery(ref('stg_jira__priority')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_stg_jira__priority_priority_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__priority_priority_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__priority_priority_id.ec0c873363", "fqn": ["jira_source", "not_null_stg_jira__priority_priority_id"], "alias": "not_null_stg_jira__priority_priority_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.1425679, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__priority", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__priority"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__priority_priority_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect priority_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__priority\"\nwhere priority_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "priority_id", "file_key_name": "models.stg_jira__priority", "attached_node": "model.jira_source.stg_jira__priority"}, "test.jira_source.unique_stg_jira__project_project_id.58d321d374": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "project_id", "model": "{{ get_where_subquery(ref('stg_jira__project')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_stg_jira__project_project_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__project_project_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__project_project_id.58d321d374", "fqn": ["jira_source", "unique_stg_jira__project_project_id"], "alias": "unique_stg_jira__project_project_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.1439302, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__project", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__project"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__project_project_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n project_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__project\"\nwhere project_id is not null\ngroup by project_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "project_id", "file_key_name": "models.stg_jira__project", "attached_node": "model.jira_source.stg_jira__project"}, "test.jira_source.not_null_stg_jira__project_project_id.996fe19522": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "project_id", "model": "{{ get_where_subquery(ref('stg_jira__project')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_stg_jira__project_project_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__project_project_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__project_project_id.996fe19522", "fqn": ["jira_source", "not_null_stg_jira__project_project_id"], "alias": "not_null_stg_jira__project_project_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.145421, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__project", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__project"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__project_project_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect project_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__project\"\nwhere project_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "project_id", "file_key_name": "models.stg_jira__project", "attached_node": "model.jira_source.stg_jira__project"}, "test.jira_source.unique_stg_jira__resolution_resolution_id.b3acb37c87": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "resolution_id", "model": "{{ get_where_subquery(ref('stg_jira__resolution')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_stg_jira__resolution_resolution_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__resolution_resolution_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__resolution_resolution_id.b3acb37c87", "fqn": ["jira_source", "unique_stg_jira__resolution_resolution_id"], "alias": "unique_stg_jira__resolution_resolution_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.146778, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__resolution", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__resolution"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__resolution_resolution_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n resolution_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__resolution\"\nwhere resolution_id is not null\ngroup by resolution_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "resolution_id", "file_key_name": "models.stg_jira__resolution", "attached_node": "model.jira_source.stg_jira__resolution"}, "test.jira_source.not_null_stg_jira__resolution_resolution_id.1c04bac8a4": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "resolution_id", "model": "{{ get_where_subquery(ref('stg_jira__resolution')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_stg_jira__resolution_resolution_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__resolution_resolution_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__resolution_resolution_id.1c04bac8a4", "fqn": ["jira_source", "not_null_stg_jira__resolution_resolution_id"], "alias": "not_null_stg_jira__resolution_resolution_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.148124, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__resolution", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__resolution"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__resolution_resolution_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect resolution_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__resolution\"\nwhere resolution_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "resolution_id", "file_key_name": "models.stg_jira__resolution", "attached_node": "model.jira_source.stg_jira__resolution"}, "test.jira_source.unique_stg_jira__sprint_sprint_id.8a73555fed": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "sprint_id", "model": "{{ get_where_subquery(ref('stg_jira__sprint')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_stg_jira__sprint_sprint_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__sprint_sprint_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__sprint_sprint_id.8a73555fed", "fqn": ["jira_source", "unique_stg_jira__sprint_sprint_id"], "alias": "unique_stg_jira__sprint_sprint_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.149475, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__sprint", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__sprint"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__sprint_sprint_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n sprint_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__sprint\"\nwhere sprint_id is not null\ngroup by sprint_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "sprint_id", "file_key_name": "models.stg_jira__sprint", "attached_node": "model.jira_source.stg_jira__sprint"}, "test.jira_source.not_null_stg_jira__sprint_sprint_id.899b4b77d7": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "sprint_id", "model": "{{ get_where_subquery(ref('stg_jira__sprint')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_stg_jira__sprint_sprint_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__sprint_sprint_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__sprint_sprint_id.899b4b77d7", "fqn": ["jira_source", "not_null_stg_jira__sprint_sprint_id"], "alias": "not_null_stg_jira__sprint_sprint_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.1511629, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__sprint", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__sprint"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__sprint_sprint_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect sprint_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__sprint\"\nwhere sprint_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "sprint_id", "file_key_name": "models.stg_jira__sprint", "attached_node": "model.jira_source.stg_jira__sprint"}, "test.jira_source.unique_stg_jira__status_status_id.0449241b95": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "status_id", "model": "{{ get_where_subquery(ref('stg_jira__status')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_stg_jira__status_status_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__status_status_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__status_status_id.0449241b95", "fqn": ["jira_source", "unique_stg_jira__status_status_id"], "alias": "unique_stg_jira__status_status_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.152519, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__status", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__status"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__status_status_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n status_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__status\"\nwhere status_id is not null\ngroup by status_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "status_id", "file_key_name": "models.stg_jira__status", "attached_node": "model.jira_source.stg_jira__status"}, "test.jira_source.not_null_stg_jira__status_status_id.b32a8a0d84": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "status_id", "model": "{{ get_where_subquery(ref('stg_jira__status')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_stg_jira__status_status_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__status_status_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__status_status_id.b32a8a0d84", "fqn": ["jira_source", "not_null_stg_jira__status_status_id"], "alias": "not_null_stg_jira__status_status_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.153864, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__status", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__status"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__status_status_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect status_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__status\"\nwhere status_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "status_id", "file_key_name": "models.stg_jira__status", "attached_node": "model.jira_source.stg_jira__status"}, "test.jira_source.unique_stg_jira__status_category_status_category_id.99c869330a": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "status_category_id", "model": "{{ get_where_subquery(ref('stg_jira__status_category')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_stg_jira__status_category_status_category_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__status_category_status_category_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__status_category_status_category_id.99c869330a", "fqn": ["jira_source", "unique_stg_jira__status_category_status_category_id"], "alias": "unique_stg_jira__status_category_status_category_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.1553438, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__status_category", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__status_category"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__status_category_status_category_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n status_category_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__status_category\"\nwhere status_category_id is not null\ngroup by status_category_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "status_category_id", "file_key_name": "models.stg_jira__status_category", "attached_node": "model.jira_source.stg_jira__status_category"}, "test.jira_source.not_null_stg_jira__status_category_status_category_id.7a89cdfcf0": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "status_category_id", "model": "{{ get_where_subquery(ref('stg_jira__status_category')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_stg_jira__status_category_status_category_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__status_category_status_category_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__status_category_status_category_id.7a89cdfcf0", "fqn": ["jira_source", "not_null_stg_jira__status_category_status_category_id"], "alias": "not_null_stg_jira__status_category_status_category_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.156688, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__status_category", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__status_category"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__status_category_status_category_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect status_category_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__status_category\"\nwhere status_category_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "status_category_id", "file_key_name": "models.stg_jira__status_category", "attached_node": "model.jira_source.stg_jira__status_category"}, "test.jira_source.unique_stg_jira__user_user_id.a397e1a23f": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('stg_jira__user')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_stg_jira__user_user_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__user_user_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__user_user_id.a397e1a23f", "fqn": ["jira_source", "unique_stg_jira__user_user_id"], "alias": "unique_stg_jira__user_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.158041, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__user", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__user"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__user_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n user_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\nwhere user_id is not null\ngroup by user_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "user_id", "file_key_name": "models.stg_jira__user", "attached_node": "model.jira_source.stg_jira__user"}, "test.jira_source.not_null_stg_jira__user_user_id.b2153f97d2": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('stg_jira__user')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_stg_jira__user_user_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__user_user_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__user_user_id.b2153f97d2", "fqn": ["jira_source", "not_null_stg_jira__user_user_id"], "alias": "not_null_stg_jira__user_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.1593869, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__user", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__user"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__user_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect user_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__user\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "user_id", "file_key_name": "models.stg_jira__user", "attached_node": "model.jira_source.stg_jira__user"}, "test.jira_source.unique_stg_jira__version_version_id.08231bd017": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "version_id", "model": "{{ get_where_subquery(ref('stg_jira__version')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "unique_stg_jira__version_version_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__version_version_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__version_version_id.08231bd017", "fqn": ["jira_source", "unique_stg_jira__version_version_id"], "alias": "unique_stg_jira__version_version_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.160863, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__version", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__version"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__version_version_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n version_id as unique_field,\n count(*) as n_records\n\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__version\"\nwhere version_id is not null\ngroup by version_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "version_id", "file_key_name": "models.stg_jira__version", "attached_node": "model.jira_source.stg_jira__version"}, "test.jira_source.not_null_stg_jira__version_version_id.03877ce324": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "version_id", "model": "{{ get_where_subquery(ref('stg_jira__version')) }}"}, "namespace": null}, "database": "redshift-test-kristin", "schema": "jira_integrations_tests_1_dbt_test__audit", "name": "not_null_stg_jira__version_version_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__version_version_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__version_version_id.03877ce324", "fqn": ["jira_source", "not_null_stg_jira__version_version_id"], "alias": "not_null_stg_jira__version_version_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1695163463.16221, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__version", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__version"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__version_version_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect version_id\nfrom \"redshift-test-kristin\".\"jira_integrations_tests_1_jira_source\".\"stg_jira__version\"\nwhere version_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "version_id", "file_key_name": "models.stg_jira__version", "attached_node": "model.jira_source.stg_jira__version"}}, "sources": {"source.jira_source.jira.comment": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "comment", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.comment", "fqn": ["jira_source", "jira", "comment"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "comment", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of comments made on issues.", "columns": {"id": {"name": "id", "description": "Unique ID of the comment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "author_id": {"name": "author_id", "description": "Foreign key referencing the `user` id of the comment's author.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "body": {"name": "body", "description": "Content of the comment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created": {"name": "created", "description": "Timestamp of when the comment was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_public": {"name": "is_public", "description": "Boolean that is true if the comment is visible to all users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the id of the `issue` that was commented on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "update_author_id": {"name": "update_author_id", "description": "Foreign key referencing the id of the `user` who last updated this comment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the comment was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"comment\"", "created_at": 1695163463.218}, "source.jira_source.jira.component": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "component", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.component", "fqn": ["jira_source", "jira", "component"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "component", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of project components (subsections to group issues).\n", "columns": {"id": {"name": "id", "description": "ID of the component.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Description given to the component.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "UI-facing name of the component.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the id of the component's `project`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"component\"", "created_at": 1695163463.218168}, "source.jira_source.jira.field": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "field", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.field", "fqn": ["jira_source", "jira", "field"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "field", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of all issue fields.", "columns": {"id": {"name": "id", "description": "Unique ID of the field. Default fields will have descriptive IDs, whereas custom field IDs will be `'customfield_#####'`.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_array": {"name": "is_array", "description": "Boolean that is true if a field can have multiple values (is mulitselect).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_custom": {"name": "is_custom", "description": "Boolean that is true if the field is custom to this organization, and false if it is default to Jira.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the field as it appears on issue cards.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"field\"", "created_at": 1695163463.218293}, "source.jira_source.jira.field_option": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "field_option", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.field_option", "fqn": ["jira_source", "jira", "field_option"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "field_option", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of all options related to custom fields.", "columns": {"id": {"name": "id", "description": "The ID of the custom field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The ID of the parent custom field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the field option.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"field_option\"", "created_at": 1695163463.21841}, "source.jira_source.jira.issue": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "issue", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.issue", "fqn": ["jira_source", "jira", "issue"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "issue", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of all issues in your organization's Jira (captures soft deletes).", "columns": {"id": {"name": "id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the row has been soft-deleted from the source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee": {"name": "assignee", "description": "Foreign key referencing the ID of the `user` currently assigned to this task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created": {"name": "created", "description": "Timestamp of when the issue was created (in UTC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "creator": {"name": "creator", "description": "Foreign key referencing the `user` who first created the issue. Cannot be changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "The issue description, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "Calendar day on which the issue is due, if a due date is provided.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "environment": {"name": "environment", "description": "Text field describing the environment in which the issue occurred (ie \"IE9 on Windows 7\").", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type": {"name": "issue_type", "description": "Foreign key referencing the ID of the `issue_type`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "key": {"name": "key", "description": "UI-facing id of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed": {"name": "last_viewed", "description": "Timestamp of when the user who set up the connector last viewed the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "original_estimate": {"name": "original_estimate", "description": "The original estimate of how long working on this issue would take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "Self-referencing ID of the parent `issue`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority": {"name": "priority", "description": "Foreign key referencing the ID of the issue's current `priority`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project": {"name": "project", "description": "Foreign key referencing the ID of the `project` that the issue belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "remaining_estimate": {"name": "remaining_estimate", "description": "The estimate of how much longer working on this issue will take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter": {"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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution": {"name": "resolution", "description": "Foreign key referencing the ID of the issue's type of `resolution`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolved": {"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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"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).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_category_changed": {"name": "status_category_changed", "description": "Timestamp of when the status was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "summary": {"name": "summary", "description": "Title of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_spent": {"name": "time_spent", "description": "The time that was spent working on this issue, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the issue was last updated in some way.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "work_ratio": {"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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"issue\"", "created_at": 1695163463.218556}, "source.jira_source.jira.issue_field_history": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "issue_field_history", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.issue_field_history", "fqn": ["jira_source", "jira", "issue_field_history"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "issue_field_history", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of every value that each **custom non-array** (not multiselect) field has been set to.", "columns": {"field_id": {"name": "field_id", "description": "Foreign key referencing the ID of the `field` that was changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time": {"name": "time", "description": "Timestamp of when the issue field was set to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "value": {"name": "value", "description": "Content of the value of that the field was set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"issue_field_history\"", "created_at": 1695163463.218671}, "source.jira_source.jira.issue_link": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "issue_link", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.issue_link", "fqn": ["jira_source", "jira", "issue_link"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "issue_link", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of relationships (links) created between issues. Issue links can include blockers, clones/duplicates, and general relationships.\n", "columns": {"issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` that is the subject of this relationship (the linker).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "related_issue_id": {"name": "related_issue_id", "description": "Foreign key referencing the ID of the `issue` that is the object of this relationship (the linkee).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "relationship": {"name": "relationship", "description": "The nature of the link between the two issues (\"blocks\", \"is duplicated by\", \"relates to\", etc.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"issue_link\"", "created_at": 1695163463.218787}, "source.jira_source.jira.issue_multiselect_history": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "issue_multiselect_history", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.issue_multiselect_history", "fqn": ["jira_source", "jira", "issue_multiselect_history"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "issue_multiselect_history", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of every value that each array-type (multiselect) field has been set to. Each row will pertain to **one** value.\n", "columns": {"_fivetran_id": {"name": "_fivetran_id", "description": "Fivetran-generated ID hashed on field, issue, and value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time": {"name": "time", "description": "Timestamp of when the issue field was updated to included this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_id": {"name": "field_id", "description": "Foreign key referencing the ID of the `field` that was changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "value": {"name": "value", "description": "Content of the value of that the field was set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"issue_multiselect_history\"", "created_at": 1695163463.218901}, "source.jira_source.jira.issue_type": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "issue_type", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.issue_type", "fqn": ["jira_source", "jira", "issue_type"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "issue_type", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table containing information about issue types. Issue types can have identical names in different projects, but they may have differing descriptions.\n", "columns": {"id": {"name": "id", "description": "Unique ID of the issue type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Project-level description given to the issue type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the issue type (ie Epic, Task, Subtask, any custom types)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "subtask": {"name": "subtask", "description": "Boolean that is true if this type of issue is a subtask.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"issue_type\"", "created_at": 1695163463.219012}, "source.jira_source.jira.priority": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "priority", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.priority", "fqn": ["jira_source", "jira", "priority"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "priority", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of issue priority levels (global).", "columns": {"id": {"name": "id", "description": "Unique ID of the priority level.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Description of the priority level.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the priority as it appears in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"priority\"", "created_at": 1695163463.21913}, "source.jira_source.jira.project": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "project", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.project", "fqn": ["jira_source", "jira", "project"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "project", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of all projects in your organization.", "columns": {"id": {"name": "id", "description": "Unique ID of the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Description of the project, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "key": {"name": "key", "description": "UI-facing ID of the project. This becomes the default prefix for tasks created within this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_id": {"name": "lead_id", "description": "Foreign key referencing the ID of the `user` who leads this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Title of the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "permission_scheme_id": {"name": "permission_scheme_id", "description": "Foreign key referencing the ID of the `permission_scheme` that the project ascribes to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_category_id": {"name": "project_category_id", "description": "Foreign key referencing the ID of the `project_category` that the project is associated with, if any.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_type_key": {"name": "project_type_key", "description": "ID of the type of project (ie 'software').", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"project\"", "created_at": 1695163463.2193012}, "source.jira_source.jira.resolution": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "resolution", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.resolution", "fqn": ["jira_source", "jira", "resolution"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "resolution", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table storing the types of resolutions used by your organization.", "columns": {"id": {"name": "id", "description": "Unique ID of the resolution type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Description given to the resolution.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Display name of the resolution.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"resolution\"", "created_at": 1695163463.219415}, "source.jira_source.jira.sprint": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "sprint", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.sprint", "fqn": ["jira_source", "jira", "sprint"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "sprint", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of all sprints.", "columns": {"id": {"name": "id", "description": "Unique ID of the sprint.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "board_id": {"name": "board_id", "description": "Foreign key referencing the ID of the `board` that the sprint lives in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "complete_date": {"name": "complete_date", "description": "Timestamp of when the sprint was completed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "end_date": {"name": "end_date", "description": "Timestamp of when the sprint is planned to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Title of the sprint.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "start_date": {"name": "start_date", "description": "Timestamp of when the sprint began.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"sprint\"", "created_at": 1695163463.2195399}, "source.jira_source.jira.status": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "status", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.status", "fqn": ["jira_source", "jira", "status"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "status", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of project-level statuses (which may have the same umbrella `status_category`).", "columns": {"id": {"name": "id", "description": "Unique ID of the project status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Description of the project status. Different projects may all have a status called \"Backlog\", but their definitions of \"backlog\" may differ.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Title of the status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_category_id": {"name": "status_category_id", "description": "Foreign key referencing the ID of the `status_category` that this project status falls under.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"status\"", "created_at": 1695163463.21965}, "source.jira_source.jira.status_category": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "status_category", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.status_category", "fqn": ["jira_source", "jira", "status_category"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "status_category", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of overarching status categories.", "columns": {"id": {"name": "id", "description": "Unique ID of the status category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Title of the status category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"status_category\"", "created_at": 1695163463.219758}, "source.jira_source.jira.user": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "user", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.user", "fqn": ["jira_source", "jira", "user"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "user", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of users associated with your organization.", "columns": {"id": {"name": "id", "description": "Unique ID of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "Email associated with the user account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "locale": {"name": "locale", "description": "The Java locale of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the user as it appears in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_zone": {"name": "time_zone", "description": "The user's timezone, as defined in their settings.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "username": {"name": "username", "description": "Account username.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"user\"", "created_at": 1695163463.219869}, "source.jira_source.jira.version": {"database": "redshift-test-kristin", "schema": "jira_integrations_tests_1", "name": "version", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.version", "fqn": ["jira_source", "jira", "version"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "version", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of project versions in your organization.", "columns": {"archived": {"name": "archived", "description": "Boolean that is true if the project version has been archived.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "The optional description given to the version.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the version.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Unique name of the version.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "overdue": {"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.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the `PROJECT` to which this version is attached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "release_date": {"name": "release_date", "description": "The optional release date of the version. Expressed in ISO 8601 format (yyyy-mm-dd).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "released": {"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", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "start_date": {"name": "start_date", "description": "The start date of the version. Expressed in ISO 8601 format (yyyy-mm-dd).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"redshift-test-kristin\".\"jira_integrations_tests_1\".\"version\"", "created_at": 1695163463.219994}}, "macros": {"macro.dbt_redshift.redshift__current_timestamp": {"name": "redshift__current_timestamp", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_redshift.redshift__current_timestamp", "macro_sql": "{% macro redshift__current_timestamp() -%}\n getdate()\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.7863271, "supported_languages": null}, "macro.dbt_redshift.redshift__snapshot_get_time": {"name": "redshift__snapshot_get_time", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_redshift.redshift__snapshot_get_time", "macro_sql": "{% macro redshift__snapshot_get_time() -%}\n {{ current_timestamp() }}::timestamp\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.786459, "supported_languages": null}, "macro.dbt_redshift.redshift__snapshot_string_as_time": {"name": "redshift__snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_redshift.redshift__snapshot_string_as_time", "macro_sql": "{% macro redshift__snapshot_string_as_time(timestamp) -%}\n {%- set result = \"'\" ~ timestamp ~ \"'::timestamp\" -%}\n {{ return(result) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.786669, "supported_languages": null}, "macro.dbt_redshift.redshift__current_timestamp_backcompat": {"name": "redshift__current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_redshift.redshift__current_timestamp_backcompat", "macro_sql": "{% macro redshift__current_timestamp_backcompat() -%}\n getdate()\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.786752, "supported_languages": null}, "macro.dbt_redshift.redshift__current_timestamp_in_utc_backcompat": {"name": "redshift__current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_redshift.redshift__current_timestamp_in_utc_backcompat", "macro_sql": "{% macro redshift__current_timestamp_in_utc_backcompat() -%}\n getdate()\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.786828, "supported_languages": null}, "macro.dbt_redshift.redshift__get_base_catalog": {"name": "redshift__get_base_catalog", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_redshift.redshift__get_base_catalog", "macro_sql": "{% macro redshift__get_base_catalog(information_schema, schemas) -%}\n {%- call statement('base_catalog', fetch_result=True) -%}\n {% set database = information_schema.database %}\n {{ adapter.verify_database(database) }}\n\n with late_binding as (\n select\n '{{ database }}'::varchar as table_database,\n table_schema,\n table_name,\n 'LATE BINDING VIEW'::varchar as table_type,\n null::text as table_comment,\n\n column_name,\n column_index,\n column_type,\n null::text as column_comment\n from pg_get_late_binding_view_cols()\n cols(table_schema name, table_name name, column_name name,\n column_type varchar,\n column_index int)\n order by \"column_index\"\n ),\n\n early_binding as (\n select\n '{{ database }}'::varchar as table_database,\n sch.nspname as table_schema,\n tbl.relname as table_name,\n case tbl.relkind\n when 'v' then 'VIEW'\n else 'BASE TABLE'\n end as table_type,\n tbl_desc.description as table_comment,\n col.attname as column_name,\n col.attnum as column_index,\n pg_catalog.format_type(col.atttypid, col.atttypmod) as column_type,\n col_desc.description as column_comment\n\n from pg_catalog.pg_namespace sch\n join pg_catalog.pg_class tbl on tbl.relnamespace = sch.oid\n join pg_catalog.pg_attribute col on col.attrelid = tbl.oid\n left outer join pg_catalog.pg_description tbl_desc on (tbl_desc.objoid = tbl.oid and tbl_desc.objsubid = 0)\n left outer join pg_catalog.pg_description col_desc on (col_desc.objoid = tbl.oid and col_desc.objsubid = col.attnum)\n where (\n {%- for schema in schemas -%}\n upper(sch.nspname) = upper('{{ schema }}'){%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n and tbl.relkind in ('r', 'v', 'f', 'p')\n and col.attnum > 0\n and not col.attisdropped\n ),\n\n table_owners as (\n\n select\n '{{ database }}'::varchar as table_database,\n schemaname as table_schema,\n tablename as table_name,\n tableowner as table_owner\n\n from pg_tables\n\n union all\n\n select\n '{{ database }}'::varchar as table_database,\n schemaname as table_schema,\n viewname as table_name,\n viewowner as table_owner\n\n from pg_views\n\n ),\n\n unioned as (\n\n select *\n from early_binding\n\n union all\n\n select *\n from late_binding\n\n )\n\n select *,\n table_database || '.' || table_schema || '.' || table_name as table_id\n\n from unioned\n join table_owners using (table_database, table_schema, table_name)\n\n where (\n {%- for schema in schemas -%}\n upper(table_schema) = upper('{{ schema }}'){%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n\n order by \"column_index\"\n {%- endcall -%}\n\n {{ return(load_result('base_catalog').table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.7921422, "supported_languages": null}, "macro.dbt_redshift.redshift__get_extended_catalog": {"name": "redshift__get_extended_catalog", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_redshift.redshift__get_extended_catalog", "macro_sql": "{% macro redshift__get_extended_catalog(schemas) %}\n {%- call statement('extended_catalog', fetch_result=True) -%}\n\n select\n \"database\" || '.' || \"schema\" || '.' || \"table\" as table_id,\n\n 'Encoded'::text as \"stats:encoded:label\",\n encoded as \"stats:encoded:value\",\n 'Indicates whether any column in the table has compression encoding defined.'::text as \"stats:encoded:description\",\n true as \"stats:encoded:include\",\n\n 'Dist Style' as \"stats:diststyle:label\",\n diststyle as \"stats:diststyle:value\",\n 'Distribution style or distribution key column, if key distribution is defined.'::text as \"stats:diststyle:description\",\n true as \"stats:diststyle:include\",\n\n 'Sort Key 1' as \"stats:sortkey1:label\",\n -- handle 0xFF byte in response for interleaved sort styles\n case\n when sortkey1 like 'INTERLEAVED%' then 'INTERLEAVED'::text\n else sortkey1\n end as \"stats:sortkey1:value\",\n 'First column in the sort key.'::text as \"stats:sortkey1:description\",\n (sortkey1 is not null) as \"stats:sortkey1:include\",\n\n 'Max Varchar' as \"stats:max_varchar:label\",\n max_varchar as \"stats:max_varchar:value\",\n 'Size of the largest column that uses a VARCHAR data type.'::text as \"stats:max_varchar:description\",\n true as \"stats:max_varchar:include\",\n\n -- exclude this, as the data is strangely returned with null-byte characters\n 'Sort Key 1 Encoding' as \"stats:sortkey1_enc:label\",\n sortkey1_enc as \"stats:sortkey1_enc:value\",\n 'Compression encoding of the first column in the sort key.' as \"stats:sortkey1_enc:description\",\n false as \"stats:sortkey1_enc:include\",\n\n '# Sort Keys' as \"stats:sortkey_num:label\",\n sortkey_num as \"stats:sortkey_num:value\",\n 'Number of columns defined as sort keys.' as \"stats:sortkey_num:description\",\n (sortkey_num > 0) as \"stats:sortkey_num:include\",\n\n 'Approximate Size' as \"stats:size:label\",\n size * 1000000 as \"stats:size:value\",\n 'Approximate size of the table, calculated from a count of 1MB blocks'::text as \"stats:size:description\",\n true as \"stats:size:include\",\n\n 'Disk Utilization' as \"stats:pct_used:label\",\n pct_used / 100.0 as \"stats:pct_used:value\",\n 'Percent of available space that is used by the table.'::text as \"stats:pct_used:description\",\n true as \"stats:pct_used:include\",\n\n 'Unsorted %' as \"stats:unsorted:label\",\n unsorted / 100.0 as \"stats:unsorted:value\",\n 'Percent of unsorted rows in the table.'::text as \"stats:unsorted:description\",\n (unsorted is not null) as \"stats:unsorted:include\",\n\n 'Stats Off' as \"stats:stats_off:label\",\n stats_off as \"stats:stats_off:value\",\n 'Number that indicates how stale the table statistics are; 0 is current, 100 is out of date.'::text as \"stats:stats_off:description\",\n true as \"stats:stats_off:include\",\n\n 'Approximate Row Count' as \"stats:rows:label\",\n tbl_rows as \"stats:rows:value\",\n 'Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed.'::text as \"stats:rows:description\",\n true as \"stats:rows:include\",\n\n 'Sort Key Skew' as \"stats:skew_sortkey1:label\",\n skew_sortkey1 as \"stats:skew_sortkey1:value\",\n 'Ratio of the size of the largest non-sort key column to the size of the first column of the sort key.'::text as \"stats:skew_sortkey1:description\",\n (skew_sortkey1 is not null) as \"stats:skew_sortkey1:include\",\n\n 'Skew Rows' as \"stats:skew_rows:label\",\n skew_rows as \"stats:skew_rows:value\",\n 'Ratio of the number of rows in the slice with the most rows to the number of rows in the slice with the fewest rows.'::text as \"stats:skew_rows:description\",\n (skew_rows is not null) as \"stats:skew_rows:include\"\n\n from svv_table_info\n where (\n {%- for schema in schemas -%}\n upper(schema) = upper('{{ schema }}'){%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n\n {%- endcall -%}\n\n {{ return(load_result('extended_catalog').table) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.792779, "supported_languages": null}, "macro.dbt_redshift.redshift__can_select_from": {"name": "redshift__can_select_from", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_redshift.redshift__can_select_from", "macro_sql": "{% macro redshift__can_select_from(table_name) %}\n\n {%- call statement('has_table_privilege', fetch_result=True) -%}\n\n select has_table_privilege(current_user, '{{ table_name }}', 'SELECT') as can_select\n\n {%- endcall -%}\n\n {% set can_select = load_result('has_table_privilege').table[0]['can_select'] %}\n {{ return(can_select) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.7931352, "supported_languages": null}, "macro.dbt_redshift.redshift__no_svv_table_info_warning": {"name": "redshift__no_svv_table_info_warning", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_redshift.redshift__no_svv_table_info_warning", "macro_sql": "{% macro redshift__no_svv_table_info_warning() %}\n\n {% set msg %}\n\n Warning: The database user \"{{ target.user }}\" has insufficient permissions to\n query the \"svv_table_info\" table. Please grant SELECT permissions on this table\n to the \"{{ target.user }}\" user to fetch extended table details from Redshift.\n\n {% endset %}\n\n {{ log(msg, info=True) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.793401, "supported_languages": null}, "macro.dbt_redshift.redshift__get_catalog": {"name": "redshift__get_catalog", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_redshift.redshift__get_catalog", "macro_sql": "{% macro redshift__get_catalog(information_schema, schemas) %}\n\n {#-- Compute a left-outer join in memory. Some Redshift queries are\n -- leader-only, and cannot be joined to other compute-based queries #}\n\n {% set catalog = redshift__get_base_catalog(information_schema, schemas) %}\n\n {% set select_extended = redshift__can_select_from('svv_table_info') %}\n {% if select_extended %}\n {% set extended_catalog = redshift__get_extended_catalog(schemas) %}\n {% set catalog = catalog.join(extended_catalog, 'table_id') %}\n {% else %}\n {{ redshift__no_svv_table_info_warning() }}\n {% endif %}\n\n {{ return(catalog.exclude(['table_id'])) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__get_base_catalog", "macro.dbt_redshift.redshift__can_select_from", "macro.dbt_redshift.redshift__get_extended_catalog", "macro.dbt_redshift.redshift__no_svv_table_info_warning"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.7939892, "supported_languages": null}, "macro.dbt_redshift.redshift__get_relations": {"name": "redshift__get_relations", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "unique_id": "macro.dbt_redshift.redshift__get_relations", "macro_sql": "{% macro redshift__get_relations () -%}\n {{ return(dbt.postgres_get_relations()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres_get_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.7941701, "supported_languages": null}, "macro.dbt_redshift.dist": {"name": "dist", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_redshift.dist", "macro_sql": "{% macro dist(dist) %}\n {%- if dist is not none -%}\n {%- set dist = dist.strip().lower() -%}\n\n {%- if dist in ['all', 'even'] -%}\n diststyle {{ dist }}\n {%- elif dist == \"auto\" -%}\n {%- else -%}\n diststyle key distkey ({{ dist }})\n {%- endif -%}\n\n {%- endif -%}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.807251, "supported_languages": null}, "macro.dbt_redshift.sort": {"name": "sort", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_redshift.sort", "macro_sql": "{% macro sort(sort_type, sort) %}\n {%- if sort is not none %}\n {{ sort_type | default('compound', boolean=true) }} sortkey(\n {%- if sort is string -%}\n {%- set sort = [sort] -%}\n {%- endif -%}\n {%- for item in sort -%}\n {{ item }}\n {%- if not loop.last -%},{%- endif -%}\n {%- endfor -%}\n )\n {%- endif %}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8077152, "supported_languages": null}, "macro.dbt_redshift.redshift__create_table_as": {"name": "redshift__create_table_as", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_redshift.redshift__create_table_as", "macro_sql": "{% macro redshift__create_table_as(temporary, relation, sql) -%}\n\n {%- set _dist = config.get('dist') -%}\n {%- set _sort_type = config.get(\n 'sort_type',\n validator=validation.any['compound', 'interleaved']) -%}\n {%- set _sort = config.get(\n 'sort',\n validator=validation.any[list, basestring]) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n {%- set backup = config.get('backup') -%}\n\n {{ sql_header if sql_header is not none }}\n\n {%- set contract_config = config.get('contract') -%}\n {%- if contract_config.enforced -%}\n\n create {% if temporary -%}temporary{%- endif %} table\n {{ relation.include(database=(not temporary), schema=(not temporary)) }}\n {{ get_table_columns_and_constraints() }}\n {{ get_assert_columns_equivalent(sql) }}\n {%- set sql = get_select_subquery(sql) %}\n {% if backup == false -%}backup no{%- endif %}\n {{ dist(_dist) }}\n {{ sort(_sort_type, _sort) }}\n ;\n\n insert into {{ relation.include(database=(not temporary), schema=(not temporary)) }}\n (\n {{ sql }}\n )\n ;\n\n {%- else %}\n\n create {% if temporary -%}temporary{%- endif %} table\n {{ relation.include(database=(not temporary), schema=(not temporary)) }}\n {% if backup == false -%}backup no{%- endif %}\n {{ dist(_dist) }}\n {{ sort(_sort_type, _sort) }}\n as (\n {{ sql }}\n );\n\n {%- endif %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_table_columns_and_constraints", "macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_select_subquery", "macro.dbt_redshift.dist", "macro.dbt_redshift.sort"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.809489, "supported_languages": null}, "macro.dbt_redshift.redshift__create_view_as": {"name": "redshift__create_view_as", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_redshift.redshift__create_view_as", "macro_sql": "{% macro redshift__create_view_as(relation, sql) -%}\n {%- set binding = config.get('bind', default=True) -%}\n\n {% set bind_qualifier = '' if binding else 'with no schema binding' %}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create view {{ relation }}\n {%- set contract_config = config.get('contract') -%}\n {%- if contract_config.enforced -%}\n {{ get_assert_columns_equivalent(sql) }}\n {%- endif %} as (\n {{ sql }}\n ) {{ bind_qualifier }};\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8101041, "supported_languages": null}, "macro.dbt_redshift.redshift__create_schema": {"name": "redshift__create_schema", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_redshift.redshift__create_schema", "macro_sql": "{% macro redshift__create_schema(relation) -%}\n {{ postgres__create_schema(relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.810233, "supported_languages": null}, "macro.dbt_redshift.redshift__drop_schema": {"name": "redshift__drop_schema", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_redshift.redshift__drop_schema", "macro_sql": "{% macro redshift__drop_schema(relation) -%}\n {{ postgres__drop_schema(relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.810354, "supported_languages": null}, "macro.dbt_redshift.redshift__get_columns_in_relation": {"name": "redshift__get_columns_in_relation", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_redshift.redshift__get_columns_in_relation", "macro_sql": "{% macro redshift__get_columns_in_relation(relation) -%}\n {% call statement('get_columns_in_relation', fetch_result=True) %}\n with bound_views as (\n select\n ordinal_position,\n table_schema,\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from information_schema.\"columns\"\n where table_name = '{{ relation.identifier }}'\n ),\n\n unbound_views as (\n select\n ordinal_position,\n view_schema,\n col_name,\n case\n when col_type ilike 'character varying%' then\n 'character varying'\n when col_type ilike 'numeric%' then 'numeric'\n else col_type\n end as col_type,\n case\n when col_type like 'character%'\n then nullif(REGEXP_SUBSTR(col_type, '[0-9]+'), '')::int\n else null\n end as character_maximum_length,\n case\n when col_type like 'numeric%'\n then nullif(\n SPLIT_PART(REGEXP_SUBSTR(col_type, '[0-9,]+'), ',', 1),\n '')::int\n else null\n end as numeric_precision,\n case\n when col_type like 'numeric%'\n then nullif(\n SPLIT_PART(REGEXP_SUBSTR(col_type, '[0-9,]+'), ',', 2),\n '')::int\n else null\n end as numeric_scale\n\n from pg_get_late_binding_view_cols()\n cols(view_schema name, view_name name, col_name name,\n col_type varchar, ordinal_position int)\n where view_name = '{{ relation.identifier }}'\n ),\n\n external_views as (\n select\n columnnum,\n schemaname,\n columnname,\n case\n when external_type ilike 'character varying%' or external_type ilike 'varchar%'\n then 'character varying'\n when external_type ilike 'numeric%' then 'numeric'\n else external_type\n end as external_type,\n case\n when external_type like 'character%' or external_type like 'varchar%'\n then nullif(\n REGEXP_SUBSTR(external_type, '[0-9]+'),\n '')::int\n else null\n end as character_maximum_length,\n case\n when external_type like 'numeric%'\n then nullif(\n SPLIT_PART(REGEXP_SUBSTR(external_type, '[0-9,]+'), ',', 1),\n '')::int\n else null\n end as numeric_precision,\n case\n when external_type like 'numeric%'\n then nullif(\n SPLIT_PART(REGEXP_SUBSTR(external_type, '[0-9,]+'), ',', 2),\n '')::int\n else null\n end as numeric_scale\n from\n pg_catalog.svv_external_columns\n where\n schemaname = '{{ relation.schema }}'\n and tablename = '{{ relation.identifier }}'\n\n ),\n\n unioned as (\n select * from bound_views\n union all\n select * from unbound_views\n union all\n select * from external_views\n )\n\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from unioned\n {% if relation.schema %}\n where table_schema = '{{ relation.schema }}'\n {% endif %}\n order by ordinal_position\n {% endcall %}\n {% set table = load_result('get_columns_in_relation').table %}\n {{ return(sql_convert_columns_in_relation(table)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.sql_convert_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.811041, "supported_languages": null}, "macro.dbt_redshift.redshift__list_relations_without_caching": {"name": "redshift__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_redshift.redshift__list_relations_without_caching", "macro_sql": "{% macro redshift__list_relations_without_caching(schema_relation) %}\n {{ return(postgres__list_relations_without_caching(schema_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8111959, "supported_languages": null}, "macro.dbt_redshift.redshift__information_schema_name": {"name": "redshift__information_schema_name", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_redshift.redshift__information_schema_name", "macro_sql": "{% macro redshift__information_schema_name(database) -%}\n {{ return(postgres__information_schema_name(database)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.811336, "supported_languages": null}, "macro.dbt_redshift.redshift__list_schemas": {"name": "redshift__list_schemas", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_redshift.redshift__list_schemas", "macro_sql": "{% macro redshift__list_schemas(database) -%}\n {{ return(postgres__list_schemas(database)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.81147, "supported_languages": null}, "macro.dbt_redshift.redshift__check_schema_exists": {"name": "redshift__check_schema_exists", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_redshift.redshift__check_schema_exists", "macro_sql": "{% macro redshift__check_schema_exists(information_schema, schema) -%}\n {{ return(postgres__check_schema_exists(information_schema, schema)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8116338, "supported_languages": null}, "macro.dbt_redshift.redshift__persist_docs": {"name": "redshift__persist_docs", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_redshift.redshift__persist_docs", "macro_sql": "{% macro redshift__persist_docs(relation, model, for_relation, for_columns) -%}\n {% if for_relation and config.persist_relation_docs() and model.description %}\n {% do run_query(alter_relation_comment(relation, model.description)) %}\n {% endif %}\n\n {# Override: do not set column comments for LBVs #}\n {% set is_lbv = config.get('materialized') == 'view' and config.get('bind') == false %}\n {% if for_columns and config.persist_column_docs() and model.columns and not is_lbv %}\n {% do run_query(alter_column_comment(relation, model.columns)) %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.812311, "supported_languages": null}, "macro.dbt_redshift.redshift__alter_relation_comment": {"name": "redshift__alter_relation_comment", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_redshift.redshift__alter_relation_comment", "macro_sql": "{% macro redshift__alter_relation_comment(relation, comment) %}\n {% do return(postgres__alter_relation_comment(relation, comment)) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.812499, "supported_languages": null}, "macro.dbt_redshift.redshift__alter_column_comment": {"name": "redshift__alter_column_comment", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_redshift.redshift__alter_column_comment", "macro_sql": "{% macro redshift__alter_column_comment(relation, column_dict) %}\n {% do return(postgres__alter_column_comment(relation, column_dict)) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8126779, "supported_languages": null}, "macro.dbt_redshift.redshift__alter_relation_add_remove_columns": {"name": "redshift__alter_relation_add_remove_columns", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_redshift.redshift__alter_relation_add_remove_columns", "macro_sql": "{% macro redshift__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n\n {% if add_columns %}\n\n {% for column in add_columns %}\n {% set sql -%}\n alter {{ relation.type }} {{ relation }} add column {{ column.name }} {{ column.data_type }}\n {% endset %}\n {% do run_query(sql) %}\n {% endfor %}\n\n {% endif %}\n\n {% if remove_columns %}\n\n {% for column in remove_columns %}\n {% set sql -%}\n alter {{ relation.type }} {{ relation }} drop column {{ column.name }}\n {% endset %}\n {% do run_query(sql) %}\n {% endfor %}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.813369, "supported_languages": null}, "macro.dbt_redshift.redshift__snapshot_merge_sql": {"name": "redshift__snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/materializations/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshot_merge.sql", "unique_id": "macro.dbt_redshift.redshift__snapshot_merge_sql", "macro_sql": "{% macro redshift__snapshot_merge_sql(target, source, insert_cols) -%}\n {{ postgres__snapshot_merge_sql(target, source, insert_cols) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8135839, "supported_languages": null}, "macro.dbt_redshift.redshift__get_batch_size": {"name": "redshift__get_batch_size", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt_redshift.redshift__get_batch_size", "macro_sql": "{% macro redshift__get_batch_size() %}\n {{ return(500) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.813735, "supported_languages": null}, "macro.dbt_redshift.redshift__length": {"name": "redshift__length", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "unique_id": "macro.dbt_redshift.redshift__length", "macro_sql": "{% macro redshift__length(expression) %}\n\n len(\n {{ expression }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.813884, "supported_languages": null}, "macro.dbt_redshift.redshift__dateadd": {"name": "redshift__dateadd", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt_redshift.redshift__dateadd", "macro_sql": "{% macro redshift__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_date_or_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.814118, "supported_languages": null}, "macro.dbt_redshift.redshift__listagg": {"name": "redshift__listagg", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt_redshift.redshift__listagg", "macro_sql": "{% macro redshift__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n {% set ns = namespace() %}\n {% set ns.delimiter_text_regex = delimiter_text|trim(\"'\") %}\n {% set special_chars %}\\,^,$,.,|,?,*,+,(,),[,],{,}{% endset %}\n {%- for char in special_chars.split(',') -%}\n {% set escape_char %}\\\\{{ char }}{% endset %}\n {% set ns.delimiter_text_regex = ns.delimiter_text_regex|replace(char,escape_char) %}\n {%- endfor -%}\n\n {% set regex %}'([^{{ ns.delimiter_text_regex }}]+{{ ns.delimiter_text_regex }}){1,{{ limit_num - 1}}}[^{{ ns.delimiter_text_regex }}]+'{% endset %}\n regexp_substr(\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n ,{{ regex }}\n )\n {%- else %}\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.815823, "supported_languages": null}, "macro.dbt_redshift.redshift__datediff": {"name": "redshift__datediff", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt_redshift.redshift__datediff", "macro_sql": "{% macro redshift__datediff(first_date, second_date, datepart) -%}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.816065, "supported_languages": null}, "macro.dbt_redshift.redshift__cast_bool_to_text": {"name": "redshift__cast_bool_to_text", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "unique_id": "macro.dbt_redshift.redshift__cast_bool_to_text", "macro_sql": "{% macro redshift__cast_bool_to_text(field) %}\n case\n when {{ field }} is true then 'true'\n when {{ field }} is false then 'false'\n end::text\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.816244, "supported_languages": null}, "macro.dbt_redshift.redshift__array_concat": {"name": "redshift__array_concat", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "unique_id": "macro.dbt_redshift.redshift__array_concat", "macro_sql": "{% macro redshift__array_concat(array_1, array_2) -%}\n array_concat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.816412, "supported_languages": null}, "macro.dbt_redshift.redshift__last_day": {"name": "redshift__last_day", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt_redshift.redshift__last_day", "macro_sql": "{% macro redshift__last_day(date, datepart) %}\n cast(\n {{dbt.dateadd('day', '-1',\n dbt.dateadd(datepart, '1', dbt.date_trunc(datepart, date))\n )}}\n as date)\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.816747, "supported_languages": null}, "macro.dbt_redshift.redshift__split_part": {"name": "redshift__split_part", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt_redshift.redshift__split_part", "macro_sql": "{% macro redshift__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n {{ dbt.default__split_part(string_text, delimiter_text, part_number) }}\n {% else %}\n {{ dbt._split_part_negative(string_text, delimiter_text, part_number) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__split_part", "macro.dbt._split_part_negative"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.81716, "supported_languages": null}, "macro.dbt_redshift.redshift__array_construct": {"name": "redshift__array_construct", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "unique_id": "macro.dbt_redshift.redshift__array_construct", "macro_sql": "{% macro redshift__array_construct(inputs, data_type) -%}\n array( {{ inputs|join(' , ') }} )\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.81734, "supported_languages": null}, "macro.dbt_redshift.redshift__array_append": {"name": "redshift__array_append", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "unique_id": "macro.dbt_redshift.redshift__array_append", "macro_sql": "{% macro redshift__array_append(array, new_element) -%}\n {{ array_concat(array, array_construct([new_element])) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.array_concat", "macro.dbt.array_construct"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.817622, "supported_languages": null}, "macro.dbt_redshift.redshift__get_show_grant_sql": {"name": "redshift__get_show_grant_sql", "resource_type": "macro", "package_name": "dbt_redshift", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt_redshift.redshift__get_show_grant_sql", "macro_sql": "{% macro redshift__get_show_grant_sql(relation) %}\n\nwith privileges as (\n\n -- valid options per https://docs.aws.amazon.com/redshift/latest/dg/r_HAS_TABLE_PRIVILEGE.html\n select 'select' as privilege_type\n union all\n select 'insert' as privilege_type\n union all\n select 'update' as privilege_type\n union all\n select 'delete' as privilege_type\n union all\n select 'references' as privilege_type\n\n)\n\nselect\n u.usename as grantee,\n p.privilege_type\nfrom pg_user u\ncross join privileges p\nwhere has_table_privilege(u.usename, '{{ relation }}', privilege_type)\n and u.usename != current_user\n and not u.usesuper\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8178391, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp": {"name": "postgres__current_timestamp", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp", "macro_sql": "{% macro postgres__current_timestamp() -%}\n now()\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8181188, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_string_as_time": {"name": "postgres__snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_string_as_time", "macro_sql": "{% macro postgres__snapshot_string_as_time(timestamp) -%}\n {%- set result = \"'\" ~ timestamp ~ \"'::timestamp without time zone\" -%}\n {{ return(result) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.818301, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_get_time": {"name": "postgres__snapshot_get_time", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_get_time", "macro_sql": "{% macro postgres__snapshot_get_time() -%}\n {{ current_timestamp() }}::timestamp without time zone\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8184042, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp_backcompat": {"name": "postgres__current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp_backcompat", "macro_sql": "{% macro postgres__current_timestamp_backcompat() %}\n current_timestamp::{{ type_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.818509, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat": {"name": "postgres__current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat", "macro_sql": "{% macro postgres__current_timestamp_in_utc_backcompat() %}\n (current_timestamp at time zone 'utc')::{{ type_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.818614, "supported_languages": null}, "macro.dbt_postgres.postgres__get_catalog": {"name": "postgres__get_catalog", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_postgres.postgres__get_catalog", "macro_sql": "{% macro postgres__get_catalog(information_schema, schemas) -%}\n\n {%- call statement('catalog', fetch_result=True) -%}\n {#\n If the user has multiple databases set and the first one is wrong, this will fail.\n But we won't fail in the case where there are multiple quoting-difference-only dbs, which is better.\n #}\n {% set database = information_schema.database %}\n {{ adapter.verify_database(database) }}\n\n select\n '{{ database }}' as table_database,\n sch.nspname as table_schema,\n tbl.relname as table_name,\n case tbl.relkind\n when 'v' then 'VIEW'\n else 'BASE TABLE'\n end as table_type,\n tbl_desc.description as table_comment,\n col.attname as column_name,\n col.attnum as column_index,\n pg_catalog.format_type(col.atttypid, col.atttypmod) as column_type,\n col_desc.description as column_comment,\n pg_get_userbyid(tbl.relowner) as table_owner\n\n from pg_catalog.pg_namespace sch\n join pg_catalog.pg_class tbl on tbl.relnamespace = sch.oid\n join pg_catalog.pg_attribute col on col.attrelid = tbl.oid\n left outer join pg_catalog.pg_description tbl_desc on (tbl_desc.objoid = tbl.oid and tbl_desc.objsubid = 0)\n left outer join pg_catalog.pg_description col_desc on (col_desc.objoid = tbl.oid and col_desc.objsubid = col.attnum)\n\n where (\n {%- for schema in schemas -%}\n upper(sch.nspname) = upper('{{ schema }}'){%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n and not pg_is_other_temp_schema(sch.oid) -- not a temporary schema belonging to another session\n and tbl.relpersistence in ('p', 'u') -- [p]ermanent table or [u]nlogged table. Exclude [t]emporary tables\n and tbl.relkind in ('r', 'v', 'f', 'p') -- o[r]dinary table, [v]iew, [f]oreign table, [p]artitioned table. Other values are [i]ndex, [S]equence, [c]omposite type, [t]OAST table, [m]aterialized view\n and col.attnum > 0 -- negative numbers are used for system columns such as oid\n and not col.attisdropped -- column as not been dropped\n\n order by\n sch.nspname,\n tbl.relname,\n col.attnum\n\n {%- endcall -%}\n\n {{ return(load_result('catalog').table) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8196712, "supported_languages": null}, "macro.dbt_postgres.postgres_get_relations": {"name": "postgres_get_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "unique_id": "macro.dbt_postgres.postgres_get_relations", "macro_sql": "{% macro postgres_get_relations () -%}\n\n {#\n -- in pg_depend, objid is the dependent, refobjid is the referenced object\n -- > a pg_depend entry indicates that the referenced object cannot be\n -- > dropped without also dropping the dependent object.\n #}\n\n {%- call statement('relations', fetch_result=True) -%}\n with relation as (\n select\n pg_rewrite.ev_class as class,\n pg_rewrite.oid as id\n from pg_rewrite\n ),\n class as (\n select\n oid as id,\n relname as name,\n relnamespace as schema,\n relkind as kind\n from pg_class\n ),\n dependency as (\n select distinct\n pg_depend.objid as id,\n pg_depend.refobjid as ref\n from pg_depend\n ),\n schema as (\n select\n pg_namespace.oid as id,\n pg_namespace.nspname as name\n from pg_namespace\n where nspname != 'information_schema' and nspname not like 'pg\\_%'\n ),\n referenced as (\n select\n relation.id AS id,\n referenced_class.name ,\n referenced_class.schema ,\n referenced_class.kind\n from relation\n join class as referenced_class on relation.class=referenced_class.id\n where referenced_class.kind in ('r', 'v')\n ),\n relationships as (\n select\n referenced.name as referenced_name,\n referenced.schema as referenced_schema_id,\n dependent_class.name as dependent_name,\n dependent_class.schema as dependent_schema_id,\n referenced.kind as kind\n from referenced\n join dependency on referenced.id=dependency.id\n join class as dependent_class on dependency.ref=dependent_class.id\n where\n (referenced.name != dependent_class.name or\n referenced.schema != dependent_class.schema)\n )\n\n select\n referenced_schema.name as referenced_schema,\n relationships.referenced_name as referenced_name,\n dependent_schema.name as dependent_schema,\n relationships.dependent_name as dependent_name\n from relationships\n join schema as dependent_schema on relationships.dependent_schema_id=dependent_schema.id\n join schema as referenced_schema on relationships.referenced_schema_id=referenced_schema.id\n group by referenced_schema, referenced_name, dependent_schema, dependent_name\n order by referenced_schema, referenced_name, dependent_schema, dependent_name;\n\n {%- endcall -%}\n\n {{ return(load_result('relations').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.820299, "supported_languages": null}, "macro.dbt_postgres.postgres__create_table_as": {"name": "postgres__create_table_as", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__create_table_as", "macro_sql": "{% macro postgres__create_table_as(temporary, relation, sql) -%}\n {%- set unlogged = config.get('unlogged', default=false) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create {% if temporary -%}\n temporary\n {%- elif unlogged -%}\n unlogged\n {%- endif %} table {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {{ get_table_columns_and_constraints() }} ;\n insert into {{ relation }} (\n {{ adapter.dispatch('get_column_names', 'dbt')() }}\n )\n {%- set sql = get_select_subquery(sql) %}\n {% else %}\n as\n {% endif %}\n (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.default__get_column_names", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.827598, "supported_languages": null}, "macro.dbt_postgres.postgres__get_create_index_sql": {"name": "postgres__get_create_index_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_create_index_sql", "macro_sql": "{% macro postgres__get_create_index_sql(relation, index_dict) -%}\n {%- set index_config = adapter.parse_index(index_dict) -%}\n {%- set comma_separated_columns = \", \".join(index_config.columns) -%}\n {%- set index_name = index_config.render(relation) -%}\n\n create {% if index_config.unique -%}\n unique\n {%- endif %} index if not exists\n \"{{ index_name }}\"\n on {{ relation }} {% if index_config.type -%}\n using {{ index_config.type }}\n {%- endif %}\n ({{ comma_separated_columns }});\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.828098, "supported_languages": null}, "macro.dbt_postgres.postgres__create_schema": {"name": "postgres__create_schema", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__create_schema", "macro_sql": "{% macro postgres__create_schema(relation) -%}\n {% if relation.database -%}\n {{ adapter.verify_database(relation.database) }}\n {%- endif -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier().include(database=False) }}\n {%- endcall -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.828416, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_schema": {"name": "postgres__drop_schema", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__drop_schema", "macro_sql": "{% macro postgres__drop_schema(relation) -%}\n {% if relation.database -%}\n {{ adapter.verify_database(relation.database) }}\n {%- endif -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier().include(database=False) }} cascade\n {%- endcall -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.828734, "supported_languages": null}, "macro.dbt_postgres.postgres__get_columns_in_relation": {"name": "postgres__get_columns_in_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_columns_in_relation", "macro_sql": "{% macro postgres__get_columns_in_relation(relation) -%}\n {% call statement('get_columns_in_relation', fetch_result=True) %}\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from {{ relation.information_schema('columns') }}\n where table_name = '{{ relation.identifier }}'\n {% if relation.schema %}\n and table_schema = '{{ relation.schema }}'\n {% endif %}\n order by ordinal_position\n\n {% endcall %}\n {% set table = load_result('get_columns_in_relation').table %}\n {{ return(sql_convert_columns_in_relation(table)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.sql_convert_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8292081, "supported_languages": null}, "macro.dbt_postgres.postgres__list_relations_without_caching": {"name": "postgres__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__list_relations_without_caching", "macro_sql": "{% macro postgres__list_relations_without_caching(schema_relation) %}\n {% call statement('list_relations_without_caching', fetch_result=True) -%}\n select\n '{{ schema_relation.database }}' as database,\n tablename as name,\n schemaname as schema,\n 'table' as type\n from pg_tables\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select\n '{{ schema_relation.database }}' as database,\n viewname as name,\n schemaname as schema,\n 'view' as type\n from pg_views\n where schemaname ilike '{{ schema_relation.schema }}'\n {% endcall %}\n {{ return(load_result('list_relations_without_caching').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8295848, "supported_languages": null}, "macro.dbt_postgres.postgres__information_schema_name": {"name": "postgres__information_schema_name", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__information_schema_name", "macro_sql": "{% macro postgres__information_schema_name(database) -%}\n {% if database_name -%}\n {{ adapter.verify_database(database_name) }}\n {%- endif -%}\n information_schema\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.829759, "supported_languages": null}, "macro.dbt_postgres.postgres__list_schemas": {"name": "postgres__list_schemas", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__list_schemas", "macro_sql": "{% macro postgres__list_schemas(database) %}\n {% if database -%}\n {{ adapter.verify_database(database) }}\n {%- endif -%}\n {% call statement('list_schemas', fetch_result=True, auto_begin=False) %}\n select distinct nspname from pg_namespace\n {% endcall %}\n {{ return(load_result('list_schemas').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.830108, "supported_languages": null}, "macro.dbt_postgres.postgres__check_schema_exists": {"name": "postgres__check_schema_exists", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__check_schema_exists", "macro_sql": "{% macro postgres__check_schema_exists(information_schema, schema) -%}\n {% if information_schema.database -%}\n {{ adapter.verify_database(information_schema.database) }}\n {%- endif -%}\n {% call statement('check_schema_exists', fetch_result=True, auto_begin=False) %}\n select count(*) from pg_namespace where nspname = '{{ schema }}'\n {% endcall %}\n {{ return(load_result('check_schema_exists').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.830563, "supported_languages": null}, "macro.dbt_postgres.postgres__make_relation_with_suffix": {"name": "postgres__make_relation_with_suffix", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_relation_with_suffix", "macro_sql": "{% macro postgres__make_relation_with_suffix(base_relation, suffix, dstring) %}\n {% if dstring %}\n {% set dt = modules.datetime.datetime.now() %}\n {% set dtstring = dt.strftime(\"%H%M%S%f\") %}\n {% set suffix = suffix ~ dtstring %}\n {% endif %}\n {% set suffix_length = suffix|length %}\n {% set relation_max_name_length = base_relation.relation_max_name_length() %}\n {% if suffix_length > relation_max_name_length %}\n {% do exceptions.raise_compiler_error('Relation suffix is too long (' ~ suffix_length ~ ' characters). Maximum length is ' ~ relation_max_name_length ~ ' characters.') %}\n {% endif %}\n {% set identifier = base_relation.identifier[:relation_max_name_length - suffix_length] ~ suffix %}\n\n {{ return(base_relation.incorporate(path={\"identifier\": identifier })) }}\n\n {% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.831406, "supported_languages": null}, "macro.dbt_postgres.postgres__make_intermediate_relation": {"name": "postgres__make_intermediate_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_intermediate_relation", "macro_sql": "{% macro postgres__make_intermediate_relation(base_relation, suffix) %}\n {{ return(postgres__make_relation_with_suffix(base_relation, suffix, dstring=False)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.831605, "supported_languages": null}, "macro.dbt_postgres.postgres__make_temp_relation": {"name": "postgres__make_temp_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_temp_relation", "macro_sql": "{% macro postgres__make_temp_relation(base_relation, suffix) %}\n {% set temp_relation = postgres__make_relation_with_suffix(base_relation, suffix, dstring=True) %}\n {{ return(temp_relation.incorporate(path={\"schema\": none,\n \"database\": none})) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8319318, "supported_languages": null}, "macro.dbt_postgres.postgres__make_backup_relation": {"name": "postgres__make_backup_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_backup_relation", "macro_sql": "{% macro postgres__make_backup_relation(base_relation, backup_relation_type, suffix) %}\n {% set backup_relation = postgres__make_relation_with_suffix(base_relation, suffix, dstring=False) %}\n {{ return(backup_relation.incorporate(type=backup_relation_type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8322098, "supported_languages": null}, "macro.dbt_postgres.postgres_escape_comment": {"name": "postgres_escape_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres_escape_comment", "macro_sql": "{% macro postgres_escape_comment(comment) -%}\n {% if comment is not string %}\n {% do exceptions.raise_compiler_error('cannot escape a non-string: ' ~ comment) %}\n {% endif %}\n {%- set magic = '$dbt_comment_literal_block$' -%}\n {%- if magic in comment -%}\n {%- do exceptions.raise_compiler_error('The string ' ~ magic ~ ' is not allowed in comments.') -%}\n {%- endif -%}\n {{ magic }}{{ comment }}{{ magic }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8326652, "supported_languages": null}, "macro.dbt_postgres.postgres__alter_relation_comment": {"name": "postgres__alter_relation_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__alter_relation_comment", "macro_sql": "{% macro postgres__alter_relation_comment(relation, comment) %}\n {% set escaped_comment = postgres_escape_comment(comment) %}\n comment on {{ relation.type }} {{ relation }} is {{ escaped_comment }};\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.832893, "supported_languages": null}, "macro.dbt_postgres.postgres__alter_column_comment": {"name": "postgres__alter_column_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__alter_column_comment", "macro_sql": "{% macro postgres__alter_column_comment(relation, column_dict) %}\n {% set existing_columns = adapter.get_columns_in_relation(relation) | map(attribute=\"name\") | list %}\n {% for column_name in column_dict if (column_name in existing_columns) %}\n {% set comment = column_dict[column_name]['description'] %}\n {% set escaped_comment = postgres_escape_comment(comment) %}\n comment on column {{ relation }}.{{ adapter.quote(column_name) if column_dict[column_name]['quote'] else column_name }} is {{ escaped_comment }};\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8335, "supported_languages": null}, "macro.dbt_postgres.postgres__get_show_grant_sql": {"name": "postgres__get_show_grant_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_show_grant_sql", "macro_sql": "\n\n{%- macro postgres__get_show_grant_sql(relation) -%}\n select grantee, privilege_type\n from {{ relation.information_schema('role_table_grants') }}\n where grantor = current_role\n and grantee != current_role\n and table_schema = '{{ relation.schema }}'\n and table_name = '{{ relation.identifier }}'\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.833704, "supported_languages": null}, "macro.dbt_postgres.postgres__copy_grants": {"name": "postgres__copy_grants", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__copy_grants", "macro_sql": "{% macro postgres__copy_grants() %}\n {{ return(False) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8338208, "supported_languages": null}, "macro.dbt_postgres.postgres__get_incremental_default_sql": {"name": "postgres__get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/incremental_strategies.sql", "original_file_path": "macros/materializations/incremental_strategies.sql", "unique_id": "macro.dbt_postgres.postgres__get_incremental_default_sql", "macro_sql": "{% macro postgres__get_incremental_default_sql(arg_dict) %}\n\n {% if arg_dict[\"unique_key\"] %}\n {% do return(get_incremental_delete_insert_sql(arg_dict)) %}\n {% else %}\n {% do return(get_incremental_append_sql(arg_dict)) %}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_delete_insert_sql", "macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.834225, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_merge_sql": {"name": "postgres__snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshot_merge.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_merge_sql", "macro_sql": "{% macro postgres__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n update {{ target }}\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_scd_id::text = {{ target }}.dbt_scd_id::text\n and DBT_INTERNAL_SOURCE.dbt_change_type::text in ('update'::text, 'delete'::text)\n and {{ target }}.dbt_valid_to is null;\n\n insert into {{ target }} ({{ insert_cols_csv }})\n select {% for column in insert_cols -%}\n DBT_INTERNAL_SOURCE.{{ column }} {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_change_type::text = 'insert'::text;\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.834989, "supported_languages": null}, "macro.dbt_postgres.postgres__dateadd": {"name": "postgres__dateadd", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt_postgres.postgres__dateadd", "macro_sql": "{% macro postgres__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {{ from_date_or_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8352299, "supported_languages": null}, "macro.dbt_postgres.postgres__listagg": {"name": "postgres__listagg", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt_postgres.postgres__listagg", "macro_sql": "{% macro postgres__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n array_to_string(\n (array_agg(\n {{ measure }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n ))[1:{{ limit_num }}],\n {{ delimiter_text }}\n )\n {%- else %}\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n )\n {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.835906, "supported_languages": null}, "macro.dbt_postgres.postgres__datediff": {"name": "postgres__datediff", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt_postgres.postgres__datediff", "macro_sql": "{% macro postgres__datediff(first_date, second_date, datepart) -%}\n\n {% if datepart == 'year' %}\n (date_part('year', ({{second_date}})::date) - date_part('year', ({{first_date}})::date))\n {% elif datepart == 'quarter' %}\n ({{ datediff(first_date, second_date, 'year') }} * 4 + date_part('quarter', ({{second_date}})::date) - date_part('quarter', ({{first_date}})::date))\n {% elif datepart == 'month' %}\n ({{ datediff(first_date, second_date, 'year') }} * 12 + date_part('month', ({{second_date}})::date) - date_part('month', ({{first_date}})::date))\n {% elif datepart == 'day' %}\n (({{second_date}})::date - ({{first_date}})::date)\n {% elif datepart == 'week' %}\n ({{ datediff(first_date, second_date, 'day') }} / 7 + case\n when date_part('dow', ({{first_date}})::timestamp) <= date_part('dow', ({{second_date}})::timestamp) then\n case when {{first_date}} <= {{second_date}} then 0 else -1 end\n else\n case when {{first_date}} <= {{second_date}} then 1 else 0 end\n end)\n {% elif datepart == 'hour' %}\n ({{ datediff(first_date, second_date, 'day') }} * 24 + date_part('hour', ({{second_date}})::timestamp) - date_part('hour', ({{first_date}})::timestamp))\n {% elif datepart == 'minute' %}\n ({{ datediff(first_date, second_date, 'hour') }} * 60 + date_part('minute', ({{second_date}})::timestamp) - date_part('minute', ({{first_date}})::timestamp))\n {% elif datepart == 'second' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60 + floor(date_part('second', ({{second_date}})::timestamp)) - floor(date_part('second', ({{first_date}})::timestamp)))\n {% elif datepart == 'millisecond' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60000 + floor(date_part('millisecond', ({{second_date}})::timestamp)) - floor(date_part('millisecond', ({{first_date}})::timestamp)))\n {% elif datepart == 'microsecond' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60000000 + floor(date_part('microsecond', ({{second_date}})::timestamp)) - floor(date_part('microsecond', ({{first_date}})::timestamp)))\n {% else %}\n {{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in postgres: {!r}\".format(datepart)) }}\n {% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.839381, "supported_languages": null}, "macro.dbt_postgres.postgres__any_value": {"name": "postgres__any_value", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt_postgres.postgres__any_value", "macro_sql": "{% macro postgres__any_value(expression) -%}\n\n min({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.839547, "supported_languages": null}, "macro.dbt_postgres.postgres__last_day": {"name": "postgres__last_day", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt_postgres.postgres__last_day", "macro_sql": "{% macro postgres__last_day(date, datepart) -%}\n\n {%- if datepart == 'quarter' -%}\n -- postgres dateadd does not support quarter interval.\n cast(\n {{dbt.dateadd('day', '-1',\n dbt.dateadd('month', '3', dbt.date_trunc(datepart, date))\n )}}\n as date)\n {%- else -%}\n {{dbt.default_last_day(date, datepart)}}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc", "macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.840065, "supported_languages": null}, "macro.dbt_postgres.postgres__split_part": {"name": "postgres__split_part", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt_postgres.postgres__split_part", "macro_sql": "{% macro postgres__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n {{ dbt.default__split_part(string_text, delimiter_text, part_number) }}\n {% else %}\n {{ dbt._split_part_negative(string_text, delimiter_text, part_number) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__split_part", "macro.dbt._split_part_negative"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.840491, "supported_languages": null}, "macro.dbt.run_hooks": {"name": "run_hooks", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.run_hooks", "macro_sql": "{% macro run_hooks(hooks, inside_transaction=True) %}\n {% for hook in hooks | selectattr('transaction', 'equalto', inside_transaction) %}\n {% if not inside_transaction and loop.first %}\n {% call statement(auto_begin=inside_transaction) %}\n commit;\n {% endcall %}\n {% endif %}\n {% set rendered = render(hook.get('sql')) | trim %}\n {% if (rendered | length) > 0 %}\n {% call statement(auto_begin=inside_transaction) %}\n {{ rendered }}\n {% endcall %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.841643, "supported_languages": null}, "macro.dbt.make_hook_config": {"name": "make_hook_config", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8418539, "supported_languages": null}, "macro.dbt.before_begin": {"name": "before_begin", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.before_begin", "macro_sql": "{% macro before_begin(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.842007, "supported_languages": null}, "macro.dbt.in_transaction": {"name": "in_transaction", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.842158, "supported_languages": null}, "macro.dbt.after_commit": {"name": "after_commit", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.after_commit", "macro_sql": "{% macro after_commit(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8423061, "supported_languages": null}, "macro.dbt.set_sql_header": {"name": "set_sql_header", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.842701, "supported_languages": null}, "macro.dbt.should_full_refresh": {"name": "should_full_refresh", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.should_full_refresh", "macro_sql": "{% macro should_full_refresh() %}\n {% set config_full_refresh = config.get('full_refresh') %}\n {% if config_full_refresh is none %}\n {% set config_full_refresh = flags.FULL_REFRESH %}\n {% endif %}\n {% do return(config_full_refresh) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8430169, "supported_languages": null}, "macro.dbt.should_store_failures": {"name": "should_store_failures", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.should_store_failures", "macro_sql": "{% macro should_store_failures() %}\n {% set config_store_failures = config.get('store_failures') %}\n {% if config_store_failures is none %}\n {% set config_store_failures = flags.STORE_FAILURES %}\n {% endif %}\n {% do return(config_store_failures) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.843335, "supported_languages": null}, "macro.dbt.snapshot_merge_sql": {"name": "snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "unique_id": "macro.dbt.snapshot_merge_sql", "macro_sql": "{% macro snapshot_merge_sql(target, source, insert_cols) -%}\n {{ adapter.dispatch('snapshot_merge_sql', 'dbt')(target, source, insert_cols) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.843785, "supported_languages": null}, "macro.dbt.default__snapshot_merge_sql": {"name": "default__snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "unique_id": "macro.dbt.default__snapshot_merge_sql", "macro_sql": "{% macro default__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.dbt_scd_id = DBT_INTERNAL_DEST.dbt_scd_id\n\n when matched\n and DBT_INTERNAL_DEST.dbt_valid_to is null\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n\n when not matched\n and DBT_INTERNAL_SOURCE.dbt_change_type = 'insert'\n then insert ({{ insert_cols_csv }})\n values ({{ insert_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.844068, "supported_languages": null}, "macro.dbt.strategy_dispatch": {"name": "strategy_dispatch", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.strategy_dispatch", "macro_sql": "{% macro strategy_dispatch(name) -%}\n{% set original_name = name %}\n {% if '.' in name %}\n {% set package_name, name = name.split(\".\", 1) %}\n {% else %}\n {% set package_name = none %}\n {% endif %}\n\n {% if package_name is none %}\n {% set package_context = context %}\n {% elif package_name in context %}\n {% set package_context = context[package_name] %}\n {% else %}\n {% set error_msg %}\n Could not find package '{{package_name}}', called with '{{original_name}}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n\n {%- set search_name = 'snapshot_' ~ name ~ '_strategy' -%}\n\n {% if search_name not in package_context %}\n {% set error_msg %}\n The specified strategy macro '{{name}}' was not found in package '{{ package_name }}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n {{ return(package_context[search_name]) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.847875, "supported_languages": null}, "macro.dbt.snapshot_hash_arguments": {"name": "snapshot_hash_arguments", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n {{ adapter.dispatch('snapshot_hash_arguments', 'dbt')(args) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.848053, "supported_languages": null}, "macro.dbt.default__snapshot_hash_arguments": {"name": "default__snapshot_hash_arguments", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.default__snapshot_hash_arguments", "macro_sql": "{% macro default__snapshot_hash_arguments(args) -%}\n md5({%- for arg in args -%}\n coalesce(cast({{ arg }} as varchar ), '')\n {% if not loop.last %} || '|' || {% endif %}\n {%- endfor -%})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.848282, "supported_languages": null}, "macro.dbt.snapshot_timestamp_strategy": {"name": "snapshot_timestamp_strategy", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_timestamp_strategy", "macro_sql": "{% macro snapshot_timestamp_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set primary_key = config['unique_key'] %}\n {% set updated_at = config['updated_at'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n\n {#/*\n The snapshot relation might not have an {{ updated_at }} value if the\n snapshot strategy is changed from `check` to `timestamp`. We\n should use a dbt-created column for the comparison in the snapshot\n table instead of assuming that the user-supplied {{ updated_at }}\n will be present in the historical data.\n\n See https://github.com/dbt-labs/dbt-core/issues/2350\n */ #}\n {% set row_changed_expr -%}\n ({{ snapshotted_rel }}.dbt_valid_from < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.849043, "supported_languages": null}, "macro.dbt.snapshot_string_as_time": {"name": "snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n {{ adapter.dispatch('snapshot_string_as_time', 'dbt')(timestamp) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8492181, "supported_languages": null}, "macro.dbt.default__snapshot_string_as_time": {"name": "default__snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.default__snapshot_string_as_time", "macro_sql": "{% macro default__snapshot_string_as_time(timestamp) %}\n {% do exceptions.raise_not_implemented(\n 'snapshot_string_as_time macro not implemented for adapter '+adapter.type()\n ) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.849398, "supported_languages": null}, "macro.dbt.snapshot_check_all_get_existing_columns": {"name": "snapshot_check_all_get_existing_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "macro_sql": "{% macro snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) -%}\n {%- if not target_exists -%}\n {#-- no table yet -> return whatever the query does --#}\n {{ return((false, query_columns)) }}\n {%- endif -%}\n\n {#-- handle any schema changes --#}\n {%- set target_relation = adapter.get_relation(database=node.database, schema=node.schema, identifier=node.alias) -%}\n\n {% if check_cols_config == 'all' %}\n {%- set query_columns = get_columns_in_query(node['compiled_code']) -%}\n\n {% elif check_cols_config is iterable and (check_cols_config | length) > 0 %}\n {#-- query for proper casing/quoting, to support comparison below --#}\n {%- set select_check_cols_from_target -%}\n {#-- N.B. The whitespace below is necessary to avoid edge case issue with comments --#}\n {#-- See: https://github.com/dbt-labs/dbt-core/issues/6781 --#}\n select {{ check_cols_config | join(', ') }} from (\n {{ node['compiled_code'] }}\n ) subq\n {%- endset -%}\n {% set query_columns = get_columns_in_query(select_check_cols_from_target) %}\n\n {% else %}\n {% do exceptions.raise_compiler_error(\"Invalid value for 'check_cols': \" ~ check_cols_config) %}\n {% endif %}\n\n {%- set existing_cols = adapter.get_columns_in_relation(target_relation) | map(attribute = 'name') | list -%}\n {%- set ns = namespace() -%} {#-- handle for-loop scoping with a namespace --#}\n {%- set ns.column_added = false -%}\n\n {%- set intersection = [] -%}\n {%- for col in query_columns -%}\n {%- if col in existing_cols -%}\n {%- do intersection.append(adapter.quote(col)) -%}\n {%- else -%}\n {% set ns.column_added = true %}\n {%- endif -%}\n {%- endfor -%}\n {{ return((ns.column_added, intersection)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.850882, "supported_languages": null}, "macro.dbt.snapshot_check_strategy": {"name": "snapshot_check_strategy", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_check_strategy", "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set check_cols_config = config['check_cols'] %}\n {% set primary_key = config['unique_key'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n {% set updated_at = config.get('updated_at', snapshot_get_time()) %}\n\n {% set column_added = false %}\n\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n {{ get_true_sql() }}\n {%- else -%}\n {%- for col in check_cols -%}\n {{ snapshotted_rel }}.{{ col }} != {{ current_rel }}.{{ col }}\n or\n (\n (({{ snapshotted_rel }}.{{ col }} is null) and not ({{ current_rel }}.{{ col }} is null))\n or\n ((not {{ snapshotted_rel }}.{{ col }} is null) and ({{ current_rel }}.{{ col }} is null))\n )\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n {%- endif -%}\n )\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt.snapshot_check_all_get_existing_columns", "macro.dbt.get_true_sql", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8523798, "supported_languages": null}, "macro.dbt.create_columns": {"name": "create_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n {{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.856933, "supported_languages": null}, "macro.dbt.default__create_columns": {"name": "default__create_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__create_columns", "macro_sql": "{% macro default__create_columns(relation, columns) %}\n {% for column in columns %}\n {% call statement() %}\n alter table {{ relation }} add column \"{{ column.name }}\" {{ column.data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8572412, "supported_languages": null}, "macro.dbt.post_snapshot": {"name": "post_snapshot", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n {{ adapter.dispatch('post_snapshot', 'dbt')(staging_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.85742, "supported_languages": null}, "macro.dbt.default__post_snapshot": {"name": "default__post_snapshot", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n {# no-op #}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8575108, "supported_languages": null}, "macro.dbt.get_true_sql": {"name": "get_true_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_true_sql", "macro_sql": "{% macro get_true_sql() %}\n {{ adapter.dispatch('get_true_sql', 'dbt')() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_true_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8576589, "supported_languages": null}, "macro.dbt.default__get_true_sql": {"name": "default__get_true_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__get_true_sql", "macro_sql": "{% macro default__get_true_sql() %}\n {{ return('TRUE') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8577769, "supported_languages": null}, "macro.dbt.snapshot_staging_table": {"name": "snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.snapshot_staging_table", "macro_sql": "{% macro snapshot_staging_table(strategy, source_sql, target_relation) -%}\n {{ adapter.dispatch('snapshot_staging_table', 'dbt')(strategy, source_sql, target_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__snapshot_staging_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8579898, "supported_languages": null}, "macro.dbt.default__snapshot_staging_table": {"name": "default__snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__snapshot_staging_table", "macro_sql": "{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}\n\n with snapshot_query as (\n\n {{ source_sql }}\n\n ),\n\n snapshotted_data as (\n\n select *,\n {{ strategy.unique_key }} as dbt_unique_key\n\n from {{ target_relation }}\n where dbt_valid_to is null\n\n ),\n\n insertions_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to,\n {{ strategy.scd_id }} as dbt_scd_id\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n {{ strategy.updated_at }} as dbt_valid_to\n\n from snapshot_query\n ),\n\n {%- if strategy.invalidate_hard_deletes %}\n\n deletes_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key\n from snapshot_query\n ),\n {% endif %}\n\n insertions as (\n\n select\n 'insert' as dbt_change_type,\n source_data.*\n\n from insertions_source_data as source_data\n left outer join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where snapshotted_data.dbt_unique_key is null\n or (\n snapshotted_data.dbt_unique_key is not null\n and (\n {{ strategy.row_changed }}\n )\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.dbt_scd_id\n\n from updates_source_data as source_data\n join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where (\n {{ strategy.row_changed }}\n )\n )\n\n {%- if strategy.invalidate_hard_deletes -%}\n ,\n\n deletes as (\n\n select\n 'delete' as dbt_change_type,\n source_data.*,\n {{ snapshot_get_time() }} as dbt_valid_from,\n {{ snapshot_get_time() }} as dbt_updated_at,\n {{ snapshot_get_time() }} as dbt_valid_to,\n snapshotted_data.dbt_scd_id\n\n from snapshotted_data\n left join deletes_source_data as source_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where source_data.dbt_unique_key is null\n )\n {%- endif %}\n\n select * from insertions\n union all\n select * from updates\n {%- if strategy.invalidate_hard_deletes %}\n union all\n select * from deletes\n {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8588989, "supported_languages": null}, "macro.dbt.build_snapshot_table": {"name": "build_snapshot_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.build_snapshot_table", "macro_sql": "{% macro build_snapshot_table(strategy, sql) -%}\n {{ adapter.dispatch('build_snapshot_table', 'dbt')(strategy, sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__build_snapshot_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.859093, "supported_languages": null}, "macro.dbt.default__build_snapshot_table": {"name": "default__build_snapshot_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__build_snapshot_table", "macro_sql": "{% macro default__build_snapshot_table(strategy, sql) %}\n\n select *,\n {{ strategy.scd_id }} as dbt_scd_id,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.85935, "supported_languages": null}, "macro.dbt.build_snapshot_staging_table": {"name": "build_snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.build_snapshot_staging_table", "macro_sql": "{% macro build_snapshot_staging_table(strategy, sql, target_relation) %}\n {% set temp_relation = make_temp_relation(target_relation) %}\n\n {% set select = snapshot_staging_table(strategy, sql, target_relation) %}\n\n {% call statement('build_snapshot_staging_relation') %}\n {{ create_table_as(True, temp_relation, select) }}\n {% endcall %}\n\n {% do return(temp_relation) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_temp_relation", "macro.dbt.snapshot_staging_table", "macro.dbt.statement", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.859793, "supported_languages": null}, "macro.dbt.materialization_snapshot_default": {"name": "materialization_snapshot_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot.sql", "original_file_path": "macros/materializations/snapshots/snapshot.sql", "unique_id": "macro.dbt.materialization_snapshot_default", "macro_sql": "{% materialization snapshot, default %}\n {%- set config = model['config'] -%}\n\n {%- set target_table = model.get('alias', model.get('name')) -%}\n\n {%- set strategy_name = config.get('strategy') -%}\n {%- set unique_key = config.get('unique_key') %}\n -- grab current tables grants config for comparision later on\n {%- set grant_config = config.get('grants') -%}\n\n {% set target_relation_exists, target_relation = get_or_create_relation(\n database=model.database,\n schema=model.schema,\n identifier=target_table,\n type='table') -%}\n\n {%- if not target_relation.is_table -%}\n {% do exceptions.relation_wrong_type(target_relation, 'table') %}\n {%- endif -%}\n\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set strategy_macro = strategy_dispatch(strategy_name) %}\n {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", config, target_relation_exists) %}\n\n {% if not target_relation_exists %}\n\n {% set build_sql = build_snapshot_table(strategy, model['compiled_code']) %}\n {% set final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {{ adapter.valid_snapshot_target(target_relation) }}\n\n {% set staging_table = build_snapshot_staging_table(strategy, sql, target_relation) %}\n\n -- this may no-op if the database does not require column expansion\n {% do adapter.expand_target_column_types(from_relation=staging_table,\n to_relation=target_relation) %}\n\n {% set missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% do create_columns(target_relation, missing_columns) %}\n\n {% set source_columns = adapter.get_columns_in_relation(staging_table)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% set quoted_source_columns = [] %}\n {% for column in source_columns %}\n {% do quoted_source_columns.append(adapter.quote(column.name)) %}\n {% endfor %}\n\n {% set final_sql = snapshot_merge_sql(\n target = target_relation,\n source = staging_table,\n insert_cols = quoted_source_columns\n )\n %}\n\n {% endif %}\n\n {% call statement('main') %}\n {{ final_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(target_relation_exists, full_refresh_mode=False) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if not target_relation_exists %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {% if staging_table is defined %}\n {% do post_snapshot(staging_table) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.get_or_create_relation", "macro.dbt.run_hooks", "macro.dbt.strategy_dispatch", "macro.dbt.build_snapshot_table", "macro.dbt.create_table_as", "macro.dbt.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes", "macro.dbt.post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.866285, "supported_languages": ["sql"]}, "macro.dbt.materialization_test_default": {"name": "materialization_test_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "unique_id": "macro.dbt.materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\n\n {% if should_store_failures() %}\n\n {% set identifier = model['alias'] %}\n {% set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n {% set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database, type='table') -%} %}\n\n {% if old_relation %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n\n {% call statement(auto_begin=True) %}\n {{ create_table_as(False, target_relation, sql) }}\n {% endcall %}\n\n {% do relations.append(target_relation) %}\n\n {% set main_sql %}\n select *\n from {{ target_relation }}\n {% endset %}\n\n {{ adapter.commit() }}\n\n {% else %}\n\n {% set main_sql = sql %}\n\n {% endif %}\n\n {% set limit = config.get('limit') %}\n {% set fail_calc = config.get('fail_calc') %}\n {% set warn_if = config.get('warn_if') %}\n {% set error_if = config.get('error_if') %}\n\n {% call statement('main', fetch_result=True) -%}\n\n {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit)}}\n\n {%- endcall %}\n\n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.should_store_failures", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.868413, "supported_languages": ["sql"]}, "macro.dbt.get_test_sql": {"name": "get_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.get_test_sql", "macro_sql": "{% macro get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n {{ adapter.dispatch('get_test_sql', 'dbt')(main_sql, fail_calc, warn_if, error_if, limit) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8688772, "supported_languages": null}, "macro.dbt.default__get_test_sql": {"name": "default__get_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.default__get_test_sql", "macro_sql": "{% macro default__get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n select\n {{ fail_calc }} as failures,\n {{ fail_calc }} {{ warn_if }} as should_warn,\n {{ fail_calc }} {{ error_if }} as should_error\n from (\n {{ main_sql }}\n {{ \"limit \" ~ limit if limit != none }}\n ) dbt_internal_test\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.869193, "supported_languages": null}, "macro.dbt.get_where_subquery": {"name": "get_where_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "unique_id": "macro.dbt.get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.869587, "supported_languages": null}, "macro.dbt.default__get_where_subquery": {"name": "default__get_where_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "unique_id": "macro.dbt.default__get_where_subquery", "macro_sql": "{% macro default__get_where_subquery(relation) -%}\n {% set where = config.get('where', '') %}\n {% if where %}\n {%- set filtered -%}\n (select * from {{ relation }} where {{ where }}) dbt_subquery\n {%- endset -%}\n {% do return(filtered) %}\n {%- else -%}\n {% do return(relation) %}\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.869977, "supported_languages": null}, "macro.dbt.get_quoted_csv": {"name": "get_quoted_csv", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.get_quoted_csv", "macro_sql": "{% macro get_quoted_csv(column_names) %}\n\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote(col)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8716319, "supported_languages": null}, "macro.dbt.diff_columns": {"name": "diff_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.diff_columns", "macro_sql": "{% macro diff_columns(source_columns, target_columns) %}\n\n {% set result = [] %}\n {% set source_names = source_columns | map(attribute = 'column') | list %}\n {% set target_names = target_columns | map(attribute = 'column') | list %}\n\n {# --check whether the name attribute exists in the target - this does not perform a data type check #}\n {% for sc in source_columns %}\n {% if sc.name not in target_names %}\n {{ result.append(sc) }}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.872185, "supported_languages": null}, "macro.dbt.diff_column_data_types": {"name": "diff_column_data_types", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.diff_column_data_types", "macro_sql": "{% macro diff_column_data_types(source_columns, target_columns) %}\n\n {% set result = [] %}\n {% for sc in source_columns %}\n {% set tc = target_columns | selectattr(\"name\", \"equalto\", sc.name) | list | first %}\n {% if tc %}\n {% if sc.data_type != tc.data_type and not sc.can_expand_to(other_column=tc) %}\n {{ result.append( { 'column_name': tc.name, 'new_type': sc.data_type } ) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8728662, "supported_languages": null}, "macro.dbt.get_merge_update_columns": {"name": "get_merge_update_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.get_merge_update_columns", "macro_sql": "{% macro get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) %}\n {{ return(adapter.dispatch('get_merge_update_columns', 'dbt')(merge_update_columns, merge_exclude_columns, dest_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_update_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.87311, "supported_languages": null}, "macro.dbt.default__get_merge_update_columns": {"name": "default__get_merge_update_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.default__get_merge_update_columns", "macro_sql": "{% macro default__get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) %}\n {%- set default_cols = dest_columns | map(attribute=\"quoted\") | list -%}\n\n {%- if merge_update_columns and merge_exclude_columns -%}\n {{ exceptions.raise_compiler_error(\n 'Model cannot specify merge_update_columns and merge_exclude_columns. Please update model to use only one config'\n )}}\n {%- elif merge_update_columns -%}\n {%- set update_columns = merge_update_columns -%}\n {%- elif merge_exclude_columns -%}\n {%- set update_columns = [] -%}\n {%- for column in dest_columns -%}\n {% if column.column | lower not in merge_exclude_columns | map(\"lower\") | list %}\n {%- do update_columns.append(column.quoted) -%}\n {% endif %}\n {%- endfor -%}\n {%- else -%}\n {%- set update_columns = default_cols -%}\n {%- endif -%}\n\n {{ return(update_columns) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8738391, "supported_languages": null}, "macro.dbt.get_merge_sql": {"name": "get_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, incremental_predicates=none) -%}\n -- back compat for old kwarg name\n {% set incremental_predicates = kwargs.get('predicates', incremental_predicates) %}\n {{ adapter.dispatch('get_merge_sql', 'dbt')(target, source, unique_key, dest_columns, incremental_predicates) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.880877, "supported_languages": null}, "macro.dbt.default__get_merge_sql": {"name": "default__get_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, incremental_predicates=none) -%}\n {%- set predicates = [] if incremental_predicates is none else [] + incremental_predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set merge_update_columns = config.get('merge_update_columns') -%}\n {%- set merge_exclude_columns = config.get('merge_exclude_columns') -%}\n {%- set update_columns = get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {% if unique_key %}\n {% if unique_key is sequence and unique_key is not mapping and unique_key is not string %}\n {% for key in unique_key %}\n {% set this_key_match %}\n DBT_INTERNAL_SOURCE.{{ key }} = DBT_INTERNAL_DEST.{{ key }}\n {% endset %}\n {% do predicates.append(this_key_match) %}\n {% endfor %}\n {% else %}\n {% set unique_key_match %}\n DBT_INTERNAL_SOURCE.{{ unique_key }} = DBT_INTERNAL_DEST.{{ unique_key }}\n {% endset %}\n {% do predicates.append(unique_key_match) %}\n {% endif %}\n {% else %}\n {% do predicates.append('FALSE') %}\n {% endif %}\n\n {{ sql_header if sql_header is not none }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on {{\"(\" ~ predicates | join(\") and (\") ~ \")\"}}\n\n {% if unique_key %}\n when matched then update set\n {% for column_name in update_columns -%}\n {{ column_name }} = DBT_INTERNAL_SOURCE.{{ column_name }}\n {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n {% endif %}\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv", "macro.dbt.get_merge_update_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.882677, "supported_languages": null}, "macro.dbt.get_delete_insert_merge_sql": {"name": "get_delete_insert_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) -%}\n {{ adapter.dispatch('get_delete_insert_merge_sql', 'dbt')(target, source, unique_key, dest_columns, incremental_predicates) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.882954, "supported_languages": null}, "macro.dbt.default__get_delete_insert_merge_sql": {"name": "default__get_delete_insert_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) -%}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {% if unique_key %}\n {% if unique_key is sequence and unique_key is not string %}\n delete from {{target }}\n using {{ source }}\n where (\n {% for key in unique_key %}\n {{ source }}.{{ key }} = {{ target }}.{{ key }}\n {{ \"and \" if not loop.last}}\n {% endfor %}\n {% if incremental_predicates %}\n {% for predicate in incremental_predicates %}\n and {{ predicate }}\n {% endfor %}\n {% endif %}\n );\n {% else %}\n delete from {{ target }}\n where (\n {{ unique_key }}) in (\n select ({{ unique_key }})\n from {{ source }}\n )\n {%- if incremental_predicates %}\n {% for predicate in incremental_predicates %}\n and {{ predicate }}\n {% endfor %}\n {%- endif -%};\n\n {% endif %}\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.883977, "supported_languages": null}, "macro.dbt.get_insert_overwrite_merge_sql": {"name": "get_insert_overwrite_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "macro_sql": "{% macro get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header=false) -%}\n {{ adapter.dispatch('get_insert_overwrite_merge_sql', 'dbt')(target, source, dest_columns, predicates, include_sql_header) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.884255, "supported_languages": null}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"name": "default__get_insert_overwrite_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "macro_sql": "{% macro default__get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header) -%}\n {#-- The only time include_sql_header is True: --#}\n {#-- BigQuery + insert_overwrite strategy + \"static\" partitions config --#}\n {#-- We should consider including the sql header at the materialization level instead --#}\n\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none and include_sql_header }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on FALSE\n\n when not matched by source\n {% if predicates %} and {{ predicates | join(' and ') }} {% endif %}\n then delete\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.884918, "supported_languages": null}, "macro.dbt.is_incremental": {"name": "is_incremental", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/is_incremental.sql", "original_file_path": "macros/materializations/models/incremental/is_incremental.sql", "unique_id": "macro.dbt.is_incremental", "macro_sql": "{% macro is_incremental() %}\n {#-- do not run introspective queries in parsing #}\n {% if not execute %}\n {{ return(False) }}\n {% else %}\n {% set relation = adapter.get_relation(this.database, this.schema, this.table) %}\n {{ return(relation is not none\n and relation.type == 'table'\n and model.config.materialized == 'incremental'\n and not should_full_refresh()) }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.88558, "supported_languages": null}, "macro.dbt.get_incremental_append_sql": {"name": "get_incremental_append_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_append_sql", "macro_sql": "{% macro get_incremental_append_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_append_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.886498, "supported_languages": null}, "macro.dbt.default__get_incremental_append_sql": {"name": "default__get_incremental_append_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_append_sql", "macro_sql": "{% macro default__get_incremental_append_sql(arg_dict) %}\n\n {% do return(get_insert_into_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"dest_columns\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_insert_into_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.886739, "supported_languages": null}, "macro.dbt.get_incremental_delete_insert_sql": {"name": "get_incremental_delete_insert_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_delete_insert_sql", "macro_sql": "{% macro get_incremental_delete_insert_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_delete_insert_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_delete_insert_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8869288, "supported_languages": null}, "macro.dbt.default__get_incremental_delete_insert_sql": {"name": "default__get_incremental_delete_insert_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_delete_insert_sql", "macro_sql": "{% macro default__get_incremental_delete_insert_sql(arg_dict) %}\n\n {% do return(get_delete_insert_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"unique_key\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8872268, "supported_languages": null}, "macro.dbt.get_incremental_merge_sql": {"name": "get_incremental_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_merge_sql", "macro_sql": "{% macro get_incremental_merge_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_merge_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.887415, "supported_languages": null}, "macro.dbt.default__get_incremental_merge_sql": {"name": "default__get_incremental_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_merge_sql", "macro_sql": "{% macro default__get_incremental_merge_sql(arg_dict) %}\n\n {% do return(get_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"unique_key\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.887716, "supported_languages": null}, "macro.dbt.get_incremental_insert_overwrite_sql": {"name": "get_incremental_insert_overwrite_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_insert_overwrite_sql", "macro_sql": "{% macro get_incremental_insert_overwrite_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_insert_overwrite_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_insert_overwrite_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.887907, "supported_languages": null}, "macro.dbt.default__get_incremental_insert_overwrite_sql": {"name": "default__get_incremental_insert_overwrite_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_insert_overwrite_sql", "macro_sql": "{% macro default__get_incremental_insert_overwrite_sql(arg_dict) %}\n\n {% do return(get_insert_overwrite_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8881762, "supported_languages": null}, "macro.dbt.get_incremental_default_sql": {"name": "get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_default_sql", "macro_sql": "{% macro get_incremental_default_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_default_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_incremental_default_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.8883681, "supported_languages": null}, "macro.dbt.default__get_incremental_default_sql": {"name": "default__get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_default_sql", "macro_sql": "{% macro default__get_incremental_default_sql(arg_dict) %}\n\n {% do return(get_incremental_append_sql(arg_dict)) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.888525, "supported_languages": null}, "macro.dbt.get_insert_into_sql": {"name": "get_insert_into_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_insert_into_sql", "macro_sql": "{% macro get_insert_into_sql(target_relation, temp_relation, dest_columns) %}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n insert into {{ target_relation }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ temp_relation }}\n )\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.88881, "supported_languages": null}, "macro.dbt.materialization_incremental_default": {"name": "materialization_incremental_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/incremental.sql", "original_file_path": "macros/materializations/models/incremental/incremental.sql", "unique_id": "macro.dbt.materialization_incremental_default", "macro_sql": "{% materialization incremental, default -%}\n\n -- relations\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='table') -%}\n {%- set temp_relation = make_temp_relation(target_relation)-%}\n {%- set intermediate_relation = make_intermediate_relation(target_relation)-%}\n {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n\n -- configs\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh() or existing_relation.is_view) -%}\n {%- set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') -%}\n\n -- the temp_ and backup_ relations should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation. This has to happen before\n -- BEGIN, in a separate transaction\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation)-%}\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set to_drop = [] %}\n\n {% if existing_relation is none %}\n {% set build_sql = get_create_table_as_sql(False, target_relation, sql) %}\n {% elif full_refresh_mode %}\n {% set build_sql = get_create_table_as_sql(False, intermediate_relation, sql) %}\n {% set need_swap = true %}\n {% else %}\n {% do run_query(get_create_table_as_sql(True, temp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=temp_relation,\n to_relation=target_relation) %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, temp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n\n {#-- Get the incremental_strategy, the macro to use for the strategy, and build the sql --#}\n {% set incremental_strategy = config.get('incremental_strategy') or 'default' %}\n {% set incremental_predicates = config.get('predicates', none) or config.get('incremental_predicates', none) %}\n {% set strategy_sql_macro_func = adapter.get_incremental_strategy_macro(context, incremental_strategy) %}\n {% set strategy_arg_dict = ({'target_relation': target_relation, 'temp_relation': temp_relation, 'unique_key': unique_key, 'dest_columns': dest_columns, 'incremental_predicates': incremental_predicates }) %}\n {% set build_sql = strategy_sql_macro_func(strategy_arg_dict) %}\n\n {% endif %}\n\n {% call statement(\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% if need_swap %}\n {% do adapter.rename_relation(target_relation, backup_relation) %}\n {% do adapter.rename_relation(intermediate_relation, target_relation) %}\n {% do to_drop.append(backup_relation) %}\n {% endif %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {% do adapter.commit() %}\n\n {% for rel in to_drop %}\n {% do adapter.drop_relation(rel) %}\n {% endfor %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_temp_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.should_full_refresh", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.get_create_table_as_sql", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.894123, "supported_languages": ["sql"]}, "macro.dbt.incremental_validate_on_schema_change": {"name": "incremental_validate_on_schema_change", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.incremental_validate_on_schema_change", "macro_sql": "{% macro incremental_validate_on_schema_change(on_schema_change, default='ignore') %}\n\n {% if on_schema_change not in ['sync_all_columns', 'append_new_columns', 'fail', 'ignore'] %}\n\n {% set log_message = 'Invalid value for on_schema_change (%s) specified. Setting default value of %s.' % (on_schema_change, default) %}\n {% do log(log_message) %}\n\n {{ return(default) }}\n\n {% else %}\n\n {{ return(on_schema_change) }}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.900007, "supported_languages": null}, "macro.dbt.check_for_schema_changes": {"name": "check_for_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.check_for_schema_changes", "macro_sql": "{% macro check_for_schema_changes(source_relation, target_relation) %}\n\n {% set schema_changed = False %}\n\n {%- set source_columns = adapter.get_columns_in_relation(source_relation) -%}\n {%- set target_columns = adapter.get_columns_in_relation(target_relation) -%}\n {%- set source_not_in_target = diff_columns(source_columns, target_columns) -%}\n {%- set target_not_in_source = diff_columns(target_columns, source_columns) -%}\n\n {% set new_target_types = diff_column_data_types(source_columns, target_columns) %}\n\n {% if source_not_in_target != [] %}\n {% set schema_changed = True %}\n {% elif target_not_in_source != [] or new_target_types != [] %}\n {% set schema_changed = True %}\n {% elif new_target_types != [] %}\n {% set schema_changed = True %}\n {% endif %}\n\n {% set changes_dict = {\n 'schema_changed': schema_changed,\n 'source_not_in_target': source_not_in_target,\n 'target_not_in_source': target_not_in_source,\n 'source_columns': source_columns,\n 'target_columns': target_columns,\n 'new_target_types': new_target_types\n } %}\n\n {% set msg %}\n In {{ target_relation }}:\n Schema changed: {{ schema_changed }}\n Source columns not in target: {{ source_not_in_target }}\n Target columns not in source: {{ target_not_in_source }}\n New column types: {{ new_target_types }}\n {% endset %}\n\n {% do log(msg) %}\n\n {{ return(changes_dict) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.diff_columns", "macro.dbt.diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9012601, "supported_languages": null}, "macro.dbt.sync_column_schemas": {"name": "sync_column_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.sync_column_schemas", "macro_sql": "{% macro sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n\n {%- set add_to_target_arr = schema_changes_dict['source_not_in_target'] -%}\n\n {%- if on_schema_change == 'append_new_columns'-%}\n {%- if add_to_target_arr | length > 0 -%}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, none) -%}\n {%- endif -%}\n\n {% elif on_schema_change == 'sync_all_columns' %}\n {%- set remove_from_target_arr = schema_changes_dict['target_not_in_source'] -%}\n {%- set new_target_types = schema_changes_dict['new_target_types'] -%}\n\n {% if add_to_target_arr | length > 0 or remove_from_target_arr | length > 0 %}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, remove_from_target_arr) -%}\n {% endif %}\n\n {% if new_target_types != [] %}\n {% for ntt in new_target_types %}\n {% set column_name = ntt['column_name'] %}\n {% set new_type = ntt['new_type'] %}\n {% do alter_column_type(target_relation, column_name, new_type) %}\n {% endfor %}\n {% endif %}\n\n {% endif %}\n\n {% set schema_change_message %}\n In {{ target_relation }}:\n Schema change approach: {{ on_schema_change }}\n Columns added: {{ add_to_target_arr }}\n Columns removed: {{ remove_from_target_arr }}\n Data types changed: {{ new_target_types }}\n {% endset %}\n\n {% do log(schema_change_message) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.902508, "supported_languages": null}, "macro.dbt.process_schema_changes": {"name": "process_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.process_schema_changes", "macro_sql": "{% macro process_schema_changes(on_schema_change, source_relation, target_relation) %}\n\n {% if on_schema_change == 'ignore' %}\n\n {{ return({}) }}\n\n {% else %}\n\n {% set schema_changes_dict = check_for_schema_changes(source_relation, target_relation) %}\n\n {% if schema_changes_dict['schema_changed'] %}\n\n {% if on_schema_change == 'fail' %}\n\n {% set fail_msg %}\n The source and target schemas on this incremental model are out of sync!\n They can be reconciled in several ways:\n - set the `on_schema_change` config to either append_new_columns or sync_all_columns, depending on your situation.\n - Re-run the incremental model with `full_refresh: True` to update the target schema.\n - update the schema manually and re-run the process.\n\n Additional troubleshooting context:\n Source columns not in target: {{ schema_changes_dict['source_not_in_target'] }}\n Target columns not in source: {{ schema_changes_dict['target_not_in_source'] }}\n New column types: {{ schema_changes_dict['new_target_types'] }}\n {% endset %}\n\n {% do exceptions.raise_compiler_error(fail_msg) %}\n\n {# -- unless we ignore, run the sync operation per the config #}\n {% else %}\n\n {% do sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n\n {% endif %}\n\n {% endif %}\n\n {{ return(schema_changes_dict['source_columns']) }}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.check_for_schema_changes", "macro.dbt.sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.903394, "supported_languages": null}, "macro.dbt.get_table_columns_and_constraints": {"name": "get_table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/columns_spec_ddl.sql", "original_file_path": "macros/materializations/models/table/columns_spec_ddl.sql", "unique_id": "macro.dbt.get_table_columns_and_constraints", "macro_sql": "{%- macro get_table_columns_and_constraints() -%}\n {{ adapter.dispatch('get_table_columns_and_constraints', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_table_columns_and_constraints"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.904447, "supported_languages": null}, "macro.dbt.default__get_table_columns_and_constraints": {"name": "default__get_table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/columns_spec_ddl.sql", "original_file_path": "macros/materializations/models/table/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__get_table_columns_and_constraints", "macro_sql": "{% macro default__get_table_columns_and_constraints() -%}\n {{ return(table_columns_and_constraints()) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.table_columns_and_constraints"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9045708, "supported_languages": null}, "macro.dbt.table_columns_and_constraints": {"name": "table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/columns_spec_ddl.sql", "original_file_path": "macros/materializations/models/table/columns_spec_ddl.sql", "unique_id": "macro.dbt.table_columns_and_constraints", "macro_sql": "{% macro table_columns_and_constraints() %}\n {# loop through user_provided_columns to create DDL with data types and constraints #}\n {%- set raw_column_constraints = adapter.render_raw_columns_constraints(raw_columns=model['columns']) -%}\n {%- set raw_model_constraints = adapter.render_raw_model_constraints(raw_constraints=model['constraints']) -%}\n (\n {% for c in raw_column_constraints -%}\n {{ c }}{{ \",\" if not loop.last or raw_model_constraints }}\n {% endfor %}\n {% for c in raw_model_constraints -%}\n {{ c }}{{ \",\" if not loop.last }}\n {% endfor -%}\n )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9051101, "supported_languages": null}, "macro.dbt.get_assert_columns_equivalent": {"name": "get_assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/columns_spec_ddl.sql", "original_file_path": "macros/materializations/models/table/columns_spec_ddl.sql", "unique_id": "macro.dbt.get_assert_columns_equivalent", "macro_sql": "\n\n{%- macro get_assert_columns_equivalent(sql) -%}\n {{ adapter.dispatch('get_assert_columns_equivalent', 'dbt')(sql) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.905283, "supported_languages": null}, "macro.dbt.default__get_assert_columns_equivalent": {"name": "default__get_assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/columns_spec_ddl.sql", "original_file_path": "macros/materializations/models/table/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__get_assert_columns_equivalent", "macro_sql": "{% macro default__get_assert_columns_equivalent(sql) -%}\n {{ return(assert_columns_equivalent(sql)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9054239, "supported_languages": null}, "macro.dbt.assert_columns_equivalent": {"name": "assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/columns_spec_ddl.sql", "original_file_path": "macros/materializations/models/table/columns_spec_ddl.sql", "unique_id": "macro.dbt.assert_columns_equivalent", "macro_sql": "{% macro assert_columns_equivalent(sql) %}\n\n {#-- First ensure the user has defined 'columns' in yaml specification --#}\n {%- set user_defined_columns = model['columns'] -%}\n {%- if not user_defined_columns -%}\n {{ exceptions.raise_contract_error([], []) }}\n {%- endif -%}\n\n {#-- Obtain the column schema provided by sql file. #}\n {%- set sql_file_provided_columns = get_column_schema_from_query(sql, config.get('sql_header', none)) -%}\n {#--Obtain the column schema provided by the schema file by generating an 'empty schema' query from the model's columns. #}\n {%- set schema_file_provided_columns = get_column_schema_from_query(get_empty_schema_sql(user_defined_columns)) -%}\n\n {#-- create dictionaries with name and formatted data type and strings for exception #}\n {%- set sql_columns = format_columns(sql_file_provided_columns) -%}\n {%- set yaml_columns = format_columns(schema_file_provided_columns) -%}\n\n {%- if sql_columns|length != yaml_columns|length -%}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n\n {%- for sql_col in sql_columns -%}\n {%- set yaml_col = [] -%}\n {%- for this_col in yaml_columns -%}\n {%- if this_col['name'] == sql_col['name'] -%}\n {%- do yaml_col.append(this_col) -%}\n {%- break -%}\n {%- endif -%}\n {%- endfor -%}\n {%- if not yaml_col -%}\n {#-- Column with name not found in yaml #}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n {%- if sql_col['formatted'] != yaml_col[0]['formatted'] -%}\n {#-- Column data types don't match #}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n {%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_column_schema_from_query", "macro.dbt.get_empty_schema_sql", "macro.dbt.format_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9067168, "supported_languages": null}, "macro.dbt.format_columns": {"name": "format_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/columns_spec_ddl.sql", "original_file_path": "macros/materializations/models/table/columns_spec_ddl.sql", "unique_id": "macro.dbt.format_columns", "macro_sql": "{% macro format_columns(columns) %}\n {% set formatted_columns = [] %}\n {% for column in columns %}\n {%- set formatted_column = adapter.dispatch('format_column', 'dbt')(column) -%}\n {%- do formatted_columns.append(formatted_column) -%}\n {% endfor %}\n {{ return(formatted_columns) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__format_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.907103, "supported_languages": null}, "macro.dbt.default__format_column": {"name": "default__format_column", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/columns_spec_ddl.sql", "original_file_path": "macros/materializations/models/table/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__format_column", "macro_sql": "{% macro default__format_column(column) -%}\n {% set data_type = column.dtype %}\n {% set formatted = column.column.lower() ~ \" \" ~ data_type %}\n {{ return({'name': column.name, 'data_type': data_type, 'formatted': formatted}) }}\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.907457, "supported_languages": null}, "macro.dbt.materialization_table_default": {"name": "materialization_table_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/table.sql", "original_file_path": "macros/materializations/models/table/table.sql", "unique_id": "macro.dbt.materialization_table_default", "macro_sql": "{% materialization table, default %}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='table') %}\n {%- set intermediate_relation = make_intermediate_relation(target_relation) -%}\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) -%}\n /*\n See ../view/view.sql for more information about this relation.\n */\n {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_table_as_sql(False, intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n {% if existing_relation is not none %}\n /* Do the equivalent of rename_if_exists */\n {% set existing_relation = load_cached_relation(existing_relation) %}\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% do create_indexes(target_relation) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n -- finally, drop the existing/backup relation after the commit\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.get_create_table_as_sql", "macro.dbt.create_indexes", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.91045, "supported_languages": ["sql"]}, "macro.dbt.get_create_table_as_sql": {"name": "get_create_table_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "unique_id": "macro.dbt.get_create_table_as_sql", "macro_sql": "{% macro get_create_table_as_sql(temporary, relation, sql) -%}\n {{ adapter.dispatch('get_create_table_as_sql', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_create_table_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.911338, "supported_languages": null}, "macro.dbt.default__get_create_table_as_sql": {"name": "default__get_create_table_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "unique_id": "macro.dbt.default__get_create_table_as_sql", "macro_sql": "{% macro default__get_create_table_as_sql(temporary, relation, sql) -%}\n {{ return(create_table_as(temporary, relation, sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.911527, "supported_languages": null}, "macro.dbt.create_table_as": {"name": "create_table_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "unique_id": "macro.dbt.create_table_as", "macro_sql": "{% macro create_table_as(temporary, relation, compiled_code, language='sql') -%}\n {# backward compatibility for create_table_as that does not support language #}\n {% if language == \"sql\" %}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, compiled_code)}}\n {% else %}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, compiled_code, language) }}\n {% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.911969, "supported_languages": null}, "macro.dbt.default__create_table_as": {"name": "default__create_table_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "unique_id": "macro.dbt.default__create_table_as", "macro_sql": "{% macro default__create_table_as(temporary, relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create {% if temporary: -%}temporary{%- endif %} table\n {{ relation.include(database=(not temporary), schema=(not temporary)) }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {{ get_table_columns_and_constraints() }}\n {%- set sql = get_select_subquery(sql) %}\n {% endif %}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.912641, "supported_languages": null}, "macro.dbt.default__get_column_names": {"name": "default__get_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "unique_id": "macro.dbt.default__get_column_names", "macro_sql": "{% macro default__get_column_names() %}\n {#- loop through user_provided_columns to get column names -#}\n {%- set user_provided_columns = model['columns'] -%}\n {%- for i in user_provided_columns %}\n {%- set col = user_provided_columns[i] -%}\n {%- set col_name = adapter.quote(col['name']) if col.get('quote') else col['name'] -%}\n {{ col_name }}{{ \", \" if not loop.last }}\n {%- endfor -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.913113, "supported_languages": null}, "macro.dbt.get_select_subquery": {"name": "get_select_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "unique_id": "macro.dbt.get_select_subquery", "macro_sql": "{% macro get_select_subquery(sql) %}\n {{ return(adapter.dispatch('get_select_subquery', 'dbt')(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.913305, "supported_languages": null}, "macro.dbt.default__get_select_subquery": {"name": "default__get_select_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "unique_id": "macro.dbt.default__get_select_subquery", "macro_sql": "{% macro default__get_select_subquery(sql) %}\n select {{ adapter.dispatch('get_column_names', 'dbt')() }}\n from (\n {{ sql }}\n ) as model_subq\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_column_names"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9134872, "supported_languages": null}, "macro.dbt.materialization_view_default": {"name": "materialization_view_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view/view.sql", "original_file_path": "macros/materializations/models/view/view.sql", "unique_id": "macro.dbt.materialization_view_default", "macro_sql": "{%- materialization view, default -%}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='view') -%}\n {%- set intermediate_relation = make_intermediate_relation(target_relation) -%}\n\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) -%}\n /*\n This relation (probably) doesn't exist yet. If it does exist, it's a leftover from\n a previous run, and we're going to try to drop it immediately. At the end of this\n materialization, we're going to rename the \"existing_relation\" to this identifier,\n and then we're going to drop it. In order to make sure we run the correct one of:\n - drop view ...\n - drop table ...\n\n We need to set the type of this relation to be the type of the existing_relation, if it exists,\n or else \"view\" as a sane default if it does not. Note that if the existing_relation does not\n exist, then there is nothing to move out of the way and subsequentally drop. In that case,\n this relation will be effectively unused.\n */\n {%- set backup_relation_type = 'view' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n -- move the existing view out of the way\n {% if existing_relation is not none %}\n /* Do the equivalent of rename_if_exists */\n {% set existing_relation = load_cached_relation(existing_relation) %}\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n {% endif %}\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.916554, "supported_languages": ["sql"]}, "macro.dbt.handle_existing_table": {"name": "handle_existing_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "unique_id": "macro.dbt.handle_existing_table", "macro_sql": "{% macro handle_existing_table(full_refresh, old_relation) %}\n {{ adapter.dispatch('handle_existing_table', 'dbt')(full_refresh, old_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.916893, "supported_languages": null}, "macro.dbt.default__handle_existing_table": {"name": "default__handle_existing_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "unique_id": "macro.dbt.default__handle_existing_table", "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n {{ log(\"Dropping relation \" ~ old_relation ~ \" because it is of type \" ~ old_relation.type) }}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.917129, "supported_languages": null}, "macro.dbt.create_or_replace_view": {"name": "create_or_replace_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view/create_or_replace_view.sql", "original_file_path": "macros/materializations/models/view/create_or_replace_view.sql", "unique_id": "macro.dbt.create_or_replace_view", "macro_sql": "{% macro create_or_replace_view() %}\n {%- set identifier = model['alias'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database,\n type='view') -%}\n {% set grant_config = config.get('grants') %}\n\n {{ run_hooks(pre_hooks) }}\n\n -- If there's a table with the same name and we weren't told to full refresh,\n -- that's an error. If we were told to full refresh, drop it. This behavior differs\n -- for Snowflake and BigQuery, so multiple dispatch is used.\n {%- if old_relation is not none and old_relation.is_table -%}\n {{ handle_existing_table(should_full_refresh(), old_relation) }}\n {%- endif -%}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(target_relation, sql) }}\n {%- endcall %}\n\n {% set should_revoke = should_revoke(exists_as_view, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.handle_existing_table", "macro.dbt.should_full_refresh", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.918707, "supported_languages": null}, "macro.dbt.get_create_view_as_sql": {"name": "get_create_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "unique_id": "macro.dbt.get_create_view_as_sql", "macro_sql": "{% macro get_create_view_as_sql(relation, sql) -%}\n {{ adapter.dispatch('get_create_view_as_sql', 'dbt')(relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.919144, "supported_languages": null}, "macro.dbt.default__get_create_view_as_sql": {"name": "default__get_create_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "unique_id": "macro.dbt.default__get_create_view_as_sql", "macro_sql": "{% macro default__get_create_view_as_sql(relation, sql) -%}\n {{ return(create_view_as(relation, sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.919311, "supported_languages": null}, "macro.dbt.create_view_as": {"name": "create_view_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "unique_id": "macro.dbt.create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n {{ adapter.dispatch('create_view_as', 'dbt')(relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.919492, "supported_languages": null}, "macro.dbt.default__create_view_as": {"name": "default__create_view_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "unique_id": "macro.dbt.default__create_view_as", "macro_sql": "{% macro default__create_view_as(relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n create view {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {%- endif %}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.91994, "supported_languages": null}, "macro.dbt.materialization_seed_default": {"name": "materialization_seed_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "unique_id": "macro.dbt.materialization_seed_default", "macro_sql": "{% materialization seed, default %}\n\n {%- set identifier = model['alias'] -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set grant_config = config.get('grants') -%}\n {%- set agate_table = load_agate_table() -%}\n -- grab current tables grants config for comparision later on\n\n {%- do store_result('agate_table', response='OK', agate_table=agate_table) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% set create_table_sql = \"\" %}\n {% if exists_as_view %}\n {{ exceptions.raise_compiler_error(\"Cannot seed to '{}', it is a view\".format(old_relation)) }}\n {% elif exists_as_table %}\n {% set create_table_sql = reset_csv_table(model, full_refresh_mode, old_relation, agate_table) %}\n {% else %}\n {% set create_table_sql = create_csv_table(model, agate_table) %}\n {% endif %}\n\n {% set code = 'CREATE' if full_refresh_mode else 'INSERT' %}\n {% set rows_affected = (agate_table.rows | length) %}\n {% set sql = load_csv_rows(model, agate_table) %}\n\n {% call noop_statement('main', code ~ ' ' ~ rows_affected, code, rows_affected) %}\n {{ get_csv_sql(create_table_sql, sql) }};\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\n\n {% set should_revoke = should_revoke(old_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if full_refresh_mode or not exists_as_table %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.run_hooks", "macro.dbt.reset_csv_table", "macro.dbt.create_csv_table", "macro.dbt.load_csv_rows", "macro.dbt.noop_statement", "macro.dbt.get_csv_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.923336, "supported_languages": ["sql"]}, "macro.dbt.create_csv_table": {"name": "create_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n {{ adapter.dispatch('create_csv_table', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9287739, "supported_languages": null}, "macro.dbt.default__create_csv_table": {"name": "default__create_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__create_csv_table", "macro_sql": "{% macro default__create_csv_table(model, agate_table) %}\n {%- set column_override = model['config'].get('column_types', {}) -%}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n\n {% set sql %}\n create table {{ this.render() }} (\n {%- for col_name in agate_table.column_names -%}\n {%- set inferred_type = adapter.convert_type(agate_table, loop.index0) -%}\n {%- set type = column_override.get(col_name, inferred_type) -%}\n {%- set column_name = (col_name | string) -%}\n {{ adapter.quote_seed_column(column_name, quote_seed_column) }} {{ type }} {%- if not loop.last -%}, {%- endif -%}\n {%- endfor -%}\n )\n {% endset %}\n\n {% call statement('_') -%}\n {{ sql }}\n {%- endcall %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.929701, "supported_languages": null}, "macro.dbt.reset_csv_table": {"name": "reset_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.reset_csv_table", "macro_sql": "{% macro reset_csv_table(model, full_refresh, old_relation, agate_table) -%}\n {{ adapter.dispatch('reset_csv_table', 'dbt')(model, full_refresh, old_relation, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9299421, "supported_languages": null}, "macro.dbt.default__reset_csv_table": {"name": "default__reset_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__reset_csv_table", "macro_sql": "{% macro default__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {% set sql = \"\" %}\n {% if full_refresh %}\n {{ adapter.drop_relation(old_relation) }}\n {% set sql = create_csv_table(model, agate_table) %}\n {% else %}\n {{ adapter.truncate_relation(old_relation) }}\n {% set sql = \"truncate table \" ~ old_relation %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.930434, "supported_languages": null}, "macro.dbt.get_csv_sql": {"name": "get_csv_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_csv_sql", "macro_sql": "{% macro get_csv_sql(create_or_truncate_sql, insert_sql) %}\n {{ adapter.dispatch('get_csv_sql', 'dbt')(create_or_truncate_sql, insert_sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_csv_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.930631, "supported_languages": null}, "macro.dbt.default__get_csv_sql": {"name": "default__get_csv_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_csv_sql", "macro_sql": "{% macro default__get_csv_sql(create_or_truncate_sql, insert_sql) %}\n {{ create_or_truncate_sql }};\n -- dbt seed --\n {{ insert_sql }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9307652, "supported_languages": null}, "macro.dbt.get_binding_char": {"name": "get_binding_char", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_binding_char", "macro_sql": "{% macro get_binding_char() -%}\n {{ adapter.dispatch('get_binding_char', 'dbt')() }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9309099, "supported_languages": null}, "macro.dbt.default__get_binding_char": {"name": "default__get_binding_char", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_binding_char", "macro_sql": "{% macro default__get_binding_char() %}\n {{ return('%s') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.931028, "supported_languages": null}, "macro.dbt.get_batch_size": {"name": "get_batch_size", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_batch_size", "macro_sql": "{% macro get_batch_size() -%}\n {{ return(adapter.dispatch('get_batch_size', 'dbt')()) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.931191, "supported_languages": null}, "macro.dbt.default__get_batch_size": {"name": "default__get_batch_size", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_batch_size", "macro_sql": "{% macro default__get_batch_size() %}\n {{ return(10000) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9313102, "supported_languages": null}, "macro.dbt.get_seed_column_quoted_csv": {"name": "get_seed_column_quoted_csv", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_seed_column_quoted_csv", "macro_sql": "{% macro get_seed_column_quoted_csv(model, column_names) %}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote_seed_column(col, quote_seed_column)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.931797, "supported_languages": null}, "macro.dbt.load_csv_rows": {"name": "load_csv_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n {{ adapter.dispatch('load_csv_rows', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.931984, "supported_languages": null}, "macro.dbt.default__load_csv_rows": {"name": "default__load_csv_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__load_csv_rows", "macro_sql": "{% macro default__load_csv_rows(model, agate_table) %}\n\n {% set batch_size = get_batch_size() %}\n\n {% set cols_sql = get_seed_column_quoted_csv(model, agate_table.column_names) %}\n {% set bindings = [] %}\n\n {% set statements = [] %}\n\n {% for chunk in agate_table.rows | batch(batch_size) %}\n {% set bindings = [] %}\n\n {% for row in chunk %}\n {% do bindings.extend(row) %}\n {% endfor %}\n\n {% set sql %}\n insert into {{ this.render() }} ({{ cols_sql }}) values\n {% for row in chunk -%}\n ({%- for column in agate_table.column_names -%}\n {{ get_binding_char() }}\n {%- if not loop.last%},{%- endif %}\n {%- endfor -%})\n {%- if not loop.last%},{%- endif %}\n {%- endfor %}\n {% endset %}\n\n {% do adapter.add_query(sql, bindings=bindings, abridge_sql_log=True) %}\n\n {% if loop.index0 == 0 %}\n {% do statements.append(sql) %}\n {% endif %}\n {% endfor %}\n\n {# Return SQL so we can render it out into the compiled files #}\n {{ return(statements[0]) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_batch_size", "macro.dbt.get_seed_column_quoted_csv", "macro.dbt.get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.933284, "supported_languages": null}, "macro.dbt.generate_alias_name": {"name": "generate_alias_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "unique_id": "macro.dbt.generate_alias_name", "macro_sql": "{% macro generate_alias_name(custom_alias_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_alias_name', 'dbt')(custom_alias_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_alias_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9337249, "supported_languages": null}, "macro.dbt.default__generate_alias_name": {"name": "default__generate_alias_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "unique_id": "macro.dbt.default__generate_alias_name", "macro_sql": "{% macro default__generate_alias_name(custom_alias_name=none, node=none) -%}\n\n {%- if custom_alias_name -%}\n\n {{ custom_alias_name | trim }}\n\n {%- elif node.version -%}\n\n {{ return(node.name ~ \"_v\" ~ (node.version | replace(\".\", \"_\"))) }}\n\n {%- else -%}\n\n {{ node.name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9341178, "supported_languages": null}, "macro.dbt.generate_schema_name": {"name": "generate_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.generate_schema_name", "macro_sql": "{% macro generate_schema_name(custom_schema_name=none, node=none) -%}\n {{ return(adapter.dispatch('generate_schema_name', 'dbt')(custom_schema_name, node)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9346519, "supported_languages": null}, "macro.dbt.default__generate_schema_name": {"name": "default__generate_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.default__generate_schema_name", "macro_sql": "{% macro default__generate_schema_name(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if custom_schema_name is none -%}\n\n {{ default_schema }}\n\n {%- else -%}\n\n {{ default_schema }}_{{ custom_schema_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.934916, "supported_languages": null}, "macro.dbt.generate_schema_name_for_env": {"name": "generate_schema_name_for_env", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.generate_schema_name_for_env", "macro_sql": "{% macro generate_schema_name_for_env(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if target.name == 'prod' and custom_schema_name is not none -%}\n\n {{ custom_schema_name | trim }}\n\n {%- else -%}\n\n {{ default_schema }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9352078, "supported_languages": null}, "macro.dbt.generate_database_name": {"name": "generate_database_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "unique_id": "macro.dbt.generate_database_name", "macro_sql": "{% macro generate_database_name(custom_database_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_database_name', 'dbt')(custom_database_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.935616, "supported_languages": null}, "macro.dbt.default__generate_database_name": {"name": "default__generate_database_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "unique_id": "macro.dbt.default__generate_database_name", "macro_sql": "{% macro default__generate_database_name(custom_database_name=none, node=none) -%}\n {%- set default_database = target.database -%}\n {%- if custom_database_name is none -%}\n\n {{ default_database }}\n\n {%- else -%}\n\n {{ custom_database_name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.935874, "supported_languages": null}, "macro.dbt.default__test_relationships": {"name": "default__test_relationships", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/relationships.sql", "original_file_path": "macros/generic_test_sql/relationships.sql", "unique_id": "macro.dbt.default__test_relationships", "macro_sql": "{% macro default__test_relationships(model, column_name, to, field) %}\n\nwith child as (\n select {{ column_name }} as from_field\n from {{ model }}\n where {{ column_name }} is not null\n),\n\nparent as (\n select {{ field }} as to_field\n from {{ to }}\n)\n\nselect\n from_field\n\nfrom child\nleft join parent\n on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.936233, "supported_languages": null}, "macro.dbt.default__test_not_null": {"name": "default__test_not_null", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/not_null.sql", "original_file_path": "macros/generic_test_sql/not_null.sql", "unique_id": "macro.dbt.default__test_not_null", "macro_sql": "{% macro default__test_not_null(model, column_name) %}\n\n{% set column_list = '*' if should_store_failures() else column_name %}\n\nselect {{ column_list }}\nfrom {{ model }}\nwhere {{ column_name }} is null\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.936537, "supported_languages": null}, "macro.dbt.default__test_unique": {"name": "default__test_unique", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/unique.sql", "original_file_path": "macros/generic_test_sql/unique.sql", "unique_id": "macro.dbt.default__test_unique", "macro_sql": "{% macro default__test_unique(model, column_name) %}\n\nselect\n {{ column_name }} as unique_field,\n count(*) as n_records\n\nfrom {{ model }}\nwhere {{ column_name }} is not null\ngroup by {{ column_name }}\nhaving count(*) > 1\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9367812, "supported_languages": null}, "macro.dbt.default__test_accepted_values": {"name": "default__test_accepted_values", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/accepted_values.sql", "original_file_path": "macros/generic_test_sql/accepted_values.sql", "unique_id": "macro.dbt.default__test_accepted_values", "macro_sql": "{% macro default__test_accepted_values(model, column_name, values, quote=True) %}\n\nwith all_values as (\n\n select\n {{ column_name }} as value_field,\n count(*) as n_records\n\n from {{ model }}\n group by {{ column_name }}\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n)\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.937361, "supported_languages": null}, "macro.dbt.statement": {"name": "statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.statement", "macro_sql": "\n{%- macro statement(name=None, fetch_result=False, auto_begin=True, language='sql') -%}\n {%- if execute: -%}\n {%- set compiled_code = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime {} for node \"{}\"'.format(language, model['unique_id'])) }}\n {{ write(compiled_code) }}\n {%- endif -%}\n {%- if language == 'sql'-%}\n {%- set res, table = adapter.execute(compiled_code, auto_begin=auto_begin, fetch=fetch_result) -%}\n {%- elif language == 'python' -%}\n {%- set res = submit_python_job(model, compiled_code) -%}\n {#-- TODO: What should table be for python models? --#}\n {%- set table = None -%}\n {%- else -%}\n {% do exceptions.raise_compiler_error(\"statement macro didn't get supported language\") %}\n {%- endif -%}\n\n {%- if name is not none -%}\n {{ store_result(name, response=res, agate_table=table) }}\n {%- endif -%}\n\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.938868, "supported_languages": null}, "macro.dbt.noop_statement": {"name": "noop_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.noop_statement", "macro_sql": "{% macro noop_statement(name=None, message=None, code=None, rows_affected=None, res=None) -%}\n {%- set sql = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime SQL for node \"{}\"'.format(model['unique_id'])) }}\n {{ write(sql) }}\n {%- endif -%}\n\n {%- if name is not none -%}\n {{ store_raw_result(name, message=message, code=code, rows_affected=rows_affected, agate_table=res) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9395142, "supported_languages": null}, "macro.dbt.run_query": {"name": "run_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.run_query", "macro_sql": "{% macro run_query(sql) %}\n {% call statement(\"run_query_statement\", fetch_result=true, auto_begin=false) %}\n {{ sql }}\n {% endcall %}\n\n {% do return(load_result(\"run_query_statement\").table) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.939811, "supported_languages": null}, "macro.dbt.convert_datetime": {"name": "convert_datetime", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.convert_datetime", "macro_sql": "{% macro convert_datetime(date_str, date_fmt) %}\n\n {% set error_msg -%}\n The provided partition date '{{ date_str }}' does not match the expected format '{{ date_fmt }}'\n {%- endset %}\n\n {% set res = try_or_compiler_error(error_msg, modules.datetime.datetime.strptime, date_str.strip(), date_fmt) %}\n {{ return(res) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.941744, "supported_languages": null}, "macro.dbt.dates_in_range": {"name": "dates_in_range", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.dates_in_range", "macro_sql": "{% macro dates_in_range(start_date_str, end_date_str=none, in_fmt=\"%Y%m%d\", out_fmt=\"%Y%m%d\") %}\n {% set end_date_str = start_date_str if end_date_str is none else end_date_str %}\n\n {% set start_date = convert_datetime(start_date_str, in_fmt) %}\n {% set end_date = convert_datetime(end_date_str, in_fmt) %}\n\n {% set day_count = (end_date - start_date).days %}\n {% if day_count < 0 %}\n {% set msg -%}\n Partiton start date is after the end date ({{ start_date }}, {{ end_date }})\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg, model) }}\n {% endif %}\n\n {% set date_list = [] %}\n {% for i in range(0, day_count + 1) %}\n {% set the_date = (modules.datetime.timedelta(days=i) + start_date) %}\n {% if not out_fmt %}\n {% set _ = date_list.append(the_date) %}\n {% else %}\n {% set _ = date_list.append(the_date.strftime(out_fmt)) %}\n {% endif %}\n {% endfor %}\n\n {{ return(date_list) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.942956, "supported_languages": null}, "macro.dbt.partition_range": {"name": "partition_range", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.partition_range", "macro_sql": "{% macro partition_range(raw_partition_date, date_fmt='%Y%m%d') %}\n {% set partition_range = (raw_partition_date | string).split(\",\") %}\n\n {% if (partition_range | length) == 1 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = none %}\n {% elif (partition_range | length) == 2 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = partition_range[1] %}\n {% else %}\n {{ exceptions.raise_compiler_error(\"Invalid partition time. Expected format: {Start Date}[,{End Date}]. Got: \" ~ raw_partition_date) }}\n {% endif %}\n\n {{ return(dates_in_range(start_date, end_date, in_fmt=date_fmt)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dates_in_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.943721, "supported_languages": null}, "macro.dbt.py_current_timestring": {"name": "py_current_timestring", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.py_current_timestring", "macro_sql": "{% macro py_current_timestring() %}\n {% set dt = modules.datetime.datetime.now() %}\n {% do return(dt.strftime(\"%Y%m%d%H%M%S%f\")) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.94396, "supported_languages": null}, "macro.dbt.except": {"name": "except", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "unique_id": "macro.dbt.except", "macro_sql": "{% macro except() %}\n {{ return(adapter.dispatch('except', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.944194, "supported_languages": null}, "macro.dbt.default__except": {"name": "default__except", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "unique_id": "macro.dbt.default__except", "macro_sql": "{% macro default__except() %}\n\n except\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.944274, "supported_languages": null}, "macro.dbt.replace": {"name": "replace", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "unique_id": "macro.dbt.replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n {{ return(adapter.dispatch('replace', 'dbt') (field, old_chars, new_chars)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.944606, "supported_languages": null}, "macro.dbt.default__replace": {"name": "default__replace", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "unique_id": "macro.dbt.default__replace", "macro_sql": "{% macro default__replace(field, old_chars, new_chars) %}\n\n replace(\n {{ field }},\n {{ old_chars }},\n {{ new_chars }}\n )\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.944769, "supported_languages": null}, "macro.dbt.concat": {"name": "concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "unique_id": "macro.dbt.concat", "macro_sql": "{% macro concat(fields) -%}\n {{ return(adapter.dispatch('concat', 'dbt')(fields)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9450161, "supported_languages": null}, "macro.dbt.default__concat": {"name": "default__concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "unique_id": "macro.dbt.default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n {{ fields|join(' || ') }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.945139, "supported_languages": null}, "macro.dbt.length": {"name": "length", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "unique_id": "macro.dbt.length", "macro_sql": "{% macro length(expression) -%}\n {{ return(adapter.dispatch('length', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__length"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.945396, "supported_languages": null}, "macro.dbt.default__length": {"name": "default__length", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "unique_id": "macro.dbt.default__length", "macro_sql": "{% macro default__length(expression) %}\n\n length(\n {{ expression }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.945502, "supported_languages": null}, "macro.dbt.dateadd": {"name": "dateadd", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt.dateadd", "macro_sql": "{% macro dateadd(datepart, interval, from_date_or_timestamp) %}\n {{ return(adapter.dispatch('dateadd', 'dbt')(datepart, interval, from_date_or_timestamp)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.945845, "supported_languages": null}, "macro.dbt.default__dateadd": {"name": "default__dateadd", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt.default__dateadd", "macro_sql": "{% macro default__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_date_or_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.946016, "supported_languages": null}, "macro.dbt.intersect": {"name": "intersect", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "unique_id": "macro.dbt.intersect", "macro_sql": "{% macro intersect() %}\n {{ return(adapter.dispatch('intersect', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__intersect"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.946244, "supported_languages": null}, "macro.dbt.default__intersect": {"name": "default__intersect", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "unique_id": "macro.dbt.default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n intersect\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.946327, "supported_languages": null}, "macro.dbt.escape_single_quotes": {"name": "escape_single_quotes", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "unique_id": "macro.dbt.escape_single_quotes", "macro_sql": "{% macro escape_single_quotes(expression) %}\n {{ return(adapter.dispatch('escape_single_quotes', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.94659, "supported_languages": null}, "macro.dbt.default__escape_single_quotes": {"name": "default__escape_single_quotes", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "unique_id": "macro.dbt.default__escape_single_quotes", "macro_sql": "{% macro default__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\",\"''\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.946731, "supported_languages": null}, "macro.dbt.right": {"name": "right", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "unique_id": "macro.dbt.right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n {{ return(adapter.dispatch('right', 'dbt') (string_text, length_expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__right"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9470248, "supported_languages": null}, "macro.dbt.default__right": {"name": "default__right", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "unique_id": "macro.dbt.default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n right(\n {{ string_text }},\n {{ length_expression }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.947225, "supported_languages": null}, "macro.dbt.listagg": {"name": "listagg", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt.listagg", "macro_sql": "{% macro listagg(measure, delimiter_text=\"','\", order_by_clause=none, limit_num=none) -%}\n {{ return(adapter.dispatch('listagg', 'dbt') (measure, delimiter_text, order_by_clause, limit_num)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__listagg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9478772, "supported_languages": null}, "macro.dbt.default__listagg": {"name": "default__listagg", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt.default__listagg", "macro_sql": "{% macro default__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n array_to_string(\n array_slice(\n array_agg(\n {{ measure }}\n ){% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n ,0\n ,{{ limit_num }}\n ),\n {{ delimiter_text }}\n )\n {%- else %}\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9482932, "supported_languages": null}, "macro.dbt.datediff": {"name": "datediff", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt.datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n {{ return(adapter.dispatch('datediff', 'dbt')(first_date, second_date, datepart)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.948637, "supported_languages": null}, "macro.dbt.default__datediff": {"name": "default__datediff", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt.default__datediff", "macro_sql": "{% macro default__datediff(first_date, second_date, datepart) -%}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.948801, "supported_languages": null}, "macro.dbt.safe_cast": {"name": "safe_cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "unique_id": "macro.dbt.safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n {{ return(adapter.dispatch('safe_cast', 'dbt') (field, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.949088, "supported_languages": null}, "macro.dbt.default__safe_cast": {"name": "default__safe_cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "unique_id": "macro.dbt.default__safe_cast", "macro_sql": "{% macro default__safe_cast(field, type) %}\n {# most databases don't support this function yet\n so we just need to use cast #}\n cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.949229, "supported_languages": null}, "macro.dbt.hash": {"name": "hash", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "unique_id": "macro.dbt.hash", "macro_sql": "{% macro hash(field) -%}\n {{ return(adapter.dispatch('hash', 'dbt') (field)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.949486, "supported_languages": null}, "macro.dbt.default__hash": {"name": "default__hash", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "unique_id": "macro.dbt.default__hash", "macro_sql": "{% macro default__hash(field) -%}\n md5(cast({{ field }} as {{ api.Column.translate_type('string') }}))\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9496472, "supported_languages": null}, "macro.dbt.cast_bool_to_text": {"name": "cast_bool_to_text", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "unique_id": "macro.dbt.cast_bool_to_text", "macro_sql": "{% macro cast_bool_to_text(field) %}\n {{ adapter.dispatch('cast_bool_to_text', 'dbt') (field) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9498932, "supported_languages": null}, "macro.dbt.default__cast_bool_to_text": {"name": "default__cast_bool_to_text", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "unique_id": "macro.dbt.default__cast_bool_to_text", "macro_sql": "{% macro default__cast_bool_to_text(field) %}\n cast({{ field }} as {{ api.Column.translate_type('string') }})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.950051, "supported_languages": null}, "macro.dbt.any_value": {"name": "any_value", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt.any_value", "macro_sql": "{% macro any_value(expression) -%}\n {{ return(adapter.dispatch('any_value', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__any_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9503, "supported_languages": null}, "macro.dbt.default__any_value": {"name": "default__any_value", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt.default__any_value", "macro_sql": "{% macro default__any_value(expression) -%}\n\n any_value({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9504042, "supported_languages": null}, "macro.dbt.position": {"name": "position", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "unique_id": "macro.dbt.position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n {{ return(adapter.dispatch('position', 'dbt') (substring_text, string_text)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__position"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9506948, "supported_languages": null}, "macro.dbt.default__position": {"name": "default__position", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "unique_id": "macro.dbt.default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n position(\n {{ substring_text }} in {{ string_text }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9508321, "supported_languages": null}, "macro.dbt.string_literal": {"name": "string_literal", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "unique_id": "macro.dbt.string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n {{ return(adapter.dispatch('string_literal', 'dbt') (value)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.951075, "supported_languages": null}, "macro.dbt.default__string_literal": {"name": "default__string_literal", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "unique_id": "macro.dbt.default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n '{{ value }}'\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.951179, "supported_languages": null}, "macro.dbt.type_string": {"name": "type_string", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n {{ return(adapter.dispatch('type_string', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.952113, "supported_languages": null}, "macro.dbt.default__type_string": {"name": "default__type_string", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_string", "macro_sql": "{% macro default__type_string() %}\n {{ return(api.Column.translate_type(\"string\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.952273, "supported_languages": null}, "macro.dbt.type_timestamp": {"name": "type_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.952498, "supported_languages": null}, "macro.dbt.default__type_timestamp": {"name": "default__type_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n {{ return(api.Column.translate_type(\"timestamp\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9526541, "supported_languages": null}, "macro.dbt.type_float": {"name": "type_float", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n {{ return(adapter.dispatch('type_float', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.952821, "supported_languages": null}, "macro.dbt.default__type_float": {"name": "default__type_float", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_float", "macro_sql": "{% macro default__type_float() %}\n {{ return(api.Column.translate_type(\"float\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.952978, "supported_languages": null}, "macro.dbt.type_numeric": {"name": "type_numeric", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n {{ return(adapter.dispatch('type_numeric', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.953142, "supported_languages": null}, "macro.dbt.default__type_numeric": {"name": "default__type_numeric", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n {{ return(api.Column.numeric_type(\"numeric\", 28, 6)) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.95332, "supported_languages": null}, "macro.dbt.type_bigint": {"name": "type_bigint", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n {{ return(adapter.dispatch('type_bigint', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.953485, "supported_languages": null}, "macro.dbt.default__type_bigint": {"name": "default__type_bigint", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n {{ return(api.Column.translate_type(\"bigint\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9536378, "supported_languages": null}, "macro.dbt.type_int": {"name": "type_int", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n {{ return(adapter.dispatch('type_int', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.953799, "supported_languages": null}, "macro.dbt.default__type_int": {"name": "default__type_int", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_int", "macro_sql": "{%- macro default__type_int() -%}\n {{ return(api.Column.translate_type(\"integer\")) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.953949, "supported_languages": null}, "macro.dbt.type_boolean": {"name": "type_boolean", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_boolean", "macro_sql": "\n\n{%- macro type_boolean() -%}\n {{ return(adapter.dispatch('type_boolean', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9541152, "supported_languages": null}, "macro.dbt.default__type_boolean": {"name": "default__type_boolean", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_boolean", "macro_sql": "{%- macro default__type_boolean() -%}\n {{ return(api.Column.translate_type(\"boolean\")) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.954263, "supported_languages": null}, "macro.dbt.array_concat": {"name": "array_concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "unique_id": "macro.dbt.array_concat", "macro_sql": "{% macro array_concat(array_1, array_2) -%}\n {{ return(adapter.dispatch('array_concat', 'dbt')(array_1, array_2)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__array_concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.954547, "supported_languages": null}, "macro.dbt.default__array_concat": {"name": "default__array_concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "unique_id": "macro.dbt.default__array_concat", "macro_sql": "{% macro default__array_concat(array_1, array_2) -%}\n array_cat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9546812, "supported_languages": null}, "macro.dbt.bool_or": {"name": "bool_or", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "unique_id": "macro.dbt.bool_or", "macro_sql": "{% macro bool_or(expression) -%}\n {{ return(adapter.dispatch('bool_or', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9549298, "supported_languages": null}, "macro.dbt.default__bool_or": {"name": "default__bool_or", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "unique_id": "macro.dbt.default__bool_or", "macro_sql": "{% macro default__bool_or(expression) -%}\n\n bool_or({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.955034, "supported_languages": null}, "macro.dbt.last_day": {"name": "last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n {{ return(adapter.dispatch('last_day', 'dbt') (date, datepart)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.95538, "supported_languages": null}, "macro.dbt.default_last_day": {"name": "default_last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.default_last_day", "macro_sql": "\n\n{%- macro default_last_day(date, datepart) -%}\n cast(\n {{dbt.dateadd('day', '-1',\n dbt.dateadd(datepart, '1', dbt.date_trunc(datepart, date))\n )}}\n as date)\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9556532, "supported_languages": null}, "macro.dbt.default__last_day": {"name": "default__last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n {{dbt.default_last_day(date, datepart)}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9558039, "supported_languages": null}, "macro.dbt.split_part": {"name": "split_part", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt.split_part", "macro_sql": "{% macro split_part(string_text, delimiter_text, part_number) %}\n {{ return(adapter.dispatch('split_part', 'dbt') (string_text, delimiter_text, part_number)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.956345, "supported_languages": null}, "macro.dbt.default__split_part": {"name": "default__split_part", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt.default__split_part", "macro_sql": "{% macro default__split_part(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n {{ part_number }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.956515, "supported_languages": null}, "macro.dbt._split_part_negative": {"name": "_split_part_negative", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt._split_part_negative", "macro_sql": "{% macro _split_part_negative(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n length({{ string_text }})\n - length(\n replace({{ string_text }}, {{ delimiter_text }}, '')\n ) + 2 {{ part_number }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.956807, "supported_languages": null}, "macro.dbt.date_trunc": {"name": "date_trunc", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "unique_id": "macro.dbt.date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n {{ return(adapter.dispatch('date_trunc', 'dbt') (datepart, date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.957089, "supported_languages": null}, "macro.dbt.default__date_trunc": {"name": "default__date_trunc", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "unique_id": "macro.dbt.default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) -%}\n date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.957221, "supported_languages": null}, "macro.dbt.array_construct": {"name": "array_construct", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "unique_id": "macro.dbt.array_construct", "macro_sql": "{% macro array_construct(inputs=[], data_type=api.Column.translate_type('integer')) -%}\n {{ return(adapter.dispatch('array_construct', 'dbt')(inputs, data_type)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__array_construct"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9575958, "supported_languages": null}, "macro.dbt.default__array_construct": {"name": "default__array_construct", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "unique_id": "macro.dbt.default__array_construct", "macro_sql": "{% macro default__array_construct(inputs, data_type) -%}\n {% if inputs|length > 0 %}\n array[ {{ inputs|join(' , ') }} ]\n {% else %}\n array[]::{{data_type}}[]\n {% endif %}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9578419, "supported_languages": null}, "macro.dbt.array_append": {"name": "array_append", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "unique_id": "macro.dbt.array_append", "macro_sql": "{% macro array_append(array, new_element) -%}\n {{ return(adapter.dispatch('array_append', 'dbt')(array, new_element)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__array_append"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.958126, "supported_languages": null}, "macro.dbt.default__array_append": {"name": "default__array_append", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "unique_id": "macro.dbt.default__array_append", "macro_sql": "{% macro default__array_append(array, new_element) -%}\n array_append({{ array }}, {{ new_element }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.958265, "supported_languages": null}, "macro.dbt.create_schema": {"name": "create_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n {{ adapter.dispatch('create_schema', 'dbt')(relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.958646, "supported_languages": null}, "macro.dbt.default__create_schema": {"name": "default__create_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.default__create_schema", "macro_sql": "{% macro default__create_schema(relation) -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier() }}\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.95883, "supported_languages": null}, "macro.dbt.drop_schema": {"name": "drop_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n {{ adapter.dispatch('drop_schema', 'dbt')(relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.958994, "supported_languages": null}, "macro.dbt.default__drop_schema": {"name": "default__drop_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.default__drop_schema", "macro_sql": "{% macro default__drop_schema(relation) -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier() }} cascade\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.959177, "supported_languages": null}, "macro.dbt.current_timestamp": {"name": "current_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp", "macro_sql": "{%- macro current_timestamp() -%}\n {{ adapter.dispatch('current_timestamp', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_redshift.redshift__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9596732, "supported_languages": null}, "macro.dbt.default__current_timestamp": {"name": "default__current_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() -%}\n {{ exceptions.raise_not_implemented(\n 'current_timestamp macro not implemented for adapter ' + adapter.type()) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9598231, "supported_languages": null}, "macro.dbt.snapshot_get_time": {"name": "snapshot_get_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.snapshot_get_time", "macro_sql": "\n\n{%- macro snapshot_get_time() -%}\n {{ adapter.dispatch('snapshot_get_time', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_redshift.redshift__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9599638, "supported_languages": null}, "macro.dbt.default__snapshot_get_time": {"name": "default__snapshot_get_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() %}\n {{ current_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9600708, "supported_languages": null}, "macro.dbt.current_timestamp_backcompat": {"name": "current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp_backcompat", "macro_sql": "{% macro current_timestamp_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9602392, "supported_languages": null}, "macro.dbt.default__current_timestamp_backcompat": {"name": "default__current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp_backcompat", "macro_sql": "{% macro default__current_timestamp_backcompat() %}\n current_timestamp::timestamp\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.960315, "supported_languages": null}, "macro.dbt.current_timestamp_in_utc_backcompat": {"name": "current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp_in_utc_backcompat", "macro_sql": "{% macro current_timestamp_in_utc_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_in_utc_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__current_timestamp_in_utc_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.960479, "supported_languages": null}, "macro.dbt.default__current_timestamp_in_utc_backcompat": {"name": "default__current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp_in_utc_backcompat", "macro_sql": "{% macro default__current_timestamp_in_utc_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp_backcompat", "macro.dbt_redshift.redshift__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9606469, "supported_languages": null}, "macro.dbt.get_create_index_sql": {"name": "get_create_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_create_index_sql", "macro_sql": "{% macro get_create_index_sql(relation, index_dict) -%}\n {{ return(adapter.dispatch('get_create_index_sql', 'dbt')(relation, index_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.961111, "supported_languages": null}, "macro.dbt.default__get_create_index_sql": {"name": "default__get_create_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_create_index_sql", "macro_sql": "{% macro default__get_create_index_sql(relation, index_dict) -%}\n {% do return(None) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.961309, "supported_languages": null}, "macro.dbt.create_indexes": {"name": "create_indexes", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.create_indexes", "macro_sql": "{% macro create_indexes(relation) -%}\n {{ adapter.dispatch('create_indexes', 'dbt')(relation) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.961471, "supported_languages": null}, "macro.dbt.default__create_indexes": {"name": "default__create_indexes", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__create_indexes", "macro_sql": "{% macro default__create_indexes(relation) -%}\n {%- set _indexes = config.get('indexes', default=[]) -%}\n\n {% for _index_dict in _indexes %}\n {% set create_index_sql = get_create_index_sql(relation, _index_dict) %}\n {% if create_index_sql %}\n {% do run_query(create_index_sql) %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_create_index_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.96188, "supported_languages": null}, "macro.dbt.make_intermediate_relation": {"name": "make_intermediate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_intermediate_relation", "macro_sql": "{% macro make_intermediate_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_intermediate_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_intermediate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.965334, "supported_languages": null}, "macro.dbt.default__make_intermediate_relation": {"name": "default__make_intermediate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_intermediate_relation", "macro_sql": "{% macro default__make_intermediate_relation(base_relation, suffix) %}\n {{ return(default__make_temp_relation(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.965506, "supported_languages": null}, "macro.dbt.make_temp_relation": {"name": "make_temp_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_temp_relation", "macro_sql": "{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_temp_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.965732, "supported_languages": null}, "macro.dbt.default__make_temp_relation": {"name": "default__make_temp_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_temp_relation", "macro_sql": "{% macro default__make_temp_relation(base_relation, suffix) %}\n {%- set temp_identifier = base_relation.identifier ~ suffix -%}\n {%- set temp_relation = base_relation.incorporate(\n path={\"identifier\": temp_identifier}) -%}\n\n {{ return(temp_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.966028, "supported_languages": null}, "macro.dbt.make_backup_relation": {"name": "make_backup_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_backup_relation", "macro_sql": "{% macro make_backup_relation(base_relation, backup_relation_type, suffix='__dbt_backup') %}\n {{ return(adapter.dispatch('make_backup_relation', 'dbt')(base_relation, backup_relation_type, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_backup_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9662771, "supported_languages": null}, "macro.dbt.default__make_backup_relation": {"name": "default__make_backup_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_backup_relation", "macro_sql": "{% macro default__make_backup_relation(base_relation, backup_relation_type, suffix) %}\n {%- set backup_identifier = base_relation.identifier ~ suffix -%}\n {%- set backup_relation = base_relation.incorporate(\n path={\"identifier\": backup_identifier},\n type=backup_relation_type\n ) -%}\n {{ return(backup_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9666061, "supported_languages": null}, "macro.dbt.drop_relation": {"name": "drop_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n {{ return(adapter.dispatch('drop_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9667919, "supported_languages": null}, "macro.dbt.default__drop_relation": {"name": "default__drop_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__drop_relation", "macro_sql": "{% macro default__drop_relation(relation) -%}\n {% call statement('drop_relation', auto_begin=False) -%}\n drop {{ relation.type }} if exists {{ relation }} cascade\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.967009, "supported_languages": null}, "macro.dbt.truncate_relation": {"name": "truncate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n {{ return(adapter.dispatch('truncate_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__truncate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9671931, "supported_languages": null}, "macro.dbt.default__truncate_relation": {"name": "default__truncate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9673548, "supported_languages": null}, "macro.dbt.rename_relation": {"name": "rename_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n {{ return(adapter.dispatch('rename_relation', 'dbt')(from_relation, to_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.967565, "supported_languages": null}, "macro.dbt.default__rename_relation": {"name": "default__rename_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__rename_relation", "macro_sql": "{% macro default__rename_relation(from_relation, to_relation) -%}\n {% set target_name = adapter.quote_as_configured(to_relation.identifier, 'identifier') %}\n {% call statement('rename_relation') -%}\n alter table {{ from_relation }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9678478, "supported_languages": null}, "macro.dbt.get_or_create_relation": {"name": "get_or_create_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.get_or_create_relation", "macro_sql": "{% macro get_or_create_relation(database, schema, identifier, type) -%}\n {{ return(adapter.dispatch('get_or_create_relation', 'dbt')(database, schema, identifier, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_or_create_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9680982, "supported_languages": null}, "macro.dbt.default__get_or_create_relation": {"name": "default__get_or_create_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__get_or_create_relation", "macro_sql": "{% macro default__get_or_create_relation(database, schema, identifier, type) %}\n {%- set target_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n {% if target_relation %}\n {% do return([true, target_relation]) %}\n {% endif %}\n\n {%- set new_relation = api.Relation.create(\n database=database,\n schema=schema,\n identifier=identifier,\n type=type\n ) -%}\n {% do return([false, new_relation]) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.968661, "supported_languages": null}, "macro.dbt.load_cached_relation": {"name": "load_cached_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.load_cached_relation", "macro_sql": "{% macro load_cached_relation(relation) %}\n {% do return(adapter.get_relation(\n database=relation.database,\n schema=relation.schema,\n identifier=relation.identifier\n )) -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9689522, "supported_languages": null}, "macro.dbt.load_relation": {"name": "load_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.load_relation", "macro_sql": "{% macro load_relation(relation) %}\n {{ return(load_cached_relation(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.969097, "supported_languages": null}, "macro.dbt.drop_relation_if_exists": {"name": "drop_relation_if_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.drop_relation_if_exists", "macro_sql": "{% macro drop_relation_if_exists(relation) %}\n {% if relation is not none %}\n {{ adapter.drop_relation(relation) }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.969293, "supported_languages": null}, "macro.dbt.collect_freshness": {"name": "collect_freshness", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n {{ return(adapter.dispatch('collect_freshness', 'dbt')(source, loaded_at_field, filter))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9697258, "supported_languages": null}, "macro.dbt.default__collect_freshness": {"name": "default__collect_freshness", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n select\n max({{ loaded_at_field }}) as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n from {{ source }}\n {% if filter %}\n where {{ filter }}\n {% endif %}\n {% endcall %}\n {{ return(load_result('collect_freshness')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.970145, "supported_languages": null}, "macro.dbt.copy_grants": {"name": "copy_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.copy_grants", "macro_sql": "{% macro copy_grants() %}\n {{ return(adapter.dispatch('copy_grants', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.971909, "supported_languages": null}, "macro.dbt.default__copy_grants": {"name": "default__copy_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__copy_grants", "macro_sql": "{% macro default__copy_grants() %}\n {{ return(True) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.972028, "supported_languages": null}, "macro.dbt.support_multiple_grantees_per_dcl_statement": {"name": "support_multiple_grantees_per_dcl_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.support_multiple_grantees_per_dcl_statement", "macro_sql": "{% macro support_multiple_grantees_per_dcl_statement() %}\n {{ return(adapter.dispatch('support_multiple_grantees_per_dcl_statement', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9722009, "supported_languages": null}, "macro.dbt.default__support_multiple_grantees_per_dcl_statement": {"name": "default__support_multiple_grantees_per_dcl_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__support_multiple_grantees_per_dcl_statement", "macro_sql": "\n\n{%- macro default__support_multiple_grantees_per_dcl_statement() -%}\n {{ return(True) }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9723132, "supported_languages": null}, "macro.dbt.should_revoke": {"name": "should_revoke", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.should_revoke", "macro_sql": "{% macro should_revoke(existing_relation, full_refresh_mode=True) %}\n\n {% if not existing_relation %}\n {#-- The table doesn't already exist, so no grants to copy over --#}\n {{ return(False) }}\n {% elif full_refresh_mode %}\n {#-- The object is being REPLACED -- whether grants are copied over depends on the value of user config --#}\n {{ return(copy_grants()) }}\n {% else %}\n {#-- The table is being merged/upserted/inserted -- grants will be carried over --#}\n {{ return(True) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9726589, "supported_languages": null}, "macro.dbt.get_show_grant_sql": {"name": "get_show_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_show_grant_sql", "macro_sql": "{% macro get_show_grant_sql(relation) %}\n {{ return(adapter.dispatch(\"get_show_grant_sql\", \"dbt\")(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__get_show_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.972847, "supported_languages": null}, "macro.dbt.default__get_show_grant_sql": {"name": "default__get_show_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_show_grant_sql", "macro_sql": "{% macro default__get_show_grant_sql(relation) %}\n show grants on {{ relation }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.972951, "supported_languages": null}, "macro.dbt.get_grant_sql": {"name": "get_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_grant_sql", "macro_sql": "{% macro get_grant_sql(relation, privilege, grantees) %}\n {{ return(adapter.dispatch('get_grant_sql', 'dbt')(relation, privilege, grantees)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9731798, "supported_languages": null}, "macro.dbt.default__get_grant_sql": {"name": "default__get_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_grant_sql", "macro_sql": "\n\n{%- macro default__get_grant_sql(relation, privilege, grantees) -%}\n grant {{ privilege }} on {{ relation }} to {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.973372, "supported_languages": null}, "macro.dbt.get_revoke_sql": {"name": "get_revoke_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_revoke_sql", "macro_sql": "{% macro get_revoke_sql(relation, privilege, grantees) %}\n {{ return(adapter.dispatch('get_revoke_sql', 'dbt')(relation, privilege, grantees)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_revoke_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.973603, "supported_languages": null}, "macro.dbt.default__get_revoke_sql": {"name": "default__get_revoke_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_revoke_sql", "macro_sql": "\n\n{%- macro default__get_revoke_sql(relation, privilege, grantees) -%}\n revoke {{ privilege }} on {{ relation }} from {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.973791, "supported_languages": null}, "macro.dbt.get_dcl_statement_list": {"name": "get_dcl_statement_list", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_dcl_statement_list", "macro_sql": "{% macro get_dcl_statement_list(relation, grant_config, get_dcl_macro) %}\n {{ return(adapter.dispatch('get_dcl_statement_list', 'dbt')(relation, grant_config, get_dcl_macro)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_dcl_statement_list"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.974026, "supported_languages": null}, "macro.dbt.default__get_dcl_statement_list": {"name": "default__get_dcl_statement_list", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_dcl_statement_list", "macro_sql": "\n\n{%- macro default__get_dcl_statement_list(relation, grant_config, get_dcl_macro) -%}\n {#\n -- Unpack grant_config into specific privileges and the set of users who need them granted/revoked.\n -- Depending on whether this database supports multiple grantees per statement, pass in the list of\n -- all grantees per privilege, or (if not) template one statement per privilege-grantee pair.\n -- `get_dcl_macro` will be either `get_grant_sql` or `get_revoke_sql`\n #}\n {%- set dcl_statements = [] -%}\n {%- for privilege, grantees in grant_config.items() %}\n {%- if support_multiple_grantees_per_dcl_statement() and grantees -%}\n {%- set dcl = get_dcl_macro(relation, privilege, grantees) -%}\n {%- do dcl_statements.append(dcl) -%}\n {%- else -%}\n {%- for grantee in grantees -%}\n {% set dcl = get_dcl_macro(relation, privilege, [grantee]) %}\n {%- do dcl_statements.append(dcl) -%}\n {% endfor -%}\n {%- endif -%}\n {%- endfor -%}\n {{ return(dcl_statements) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.974775, "supported_languages": null}, "macro.dbt.call_dcl_statements": {"name": "call_dcl_statements", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.call_dcl_statements", "macro_sql": "{% macro call_dcl_statements(dcl_statement_list) %}\n {{ return(adapter.dispatch(\"call_dcl_statements\", \"dbt\")(dcl_statement_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.974967, "supported_languages": null}, "macro.dbt.default__call_dcl_statements": {"name": "default__call_dcl_statements", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__call_dcl_statements", "macro_sql": "{% macro default__call_dcl_statements(dcl_statement_list) %}\n {#\n -- By default, supply all grant + revoke statements in a single semicolon-separated block,\n -- so that they're all processed together.\n\n -- Some databases do not support this. Those adapters will need to override this macro\n -- to run each statement individually.\n #}\n {% call statement('grants') %}\n {% for dcl_statement in dcl_statement_list %}\n {{ dcl_statement }};\n {% endfor %}\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.97521, "supported_languages": null}, "macro.dbt.apply_grants": {"name": "apply_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.apply_grants", "macro_sql": "{% macro apply_grants(relation, grant_config, should_revoke) %}\n {{ return(adapter.dispatch(\"apply_grants\", \"dbt\")(relation, grant_config, should_revoke)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.975441, "supported_languages": null}, "macro.dbt.default__apply_grants": {"name": "default__apply_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__apply_grants", "macro_sql": "{% macro default__apply_grants(relation, grant_config, should_revoke=True) %}\n {#-- If grant_config is {} or None, this is a no-op --#}\n {% if grant_config %}\n {% if should_revoke %}\n {#-- We think previous grants may have carried over --#}\n {#-- Show current grants and calculate diffs --#}\n {% set current_grants_table = run_query(get_show_grant_sql(relation)) %}\n {% set current_grants_dict = adapter.standardize_grants_dict(current_grants_table) %}\n {% set needs_granting = diff_of_two_dicts(grant_config, current_grants_dict) %}\n {% set needs_revoking = diff_of_two_dicts(current_grants_dict, grant_config) %}\n {% if not (needs_granting or needs_revoking) %}\n {{ log('On ' ~ relation ~': All grants are in place, no revocation or granting needed.')}}\n {% endif %}\n {% else %}\n {#-- We don't think there's any chance of previous grants having carried over. --#}\n {#-- Jump straight to granting what the user has configured. --#}\n {% set needs_revoking = {} %}\n {% set needs_granting = grant_config %}\n {% endif %}\n {% if needs_granting or needs_revoking %}\n {% set revoke_statement_list = get_dcl_statement_list(relation, needs_revoking, get_revoke_sql) %}\n {% set grant_statement_list = get_dcl_statement_list(relation, needs_granting, get_grant_sql) %}\n {% set dcl_statement_list = revoke_statement_list + grant_statement_list %}\n {% if dcl_statement_list %}\n {{ call_dcl_statements(dcl_statement_list) }}\n {% endif %}\n {% endif %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.get_show_grant_sql", "macro.dbt.get_dcl_statement_list", "macro.dbt.call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.976614, "supported_languages": null}, "macro.dbt.alter_column_comment": {"name": "alter_column_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.alter_column_comment", "macro_sql": "{% macro alter_column_comment(relation, column_dict) -%}\n {{ return(adapter.dispatch('alter_column_comment', 'dbt')(relation, column_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.977323, "supported_languages": null}, "macro.dbt.default__alter_column_comment": {"name": "default__alter_column_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__alter_column_comment", "macro_sql": "{% macro default__alter_column_comment(relation, column_dict) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_column_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.977494, "supported_languages": null}, "macro.dbt.alter_relation_comment": {"name": "alter_relation_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.alter_relation_comment", "macro_sql": "{% macro alter_relation_comment(relation, relation_comment) -%}\n {{ return(adapter.dispatch('alter_relation_comment', 'dbt')(relation, relation_comment)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9777029, "supported_languages": null}, "macro.dbt.default__alter_relation_comment": {"name": "default__alter_relation_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__alter_relation_comment", "macro_sql": "{% macro default__alter_relation_comment(relation, relation_comment) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_relation_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.977876, "supported_languages": null}, "macro.dbt.persist_docs": {"name": "persist_docs", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.persist_docs", "macro_sql": "{% macro persist_docs(relation, model, for_relation=true, for_columns=true) -%}\n {{ return(adapter.dispatch('persist_docs', 'dbt')(relation, model, for_relation, for_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.978147, "supported_languages": null}, "macro.dbt.default__persist_docs": {"name": "default__persist_docs", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__persist_docs", "macro_sql": "{% macro default__persist_docs(relation, model, for_relation, for_columns) -%}\n {% if for_relation and config.persist_relation_docs() and model.description %}\n {% do run_query(alter_relation_comment(relation, model.description)) %}\n {% endif %}\n\n {% if for_columns and config.persist_column_docs() and model.columns %}\n {% do run_query(alter_column_comment(relation, model.columns)) %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9786382, "supported_languages": null}, "macro.dbt.get_catalog": {"name": "get_catalog", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n {{ return(adapter.dispatch('get_catalog', 'dbt')(information_schema, schemas)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9801888, "supported_languages": null}, "macro.dbt.default__get_catalog": {"name": "default__get_catalog", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog", "macro_sql": "{% macro default__get_catalog(information_schema, schemas) -%}\n\n {% set typename = adapter.type() %}\n {% set msg -%}\n get_catalog not implemented for {{ typename }}\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9804502, "supported_languages": null}, "macro.dbt.information_schema_name": {"name": "information_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n {{ return(adapter.dispatch('information_schema_name', 'dbt')(database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.980642, "supported_languages": null}, "macro.dbt.default__information_schema_name": {"name": "default__information_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__information_schema_name", "macro_sql": "{% macro default__information_schema_name(database) -%}\n {%- if database -%}\n {{ database }}.INFORMATION_SCHEMA\n {%- else -%}\n INFORMATION_SCHEMA\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.980798, "supported_languages": null}, "macro.dbt.list_schemas": {"name": "list_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n {{ return(adapter.dispatch('list_schemas', 'dbt')(database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.980984, "supported_languages": null}, "macro.dbt.default__list_schemas": {"name": "default__list_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_schemas", "macro_sql": "{% macro default__list_schemas(database) -%}\n {% set sql %}\n select distinct schema_name\n from {{ information_schema_name(database) }}.SCHEMATA\n where catalog_name ilike '{{ database }}'\n {% endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.information_schema_name", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.98123, "supported_languages": null}, "macro.dbt.check_schema_exists": {"name": "check_schema_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.check_schema_exists", "macro_sql": "{% macro check_schema_exists(information_schema, schema) -%}\n {{ return(adapter.dispatch('check_schema_exists', 'dbt')(information_schema, schema)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.981434, "supported_languages": null}, "macro.dbt.default__check_schema_exists": {"name": "default__check_schema_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__check_schema_exists", "macro_sql": "{% macro default__check_schema_exists(information_schema, schema) -%}\n {% set sql -%}\n select count(*)\n from {{ information_schema.replace(information_schema_view='SCHEMATA') }}\n where catalog_name='{{ information_schema.database }}'\n and schema_name='{{ schema }}'\n {%- endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.981739, "supported_languages": null}, "macro.dbt.list_relations_without_caching": {"name": "list_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_relations_without_caching", "macro_sql": "{% macro list_relations_without_caching(schema_relation) %}\n {{ return(adapter.dispatch('list_relations_without_caching', 'dbt')(schema_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.981927, "supported_languages": null}, "macro.dbt.default__list_relations_without_caching": {"name": "default__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_relations_without_caching", "macro_sql": "{% macro default__list_relations_without_caching(schema_relation) %}\n {{ exceptions.raise_not_implemented(\n 'list_relations_without_caching macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.982089, "supported_languages": null}, "macro.dbt.get_columns_in_relation": {"name": "get_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n {{ return(adapter.dispatch('get_columns_in_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9844182, "supported_languages": null}, "macro.dbt.default__get_columns_in_relation": {"name": "default__get_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_columns_in_relation", "macro_sql": "{% macro default__get_columns_in_relation(relation) -%}\n {{ exceptions.raise_not_implemented(\n 'get_columns_in_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.984651, "supported_languages": null}, "macro.dbt.sql_convert_columns_in_relation": {"name": "sql_convert_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.sql_convert_columns_in_relation", "macro_sql": "{% macro sql_convert_columns_in_relation(table) -%}\n {% set columns = [] %}\n {% for row in table %}\n {% do columns.append(api.Column(*row)) %}\n {% endfor %}\n {{ return(columns) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.98497, "supported_languages": null}, "macro.dbt.get_empty_subquery_sql": {"name": "get_empty_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_empty_subquery_sql", "macro_sql": "{% macro get_empty_subquery_sql(select_sql, select_sql_header=none) -%}\n {{ return(adapter.dispatch('get_empty_subquery_sql', 'dbt')(select_sql, select_sql_header)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.985193, "supported_languages": null}, "macro.dbt.default__get_empty_subquery_sql": {"name": "default__get_empty_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_empty_subquery_sql", "macro_sql": "{% macro default__get_empty_subquery_sql(select_sql, select_sql_header=none) %}\n {%- if select_sql_header is not none -%}\n {{ select_sql_header }}\n {%- endif -%}\n select * from (\n {{ select_sql }}\n ) as __dbt_sbq\n where false\n limit 0\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9854012, "supported_languages": null}, "macro.dbt.get_empty_schema_sql": {"name": "get_empty_schema_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_empty_schema_sql", "macro_sql": "{% macro get_empty_schema_sql(columns) -%}\n {{ return(adapter.dispatch('get_empty_schema_sql', 'dbt')(columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_empty_schema_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.985582, "supported_languages": null}, "macro.dbt.default__get_empty_schema_sql": {"name": "default__get_empty_schema_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_empty_schema_sql", "macro_sql": "{% macro default__get_empty_schema_sql(columns) %}\n {%- set col_err = [] -%}\n select\n {% for i in columns %}\n {%- set col = columns[i] -%}\n {%- if col['data_type'] is not defined -%}\n {{ col_err.append(col['name']) }}\n {%- endif -%}\n {% set col_name = adapter.quote(col['name']) if col.get('quote') else col['name'] %}\n cast(null as {{ col['data_type'] }}) as {{ col_name }}{{ \", \" if not loop.last }}\n {%- endfor -%}\n {%- if (col_err | length) > 0 -%}\n {{ exceptions.column_type_missing(column_names=col_err) }}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.986358, "supported_languages": null}, "macro.dbt.get_column_schema_from_query": {"name": "get_column_schema_from_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_column_schema_from_query", "macro_sql": "{% macro get_column_schema_from_query(select_sql, select_sql_header=none) -%}\n {% set columns = [] %}\n {# -- Using an 'empty subquery' here to get the same schema as the given select_sql statement, without necessitating a data scan.#}\n {% set sql = get_empty_subquery_sql(select_sql, select_sql_header) %}\n {% set column_schema = adapter.get_column_schema_from_query(sql) %}\n {{ return(column_schema) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.986707, "supported_languages": null}, "macro.dbt.get_columns_in_query": {"name": "get_columns_in_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_columns_in_query", "macro_sql": "{% macro get_columns_in_query(select_sql) -%}\n {{ return(adapter.dispatch('get_columns_in_query', 'dbt')(select_sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9868941, "supported_languages": null}, "macro.dbt.default__get_columns_in_query": {"name": "default__get_columns_in_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_columns_in_query", "macro_sql": "{% macro default__get_columns_in_query(select_sql) %}\n {% call statement('get_columns_in_query', fetch_result=True, auto_begin=False) -%}\n {{ get_empty_subquery_sql(select_sql) }}\n {% endcall %}\n {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.987254, "supported_languages": null}, "macro.dbt.alter_column_type": {"name": "alter_column_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.alter_column_type", "macro_sql": "{% macro alter_column_type(relation, column_name, new_column_type) -%}\n {{ return(adapter.dispatch('alter_column_type', 'dbt')(relation, column_name, new_column_type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.987489, "supported_languages": null}, "macro.dbt.default__alter_column_type": {"name": "default__alter_column_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__alter_column_type", "macro_sql": "{% macro default__alter_column_type(relation, column_name, new_column_type) -%}\n {#\n 1. Create a new column (w/ temp name and correct type)\n 2. Copy data over to it\n 3. Drop the existing column (cascade!)\n 4. Rename the new column to existing column\n #}\n {%- set tmp_column = column_name + \"__dbt_alter\" -%}\n\n {% call statement('alter_column_type') %}\n alter table {{ relation }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.988103, "supported_languages": null}, "macro.dbt.alter_relation_add_remove_columns": {"name": "alter_relation_add_remove_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.alter_relation_add_remove_columns", "macro_sql": "{% macro alter_relation_add_remove_columns(relation, add_columns = none, remove_columns = none) -%}\n {{ return(adapter.dispatch('alter_relation_add_remove_columns', 'dbt')(relation, add_columns, remove_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_redshift.redshift__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.988362, "supported_languages": null}, "macro.dbt.default__alter_relation_add_remove_columns": {"name": "default__alter_relation_add_remove_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "macro_sql": "{% macro default__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n\n {% if add_columns is none %}\n {% set add_columns = [] %}\n {% endif %}\n {% if remove_columns is none %}\n {% set remove_columns = [] %}\n {% endif %}\n\n {% set sql -%}\n\n alter {{ relation.type }} {{ relation }}\n\n {% for column in add_columns %}\n add column {{ column.name }} {{ column.data_type }}{{ ',' if not loop.last }}\n {% endfor %}{{ ',' if add_columns and remove_columns }}\n\n {% for column in remove_columns %}\n drop column {{ column.name }}{{ ',' if not loop.last }}\n {% endfor %}\n\n {%- endset -%}\n\n {% do run_query(sql) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9891589, "supported_languages": null}, "macro.dbt.resolve_model_name": {"name": "resolve_model_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.resolve_model_name", "macro_sql": "{% macro resolve_model_name(input_model_name) %}\n {{ return(adapter.dispatch('resolve_model_name', 'dbt')(input_model_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.990867, "supported_languages": null}, "macro.dbt.default__resolve_model_name": {"name": "default__resolve_model_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.default__resolve_model_name", "macro_sql": "\n\n{%- macro default__resolve_model_name(input_model_name) -%}\n {{ input_model_name | string | replace('\"', '\\\"') }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.99102, "supported_languages": null}, "macro.dbt.build_ref_function": {"name": "build_ref_function", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_ref_function", "macro_sql": "{% macro build_ref_function(model) %}\n\n {%- set ref_dict = {} -%}\n {%- for _ref in model.refs -%}\n {% set _ref_args = [_ref.get('package'), _ref['name']] if _ref.get('package') else [_ref['name'],] %}\n {%- set resolved = ref(*_ref_args, v=_ref.get('version')) -%}\n {%- if _ref.get('version') -%}\n {% do _ref_args.extend([\"v\" ~ _ref['version']]) %}\n {%- endif -%}\n {%- do ref_dict.update({_ref_args | join('.'): resolve_model_name(resolved)}) -%}\n {%- endfor -%}\n\ndef ref(*args, **kwargs):\n refs = {{ ref_dict | tojson }}\n key = '.'.join(args)\n version = kwargs.get(\"v\") or kwargs.get(\"version\")\n if version:\n key += f\".v{version}\"\n dbt_load_df_function = kwargs.get(\"dbt_load_df_function\")\n return dbt_load_df_function(refs[key])\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.991852, "supported_languages": null}, "macro.dbt.build_source_function": {"name": "build_source_function", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_source_function", "macro_sql": "{% macro build_source_function(model) %}\n\n {%- set source_dict = {} -%}\n {%- for _source in model.sources -%}\n {%- set resolved = source(*_source) -%}\n {%- do source_dict.update({_source | join('.'): resolve_model_name(resolved)}) -%}\n {%- endfor -%}\n\ndef source(*args, dbt_load_df_function):\n sources = {{ source_dict | tojson }}\n key = '.'.join(args)\n return dbt_load_df_function(sources[key])\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.992439, "supported_languages": null}, "macro.dbt.build_config_dict": {"name": "build_config_dict", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_config_dict", "macro_sql": "{% macro build_config_dict(model) %}\n {%- set config_dict = {} -%}\n {% set config_dbt_used = zip(model.config.config_keys_used, model.config.config_keys_defaults) | list %}\n {%- for key, default in config_dbt_used -%}\n {# weird type testing with enum, would be much easier to write this logic in Python! #}\n {%- if key == \"language\" -%}\n {%- set value = \"python\" -%}\n {%- endif -%}\n {%- set value = model.config.get(key, default) -%}\n {%- do config_dict.update({key: value}) -%}\n {%- endfor -%}\nconfig_dict = {{ config_dict }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.993029, "supported_languages": null}, "macro.dbt.py_script_postfix": {"name": "py_script_postfix", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.py_script_postfix", "macro_sql": "{% macro py_script_postfix(model) %}\n# This part is user provided model code\n# you will need to copy the next section to run the code\n# COMMAND ----------\n# this part is dbt logic for get ref work, do not modify\n\n{{ build_ref_function(model ) }}\n{{ build_source_function(model ) }}\n{{ build_config_dict(model) }}\n\nclass config:\n def __init__(self, *args, **kwargs):\n pass\n\n @staticmethod\n def get(key, default=None):\n return config_dict.get(key, default)\n\nclass this:\n \"\"\"dbt.this() or dbt.this.identifier\"\"\"\n database = \"{{ this.database }}\"\n schema = \"{{ this.schema }}\"\n identifier = \"{{ this.identifier }}\"\n {% set this_relation_name = resolve_model_name(this) %}\n def __repr__(self):\n return '{{ this_relation_name }}'\n\n\nclass dbtObj:\n def __init__(self, load_df_function) -> None:\n self.source = lambda *args: source(*args, dbt_load_df_function=load_df_function)\n self.ref = lambda *args, **kwargs: ref(*args, **kwargs, dbt_load_df_function=load_df_function)\n self.config = config\n self.this = this()\n self.is_incremental = {{ is_incremental() }}\n\n# COMMAND ----------\n{{py_script_comment()}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.build_ref_function", "macro.dbt.build_source_function", "macro.dbt.build_config_dict", "macro.dbt.resolve_model_name", "macro.dbt.is_incremental", "macro.dbt.py_script_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9935098, "supported_languages": null}, "macro.dbt.py_script_comment": {"name": "py_script_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.py_script_comment", "macro_sql": "{%macro py_script_comment()%}\n{%endmacro%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9935832, "supported_languages": null}, "macro.dbt.test_unique": {"name": "test_unique", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_unique", "macro_sql": "{% test unique(model, column_name) %}\n {% set macro = adapter.dispatch('test_unique', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.994096, "supported_languages": null}, "macro.dbt.test_not_null": {"name": "test_not_null", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_not_null", "macro_sql": "{% test not_null(model, column_name) %}\n {% set macro = adapter.dispatch('test_not_null', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.994328, "supported_languages": null}, "macro.dbt.test_accepted_values": {"name": "test_accepted_values", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_accepted_values", "macro_sql": "{% test accepted_values(model, column_name, values, quote=True) %}\n {% set macro = adapter.dispatch('test_accepted_values', 'dbt') %}\n {{ macro(model, column_name, values, quote) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.994621, "supported_languages": null}, "macro.dbt.test_relationships": {"name": "test_relationships", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_relationships", "macro_sql": "{% test relationships(model, column_name, to, field) %}\n {% set macro = adapter.dispatch('test_relationships', 'dbt') %}\n {{ macro(model, column_name, to, field) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_relationships"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.994894, "supported_languages": null}, "macro.dbt_utils.get_url_host": {"name": "get_url_host", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "unique_id": "macro.dbt_utils.get_url_host", "macro_sql": "{% macro get_url_host(field) -%}\n {{ return(adapter.dispatch('get_url_host', 'dbt_utils')(field)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_host"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9952488, "supported_languages": null}, "macro.dbt_utils.default__get_url_host": {"name": "default__get_url_host", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "unique_id": "macro.dbt_utils.default__get_url_host", "macro_sql": "{% macro default__get_url_host(field) -%}\n\n{%- set parsed =\n dbt.split_part(\n dbt.split_part(\n dbt.replace(\n dbt.replace(\n dbt.replace(field, \"'android-app://'\", \"''\"\n ), \"'http://'\", \"''\"\n ), \"'https://'\", \"''\"\n ), \"'/'\", 1\n ), \"'?'\", 1\n )\n\n-%}\n\n\n {{ dbt.safe_cast(\n parsed,\n dbt.type_string()\n )}}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.split_part", "macro.dbt.replace", "macro.dbt.safe_cast", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.99573, "supported_languages": null}, "macro.dbt_utils.get_url_path": {"name": "get_url_path", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "unique_id": "macro.dbt_utils.get_url_path", "macro_sql": "{% macro get_url_path(field) -%}\n {{ return(adapter.dispatch('get_url_path', 'dbt_utils')(field)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_path"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9962199, "supported_languages": null}, "macro.dbt_utils.default__get_url_path": {"name": "default__get_url_path", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "unique_id": "macro.dbt_utils.default__get_url_path", "macro_sql": "{% macro default__get_url_path(field) -%}\n\n {%- set stripped_url =\n dbt.replace(\n dbt.replace(field, \"'http://'\", \"''\"), \"'https://'\", \"''\")\n -%}\n\n {%- set first_slash_pos -%}\n coalesce(\n nullif({{ dbt.position(\"'/'\", stripped_url) }}, 0),\n {{ dbt.position(\"'?'\", stripped_url) }} - 1\n )\n {%- endset -%}\n\n {%- set parsed_path =\n dbt.split_part(\n dbt.right(\n stripped_url,\n dbt.length(stripped_url) ~ \"-\" ~ first_slash_pos\n ),\n \"'?'\", 1\n )\n -%}\n\n {{ dbt.safe_cast(\n parsed_path,\n dbt.type_string()\n )}}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.position", "macro.dbt.split_part", "macro.dbt.right", "macro.dbt.length", "macro.dbt.safe_cast", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.9968839, "supported_languages": null}, "macro.dbt_utils.get_url_parameter": {"name": "get_url_parameter", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "unique_id": "macro.dbt_utils.get_url_parameter", "macro_sql": "{% macro get_url_parameter(field, url_parameter) -%}\n {{ return(adapter.dispatch('get_url_parameter', 'dbt_utils')(field, url_parameter)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.997204, "supported_languages": null}, "macro.dbt_utils.default__get_url_parameter": {"name": "default__get_url_parameter", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "unique_id": "macro.dbt_utils.default__get_url_parameter", "macro_sql": "{% macro default__get_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"='\" -%}\n\n{%- set split = dbt.split_part(dbt.split_part(field, formatted_url_parameter, 2), \"'&'\", 1) -%}\n\nnullif({{ split }},'')\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.997528, "supported_languages": null}, "macro.dbt_utils.test_fewer_rows_than": {"name": "test_fewer_rows_than", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "unique_id": "macro.dbt_utils.test_fewer_rows_than", "macro_sql": "{% test fewer_rows_than(model, compare_model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_fewer_rows_than', 'dbt_utils')(model, compare_model, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_fewer_rows_than"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.998636, "supported_languages": null}, "macro.dbt_utils.default__test_fewer_rows_than": {"name": "default__test_fewer_rows_than", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "unique_id": "macro.dbt_utils.default__test_fewer_rows_than", "macro_sql": "{% macro default__test_fewer_rows_than(model, compare_model, group_by_columns) %}\n\n{{ config(fail_calc = 'sum(coalesce(row_count_delta, 0))') }}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set join_gb_cols %}\n {% for c in group_by_columns %}\n and a.{{c}} = b.{{c}}\n {% endfor %}\n {% endset %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n{#-- We must add a fake join key in case additional grouping variables are not provided --#}\n{#-- Redshift does not allow for dynamically created join conditions (e.g. full join on 1 = 1 --#}\n{#-- The same logic is used in equal_rowcount. In case of changes, maintain consistent logic --#}\n{% set group_by_columns = ['id_dbtutils_test_fewer_rows_than'] + group_by_columns %}\n{% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n\n\nwith a as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_fewer_rows_than,\n count(*) as count_our_model \n from {{ model }}\n {{ groupby_gb_cols }}\n\n),\nb as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_fewer_rows_than,\n count(*) as count_comparison_model \n from {{ compare_model }}\n {{ groupby_gb_cols }}\n\n),\ncounts as (\n\n select\n\n {% for c in group_by_columns -%}\n a.{{c}} as {{c}}_a,\n b.{{c}} as {{c}}_b,\n {% endfor %}\n\n count_our_model,\n count_comparison_model\n from a\n full join b on \n a.id_dbtutils_test_fewer_rows_than = b.id_dbtutils_test_fewer_rows_than\n {{ join_gb_cols }}\n\n),\nfinal as (\n\n select *,\n case\n -- fail the test if we have more rows than the reference model and return the row count delta\n when count_our_model > count_comparison_model then (count_our_model - count_comparison_model)\n -- fail the test if they are the same number\n when count_our_model = count_comparison_model then 1\n -- pass the test if the delta is positive (i.e. return the number 0)\n else 0\n end as row_count_delta\n from counts\n\n)\n\nselect * from final\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163461.999677, "supported_languages": null}, "macro.dbt_utils.test_equal_rowcount": {"name": "test_equal_rowcount", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "unique_id": "macro.dbt_utils.test_equal_rowcount", "macro_sql": "{% test equal_rowcount(model, compare_model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_equal_rowcount', 'dbt_utils')(model, compare_model, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_equal_rowcount"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.000553, "supported_languages": null}, "macro.dbt_utils.default__test_equal_rowcount": {"name": "default__test_equal_rowcount", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "unique_id": "macro.dbt_utils.default__test_equal_rowcount", "macro_sql": "{% macro default__test_equal_rowcount(model, compare_model, group_by_columns) %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = 'sum(coalesce(diff_count, 0))') }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(', ') + ', ' %}\n {% set join_gb_cols %}\n {% for c in group_by_columns %}\n and a.{{c}} = b.{{c}}\n {% endfor %}\n {% endset %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n{#-- We must add a fake join key in case additional grouping variables are not provided --#}\n{#-- Redshift does not allow for dynamically created join conditions (e.g. full join on 1 = 1 --#}\n{#-- The same logic is used in fewer_rows_than. In case of changes, maintain consistent logic --#}\n{% set group_by_columns = ['id_dbtutils_test_equal_rowcount'] + group_by_columns %}\n{% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n\nwith a as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_equal_rowcount,\n count(*) as count_a \n from {{ model }}\n {{groupby_gb_cols}}\n\n\n),\nb as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_equal_rowcount,\n count(*) as count_b \n from {{ compare_model }}\n {{groupby_gb_cols}}\n\n),\nfinal as (\n\n select\n \n {% for c in group_by_columns -%}\n a.{{c}} as {{c}}_a,\n b.{{c}} as {{c}}_b,\n {% endfor %}\n\n count_a,\n count_b,\n abs(count_a - count_b) as diff_count\n\n from a\n full join b\n on\n a.id_dbtutils_test_equal_rowcount = b.id_dbtutils_test_equal_rowcount\n {{join_gb_cols}}\n\n\n)\n\nselect * from final\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.00173, "supported_languages": null}, "macro.dbt_utils.test_relationships_where": {"name": "test_relationships_where", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "unique_id": "macro.dbt_utils.test_relationships_where", "macro_sql": "{% test relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n {{ return(adapter.dispatch('test_relationships_where', 'dbt_utils')(model, column_name, to, field, from_condition, to_condition)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_relationships_where"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0023942, "supported_languages": null}, "macro.dbt_utils.default__test_relationships_where": {"name": "default__test_relationships_where", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "unique_id": "macro.dbt_utils.default__test_relationships_where", "macro_sql": "{% macro default__test_relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n\n{# T-SQL has no boolean data type so we use 1=1 which returns TRUE #}\n{# ref https://stackoverflow.com/a/7170753/3842610 #}\n\nwith left_table as (\n\n select\n {{column_name}} as id\n\n from {{model}}\n\n where {{column_name}} is not null\n and {{from_condition}}\n\n),\n\nright_table as (\n\n select\n {{field}} as id\n\n from {{to}}\n\n where {{field}} is not null\n and {{to_condition}}\n\n),\n\nexceptions as (\n\n select\n left_table.id,\n right_table.id as right_id\n\n from left_table\n\n left join right_table\n on left_table.id = right_table.id\n\n where right_table.id is null\n\n)\n\nselect * from exceptions\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.002748, "supported_languages": null}, "macro.dbt_utils.test_recency": {"name": "test_recency", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "unique_id": "macro.dbt_utils.test_recency", "macro_sql": "{% test recency(model, field, datepart, interval, ignore_time_component=False, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_recency', 'dbt_utils')(model, field, datepart, interval, ignore_time_component, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_recency"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.003493, "supported_languages": null}, "macro.dbt_utils.default__test_recency": {"name": "default__test_recency", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "unique_id": "macro.dbt_utils.default__test_recency", "macro_sql": "{% macro default__test_recency(model, field, datepart, interval, ignore_time_component, group_by_columns) %}\n\n{% set threshold = 'cast(' ~ dbt.dateadd(datepart, interval * -1, dbt.current_timestamp()) ~ ' as ' ~ ('date' if ignore_time_component else dbt.type_timestamp()) ~ ')' %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n\nwith recency as (\n\n select \n\n {{ select_gb_cols }}\n {% if ignore_time_component %}\n cast(max({{ field }}) as date) as most_recent\n {%- else %}\n max({{ field }}) as most_recent\n {%- endif %}\n\n from {{ model }}\n\n {{ groupby_gb_cols }}\n\n)\n\nselect\n\n {{ select_gb_cols }}\n most_recent,\n {{ threshold }} as threshold\n\nfrom recency\nwhere most_recent < {{ threshold }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.current_timestamp", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.004341, "supported_languages": null}, "macro.dbt_utils.test_not_constant": {"name": "test_not_constant", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "unique_id": "macro.dbt_utils.test_not_constant", "macro_sql": "{% test not_constant(model, column_name, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_not_constant', 'dbt_utils')(model, column_name, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_constant"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.004791, "supported_languages": null}, "macro.dbt_utils.default__test_not_constant": {"name": "default__test_not_constant", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "unique_id": "macro.dbt_utils.default__test_not_constant", "macro_sql": "{% macro default__test_not_constant(model, column_name, group_by_columns) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n\nselect\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n {{select_gb_cols}}\n count(distinct {{ column_name }}) as filler_column\n\nfrom {{ model }}\n\n {{groupby_gb_cols}}\n\nhaving count(distinct {{ column_name }}) = 1\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.005258, "supported_languages": null}, "macro.dbt_utils.test_accepted_range": {"name": "test_accepted_range", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "unique_id": "macro.dbt_utils.test_accepted_range", "macro_sql": "{% test accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n {{ return(adapter.dispatch('test_accepted_range', 'dbt_utils')(model, column_name, min_value, max_value, inclusive)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_accepted_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.005878, "supported_languages": null}, "macro.dbt_utils.default__test_accepted_range": {"name": "default__test_accepted_range", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "unique_id": "macro.dbt_utils.default__test_accepted_range", "macro_sql": "{% macro default__test_accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n\nwith meet_condition as(\n select *\n from {{ model }}\n),\n\nvalidation_errors as (\n select *\n from meet_condition\n where\n -- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds\n 1 = 2\n\n {%- if min_value is not none %}\n -- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} > {{- \"=\" if inclusive }} {{ min_value }}\n {%- endif %}\n\n {%- if max_value is not none %}\n -- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} < {{- \"=\" if inclusive }} {{ max_value }}\n {%- endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0063639, "supported_languages": null}, "macro.dbt_utils.test_not_accepted_values": {"name": "test_not_accepted_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "unique_id": "macro.dbt_utils.test_not_accepted_values", "macro_sql": "{% test not_accepted_values(model, column_name, values, quote=True) %}\n {{ return(adapter.dispatch('test_not_accepted_values', 'dbt_utils')(model, column_name, values, quote)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.006928, "supported_languages": null}, "macro.dbt_utils.default__test_not_accepted_values": {"name": "default__test_not_accepted_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "unique_id": "macro.dbt_utils.default__test_not_accepted_values", "macro_sql": "{% macro default__test_not_accepted_values(model, column_name, values, quote=True) %}\nwith all_values as (\n\n select distinct\n {{ column_name }} as value_field\n\n from {{ model }}\n\n),\n\nvalidation_errors as (\n\n select\n value_field\n\n from all_values\n where value_field in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n )\n\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0073211, "supported_languages": null}, "macro.dbt_utils.test_at_least_one": {"name": "test_at_least_one", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "unique_id": "macro.dbt_utils.test_at_least_one", "macro_sql": "{% test at_least_one(model, column_name, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_at_least_one', 'dbt_utils')(model, column_name, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_at_least_one"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.007992, "supported_languages": null}, "macro.dbt_utils.default__test_at_least_one": {"name": "default__test_at_least_one", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "unique_id": "macro.dbt_utils.default__test_at_least_one", "macro_sql": "{% macro default__test_at_least_one(model, column_name, group_by_columns) %}\n\n{% set pruned_cols = [column_name] %}\n\n{% if group_by_columns|length() > 0 %}\n\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n {% set pruned_cols = group_by_columns %}\n\n {% if column_name not in pruned_cols %}\n {% do pruned_cols.append(column_name) %}\n {% endif %}\n\n{% endif %}\n\n{% set select_pruned_cols = pruned_cols|join(' ,') %}\n\nselect *\nfrom (\n with pruned_rows as (\n select\n {{ select_pruned_cols }}\n from {{ model }}\n where {{ column_name }} is not null\n limit 1\n )\n select\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n {{select_gb_cols}}\n count({{ column_name }}) as filler_column\n\n from pruned_rows\n\n {{groupby_gb_cols}}\n\n having count({{ column_name }}) = 0\n\n) validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.008794, "supported_languages": null}, "macro.dbt_utils.test_unique_combination_of_columns": {"name": "test_unique_combination_of_columns", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "unique_id": "macro.dbt_utils.test_unique_combination_of_columns", "macro_sql": "{% test unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n {{ return(adapter.dispatch('test_unique_combination_of_columns', 'dbt_utils')(model, combination_of_columns, quote_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_combination_of_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0094368, "supported_languages": null}, "macro.dbt_utils.default__test_unique_combination_of_columns": {"name": "default__test_unique_combination_of_columns", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "unique_id": "macro.dbt_utils.default__test_unique_combination_of_columns", "macro_sql": "{% macro default__test_unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n\n{% if not quote_columns %}\n {%- set column_list=combination_of_columns %}\n{% elif quote_columns %}\n {%- set column_list=[] %}\n {% for column in combination_of_columns -%}\n {% set column_list = column_list.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for unique_combination_of_columns test must be one of [True, False] Got: '\" ~ quote ~\"'.'\"\n ) }}\n{% endif %}\n\n{%- set columns_csv=column_list | join(', ') %}\n\n\nwith validation_errors as (\n\n select\n {{ columns_csv }}\n from {{ model }}\n group by {{ columns_csv }}\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.010093, "supported_languages": null}, "macro.dbt_utils.test_cardinality_equality": {"name": "test_cardinality_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "unique_id": "macro.dbt_utils.test_cardinality_equality", "macro_sql": "{% test cardinality_equality(model, column_name, to, field) %}\n {{ return(adapter.dispatch('test_cardinality_equality', 'dbt_utils')(model, column_name, to, field)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_cardinality_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.010647, "supported_languages": null}, "macro.dbt_utils.default__test_cardinality_equality": {"name": "default__test_cardinality_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "unique_id": "macro.dbt_utils.default__test_cardinality_equality", "macro_sql": "{% macro default__test_cardinality_equality(model, column_name, to, field) %}\n\n{# T-SQL does not let you use numbers as aliases for columns #}\n{# Thus, no \"GROUP BY 1\" #}\n\nwith table_a as (\nselect\n {{ column_name }},\n count(*) as num_rows\nfrom {{ model }}\ngroup by {{ column_name }}\n),\n\ntable_b as (\nselect\n {{ field }},\n count(*) as num_rows\nfrom {{ to }}\ngroup by {{ field }}\n),\n\nexcept_a as (\n select *\n from table_a\n {{ dbt.except() }}\n select *\n from table_b\n),\n\nexcept_b as (\n select *\n from table_b\n {{ dbt.except() }}\n select *\n from table_a\n),\n\nunioned as (\n select *\n from except_a\n union all\n select *\n from except_b\n)\n\nselect *\nfrom unioned\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.010999, "supported_languages": null}, "macro.dbt_utils.test_expression_is_true": {"name": "test_expression_is_true", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "unique_id": "macro.dbt_utils.test_expression_is_true", "macro_sql": "{% test expression_is_true(model, expression, column_name=None) %}\n {{ return(adapter.dispatch('test_expression_is_true', 'dbt_utils')(model, expression, column_name)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.011411, "supported_languages": null}, "macro.dbt_utils.default__test_expression_is_true": {"name": "default__test_expression_is_true", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "unique_id": "macro.dbt_utils.default__test_expression_is_true", "macro_sql": "{% macro default__test_expression_is_true(model, expression, column_name) %}\n\n{% set column_list = '*' if should_store_failures() else \"1\" %}\n\nselect\n {{ column_list }}\nfrom {{ model }}\n{% if column_name is none %}\nwhere not({{ expression }})\n{%- else %}\nwhere not({{ column_name }} {{ expression }})\n{%- endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.011843, "supported_languages": null}, "macro.dbt_utils.test_not_null_proportion": {"name": "test_not_null_proportion", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "unique_id": "macro.dbt_utils.test_not_null_proportion", "macro_sql": "{% macro test_not_null_proportion(model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_not_null_proportion', 'dbt_utils')(model, group_by_columns, **kwargs)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_proportion"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0125241, "supported_languages": null}, "macro.dbt_utils.default__test_not_null_proportion": {"name": "default__test_not_null_proportion", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "unique_id": "macro.dbt_utils.default__test_not_null_proportion", "macro_sql": "{% macro default__test_not_null_proportion(model, group_by_columns) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}\n{% set at_least = kwargs.get('at_least', kwargs.get('arg')) %}\n{% set at_most = kwargs.get('at_most', kwargs.get('arg', 1)) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\nwith validation as (\n select\n {{select_gb_cols}}\n sum(case when {{ column_name }} is null then 0 else 1 end) / cast(count(*) as numeric) as not_null_proportion\n from {{ model }}\n {{groupby_gb_cols}}\n),\nvalidation_errors as (\n select\n {{select_gb_cols}}\n not_null_proportion\n from validation\n where not_null_proportion < {{ at_least }} or not_null_proportion > {{ at_most }}\n)\nselect\n *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0133939, "supported_languages": null}, "macro.dbt_utils.test_sequential_values": {"name": "test_sequential_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "unique_id": "macro.dbt_utils.test_sequential_values", "macro_sql": "{% test sequential_values(model, column_name, interval=1, datepart=None, group_by_columns = []) %}\n\n {{ return(adapter.dispatch('test_sequential_values', 'dbt_utils')(model, column_name, interval, datepart, group_by_columns)) }}\n\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_sequential_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.014357, "supported_languages": null}, "macro.dbt_utils.default__test_sequential_values": {"name": "default__test_sequential_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "unique_id": "macro.dbt_utils.default__test_sequential_values", "macro_sql": "{% macro default__test_sequential_values(model, column_name, interval=1, datepart=None, group_by_columns = []) %}\n\n{% set previous_column_name = \"previous_\" ~ dbt_utils.slugify(column_name) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(',') + ', ' %}\n {% set partition_gb_cols = 'partition by ' + group_by_columns|join(',') %}\n{% endif %}\n\nwith windowed as (\n\n select\n {{ select_gb_cols }}\n {{ column_name }},\n lag({{ column_name }}) over (\n {{partition_gb_cols}}\n order by {{ column_name }}\n ) as {{ previous_column_name }}\n from {{ model }}\n),\n\nvalidation_errors as (\n select\n *\n from windowed\n {% if datepart %}\n where not(cast({{ column_name }} as {{ dbt.type_timestamp() }})= cast({{ dbt.dateadd(datepart, interval, previous_column_name) }} as {{ dbt.type_timestamp() }}))\n {% else %}\n where not({{ column_name }} = {{ previous_column_name }} + {{ interval }})\n {% endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.slugify", "macro.dbt.type_timestamp", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.015358, "supported_languages": null}, "macro.dbt_utils.test_equality": {"name": "test_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "unique_id": "macro.dbt_utils.test_equality", "macro_sql": "{% test equality(model, compare_model, compare_columns=None) %}\n {{ return(adapter.dispatch('test_equality', 'dbt_utils')(model, compare_model, compare_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.016126, "supported_languages": null}, "macro.dbt_utils.default__test_equality": {"name": "default__test_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "unique_id": "macro.dbt_utils.default__test_equality", "macro_sql": "{% macro default__test_equality(model, compare_model, compare_columns=None) %}\n\n{% set set_diff %}\n count(*) + coalesce(abs(\n sum(case when which_diff = 'a_minus_b' then 1 else 0 end) -\n sum(case when which_diff = 'b_minus_a' then 1 else 0 end)\n ), 0)\n{% endset %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = set_diff) }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\n-- setup\n{%- do dbt_utils._is_relation(model, 'test_equality') -%}\n\n{#-\nIf the compare_cols arg is provided, we can run this test without querying the\ninformation schema\u00a0\u2014 this allows the model to be an ephemeral model\n-#}\n\n{%- if not compare_columns -%}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set compare_columns = adapter.get_columns_in_relation(model) | map(attribute='quoted') -%}\n{%- endif -%}\n\n{% set compare_cols_csv = compare_columns | join(', ') %}\n\nwith a as (\n\n select * from {{ model }}\n\n),\n\nb as (\n\n select * from {{ compare_model }}\n\n),\n\na_minus_b as (\n\n select {{compare_cols_csv}} from a\n {{ dbt.except() }}\n select {{compare_cols_csv}} from b\n\n),\n\nb_minus_a as (\n\n select {{compare_cols_csv}} from b\n {{ dbt.except() }}\n select {{compare_cols_csv}} from a\n\n),\n\nunioned as (\n\n select 'a_minus_b' as which_diff, a_minus_b.* from a_minus_b\n union all\n select 'b_minus_a' as which_diff, b_minus_a.* from b_minus_a\n\n)\n\nselect * from unioned\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.017083, "supported_languages": null}, "macro.dbt_utils.test_not_empty_string": {"name": "test_not_empty_string", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "unique_id": "macro.dbt_utils.test_not_empty_string", "macro_sql": "{% test not_empty_string(model, column_name, trim_whitespace=true) %}\n\n {{ return(adapter.dispatch('test_not_empty_string', 'dbt_utils')(model, column_name, trim_whitespace)) }}\n\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_empty_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.017664, "supported_languages": null}, "macro.dbt_utils.default__test_not_empty_string": {"name": "default__test_not_empty_string", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "unique_id": "macro.dbt_utils.default__test_not_empty_string", "macro_sql": "{% macro default__test_not_empty_string(model, column_name, trim_whitespace=true) %}\n\n with\n \n all_values as (\n\n select \n\n\n {% if trim_whitespace == true -%}\n\n trim({{ column_name }}) as {{ column_name }}\n\n {%- else -%}\n\n {{ column_name }}\n\n {%- endif %}\n \n from {{ model }}\n\n ),\n\n errors as (\n\n select * from all_values\n where {{ column_name }} = ''\n\n )\n\n select * from errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.017982, "supported_languages": null}, "macro.dbt_utils.test_mutually_exclusive_ranges": {"name": "test_mutually_exclusive_ranges", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "unique_id": "macro.dbt_utils.test_mutually_exclusive_ranges", "macro_sql": "{% test mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n {{ return(adapter.dispatch('test_mutually_exclusive_ranges', 'dbt_utils')(model, lower_bound_column, upper_bound_column, partition_by, gaps, zero_length_range_allowed)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_mutually_exclusive_ranges"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.021554, "supported_languages": null}, "macro.dbt_utils.default__test_mutually_exclusive_ranges": {"name": "default__test_mutually_exclusive_ranges", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "unique_id": "macro.dbt_utils.default__test_mutually_exclusive_ranges", "macro_sql": "{% macro default__test_mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n{% if gaps == 'not_allowed' %}\n {% set allow_gaps_operator='=' %}\n {% set allow_gaps_operator_in_words='equal_to' %}\n{% elif gaps == 'allowed' %}\n {% set allow_gaps_operator='<=' %}\n {% set allow_gaps_operator_in_words='less_than_or_equal_to' %}\n{% elif gaps == 'required' %}\n {% set allow_gaps_operator='<' %}\n {% set allow_gaps_operator_in_words='less_than' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`gaps` argument for mutually_exclusive_ranges test must be one of ['not_allowed', 'allowed', 'required'] Got: '\" ~ gaps ~\"'.'\"\n ) }}\n{% endif %}\n{% if not zero_length_range_allowed %}\n {% set allow_zero_length_operator='<' %}\n {% set allow_zero_length_operator_in_words='less_than' %}\n{% elif zero_length_range_allowed %}\n {% set allow_zero_length_operator='<=' %}\n {% set allow_zero_length_operator_in_words='less_than_or_equal_to' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`zero_length_range_allowed` argument for mutually_exclusive_ranges test must be one of [true, false] Got: '\" ~ zero_length_range_allowed ~\"'.'\"\n ) }}\n{% endif %}\n\n{% set partition_clause=\"partition by \" ~ partition_by if partition_by else '' %}\n\nwith window_functions as (\n\n select\n {% if partition_by %}\n {{ partition_by }} as partition_by_col,\n {% endif %}\n {{ lower_bound_column }} as lower_bound,\n {{ upper_bound_column }} as upper_bound,\n\n lead({{ lower_bound_column }}) over (\n {{ partition_clause }}\n order by {{ lower_bound_column }}, {{ upper_bound_column }}\n ) as next_lower_bound,\n\n row_number() over (\n {{ partition_clause }}\n order by {{ lower_bound_column }} desc, {{ upper_bound_column }} desc\n ) = 1 as is_last_record\n\n from {{ model }}\n\n),\n\ncalc as (\n -- We want to return records where one of our assumptions fails, so we'll use\n -- the `not` function with `and` statements so we can write our assumptions more cleanly\n select\n *,\n\n -- For each record: lower_bound should be < upper_bound.\n -- Coalesce it to return an error on the null case (implicit assumption\n -- these columns are not_null)\n coalesce(\n lower_bound {{ allow_zero_length_operator }} upper_bound,\n false\n ) as lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound,\n\n -- For each record: upper_bound {{ allow_gaps_operator }} the next lower_bound.\n -- Coalesce it to handle null cases for the last record.\n coalesce(\n upper_bound {{ allow_gaps_operator }} next_lower_bound,\n is_last_record,\n false\n ) as upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n\n from window_functions\n\n),\n\nvalidation_errors as (\n\n select\n *\n from calc\n\n where not(\n -- THE FOLLOWING SHOULD BE TRUE --\n lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound\n and upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n )\n)\n\nselect * from validation_errors\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.023214, "supported_languages": null}, "macro.dbt_utils.pretty_log_format": {"name": "pretty_log_format", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "unique_id": "macro.dbt_utils.pretty_log_format", "macro_sql": "{% macro pretty_log_format(message) %}\n {{ return(adapter.dispatch('pretty_log_format', 'dbt_utils')(message)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.023496, "supported_languages": null}, "macro.dbt_utils.default__pretty_log_format": {"name": "default__pretty_log_format", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "unique_id": "macro.dbt_utils.default__pretty_log_format", "macro_sql": "{% macro default__pretty_log_format(message) %}\n {{ return( dbt_utils.pretty_time() ~ ' + ' ~ message) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.023665, "supported_languages": null}, "macro.dbt_utils._is_relation": {"name": "_is_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/_is_relation.sql", "original_file_path": "macros/jinja_helpers/_is_relation.sql", "unique_id": "macro.dbt_utils._is_relation", "macro_sql": "{% macro _is_relation(obj, macro) %}\n {%- if not (obj is mapping and obj.get('metadata', {}).get('type', '').endswith('Relation')) -%}\n {%- do exceptions.raise_compiler_error(\"Macro \" ~ macro ~ \" expected a Relation but received the value: \" ~ obj) -%}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.02412, "supported_languages": null}, "macro.dbt_utils.pretty_time": {"name": "pretty_time", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "unique_id": "macro.dbt_utils.pretty_time", "macro_sql": "{% macro pretty_time(format='%H:%M:%S') %}\n {{ return(adapter.dispatch('pretty_time', 'dbt_utils')(format)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0244029, "supported_languages": null}, "macro.dbt_utils.default__pretty_time": {"name": "default__pretty_time", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "unique_id": "macro.dbt_utils.default__pretty_time", "macro_sql": "{% macro default__pretty_time(format='%H:%M:%S') %}\n {{ return(modules.datetime.datetime.now().strftime(format)) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0246038, "supported_languages": null}, "macro.dbt_utils.log_info": {"name": "log_info", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "unique_id": "macro.dbt_utils.log_info", "macro_sql": "{% macro log_info(message) %}\n {{ return(adapter.dispatch('log_info', 'dbt_utils')(message)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__log_info"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0248709, "supported_languages": null}, "macro.dbt_utils.default__log_info": {"name": "default__log_info", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "unique_id": "macro.dbt_utils.default__log_info", "macro_sql": "{% macro default__log_info(message) %}\n {{ log(dbt_utils.pretty_log_format(message), info=True) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.025045, "supported_languages": null}, "macro.dbt_utils.slugify": {"name": "slugify", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/slugify.sql", "original_file_path": "macros/jinja_helpers/slugify.sql", "unique_id": "macro.dbt_utils.slugify", "macro_sql": "{% macro slugify(string) %}\n\n{#- Lower case the string -#}\n{% set string = string | lower %}\n{#- Replace spaces and dashes with underscores -#}\n{% set string = modules.re.sub('[ -]+', '_', string) %}\n{#- Only take letters, numbers, and underscores -#}\n{% set string = modules.re.sub('[^a-z0-9_]+', '', string) %}\n{#- Prepends \"_\" if string begins with a number -#}\n{% set string = modules.re.sub('^[0-9]', '_' + string[0], string) %}\n\n{{ return(string) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.025669, "supported_languages": null}, "macro.dbt_utils._is_ephemeral": {"name": "_is_ephemeral", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/_is_ephemeral.sql", "original_file_path": "macros/jinja_helpers/_is_ephemeral.sql", "unique_id": "macro.dbt_utils._is_ephemeral", "macro_sql": "{% macro _is_ephemeral(obj, macro) %}\n {%- if obj.is_cte -%}\n {% set ephemeral_prefix = api.Relation.add_ephemeral_prefix('') %}\n {% if obj.name.startswith(ephemeral_prefix) %}\n {% set model_name = obj.name[(ephemeral_prefix|length):] %}\n {% else %}\n {% set model_name = obj.name %}\n {%- endif -%}\n {% set error_message %}\nThe `{{ macro }}` macro cannot be used with ephemeral models, as it relies on the information schema.\n\n`{{ model_name }}` is an ephemeral model. Consider making it a view or table instead.\n {% endset %}\n {%- do exceptions.raise_compiler_error(error_message) -%}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0265238, "supported_languages": null}, "macro.dbt_utils.get_intervals_between": {"name": "get_intervals_between", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('get_intervals_between', 'dbt_utils')(start_date, end_date, datepart)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.027246, "supported_languages": null}, "macro.dbt_utils.default__get_intervals_between": {"name": "default__get_intervals_between", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.default__get_intervals_between", "macro_sql": "{% macro default__get_intervals_between(start_date, end_date, datepart) -%}\n {%- call statement('get_intervals_between', fetch_result=True) %}\n\n select {{ dbt.datediff(start_date, end_date, datepart) }}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_intervals_between') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values[0]) }}\n {%- else -%}\n {{ return(1) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.027853, "supported_languages": null}, "macro.dbt_utils.date_spine": {"name": "date_spine", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('date_spine', 'dbt_utils')(datepart, start_date, end_date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0280929, "supported_languages": null}, "macro.dbt_utils.default__date_spine": {"name": "default__date_spine", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n\n{# call as follows:\n\ndate_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dbt.dateadd(week, 1, current_date)\"\n) #}\n\n\nwith rawdata as (\n\n {{dbt_utils.generate_series(\n dbt_utils.get_intervals_between(start_date, end_date, datepart)\n )}}\n\n),\n\nall_periods as (\n\n select (\n {{\n dbt.dateadd(\n datepart,\n \"row_number() over (order by 1) - 1\",\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n)\n\nselect * from filtered\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.generate_series", "macro.dbt_utils.get_intervals_between", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0284648, "supported_languages": null}, "macro.dbt_utils.safe_subtract": {"name": "safe_subtract", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_subtract.sql", "original_file_path": "macros/sql/safe_subtract.sql", "unique_id": "macro.dbt_utils.safe_subtract", "macro_sql": "{%- macro safe_subtract(field_list) -%}\n {{ return(adapter.dispatch('safe_subtract', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_subtract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.028862, "supported_languages": null}, "macro.dbt_utils.default__safe_subtract": {"name": "default__safe_subtract", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_subtract.sql", "original_file_path": "macros/sql/safe_subtract.sql", "unique_id": "macro.dbt_utils.default__safe_subtract", "macro_sql": "\n\n{%- macro default__safe_subtract(field_list) -%}\n\n{%- if field_list is not iterable or field_list is string or field_list is mapping -%}\n\n{%- set error_message = '\nWarning: the `safe_subtract` macro takes a single list argument instead of \\\nstring arguments. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.raise_compiler_error(error_message) -%}\n\n{%- endif -%}\n\n{% set fields = [] %}\n\n{%- for field in field_list -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' -\\n ') }}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.029417, "supported_languages": null}, "macro.dbt_utils.nullcheck_table": {"name": "nullcheck_table", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "unique_id": "macro.dbt_utils.nullcheck_table", "macro_sql": "{% macro nullcheck_table(relation) %}\n {{ return(adapter.dispatch('nullcheck_table', 'dbt_utils')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.02974, "supported_languages": null}, "macro.dbt_utils.default__nullcheck_table": {"name": "default__nullcheck_table", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "unique_id": "macro.dbt_utils.default__nullcheck_table", "macro_sql": "{% macro default__nullcheck_table(relation) %}\n\n {%- do dbt_utils._is_relation(relation, 'nullcheck_table') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'nullcheck_table') -%}\n {% set cols = adapter.get_columns_in_relation(relation) %}\n\n select {{ dbt_utils.nullcheck(cols) }}\n from {{relation}}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.030097, "supported_languages": null}, "macro.dbt_utils.get_relations_by_pattern": {"name": "get_relations_by_pattern", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "unique_id": "macro.dbt_utils.get_relations_by_pattern", "macro_sql": "{% macro get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_pattern', 'dbt_utils')(schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0308108, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_pattern": {"name": "default__get_relations_by_pattern", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "unique_id": "macro.dbt_utils.default__get_relations_by_pattern", "macro_sql": "{% macro default__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.031764, "supported_languages": null}, "macro.dbt_utils.get_powers_of_two": {"name": "get_powers_of_two", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('get_powers_of_two', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.032639, "supported_languages": null}, "macro.dbt_utils.default__get_powers_of_two": {"name": "default__get_powers_of_two", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.default__get_powers_of_two", "macro_sql": "{% macro default__get_powers_of_two(upper_bound) %}\n\n {% if upper_bound <= 0 %}\n {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n {% endif %}\n\n {% for _ in range(1, 100) %}\n {% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.033066, "supported_languages": null}, "macro.dbt_utils.generate_series": {"name": "generate_series", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.033262, "supported_languages": null}, "macro.dbt_utils.default__generate_series": {"name": "default__generate_series", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.default__generate_series", "macro_sql": "{% macro default__generate_series(upper_bound) %}\n\n {% set n = dbt_utils.get_powers_of_two(upper_bound) %}\n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n {% for i in range(n) %}\n p{{i}}.generated_number * power(2, {{i}})\n {% if not loop.last %} + {% endif %}\n {% endfor %}\n + 1\n as generated_number\n\n from\n\n {% for i in range(n) %}\n p as p{{i}}\n {% if not loop.last %} cross join {% endif %}\n {% endfor %}\n\n )\n\n select *\n from unioned\n where generated_number <= {{upper_bound}}\n order by generated_number\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.033795, "supported_languages": null}, "macro.dbt_utils.get_relations_by_prefix": {"name": "get_relations_by_prefix", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "unique_id": "macro.dbt_utils.get_relations_by_prefix", "macro_sql": "{% macro get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_prefix', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0345101, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_prefix": {"name": "default__get_relations_by_prefix", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "unique_id": "macro.dbt_utils.default__get_relations_by_prefix", "macro_sql": "{% macro default__get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_prefix_sql(schema, prefix, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.035433, "supported_languages": null}, "macro.dbt_utils.get_tables_by_prefix_sql": {"name": "get_tables_by_prefix_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "unique_id": "macro.dbt_utils.get_tables_by_prefix_sql", "macro_sql": "{% macro get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_prefix_sql', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.035916, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_prefix_sql": {"name": "default__get_tables_by_prefix_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "unique_id": "macro.dbt_utils.default__get_tables_by_prefix_sql", "macro_sql": "{% macro default__get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(\n schema_pattern = schema,\n table_pattern = prefix ~ '%',\n exclude = exclude,\n database = database\n ) }}\n \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.036233, "supported_languages": null}, "macro.dbt_utils.star": {"name": "star", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "unique_id": "macro.dbt_utils.star", "macro_sql": "{% macro star(from, relation_alias=False, except=[], prefix='', suffix='', quote_identifiers=True) -%}\r\n {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix, quote_identifiers)) }}\r\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.037611, "supported_languages": null}, "macro.dbt_utils.default__star": {"name": "default__star", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "unique_id": "macro.dbt_utils.default__star", "macro_sql": "{% macro default__star(from, relation_alias=False, except=[], prefix='', suffix='', quote_identifiers=True) -%}\r\n {%- do dbt_utils._is_relation(from, 'star') -%}\r\n {%- do dbt_utils._is_ephemeral(from, 'star') -%}\r\n\r\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\r\n {%- if not execute -%}\r\n {% do return('*') %}\r\n {%- endif -%}\r\n\r\n {% set cols = dbt_utils.get_filtered_columns_in_relation(from, except) %}\r\n\r\n {%- if cols|length <= 0 -%}\r\n {% if flags.WHICH == 'compile' %}\r\n {% set response %}\r\n*\r\n/* No columns were returned. Maybe the relation doesn't exist yet \r\nor all columns were excluded. This star is only output during \r\ndbt compile, and exists to keep SQLFluff happy. */\r\n {% endset %}\r\n {% do return(response) %}\r\n {% else %}\r\n {% do return(\"/* no columns returned from star() macro */\") %}\r\n {% endif %}\r\n {%- else -%}\r\n {%- for col in cols %}\r\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}\r\n {%- if quote_identifiers -%}\r\n {{ adapter.quote(col)|trim }} {%- if prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }} {%- endif -%}\r\n {%- else -%}\r\n {{ col|trim }} {%- if prefix!='' or suffix!='' %} as {{ (prefix ~ col ~ suffix)|trim }} {%- endif -%}\r\n {% endif %}\r\n {%- if not loop.last %},{{ '\\n ' }}{%- endif -%}\r\n {%- endfor -%}\r\n {% endif %}\r\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.03909, "supported_languages": null}, "macro.dbt_utils.unpivot": {"name": "unpivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "unique_id": "macro.dbt_utils.unpivot", "macro_sql": "{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value') -%}\n {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.040523, "supported_languages": null}, "macro.dbt_utils.default__unpivot": {"name": "default__unpivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "unique_id": "macro.dbt_utils.default__unpivot", "macro_sql": "{% macro default__unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value') -%}\n\n {% if not relation %}\n {{ exceptions.raise_compiler_error(\"Error: argument `relation` is required for `unpivot` macro.\") }}\n {% endif %}\n\n {%- set exclude = exclude if exclude is not none else [] %}\n {%- set remove = remove if remove is not none else [] %}\n\n {%- set include_cols = [] %}\n\n {%- set table_columns = {} %}\n\n {%- do table_columns.update({relation: []}) %}\n\n {%- do dbt_utils._is_relation(relation, 'unpivot') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'unpivot') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) %}\n\n {%- for col in cols -%}\n {%- if col.column.lower() not in remove|map('lower') and col.column.lower() not in exclude|map('lower') -%}\n {% do include_cols.append(col) %}\n {%- endif %}\n {%- endfor %}\n\n\n {%- for col in include_cols -%}\n select\n {%- for exclude_col in exclude %}\n {{ exclude_col }},\n {%- endfor %}\n\n cast('{{ col.column }}' as {{ dbt.type_string() }}) as {{ field_name }},\n cast( {% if col.data_type == 'boolean' %}\n {{ dbt.cast_bool_to_text(col.column) }}\n {% else %}\n {{ col.column }}\n {% endif %}\n as {{ cast_to }}) as {{ value_name }}\n\n from {{ relation }}\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n {%- endfor -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.type_string", "macro.dbt.cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0422442, "supported_languages": null}, "macro.dbt_utils.safe_divide": {"name": "safe_divide", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_divide.sql", "original_file_path": "macros/sql/safe_divide.sql", "unique_id": "macro.dbt_utils.safe_divide", "macro_sql": "{% macro safe_divide(numerator, denominator) -%}\n {{ return(adapter.dispatch('safe_divide', 'dbt_utils')(numerator, denominator)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_divide"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.042552, "supported_languages": null}, "macro.dbt_utils.default__safe_divide": {"name": "default__safe_divide", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_divide.sql", "original_file_path": "macros/sql/safe_divide.sql", "unique_id": "macro.dbt_utils.default__safe_divide", "macro_sql": "{% macro default__safe_divide(numerator, denominator) %}\n ( {{ numerator }} ) / nullif( ( {{ denominator }} ), 0)\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.042691, "supported_languages": null}, "macro.dbt_utils.union_relations": {"name": "union_relations", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "unique_id": "macro.dbt_utils.union_relations", "macro_sql": "{%- macro union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n {{ return(adapter.dispatch('union_relations', 'dbt_utils')(relations, column_override, include, exclude, source_column_name, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.046148, "supported_languages": null}, "macro.dbt_utils.default__union_relations": {"name": "default__union_relations", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "unique_id": "macro.dbt_utils.default__union_relations", "macro_sql": "\n\n{%- macro default__union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n {%- set all_excludes = [] -%}\n {%- set all_includes = [] -%}\n\n {%- if exclude -%}\n {%- for exc in exclude -%}\n {%- do all_excludes.append(exc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- if include -%}\n {%- for inc in include -%}\n {%- do all_includes.append(inc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'union_relations') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column | lower in all_excludes -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column | lower not in all_includes -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n {%- set dbt_command = flags.WHICH -%}\n\n\n {% if dbt_command in ['run', 'build'] %}\n {% if (include | length > 0 or exclude | length > 0) and not column_superset.keys() %}\n {%- set relations_string -%}\n {%- for relation in relations -%}\n {{ relation.name }}\n {%- if not loop.last %}, {% endif -%}\n {%- endfor -%}\n {%- endset -%}\n\n {%- set error_message -%}\n There were no columns found to union for relations {{ relations_string }}\n {%- endset -%}\n\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n {%- endif -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n {%- if source_column_name is not none %}\n cast({{ dbt.string_literal(relation) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {%- endif %}\n\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ relation }}\n\n {% if where -%}\n where {{ where }}\n {%- endif %}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0497038, "supported_languages": null}, "macro.dbt_utils.group_by": {"name": "group_by", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "unique_id": "macro.dbt_utils.group_by", "macro_sql": "{%- macro group_by(n) -%}\n {{ return(adapter.dispatch('group_by', 'dbt_utils')(n)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__group_by"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.05002, "supported_languages": null}, "macro.dbt_utils.default__group_by": {"name": "default__group_by", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "unique_id": "macro.dbt_utils.default__group_by", "macro_sql": "\n\n{%- macro default__group_by(n) -%}\n\n group by {% for i in range(1, n + 1) -%}\n {{ i }}{{ ',' if not loop.last }} \n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.050281, "supported_languages": null}, "macro.dbt_utils.deduplicate": {"name": "deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.deduplicate", "macro_sql": "{%- macro deduplicate(relation, partition_by, order_by) -%}\n {{ return(adapter.dispatch('deduplicate', 'dbt_utils')(relation, partition_by, order_by)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.redshift__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.051044, "supported_languages": null}, "macro.dbt_utils.default__deduplicate": {"name": "default__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.default__deduplicate", "macro_sql": "\n\n{%- macro default__deduplicate(relation, partition_by, order_by) -%}\n\n with row_numbered as (\n select\n _inner.*,\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) as rn\n from {{ relation }} as _inner\n )\n\n select\n distinct data.*\n from {{ relation }} as data\n {#\n -- Not all DBs will support natural joins but the ones that do include:\n -- Oracle, MySQL, SQLite, Redshift, Teradata, Materialize, Databricks\n -- Apache Spark, SingleStore, Vertica\n -- Those that do not appear to support natural joins include:\n -- SQLServer, Trino, Presto, Rockset, Athena\n #}\n natural join row_numbered\n where row_numbered.rn = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.051269, "supported_languages": null}, "macro.dbt_utils.redshift__deduplicate": {"name": "redshift__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.redshift__deduplicate", "macro_sql": "{% macro redshift__deduplicate(relation, partition_by, order_by) -%}\n\n {{ return(dbt_utils.default__deduplicate(relation, partition_by, order_by=order_by)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.051483, "supported_languages": null}, "macro.dbt_utils.postgres__deduplicate": {"name": "postgres__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.postgres__deduplicate", "macro_sql": "\n{%- macro postgres__deduplicate(relation, partition_by, order_by) -%}\n\n select\n distinct on ({{ partition_by }}) *\n from {{ relation }}\n order by {{ partition_by }}{{ ',' ~ order_by }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0516832, "supported_languages": null}, "macro.dbt_utils.snowflake__deduplicate": {"name": "snowflake__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.snowflake__deduplicate", "macro_sql": "\n{%- macro snowflake__deduplicate(relation, partition_by, order_by) -%}\n\n select *\n from {{ relation }}\n qualify\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.051852, "supported_languages": null}, "macro.dbt_utils.bigquery__deduplicate": {"name": "bigquery__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.bigquery__deduplicate", "macro_sql": "\n{%- macro bigquery__deduplicate(relation, partition_by, order_by) -%}\n\n select unique.*\n from (\n select\n array_agg (\n original\n order by {{ order_by }}\n limit 1\n )[offset(0)] unique\n from {{ relation }} original\n group by {{ partition_by }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.052027, "supported_languages": null}, "macro.dbt_utils.surrogate_key": {"name": "surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "unique_id": "macro.dbt_utils.surrogate_key", "macro_sql": "{%- macro surrogate_key(field_list) -%}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('surrogate_key', 'dbt_utils')(field_list, *varargs)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.052423, "supported_languages": null}, "macro.dbt_utils.default__surrogate_key": {"name": "default__surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "unique_id": "macro.dbt_utils.default__surrogate_key", "macro_sql": "\n\n{%- macro default__surrogate_key(field_list) -%}\n\n{%- set error_message = '\nWarning: `dbt_utils.surrogate_key` has been replaced by \\\n`dbt_utils.generate_surrogate_key`. The new macro treats null values \\\ndifferently to empty strings. To restore the behaviour of the original \\\nmacro, add a global variable in dbt_project.yml called \\\n`surrogate_key_treat_nulls_as_empty_strings` to your \\\ndbt_project.yml file with a value of True. \\\nThe {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.raise_compiler_error(error_message) -%}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.052664, "supported_languages": null}, "macro.dbt_utils.safe_add": {"name": "safe_add", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "unique_id": "macro.dbt_utils.safe_add", "macro_sql": "{%- macro safe_add(field_list) -%}\n {{ return(adapter.dispatch('safe_add', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.053055, "supported_languages": null}, "macro.dbt_utils.default__safe_add": {"name": "default__safe_add", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "unique_id": "macro.dbt_utils.default__safe_add", "macro_sql": "\n\n{%- macro default__safe_add(field_list) -%}\n\n{%- if field_list is not iterable or field_list is string or field_list is mapping -%}\n\n{%- set error_message = '\nWarning: the `safe_add` macro now takes a single list argument instead of \\\nstring arguments. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.warn(error_message) -%}\n\n{%- endif -%}\n\n{% set fields = [] %}\n\n{%- for field in field_list -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' +\\n ') }}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.053613, "supported_languages": null}, "macro.dbt_utils.nullcheck": {"name": "nullcheck", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "unique_id": "macro.dbt_utils.nullcheck", "macro_sql": "{% macro nullcheck(cols) %}\n {{ return(adapter.dispatch('nullcheck', 'dbt_utils')(cols)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.053962, "supported_languages": null}, "macro.dbt_utils.default__nullcheck": {"name": "default__nullcheck", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "unique_id": "macro.dbt_utils.default__nullcheck", "macro_sql": "{% macro default__nullcheck(cols) %}\n{%- for col in cols %}\n\n {% if col.is_string() -%}\n\n nullif({{col.name}},'') as {{col.name}}\n\n {%- else -%}\n\n {{col.name}}\n\n {%- endif -%}\n\n{%- if not loop.last -%} , {%- endif -%}\n\n{%- endfor -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.054307, "supported_languages": null}, "macro.dbt_utils.get_tables_by_pattern_sql": {"name": "get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.get_tables_by_pattern_sql", "macro_sql": "{% macro get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_pattern_sql', 'dbt_utils')\n (schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.056149, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_pattern_sql": {"name": "default__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.default__get_tables_by_pattern_sql", "macro_sql": "{% macro default__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n select distinct\n table_schema as {{ adapter.quote('table_schema') }},\n table_name as {{ adapter.quote('table_name') }},\n {{ dbt_utils.get_table_types_sql() }}\n from {{ database }}.information_schema.tables\n where table_schema ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.056523, "supported_languages": null}, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": {"name": "bigquery__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.bigquery__get_tables_by_pattern_sql", "macro_sql": "{% macro bigquery__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {% if '%' in schema_pattern %}\n {% set schemata=dbt_utils._bigquery__get_matching_schemata(schema_pattern, database) %}\n {% else %}\n {% set schemata=[schema_pattern] %}\n {% endif %}\n\n {% set sql %}\n {% for schema in schemata %}\n select distinct\n table_schema,\n table_name,\n {{ dbt_utils.get_table_types_sql() }}\n\n from {{ adapter.quote(database) }}.{{ schema }}.INFORMATION_SCHEMA.TABLES\n where lower(table_name) like lower ('{{ table_pattern }}')\n and lower(table_name) not like lower ('{{ exclude }}')\n\n {% if not loop.last %} union all {% endif %}\n\n {% endfor %}\n {% endset %}\n\n {{ return(sql) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._bigquery__get_matching_schemata", "macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.057318, "supported_languages": null}, "macro.dbt_utils._bigquery__get_matching_schemata": {"name": "_bigquery__get_matching_schemata", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils._bigquery__get_matching_schemata", "macro_sql": "{% macro _bigquery__get_matching_schemata(schema_pattern, database) %}\n {% if execute %}\n\n {% set sql %}\n select schema_name from {{ adapter.quote(database) }}.INFORMATION_SCHEMA.SCHEMATA\n where lower(schema_name) like lower('{{ schema_pattern }}')\n {% endset %}\n\n {% set results=run_query(sql) %}\n\n {% set schemata=results.columns['schema_name'].values() %}\n\n {{ return(schemata) }}\n\n {% else %}\n\n {{ return([]) }}\n\n {% endif %}\n\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.05784, "supported_languages": null}, "macro.dbt_utils.get_column_values": {"name": "get_column_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "unique_id": "macro.dbt_utils.get_column_values", "macro_sql": "{% macro get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none, where=none) -%}\n {{ return(adapter.dispatch('get_column_values', 'dbt_utils')(table, column, order_by, max_records, default, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_column_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.05902, "supported_languages": null}, "macro.dbt_utils.default__get_column_values": {"name": "default__get_column_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "unique_id": "macro.dbt_utils.default__get_column_values", "macro_sql": "{% macro default__get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none, where=none) -%}\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {% set default = [] if not default %}\n {{ return(default) }}\n {% endif %}\n\n {%- do dbt_utils._is_ephemeral(table, 'get_column_values') -%}\n\n {# Not all relations are tables. Renaming for internal clarity without breaking functionality for anyone using named arguments #}\n {# TODO: Change the method signature in a future 0.x.0 release #}\n {%- set target_relation = table -%}\n\n {# adapter.load_relation is a convenience wrapper to avoid building a Relation when we already have one #}\n {% set relation_exists = (load_relation(target_relation)) is not none %}\n\n {%- call statement('get_column_values', fetch_result=true) %}\n\n {%- if not relation_exists and default is none -%}\n\n {{ exceptions.raise_compiler_error(\"In get_column_values(): relation \" ~ target_relation ~ \" does not exist and no default value was provided.\") }}\n\n {%- elif not relation_exists and default is not none -%}\n\n {{ log(\"Relation \" ~ target_relation ~ \" does not exist. Returning the default value: \" ~ default) }}\n\n {{ return(default) }}\n\n {%- else -%}\n\n\n select\n {{ column }} as value\n\n from {{ target_relation }}\n\n {% if where is not none %}\n where {{ where }}\n {% endif %}\n\n group by {{ column }}\n order by {{ order_by }}\n\n {% if max_records is not none %}\n limit {{ max_records }}\n {% endif %}\n\n {% endif %}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_column_values') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values) }}\n {%- else -%}\n {{ return(default) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_ephemeral", "macro.dbt.load_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.060559, "supported_languages": null}, "macro.dbt_utils.pivot": {"name": "pivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "unique_id": "macro.dbt_utils.pivot", "macro_sql": "{% macro pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {{ return(adapter.dispatch('pivot', 'dbt_utils')(column, values, alias, agg, cmp, prefix, suffix, then_value, else_value, quote_identifiers, distinct)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.06165, "supported_languages": null}, "macro.dbt_utils.default__pivot": {"name": "default__pivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "unique_id": "macro.dbt_utils.default__pivot", "macro_sql": "{% macro default__pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {% for value in values %}\n {{ agg }}(\n {% if distinct %} distinct {% endif %}\n case\n when {{ column }} {{ cmp }} '{{ dbt.escape_single_quotes(value) }}'\n then {{ then_value }}\n else {{ else_value }}\n end\n )\n {% if alias %}\n {% if quote_identifiers %}\n as {{ adapter.quote(prefix ~ value ~ suffix) }}\n {% else %}\n as {{ dbt_utils.slugify(prefix ~ value ~ suffix) }}\n {% endif %}\n {% endif %}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.escape_single_quotes", "macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0625129, "supported_languages": null}, "macro.dbt_utils.get_filtered_columns_in_relation": {"name": "get_filtered_columns_in_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "unique_id": "macro.dbt_utils.get_filtered_columns_in_relation", "macro_sql": "{% macro get_filtered_columns_in_relation(from, except=[]) -%}\n {{ return(adapter.dispatch('get_filtered_columns_in_relation', 'dbt_utils')(from, except)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.062995, "supported_languages": null}, "macro.dbt_utils.default__get_filtered_columns_in_relation": {"name": "default__get_filtered_columns_in_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "unique_id": "macro.dbt_utils.default__get_filtered_columns_in_relation", "macro_sql": "{% macro default__get_filtered_columns_in_relation(from, except=[]) -%}\n {%- do dbt_utils._is_relation(from, 'get_filtered_columns_in_relation') -%}\n {%- do dbt_utils._is_ephemeral(from, 'get_filtered_columns_in_relation') -%}\n\n {# -- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {{ return('') }}\n {% endif %}\n\n {%- set include_cols = [] %}\n {%- set cols = adapter.get_columns_in_relation(from) -%}\n {%- set except = except | map(\"lower\") | list %}\n {%- for col in cols -%}\n {%- if col.column|lower not in except -%}\n {% do include_cols.append(col.column) %}\n {%- endif %}\n {%- endfor %}\n\n {{ return(include_cols) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.063738, "supported_languages": null}, "macro.dbt_utils.width_bucket": {"name": "width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.width_bucket", "macro_sql": "{% macro width_bucket(expr, min_value, max_value, num_buckets) %}\n {{ return(adapter.dispatch('width_bucket', 'dbt_utils') (expr, min_value, max_value, num_buckets)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__width_bucket"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0645351, "supported_languages": null}, "macro.dbt_utils.default__width_bucket": {"name": "default__width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.default__width_bucket", "macro_sql": "{% macro default__width_bucket(expr, min_value, max_value, num_buckets) -%}\n\n {% set bin_size -%}\n (( {{ max_value }} - {{ min_value }} ) / {{ num_buckets }} )\n {%- endset %}\n (\n -- to break ties when the amount is eaxtly at the bucket egde\n case\n when\n mod(\n {{ dbt.safe_cast(expr, dbt.type_numeric() ) }},\n {{ dbt.safe_cast(bin_size, dbt.type_numeric() ) }}\n ) = 0\n then 1\n else 0\n end\n ) +\n -- Anything over max_value goes the N+1 bucket\n least(\n ceil(\n ({{ expr }} - {{ min_value }})/{{ bin_size }}\n ),\n {{ num_buckets }} + 1\n )\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.safe_cast", "macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0650082, "supported_languages": null}, "macro.dbt_utils.snowflake__width_bucket": {"name": "snowflake__width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.snowflake__width_bucket", "macro_sql": "{% macro snowflake__width_bucket(expr, min_value, max_value, num_buckets) %}\n width_bucket({{ expr }}, {{ min_value }}, {{ max_value }}, {{ num_buckets }} )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.065203, "supported_languages": null}, "macro.dbt_utils.get_query_results_as_dict": {"name": "get_query_results_as_dict", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "unique_id": "macro.dbt_utils.get_query_results_as_dict", "macro_sql": "{% macro get_query_results_as_dict(query) %}\n {{ return(adapter.dispatch('get_query_results_as_dict', 'dbt_utils')(query)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_query_results_as_dict"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0656042, "supported_languages": null}, "macro.dbt_utils.default__get_query_results_as_dict": {"name": "default__get_query_results_as_dict", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "unique_id": "macro.dbt_utils.default__get_query_results_as_dict", "macro_sql": "{% macro default__get_query_results_as_dict(query) %}\n\n{# This macro returns a dictionary of the form {column_name: (tuple_of_results)} #}\n\n {%- call statement('get_query_results', fetch_result=True,auto_begin=false) -%}\n\n {{ query }}\n\n {%- endcall -%}\n\n {% set sql_results={} %}\n\n {%- if execute -%}\n {% set sql_results_table = load_result('get_query_results').table.columns %}\n {% for column_name, column in sql_results_table.items() %}\n {% do sql_results.update({column_name: column.values()}) %}\n {% endfor %}\n {%- endif -%}\n\n {{ return(sql_results) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.066208, "supported_languages": null}, "macro.dbt_utils.generate_surrogate_key": {"name": "generate_surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "unique_id": "macro.dbt_utils.generate_surrogate_key", "macro_sql": "{%- macro generate_surrogate_key(field_list) -%}\n {{ return(adapter.dispatch('generate_surrogate_key', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__generate_surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.066684, "supported_languages": null}, "macro.dbt_utils.default__generate_surrogate_key": {"name": "default__generate_surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "unique_id": "macro.dbt_utils.default__generate_surrogate_key", "macro_sql": "\n\n{%- macro default__generate_surrogate_key(field_list) -%}\n\n{%- if var('surrogate_key_treat_nulls_as_empty_strings', False) -%}\n {%- set default_null_value = \"\" -%}\n{%- else -%}\n {%- set default_null_value = '_dbt_utils_surrogate_key_null_' -%}\n{%- endif -%}\n\n{%- set fields = [] -%}\n\n{%- for field in field_list -%}\n\n {%- do fields.append(\n \"coalesce(cast(\" ~ field ~ \" as \" ~ dbt.type_string() ~ \"), '\" ~ default_null_value ~\"')\"\n ) -%}\n\n {%- if not loop.last %}\n {%- do fields.append(\"'-'\") -%}\n {%- endif -%}\n\n{%- endfor -%}\n\n{{ dbt.hash(dbt.concat(fields)) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.hash", "macro.dbt.concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.067331, "supported_languages": null}, "macro.dbt_utils.get_table_types_sql": {"name": "get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.get_table_types_sql", "macro_sql": "{%- macro get_table_types_sql() -%}\n {{ return(adapter.dispatch('get_table_types_sql', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_utils.postgres__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.06788, "supported_languages": null}, "macro.dbt_utils.default__get_table_types_sql": {"name": "default__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.default__get_table_types_sql", "macro_sql": "{% macro default__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'EXTERNAL TABLE' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.068026, "supported_languages": null}, "macro.dbt_utils.postgres__get_table_types_sql": {"name": "postgres__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.postgres__get_table_types_sql", "macro_sql": "{% macro postgres__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'FOREIGN' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0681658, "supported_languages": null}, "macro.dbt_utils.databricks__get_table_types_sql": {"name": "databricks__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.databricks__get_table_types_sql", "macro_sql": "{% macro databricks__get_table_types_sql() %}\n case table_type\n when 'MANAGED' then 'table'\n when 'BASE TABLE' then 'table'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0683038, "supported_languages": null}, "macro.dbt_utils.get_single_value": {"name": "get_single_value", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_single_value.sql", "original_file_path": "macros/sql/get_single_value.sql", "unique_id": "macro.dbt_utils.get_single_value", "macro_sql": "{% macro get_single_value(query, default=none) %}\n {{ return(adapter.dispatch('get_single_value', 'dbt_utils')(query, default)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_single_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0688472, "supported_languages": null}, "macro.dbt_utils.default__get_single_value": {"name": "default__get_single_value", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_single_value.sql", "original_file_path": "macros/sql/get_single_value.sql", "unique_id": "macro.dbt_utils.default__get_single_value", "macro_sql": "{% macro default__get_single_value(query, default) %}\n\n{# This macro returns the (0, 0) record in a query, i.e. the first row of the first column #}\n\n {%- call statement('get_query_result', fetch_result=True, auto_begin=false) -%}\n\n {{ query }}\n\n {%- endcall -%}\n\n {%- if execute -%}\n\n {% set r = load_result('get_query_result').table.columns[0].values() %}\n {% if r | length == 0 %}\n {% do print('Query `' ~ query ~ '` returned no rows. Using the default value: ' ~ default) %}\n {% set sql_result = default %}\n {% else %}\n {% set sql_result = r[0] %}\n {% endif %}\n \n {%- else -%}\n \n {% set sql_result = default %}\n \n {%- endif -%}\n\n {% do return(sql_result) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.069664, "supported_languages": null}, "macro.dbt_utils.degrees_to_radians": {"name": "degrees_to_radians", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.degrees_to_radians", "macro_sql": "{% macro degrees_to_radians(degrees) -%}\n acos(-1) * {{degrees}} / 180\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.070786, "supported_languages": null}, "macro.dbt_utils.haversine_distance": {"name": "haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.haversine_distance", "macro_sql": "{% macro haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n {{ return(adapter.dispatch('haversine_distance', 'dbt_utils')(lat1,lon1,lat2,lon2,unit)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__haversine_distance"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.07107, "supported_languages": null}, "macro.dbt_utils.default__haversine_distance": {"name": "default__haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.default__haversine_distance", "macro_sql": "{% macro default__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n\n 2 * 3961 * asin(sqrt(power((sin(radians(({{ lat2 }} - {{ lat1 }}) / 2))), 2) +\n cos(radians({{lat1}})) * cos(radians({{lat2}})) *\n power((sin(radians(({{ lon2 }} - {{ lon1 }}) / 2))), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.071647, "supported_languages": null}, "macro.dbt_utils.bigquery__haversine_distance": {"name": "bigquery__haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.bigquery__haversine_distance", "macro_sql": "{% macro bigquery__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{% set radians_lat1 = dbt_utils.degrees_to_radians(lat1) %}\n{% set radians_lat2 = dbt_utils.degrees_to_radians(lat2) %}\n{% set radians_lon1 = dbt_utils.degrees_to_radians(lon1) %}\n{% set radians_lon2 = dbt_utils.degrees_to_radians(lon2) %}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n 2 * 3961 * asin(sqrt(power(sin(({{ radians_lat2 }} - {{ radians_lat1 }}) / 2), 2) +\n cos({{ radians_lat1 }}) * cos({{ radians_lat2 }}) *\n power(sin(({{ radians_lon2 }} - {{ radians_lon1 }}) / 2), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.degrees_to_radians"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.072466, "supported_languages": null}, "macro.spark_utils.get_tables": {"name": "get_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_tables", "macro_sql": "{% macro get_tables(table_regex_pattern='.*') %}\n\n {% set tables = [] %}\n {% for database in spark__list_schemas('not_used') %}\n {% for table in spark__list_relations_without_caching(database[0]) %}\n {% set db_tablename = database[0] ~ \".\" ~ table[1] %}\n {% set is_match = modules.re.match(table_regex_pattern, db_tablename) %}\n {% if is_match %}\n {% call statement('table_detail', fetch_result=True) -%}\n describe extended {{ db_tablename }}\n {% endcall %}\n\n {% set table_type = load_result('table_detail').table|reverse|selectattr(0, 'in', ('type', 'TYPE', 'Type'))|first %}\n {% if table_type[1]|lower != 'view' %}\n {{ tables.append(db_tablename) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n {% endfor %}\n {{ return(tables) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0780108, "supported_languages": null}, "macro.spark_utils.get_delta_tables": {"name": "get_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_delta_tables", "macro_sql": "{% macro get_delta_tables(table_regex_pattern='.*') %}\n\n {% set delta_tables = [] %}\n {% for db_tablename in get_tables(table_regex_pattern) %}\n {% call statement('table_detail', fetch_result=True) -%}\n describe extended {{ db_tablename }}\n {% endcall %}\n\n {% set table_type = load_result('table_detail').table|reverse|selectattr(0, 'in', ('provider', 'PROVIDER', 'Provider'))|first %}\n {% if table_type[1]|lower == 'delta' %}\n {{ delta_tables.append(db_tablename) }}\n {% endif %}\n {% endfor %}\n {{ return(delta_tables) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_tables", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.078719, "supported_languages": null}, "macro.spark_utils.get_statistic_columns": {"name": "get_statistic_columns", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_statistic_columns", "macro_sql": "{% macro get_statistic_columns(table) %}\n\n {% call statement('input_columns', fetch_result=True) %}\n SHOW COLUMNS IN {{ table }}\n {% endcall %}\n {% set input_columns = load_result('input_columns').table %}\n\n {% set output_columns = [] %}\n {% for column in input_columns %}\n {% call statement('column_information', fetch_result=True) %}\n DESCRIBE TABLE {{ table }} `{{ column[0] }}`\n {% endcall %}\n {% if not load_result('column_information').table[1][1].startswith('struct') and not load_result('column_information').table[1][1].startswith('array') %}\n {{ output_columns.append('`' ~ column[0] ~ '`') }}\n {% endif %}\n {% endfor %}\n {{ return(output_columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.079631, "supported_languages": null}, "macro.spark_utils.spark_optimize_delta_tables": {"name": "spark_optimize_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_optimize_delta_tables", "macro_sql": "{% macro spark_optimize_delta_tables(table_regex_pattern='.*') %}\n\n {% for table in get_delta_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Optimizing \" ~ table) }}\n {% do run_query(\"optimize \" ~ table) %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_delta_tables", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.080383, "supported_languages": null}, "macro.spark_utils.spark_vacuum_delta_tables": {"name": "spark_vacuum_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_vacuum_delta_tables", "macro_sql": "{% macro spark_vacuum_delta_tables(table_regex_pattern='.*') %}\n\n {% for table in get_delta_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Vacuuming \" ~ table) }}\n {% do run_query(\"vacuum \" ~ table) %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_delta_tables", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.081123, "supported_languages": null}, "macro.spark_utils.spark_analyze_tables": {"name": "spark_analyze_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_analyze_tables", "macro_sql": "{% macro spark_analyze_tables(table_regex_pattern='.*') %}\n\n {% for table in get_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set columns = get_statistic_columns(table) | join(',') %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Analyzing \" ~ table) }}\n {% if columns != '' %}\n {% do run_query(\"analyze table \" ~ table ~ \" compute statistics for columns \" ~ columns) %}\n {% endif %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_tables", "macro.spark_utils.get_statistic_columns", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.082102, "supported_languages": null}, "macro.spark_utils.spark__concat": {"name": "spark__concat", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/concat.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/concat.sql", "unique_id": "macro.spark_utils.spark__concat", "macro_sql": "{% macro spark__concat(fields) -%}\n concat({{ fields|join(', ') }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.08228, "supported_languages": null}, "macro.spark_utils.spark__type_numeric": {"name": "spark__type_numeric", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "unique_id": "macro.spark_utils.spark__type_numeric", "macro_sql": "{% macro spark__type_numeric() %}\n decimal(28, 6)\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.082391, "supported_languages": null}, "macro.spark_utils.spark__dateadd": {"name": "spark__dateadd", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "unique_id": "macro.spark_utils.spark__dateadd", "macro_sql": "{% macro spark__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {%- set clock_component -%}\n {# make sure the dates + timestamps are real, otherwise raise an error asap #}\n to_unix_timestamp({{ spark_utils.assert_not_null('to_timestamp', from_date_or_timestamp) }})\n - to_unix_timestamp({{ spark_utils.assert_not_null('date', from_date_or_timestamp) }})\n {%- endset -%}\n\n {%- if datepart in ['day', 'week'] -%}\n \n {%- set multiplier = 7 if datepart == 'week' else 1 -%}\n\n to_timestamp(\n to_unix_timestamp(\n date_add(\n {{ spark_utils.assert_not_null('date', from_date_or_timestamp) }},\n cast({{interval}} * {{multiplier}} as int)\n )\n ) + {{clock_component}}\n )\n\n {%- elif datepart in ['month', 'quarter', 'year'] -%}\n \n {%- set multiplier -%} \n {%- if datepart == 'month' -%} 1\n {%- elif datepart == 'quarter' -%} 3\n {%- elif datepart == 'year' -%} 12\n {%- endif -%}\n {%- endset -%}\n\n to_timestamp(\n to_unix_timestamp(\n add_months(\n {{ spark_utils.assert_not_null('date', from_date_or_timestamp) }},\n cast({{interval}} * {{multiplier}} as int)\n )\n ) + {{clock_component}}\n )\n\n {%- elif datepart in ('hour', 'minute', 'second', 'millisecond', 'microsecond') -%}\n \n {%- set multiplier -%} \n {%- if datepart == 'hour' -%} 3600\n {%- elif datepart == 'minute' -%} 60\n {%- elif datepart == 'second' -%} 1\n {%- elif datepart == 'millisecond' -%} (1/1000000)\n {%- elif datepart == 'microsecond' -%} (1/1000000)\n {%- endif -%}\n {%- endset -%}\n\n to_timestamp(\n {{ spark_utils.assert_not_null('to_unix_timestamp', from_date_or_timestamp) }}\n + cast({{interval}} * {{multiplier}} as int)\n )\n\n {%- else -%}\n\n {{ exceptions.raise_compiler_error(\"macro dateadd not implemented for datepart ~ '\" ~ datepart ~ \"' ~ on Spark\") }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.08538, "supported_languages": null}, "macro.spark_utils.spark__datediff": {"name": "spark__datediff", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/datediff.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datediff.sql", "unique_id": "macro.spark_utils.spark__datediff", "macro_sql": "{% macro spark__datediff(first_date, second_date, datepart) %}\n\n {%- if datepart in ['day', 'week', 'month', 'quarter', 'year'] -%}\n \n {# make sure the dates are real, otherwise raise an error asap #}\n {% set first_date = spark_utils.assert_not_null('date', first_date) %}\n {% set second_date = spark_utils.assert_not_null('date', second_date) %}\n \n {%- endif -%}\n \n {%- if datepart == 'day' -%}\n \n datediff({{second_date}}, {{first_date}})\n \n {%- elif datepart == 'week' -%}\n \n case when {{first_date}} < {{second_date}}\n then floor(datediff({{second_date}}, {{first_date}})/7)\n else ceil(datediff({{second_date}}, {{first_date}})/7)\n end\n \n -- did we cross a week boundary (Sunday)?\n + case\n when {{first_date}} < {{second_date}} and dayofweek({{second_date}}) < dayofweek({{first_date}}) then 1\n when {{first_date}} > {{second_date}} and dayofweek({{second_date}}) > dayofweek({{first_date}}) then -1\n else 0 end\n\n {%- elif datepart == 'month' -%}\n\n case when {{first_date}} < {{second_date}}\n then floor(months_between(date({{second_date}}), date({{first_date}})))\n else ceil(months_between(date({{second_date}}), date({{first_date}})))\n end\n \n -- did we cross a month boundary?\n + case\n when {{first_date}} < {{second_date}} and dayofmonth({{second_date}}) < dayofmonth({{first_date}}) then 1\n when {{first_date}} > {{second_date}} and dayofmonth({{second_date}}) > dayofmonth({{first_date}}) then -1\n else 0 end\n \n {%- elif datepart == 'quarter' -%}\n \n case when {{first_date}} < {{second_date}}\n then floor(months_between(date({{second_date}}), date({{first_date}}))/3)\n else ceil(months_between(date({{second_date}}), date({{first_date}}))/3)\n end\n \n -- did we cross a quarter boundary?\n + case\n when {{first_date}} < {{second_date}} and (\n (dayofyear({{second_date}}) - (quarter({{second_date}}) * 365/4))\n < (dayofyear({{first_date}}) - (quarter({{first_date}}) * 365/4))\n ) then 1\n when {{first_date}} > {{second_date}} and (\n (dayofyear({{second_date}}) - (quarter({{second_date}}) * 365/4))\n > (dayofyear({{first_date}}) - (quarter({{first_date}}) * 365/4))\n ) then -1\n else 0 end\n\n {%- elif datepart == 'year' -%}\n \n year({{second_date}}) - year({{first_date}})\n\n {%- elif datepart in ('hour', 'minute', 'second', 'millisecond', 'microsecond') -%}\n \n {%- set divisor -%} \n {%- if datepart == 'hour' -%} 3600\n {%- elif datepart == 'minute' -%} 60\n {%- elif datepart == 'second' -%} 1\n {%- elif datepart == 'millisecond' -%} (1/1000)\n {%- elif datepart == 'microsecond' -%} (1/1000000)\n {%- endif -%}\n {%- endset -%}\n\n case when {{first_date}} < {{second_date}}\n then ceil((\n {# make sure the timestamps are real, otherwise raise an error asap #}\n {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', second_date)) }}\n - {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', first_date)) }}\n ) / {{divisor}})\n else floor((\n {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', second_date)) }}\n - {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', first_date)) }}\n ) / {{divisor}})\n end\n \n {% if datepart == 'millisecond' %}\n + cast(date_format({{second_date}}, 'SSS') as int)\n - cast(date_format({{first_date}}, 'SSS') as int)\n {% endif %}\n \n {% if datepart == 'microsecond' %} \n {% set capture_str = '[0-9]{4}-[0-9]{2}-[0-9]{2}.[0-9]{2}:[0-9]{2}:[0-9]{2}.([0-9]{6})' %}\n -- Spark doesn't really support microseconds, so this is a massive hack!\n -- It will only work if the timestamp-string is of the format\n -- 'yyyy-MM-dd-HH mm.ss.SSSSSS'\n + cast(regexp_extract({{second_date}}, '{{capture_str}}', 1) as int)\n - cast(regexp_extract({{first_date}}, '{{capture_str}}', 1) as int) \n {% endif %}\n\n {%- else -%}\n\n {{ exceptions.raise_compiler_error(\"macro datediff not implemented for datepart ~ '\" ~ datepart ~ \"' ~ on Spark\") }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.093209, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp": {"name": "spark__current_timestamp", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "unique_id": "macro.spark_utils.spark__current_timestamp", "macro_sql": "{% macro spark__current_timestamp() %}\n current_timestamp()\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0933518, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp_in_utc": {"name": "spark__current_timestamp_in_utc", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "unique_id": "macro.spark_utils.spark__current_timestamp_in_utc", "macro_sql": "{% macro spark__current_timestamp_in_utc() %}\n unix_timestamp()\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.093428, "supported_languages": null}, "macro.spark_utils.spark__split_part": {"name": "spark__split_part", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/split_part.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/split_part.sql", "unique_id": "macro.spark_utils.spark__split_part", "macro_sql": "{% macro spark__split_part(string_text, delimiter_text, part_number) %}\n\n {% set delimiter_expr %}\n \n -- escape if starts with a special character\n case when regexp_extract({{ delimiter_text }}, '([^A-Za-z0-9])(.*)', 1) != '_'\n then concat('\\\\', {{ delimiter_text }})\n else {{ delimiter_text }} end\n \n {% endset %}\n\n {% set split_part_expr %}\n \n split(\n {{ string_text }},\n {{ delimiter_expr }}\n )[({{ part_number - 1 }})]\n \n {% endset %}\n \n {{ return(split_part_expr) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0940092, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_pattern": {"name": "spark__get_relations_by_pattern", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_relations_by_pattern", "macro_sql": "{% macro spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n show table extended in {{ schema_pattern }} like '{{ table_pattern }}'\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=None,\n schema=row[0],\n identifier=row[1],\n type=('view' if 'Type: VIEW' in row[3] else 'table')\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.095636, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_prefix": {"name": "spark__get_relations_by_prefix", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_relations_by_prefix", "macro_sql": "{% macro spark__get_relations_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {% set table_pattern = table_pattern ~ '*' %}\n {{ return(spark_utils.spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.095977, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_pattern": {"name": "spark__get_tables_by_pattern", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_tables_by_pattern", "macro_sql": "{% macro spark__get_tables_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(spark_utils.spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.096257, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_prefix": {"name": "spark__get_tables_by_prefix", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_tables_by_prefix", "macro_sql": "{% macro spark__get_tables_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(spark_utils.spark__get_relations_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.096535, "supported_languages": null}, "macro.spark_utils.assert_not_null": {"name": "assert_not_null", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "unique_id": "macro.spark_utils.assert_not_null", "macro_sql": "{% macro assert_not_null(function, arg) -%}\n {{ return(adapter.dispatch('assert_not_null', 'spark_utils')(function, arg)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.spark_utils.default__assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.096857, "supported_languages": null}, "macro.spark_utils.default__assert_not_null": {"name": "default__assert_not_null", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "unique_id": "macro.spark_utils.default__assert_not_null", "macro_sql": "{% macro default__assert_not_null(function, arg) %}\n\n coalesce({{function}}({{arg}}), nvl2({{function}}({{arg}}), assert_true({{function}}({{arg}}) is not null), null))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.097058, "supported_languages": null}, "macro.spark_utils.spark__convert_timezone": {"name": "spark__convert_timezone", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/snowplow/convert_timezone.sql", "original_file_path": "macros/snowplow/convert_timezone.sql", "unique_id": "macro.spark_utils.spark__convert_timezone", "macro_sql": "{% macro spark__convert_timezone(in_tz, out_tz, in_timestamp) %}\n from_utc_timestamp(to_utc_timestamp({{in_timestamp}}, {{in_tz}}), {{out_tz}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.097264, "supported_languages": null}, "macro.fivetran_utils.enabled_vars": {"name": "enabled_vars", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/enabled_vars.sql", "original_file_path": "macros/enabled_vars.sql", "unique_id": "macro.fivetran_utils.enabled_vars", "macro_sql": "{% macro enabled_vars(vars) %}\n\n{% for v in vars %}\n \n {% if var(v, True) == False %}\n {{ return(False) }}\n {% endif %}\n\n{% endfor %}\n\n{{ return(True) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.097664, "supported_languages": null}, "macro.fivetran_utils.percentile": {"name": "percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.percentile", "macro_sql": "{% macro percentile(percentile_field, partition_field, percent) -%}\n\n{{ adapter.dispatch('percentile', 'fivetran_utils') (percentile_field, partition_field, percent) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.redshift__percentile"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0986319, "supported_languages": null}, "macro.fivetran_utils.default__percentile": {"name": "default__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.default__percentile", "macro_sql": "{% macro default__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n over ( partition by {{ partition_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0988002, "supported_languages": null}, "macro.fivetran_utils.redshift__percentile": {"name": "redshift__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.redshift__percentile", "macro_sql": "{% macro redshift__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n over ( partition by {{ partition_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.0989661, "supported_languages": null}, "macro.fivetran_utils.bigquery__percentile": {"name": "bigquery__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.bigquery__percentile", "macro_sql": "{% macro bigquery__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percentile_field }}, \n {{ percent }}) \n over (partition by {{ partition_field }} \n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.099133, "supported_languages": null}, "macro.fivetran_utils.postgres__percentile": {"name": "postgres__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.postgres__percentile", "macro_sql": "{% macro postgres__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n /* have to group by partition field */\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.099278, "supported_languages": null}, "macro.fivetran_utils.spark__percentile": {"name": "spark__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.spark__percentile", "macro_sql": "{% macro spark__percentile(percentile_field, partition_field, percent) %}\n\n percentile( \n {{ percentile_field }}, \n {{ percent }}) \n over (partition by {{ partition_field }} \n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.099452, "supported_languages": null}, "macro.fivetran_utils.pivot_json_extract": {"name": "pivot_json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/pivot_json_extract.sql", "original_file_path": "macros/pivot_json_extract.sql", "unique_id": "macro.fivetran_utils.pivot_json_extract", "macro_sql": "{% macro pivot_json_extract(string, list_of_properties) %}\n\n{%- for property in list_of_properties -%}\n{%- if property is mapping -%}\nreplace( {{ fivetran_utils.json_extract(string, property.name) }}, '\"', '') as {{ property.alias if property.alias else property.name | replace(' ', '_') | replace('.', '_') | lower }}\n\n{%- else -%}\nreplace( {{ fivetran_utils.json_extract(string, property) }}, '\"', '') as {{ property | replace(' ', '_') | lower }}\n\n{%- endif -%}\n{%- if not loop.last -%},{%- endif %}\n{% endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1003149, "supported_languages": null}, "macro.fivetran_utils.persist_pass_through_columns": {"name": "persist_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/persist_pass_through_columns.sql", "original_file_path": "macros/persist_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.persist_pass_through_columns", "macro_sql": "{% macro persist_pass_through_columns(pass_through_variable, identifier=none, transform='') %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n , {{ transform ~ '(' ~ (identifier ~ '.' if identifier else '') ~ (field.alias if field.alias else field.name) ~ ')' }} as {{ field.alias if field.alias else field.name }}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.100965, "supported_languages": null}, "macro.fivetran_utils.json_parse": {"name": "json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.json_parse", "macro_sql": "{% macro json_parse(string, string_path) -%}\n\n{{ adapter.dispatch('json_parse', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.redshift__json_parse"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.102104, "supported_languages": null}, "macro.fivetran_utils.default__json_parse": {"name": "default__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.default__json_parse", "macro_sql": "{% macro default__json_parse(string, string_path) %}\n\n json_extract_path_text({{string}}, {%- for s in string_path -%}'{{ s }}'{%- if not loop.last -%},{%- endif -%}{%- endfor -%} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1023538, "supported_languages": null}, "macro.fivetran_utils.redshift__json_parse": {"name": "redshift__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.redshift__json_parse", "macro_sql": "{% macro redshift__json_parse(string, string_path) %}\n\n json_extract_path_text({{string}}, {%- for s in string_path -%}'{{ s }}'{%- if not loop.last -%},{%- endif -%}{%- endfor -%} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.102601, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_parse": {"name": "bigquery__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.bigquery__json_parse", "macro_sql": "{% macro bigquery__json_parse(string, string_path) %}\n\n \n json_extract_scalar({{string}}, '$.{%- for s in string_path -%}{{ s }}{%- if not loop.last -%}.{%- endif -%}{%- endfor -%} ')\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1028469, "supported_languages": null}, "macro.fivetran_utils.postgres__json_parse": {"name": "postgres__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.postgres__json_parse", "macro_sql": "{% macro postgres__json_parse(string, string_path) %}\n\n {{string}}::json #>> '{ {%- for s in string_path -%}{{ s }}{%- if not loop.last -%},{%- endif -%}{%- endfor -%} }'\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.103095, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_parse": {"name": "snowflake__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.snowflake__json_parse", "macro_sql": "{% macro snowflake__json_parse(string, string_path) %}\n\n parse_json( {{string}} ) {%- for s in string_path -%}{% if s is number %}[{{ s }}]{% else %}['{{ s }}']{% endif %}{%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1033652, "supported_languages": null}, "macro.fivetran_utils.spark__json_parse": {"name": "spark__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.spark__json_parse", "macro_sql": "{% macro spark__json_parse(string, string_path) %}\n\n {{string}} : {%- for s in string_path -%}{% if s is number %}[{{ s }}]{% else %}['{{ s }}']{% endif %}{%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1036339, "supported_languages": null}, "macro.fivetran_utils.max_bool": {"name": "max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.max_bool", "macro_sql": "{% macro max_bool(boolean_field) -%}\n\n{{ adapter.dispatch('max_bool', 'fivetran_utils') (boolean_field) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__max_bool"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.103966, "supported_languages": null}, "macro.fivetran_utils.default__max_bool": {"name": "default__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.default__max_bool", "macro_sql": "{% macro default__max_bool(boolean_field) %}\n\n bool_or( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.104071, "supported_languages": null}, "macro.fivetran_utils.snowflake__max_bool": {"name": "snowflake__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.snowflake__max_bool", "macro_sql": "{% macro snowflake__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.104172, "supported_languages": null}, "macro.fivetran_utils.bigquery__max_bool": {"name": "bigquery__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.bigquery__max_bool", "macro_sql": "{% macro bigquery__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.104274, "supported_languages": null}, "macro.fivetran_utils.calculated_fields": {"name": "calculated_fields", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/calculated_fields.sql", "original_file_path": "macros/calculated_fields.sql", "unique_id": "macro.fivetran_utils.calculated_fields", "macro_sql": "{% macro calculated_fields(variable) -%}\n\n{% if var(variable, none) %}\n {% for field in var(variable) %}\n , {{ field.transform_sql }} as {{ field.name }} \n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.104651, "supported_languages": null}, "macro.fivetran_utils.drop_schemas_automation": {"name": "drop_schemas_automation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/drop_schemas_automation.sql", "original_file_path": "macros/drop_schemas_automation.sql", "unique_id": "macro.fivetran_utils.drop_schemas_automation", "macro_sql": "{% macro drop_schemas_automation(drop_target_schema=true) %}\n {{ return(adapter.dispatch('drop_schemas_automation', 'fivetran_utils')(drop_target_schema)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__drop_schemas_automation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.105366, "supported_languages": null}, "macro.fivetran_utils.default__drop_schemas_automation": {"name": "default__drop_schemas_automation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/drop_schemas_automation.sql", "original_file_path": "macros/drop_schemas_automation.sql", "unique_id": "macro.fivetran_utils.default__drop_schemas_automation", "macro_sql": "{% macro default__drop_schemas_automation(drop_target_schema=true) %}\n\n{% set fetch_list_sql %}\n {% if target.type not in ('databricks', 'spark') %}\n select schema_name\n from \n {{ wrap_in_quotes(target.database) }}.INFORMATION_SCHEMA.SCHEMATA\n where lower(schema_name) like '{{ target.schema | lower }}{%- if not drop_target_schema -%}_{%- endif -%}%'\n {% else %}\n SHOW SCHEMAS LIKE '{{ target.schema }}{%- if not drop_target_schema -%}_{%- endif -%}*'\n {% endif %}\n{% endset %}\n\n{% set results = run_query(fetch_list_sql) %}\n\n{% if execute %}\n {% set results_list = results.columns[0].values() %}\n{% else %}\n {% set results_list = [] %}\n{% endif %}\n\n{% for schema_to_drop in results_list %}\n {% do adapter.drop_schema(api.Relation.create(database=target.database, schema=schema_to_drop)) %}\n {{ print('Schema ' ~ schema_to_drop ~ ' successfully dropped from the ' ~ target.database ~ ' database.\\n')}}\n{% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.wrap_in_quotes", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.106571, "supported_languages": null}, "macro.fivetran_utils.seed_data_helper": {"name": "seed_data_helper", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/seed_data_helper.sql", "original_file_path": "macros/seed_data_helper.sql", "unique_id": "macro.fivetran_utils.seed_data_helper", "macro_sql": "{% macro seed_data_helper(seed_name, warehouses) %}\n\n{% if target.type in warehouses %}\n {% for w in warehouses %}\n {% if target.type == w %}\n {{ return(ref(seed_name ~ \"_\" ~ w ~ \"\")) }}\n {% endif %}\n {% endfor %}\n{% else %}\n{{ return(ref(seed_name)) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.107166, "supported_languages": null}, "macro.fivetran_utils.fill_pass_through_columns": {"name": "fill_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_pass_through_columns.sql", "original_file_path": "macros/fill_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.fill_pass_through_columns", "macro_sql": "{% macro fill_pass_through_columns(pass_through_variable) %}\n\n{% if var(pass_through_variable) %}\n {% for field in var(pass_through_variable) %}\n {% if field is mapping %}\n {% if field.transform_sql %}\n , {{ field.transform_sql }} as {{ field.alias if field.alias else field.name }}\n {% else %}\n , {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% else %}\n , {{ field }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.107969, "supported_languages": null}, "macro.fivetran_utils.string_agg": {"name": "string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.string_agg", "macro_sql": "{% macro string_agg(field_to_agg, delimiter) -%}\n\n{{ adapter.dispatch('string_agg', 'fivetran_utils') (field_to_agg, delimiter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.redshift__string_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.108455, "supported_languages": null}, "macro.fivetran_utils.default__string_agg": {"name": "default__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.default__string_agg", "macro_sql": "{% macro default__string_agg(field_to_agg, delimiter) %}\n string_agg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.108591, "supported_languages": null}, "macro.fivetran_utils.snowflake__string_agg": {"name": "snowflake__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.snowflake__string_agg", "macro_sql": "{% macro snowflake__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.108723, "supported_languages": null}, "macro.fivetran_utils.redshift__string_agg": {"name": "redshift__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.redshift__string_agg", "macro_sql": "{% macro redshift__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.108851, "supported_languages": null}, "macro.fivetran_utils.spark__string_agg": {"name": "spark__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.spark__string_agg", "macro_sql": "{% macro spark__string_agg(field_to_agg, delimiter) %}\n -- collect set will remove duplicates\n replace(replace(replace(cast( collect_set({{ field_to_agg }}) as string), '[', ''), ']', ''), ', ', {{ delimiter }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1089878, "supported_languages": null}, "macro.fivetran_utils.timestamp_diff": {"name": "timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.timestamp_diff", "macro_sql": "{% macro timestamp_diff(first_date, second_date, datepart) %}\n {{ adapter.dispatch('timestamp_diff', 'fivetran_utils')(first_date, second_date, datepart) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.redshift__timestamp_diff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.112083, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_diff": {"name": "default__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.default__timestamp_diff", "macro_sql": "{% macro default__timestamp_diff(first_date, second_date, datepart) %}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.112247, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_diff": {"name": "redshift__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.redshift__timestamp_diff", "macro_sql": "{% macro redshift__timestamp_diff(first_date, second_date, datepart) %}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1124108, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_diff": {"name": "bigquery__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.bigquery__timestamp_diff", "macro_sql": "{% macro bigquery__timestamp_diff(first_date, second_date, datepart) %}\n\n timestamp_diff(\n {{second_date}},\n {{first_date}},\n {{datepart}}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1125681, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_diff": {"name": "postgres__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.postgres__timestamp_diff", "macro_sql": "{% macro postgres__timestamp_diff(first_date, second_date, datepart) %}\n\n {% if datepart == 'year' %}\n (date_part('year', ({{second_date}})::date) - date_part('year', ({{first_date}})::date))\n {% elif datepart == 'quarter' %}\n ({{ dbt.datediff(first_date, second_date, 'year') }} * 4 + date_part('quarter', ({{second_date}})::date) - date_part('quarter', ({{first_date}})::date))\n {% elif datepart == 'month' %}\n ({{ dbt.datediff(first_date, second_date, 'year') }} * 12 + date_part('month', ({{second_date}})::date) - date_part('month', ({{first_date}})::date))\n {% elif datepart == 'day' %}\n (({{second_date}})::date - ({{first_date}})::date)\n {% elif datepart == 'week' %}\n ({{ dbt.datediff(first_date, second_date, 'day') }} / 7 + case\n when date_part('dow', ({{first_date}})::timestamp) <= date_part('dow', ({{second_date}})::timestamp) then\n case when {{first_date}} <= {{second_date}} then 0 else -1 end\n else\n case when {{first_date}} <= {{second_date}} then 1 else 0 end\n end)\n {% elif datepart == 'hour' %}\n ({{ dbt.datediff(first_date, second_date, 'day') }} * 24 + date_part('hour', ({{second_date}})::timestamp) - date_part('hour', ({{first_date}})::timestamp))\n {% elif datepart == 'minute' %}\n ({{ dbt.datediff(first_date, second_date, 'hour') }} * 60 + date_part('minute', ({{second_date}})::timestamp) - date_part('minute', ({{first_date}})::timestamp))\n {% elif datepart == 'second' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60 + floor(date_part('second', ({{second_date}})::timestamp)) - floor(date_part('second', ({{first_date}})::timestamp)))\n {% elif datepart == 'millisecond' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60000 + floor(date_part('millisecond', ({{second_date}})::timestamp)) - floor(date_part('millisecond', ({{first_date}})::timestamp)))\n {% elif datepart == 'microsecond' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60000000 + floor(date_part('microsecond', ({{second_date}})::timestamp)) - floor(date_part('microsecond', ({{first_date}})::timestamp)))\n {% else %}\n {{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in postgres: {!r}\".format(datepart)) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1143732, "supported_languages": null}, "macro.fivetran_utils.try_cast": {"name": "try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.try_cast", "macro_sql": "{% macro try_cast(field, type) %}\n {{ adapter.dispatch('try_cast', 'fivetran_utils') (field, type) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.redshift__try_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1152608, "supported_languages": null}, "macro.fivetran_utils.default__safe_cast": {"name": "default__safe_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.default__safe_cast", "macro_sql": "{% macro default__safe_cast(field, type) %}\n {# most databases don't support this function yet\n so we just need to use cast #}\n cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.115405, "supported_languages": null}, "macro.fivetran_utils.redshift__try_cast": {"name": "redshift__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.redshift__try_cast", "macro_sql": "{% macro redshift__try_cast(field, type) %}\n{%- if type == 'numeric' -%}\n\n case\n when trim({{field}}) ~ '^(0|[1-9][0-9]*)$' then trim({{field}})\n else null\n end::{{type}}\n\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"non-numeric datatypes are not currently supported\") }}\n\n{% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.115686, "supported_languages": null}, "macro.fivetran_utils.postgres__try_cast": {"name": "postgres__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.postgres__try_cast", "macro_sql": "{% macro postgres__try_cast(field, type) %}\n{%- if type == 'numeric' -%}\n\n case\n when replace(cast({{field}} as varchar),cast(' ' as varchar),cast('' as varchar)) ~ '^(0|[1-9][0-9]*)$' \n then replace(cast({{field}} as varchar),cast(' ' as varchar),cast('' as varchar))\n else null\n end::{{type}}\n\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"non-numeric datatypes are not currently supported\") }}\n\n{% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.115979, "supported_languages": null}, "macro.fivetran_utils.snowflake__try_cast": {"name": "snowflake__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.snowflake__try_cast", "macro_sql": "{% macro snowflake__try_cast(field, type) %}\n try_cast(cast({{field}} as varchar) as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.116118, "supported_languages": null}, "macro.fivetran_utils.bigquery__try_cast": {"name": "bigquery__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.bigquery__try_cast", "macro_sql": "{% macro bigquery__try_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.116243, "supported_languages": null}, "macro.fivetran_utils.spark__try_cast": {"name": "spark__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.spark__try_cast", "macro_sql": "{% macro spark__try_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.116371, "supported_languages": null}, "macro.fivetran_utils.source_relation": {"name": "source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "unique_id": "macro.fivetran_utils.source_relation", "macro_sql": "{% macro source_relation(union_schema_variable='union_schemas', union_database_variable='union_databases') -%}\n\n{{ adapter.dispatch('source_relation', 'fivetran_utils') (union_schema_variable, union_database_variable) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__source_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1168718, "supported_languages": null}, "macro.fivetran_utils.default__source_relation": {"name": "default__source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "unique_id": "macro.fivetran_utils.default__source_relation", "macro_sql": "{% macro default__source_relation(union_schema_variable, union_database_variable) %}\n\n{% if var(union_schema_variable, none) %}\n, case\n {% for schema in var(union_schema_variable) %}\n when lower(replace(replace(_dbt_source_relation,'\"',''),'`','')) like '%.{{ schema|lower }}.%' then '{{ schema|lower }}'\n {% endfor %}\n end as source_relation\n{% elif var(union_database_variable, none) %}\n, case\n {% for database in var(union_database_variable) %}\n when lower(replace(replace(_dbt_source_relation,'\"',''),'`','')) like '%{{ database|lower }}.%' then '{{ database|lower }}'\n {% endfor %}\n end as source_relation\n{% else %}\n, cast('' as {{ dbt.type_string() }}) as source_relation\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.117465, "supported_languages": null}, "macro.fivetran_utils.first_value": {"name": "first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.first_value", "macro_sql": "{% macro first_value(first_value_field, partition_field, order_by_field, order=\"asc\") -%}\n\n{{ adapter.dispatch('first_value', 'fivetran_utils') (first_value_field, partition_field, order_by_field, order) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.redshift__first_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1179678, "supported_languages": null}, "macro.fivetran_utils.default__first_value": {"name": "default__first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.default__first_value", "macro_sql": "{% macro default__first_value(first_value_field, partition_field, order_by_field, order=\"asc\") %}\n\n first_value( {{ first_value_field }} ignore nulls ) over (partition by {{ partition_field }} order by {{ order_by_field }} {{ order }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1181812, "supported_languages": null}, "macro.fivetran_utils.redshift__first_value": {"name": "redshift__first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.redshift__first_value", "macro_sql": "{% macro redshift__first_value(first_value_field, partition_field, order_by_field, order=\"asc\") %}\n\n first_value( {{ first_value_field }} ignore nulls ) over (partition by {{ partition_field }} order by {{ order_by_field }} {{ order }} , {{ partition_field }} rows unbounded preceding )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.118411, "supported_languages": null}, "macro.fivetran_utils.add_dbt_source_relation": {"name": "add_dbt_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/add_dbt_source_relation.sql", "original_file_path": "macros/add_dbt_source_relation.sql", "unique_id": "macro.fivetran_utils.add_dbt_source_relation", "macro_sql": "{% macro add_dbt_source_relation() %}\n\n{% if var('union_schemas', none) or var('union_databases', none) %}\n, _dbt_source_relation\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.118675, "supported_languages": null}, "macro.fivetran_utils.add_pass_through_columns": {"name": "add_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/add_pass_through_columns.sql", "original_file_path": "macros/add_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.add_pass_through_columns", "macro_sql": "{% macro add_pass_through_columns(base_columns, pass_through_var) %}\n\n {% if pass_through_var %}\n\n {% for column in pass_through_var %}\n\n {% if column is mapping %}\n\n {% if column.alias %}\n\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n \n {% endif %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n\n {% endif %}\n\n {% endfor %}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.119817, "supported_languages": null}, "macro.fivetran_utils.union_relations": {"name": "union_relations", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "unique_id": "macro.fivetran_utils.union_relations", "macro_sql": "{%- macro union_relations(relations, aliases=none, column_override=none, include=[], exclude=[], source_column_name=none) -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n {%- set source_column_name = source_column_name if source_column_name is not none else '_dbt_source_relation' -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column in exclude -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column not in include -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n cast({{ dbt.string_literal(relation) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ aliases[loop.index0] if aliases else relation }}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.123989, "supported_languages": null}, "macro.fivetran_utils.union_tables": {"name": "union_tables", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "unique_id": "macro.fivetran_utils.union_tables", "macro_sql": "{%- macro union_tables(tables, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_table') -%}\n\n {%- do exceptions.warn(\"Warning: the `union_tables` macro is no longer supported and will be deprecated in a future release of dbt-utils. Use the `union_relations` macro instead\") -%}\n\n {{ return(dbt_utils.union_relations(tables, column_override, include, exclude, source_column_name)) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils.union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.124363, "supported_languages": null}, "macro.fivetran_utils.snowflake_seed_data": {"name": "snowflake_seed_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/snowflake_seed_data.sql", "original_file_path": "macros/snowflake_seed_data.sql", "unique_id": "macro.fivetran_utils.snowflake_seed_data", "macro_sql": "{% macro snowflake_seed_data(seed_name) %}\n\n{% if target.type == 'snowflake' %}\n{{ return(ref(seed_name ~ '_snowflake')) }}\n{% else %}\n{{ return(ref(seed_name)) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.124743, "supported_languages": null}, "macro.fivetran_utils.fill_staging_columns": {"name": "fill_staging_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "unique_id": "macro.fivetran_utils.fill_staging_columns", "macro_sql": "{% macro fill_staging_columns(source_columns, staging_columns) -%}\n\n{%- set source_column_names = source_columns|map(attribute='name')|map('lower')|list -%}\n\n{%- for column in staging_columns %}\n {% if column.name|lower in source_column_names -%}\n {{ fivetran_utils.quote_column(column) }} as \n {%- if 'alias' in column %} {{ column.alias }} {% else %} {{ fivetran_utils.quote_column(column) }} {%- endif -%}\n {%- else -%}\n cast(null as {{ column.datatype }})\n {%- if 'alias' in column %} as {{ column.alias }} {% else %} as {{ fivetran_utils.quote_column(column) }} {% endif -%}\n {%- endif -%}\n {%- if not loop.last -%} , {% endif -%}\n{% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.quote_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.126421, "supported_languages": null}, "macro.fivetran_utils.quote_column": {"name": "quote_column", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "unique_id": "macro.fivetran_utils.quote_column", "macro_sql": "{% macro quote_column(column) %}\n {% if 'quote' in column %}\n {% if column.quote %}\n {% if target.type in ('bigquery', 'spark', 'databricks') %}\n `{{ column.name }}`\n {% elif target.type == 'snowflake' %}\n \"{{ column.name | upper }}\"\n {% else %}\n \"{{ column.name }}\"\n {% endif %}\n {% else %}\n {{ column.name }}\n {% endif %}\n {% else %}\n {{ column.name }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.127, "supported_languages": null}, "macro.fivetran_utils.json_extract": {"name": "json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.json_extract", "macro_sql": "{% macro json_extract(string, string_path) -%}\n\n{{ adapter.dispatch('json_extract', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.redshift__json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.127583, "supported_languages": null}, "macro.fivetran_utils.default__json_extract": {"name": "default__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.default__json_extract", "macro_sql": "{% macro default__json_extract(string, string_path) %}\n\n json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} )\n \n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.127743, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_extract": {"name": "snowflake__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.snowflake__json_extract", "macro_sql": "{% macro snowflake__json_extract(string, string_path) %}\n\n json_extract_path_text(try_parse_json( {{string}} ), {{ \"'\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.127899, "supported_languages": null}, "macro.fivetran_utils.redshift__json_extract": {"name": "redshift__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.redshift__json_extract", "macro_sql": "{% macro redshift__json_extract(string, string_path) %}\n\n case when is_valid_json( {{string}} ) then json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} ) else null end\n \n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.128076, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_extract": {"name": "bigquery__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.bigquery__json_extract", "macro_sql": "{% macro bigquery__json_extract(string, string_path) %}\n\n json_extract_scalar({{string}}, {{ \"'$.\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.128233, "supported_languages": null}, "macro.fivetran_utils.postgres__json_extract": {"name": "postgres__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.postgres__json_extract", "macro_sql": "{% macro postgres__json_extract(string, string_path) %}\n\n {{string}}::json->>{{\"'\" ~ string_path ~ \"'\" }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.128384, "supported_languages": null}, "macro.fivetran_utils.collect_freshness": {"name": "collect_freshness", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "unique_id": "macro.fivetran_utils.collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n {{ return(adapter.dispatch('collect_freshness')(source, loaded_at_field, filter))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.129127, "supported_languages": null}, "macro.fivetran_utils.default__collect_freshness": {"name": "default__collect_freshness", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "unique_id": "macro.fivetran_utils.default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n\n {%- set enabled_array = [] -%}\n {% for node in graph.sources.values() %}\n {% if node.identifier == source.identifier %}\n {% if (node.meta['is_enabled'] | default(true)) %}\n {%- do enabled_array.append(1) -%}\n {% endif %}\n {% endif %}\n {% endfor %}\n {% set is_enabled = (enabled_array != []) %}\n\n select\n {% if is_enabled %}\n max({{ loaded_at_field }})\n {% else %} \n {{ current_timestamp() }} {% endif %} as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n\n {% if is_enabled %}\n from {{ source }}\n {% if filter %}\n where {{ filter }}\n {% endif %}\n {% endif %}\n\n {% endcall %}\n {{ return(load_result('collect_freshness').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1301298, "supported_languages": null}, "macro.fivetran_utils.timestamp_add": {"name": "timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.timestamp_add", "macro_sql": "{% macro timestamp_add(datepart, interval, from_timestamp) -%}\n\n{{ adapter.dispatch('timestamp_add', 'fivetran_utils') (datepart, interval, from_timestamp) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.redshift__timestamp_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.130869, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_add": {"name": "default__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.default__timestamp_add", "macro_sql": "{% macro default__timestamp_add(datepart, interval, from_timestamp) %}\n\n timestampadd(\n {{ datepart }},\n {{ interval }},\n {{ from_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1310358, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_add": {"name": "bigquery__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.bigquery__timestamp_add", "macro_sql": "{% macro bigquery__timestamp_add(datepart, interval, from_timestamp) %}\n\n timestamp_add({{ from_timestamp }}, interval {{ interval }} {{ datepart }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1312, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_add": {"name": "redshift__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.redshift__timestamp_add", "macro_sql": "{% macro redshift__timestamp_add(datepart, interval, from_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.131364, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_add": {"name": "postgres__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.postgres__timestamp_add", "macro_sql": "{% macro postgres__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ from_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.131527, "supported_languages": null}, "macro.fivetran_utils.spark__timestamp_add": {"name": "spark__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.spark__timestamp_add", "macro_sql": "{% macro spark__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ dbt.dateadd(datepart, interval, from_timestamp) }}\n \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1317031, "supported_languages": null}, "macro.fivetran_utils.ceiling": {"name": "ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.ceiling", "macro_sql": "{% macro ceiling(num) -%}\n\n{{ adapter.dispatch('ceiling', 'fivetran_utils') (num) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__ceiling"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.131958, "supported_languages": null}, "macro.fivetran_utils.default__ceiling": {"name": "default__ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.default__ceiling", "macro_sql": "{% macro default__ceiling(num) %}\n ceiling({{ num }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.132061, "supported_languages": null}, "macro.fivetran_utils.snowflake__ceiling": {"name": "snowflake__ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.snowflake__ceiling", "macro_sql": "{% macro snowflake__ceiling(num) %}\n ceil({{ num }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.132229, "supported_languages": null}, "macro.fivetran_utils.remove_prefix_from_columns": {"name": "remove_prefix_from_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/remove_prefix_from_columns.sql", "original_file_path": "macros/remove_prefix_from_columns.sql", "unique_id": "macro.fivetran_utils.remove_prefix_from_columns", "macro_sql": "{% macro remove_prefix_from_columns(columns, prefix='', exclude=[]) %}\n\n {%- for col in columns if col.name not in exclude -%}\n {%- if col.name[:prefix|length]|lower == prefix -%}\n {{ col.name }} as {{ col.name[prefix|length:] }}\n {%- else -%}\n {{ col.name }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {% endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.132886, "supported_languages": null}, "macro.fivetran_utils.union_data": {"name": "union_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "unique_id": "macro.fivetran_utils.union_data", "macro_sql": "{%- macro union_data(table_identifier, database_variable, schema_variable, default_database, default_schema, default_variable, union_schema_variable='union_schemas', union_database_variable='union_databases') -%}\n\n{{ adapter.dispatch('union_data', 'fivetran_utils') (\n table_identifier, \n database_variable, \n schema_variable, \n default_database, \n default_schema, \n default_variable,\n union_schema_variable,\n union_database_variable\n ) }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.fivetran_utils.default__union_data"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.136586, "supported_languages": null}, "macro.fivetran_utils.default__union_data": {"name": "default__union_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "unique_id": "macro.fivetran_utils.default__union_data", "macro_sql": "{%- macro default__union_data(\n table_identifier, \n database_variable, \n schema_variable, \n default_database, \n default_schema, \n default_variable,\n union_schema_variable,\n union_database_variable\n ) -%}\n\n{%- if var(union_schema_variable, none) -%}\n\n {%- set relations = [] -%}\n \n {%- if var(union_schema_variable) is string -%}\n {%- set trimmed = var(union_schema_variable)|trim('[')|trim(']') -%}\n {%- set schemas = trimmed.split(',')|map('trim',\" \")|map('trim','\"')|map('trim',\"'\") -%}\n {%- else -%}\n {%- set schemas = var(union_schema_variable) -%}\n {%- endif -%}\n\n {%- for schema in var(union_schema_variable) -%}\n {%- set relation=adapter.get_relation(\n database=source(schema, table_identifier).database if var('has_defined_sources', false) else var(database_variable, default_database),\n schema=source(schema, table_identifier).schema if var('has_defined_sources', false) else schema,\n identifier=source(schema, table_identifier).identifier if var('has_defined_sources', false) else table_identifier\n ) -%}\n \n {%- set relation_exists=relation is not none -%}\n\n {%- if relation_exists -%}\n {%- do relations.append(relation) -%}\n {%- endif -%}\n\n {%- endfor -%}\n \n {%- if relations != [] -%}\n {{ dbt_utils.union_relations(relations) }}\n {%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n {%- endif -%}\n\n{%- elif var(union_database_variable, none) -%}\n\n {%- set relations = [] -%}\n\n {%- for database in var(union_database_variable) -%}\n {%- set relation=adapter.get_relation(\n database=source(schema, table_identifier).database if var('has_defined_sources', false) else database,\n schema=source(schema, table_identifier).schema if var('has_defined_sources', false) else var(schema_variable, default_schema),\n identifier=source(schema, table_identifier).identifier if var('has_defined_sources', false) else table_identifier\n ) -%}\n\n {%- set relation_exists=relation is not none -%}\n\n {%- if relation_exists -%}\n {%- do relations.append(relation) -%}\n {%- endif -%}\n\n {%- endfor -%}\n\n {%- if relations != [] -%}\n {{ dbt_utils.union_relations(relations) }}\n {%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n {%- endif -%}\n\n{%- else -%}\n {% set exception_schemas = {\"linkedin_company_pages\": \"linkedin_pages\", \"instagram_business_pages\": \"instagram_business\"} %}\n {% set relation = namespace(value=\"\") %}\n {% if default_schema in exception_schemas.keys() %}\n {% for corrected_schema_name in exception_schemas.items() %} \n {% if default_schema in corrected_schema_name %}\n {# In order for this macro to effectively work within upstream integration tests (mainly used by the Fivetran dbt package maintainers), this identifier variable selection is required to use the macro with different identifier names. #}\n {% set identifier_var = corrected_schema_name[1] + \"_\" + table_identifier + \"_identifier\" %}\n {%- set relation.value=adapter.get_relation(\n database=source(corrected_schema_name[1], table_identifier).database,\n schema=source(corrected_schema_name[1], table_identifier).schema,\n identifier=var(identifier_var, table_identifier)\n ) -%}\n {% endif %}\n {% endfor %}\n {% else %}\n {# In order for this macro to effectively work within upstream integration tests (mainly used by the Fivetran dbt package maintainers), this identifier variable selection is required to use the macro with different identifier names. #}\n {% set identifier_var = default_schema + \"_\" + table_identifier + \"_identifier\" %}\n {# Unfortunately the Twitter Organic identifiers were misspelled. As such, we will need to account for this in the model. This will be adjusted in the Twitter Organic package, but to ensure backwards compatibility, this needs to be included. #}\n {% if var(identifier_var, none) is none %} \n {% set identifier_var = default_schema + \"_\" + table_identifier + \"_identifer\" %}\n {% endif %}\n {%- set relation.value=adapter.get_relation(\n database=source(default_schema, table_identifier).database,\n schema=source(default_schema, table_identifier).schema,\n identifier=var(identifier_var, table_identifier)\n ) -%}\n {% endif %}\n{%- set table_exists=relation.value is not none -%}\n\n{%- if table_exists -%}\n select * \n from {{ relation.value }}\n{%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n{%- endif -%}\n{%- endif -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils.union_relations", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.141278, "supported_languages": null}, "macro.fivetran_utils.dummy_coalesce_value": {"name": "dummy_coalesce_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/dummy_coalesce_value.sql", "original_file_path": "macros/dummy_coalesce_value.sql", "unique_id": "macro.fivetran_utils.dummy_coalesce_value", "macro_sql": "{% macro dummy_coalesce_value(column) %}\n\n{% set coalesce_value = {\n 'STRING': \"'DUMMY_STRING'\",\n 'BOOLEAN': 'null',\n 'INT': 999999999,\n 'FLOAT': 999999999.99,\n 'TIMESTAMP': 'cast(\"2099-12-31\" as timestamp)',\n 'DATE': 'cast(\"2099-12-31\" as date)',\n} %}\n\n{% if column.is_float() %}\n{{ return(coalesce_value['FLOAT']) }}\n\n{% elif column.is_numeric() %}\n{{ return(coalesce_value['INT']) }}\n\n{% elif column.is_string() %}\n{{ return(coalesce_value['STRING']) }}\n\n{% elif column.data_type|lower == 'boolean' %}\n{{ return(coalesce_value['BOOLEAN']) }}\n\n{% elif 'timestamp' in column.data_type|lower %}\n{{ return(coalesce_value['TIMESTAMP']) }}\n\n{% elif 'date' in column.data_type|lower %}\n{{ return(coalesce_value['DATE']) }}\n\n{% elif 'int' in column.data_type|lower %}\n{{ return(coalesce_value['INT']) }}\n\n{% endif %}\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1427321, "supported_languages": null}, "macro.fivetran_utils.wrap_in_quotes": {"name": "wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.wrap_in_quotes", "macro_sql": "{%- macro wrap_in_quotes(object_to_quote) -%}\n\n{{ return(adapter.dispatch('wrap_in_quotes', 'fivetran_utils')(object_to_quote)) }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.fivetran_utils.redshift__wrap_in_quotes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1430862, "supported_languages": null}, "macro.fivetran_utils.default__wrap_in_quotes": {"name": "default__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.default__wrap_in_quotes", "macro_sql": "{%- macro default__wrap_in_quotes(object_to_quote) -%}\n{# bigquery, spark, databricks #}\n `{{ object_to_quote }}`\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1432, "supported_languages": null}, "macro.fivetran_utils.snowflake__wrap_in_quotes": {"name": "snowflake__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.snowflake__wrap_in_quotes", "macro_sql": "{%- macro snowflake__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote | upper }}\"\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.143316, "supported_languages": null}, "macro.fivetran_utils.redshift__wrap_in_quotes": {"name": "redshift__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.redshift__wrap_in_quotes", "macro_sql": "{%- macro redshift__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote }}\"\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.14342, "supported_languages": null}, "macro.fivetran_utils.postgres__wrap_in_quotes": {"name": "postgres__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.postgres__wrap_in_quotes", "macro_sql": "{%- macro postgres__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote }}\"\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.143522, "supported_languages": null}, "macro.fivetran_utils.array_agg": {"name": "array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.array_agg", "macro_sql": "{% macro array_agg(field_to_agg) -%}\n\n{{ adapter.dispatch('array_agg', 'fivetran_utils') (field_to_agg) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.redshift__array_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1437829, "supported_languages": null}, "macro.fivetran_utils.default__array_agg": {"name": "default__array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.default__array_agg", "macro_sql": "{% macro default__array_agg(field_to_agg) %}\n array_agg({{ field_to_agg }})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.143887, "supported_languages": null}, "macro.fivetran_utils.redshift__array_agg": {"name": "redshift__array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.redshift__array_agg", "macro_sql": "{% macro redshift__array_agg(field_to_agg) %}\n listagg({{ field_to_agg }}, ',')\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.143989, "supported_languages": null}, "macro.fivetran_utils.empty_variable_warning": {"name": "empty_variable_warning", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/empty_variable_warning.sql", "original_file_path": "macros/empty_variable_warning.sql", "unique_id": "macro.fivetran_utils.empty_variable_warning", "macro_sql": "{% macro empty_variable_warning(variable, downstream_model) %}\n\n{% if not var(variable) %}\n{{ log(\n \"\"\"\n Warning: You have passed an empty list to the \"\"\" ~ variable ~ \"\"\".\n As a result, you won't see the history of any columns in the \"\"\" ~ downstream_model ~ \"\"\" model.\n \"\"\",\n info=True\n) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.144392, "supported_languages": null}, "macro.fivetran_utils.enabled_vars_one_true": {"name": "enabled_vars_one_true", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/enabled_vars_one_true.sql", "original_file_path": "macros/enabled_vars_one_true.sql", "unique_id": "macro.fivetran_utils.enabled_vars_one_true", "macro_sql": "{% macro enabled_vars_one_true(vars) %}\n\n{% for v in vars %}\n \n {% if var(v, False) == True %}\n {{ return(True) }}\n {% endif %}\n\n{% endfor %}\n\n{{ return(False) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1447942, "supported_languages": null}, "macro.jira_source.get_issue_link_columns": {"name": "get_issue_link_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_issue_link_columns.sql", "original_file_path": "macros/get_issue_link_columns.sql", "unique_id": "macro.jira_source.get_issue_link_columns", "macro_sql": "{% macro get_issue_link_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"issue_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"related_issue_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"relationship\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.145399, "supported_languages": null}, "macro.jira_source.get_issue_columns": {"name": "get_issue_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_issue_columns.sql", "original_file_path": "macros/get_issue_columns.sql", "unique_id": "macro.jira_source.get_issue_columns", "macro_sql": "{% macro get_issue_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_original_estimate\", \"datatype\": dbt.type_float()},\n {\"name\": \"_remaining_estimate\", \"datatype\": dbt.type_float()},\n {\"name\": \"_time_spent\", \"datatype\": dbt.type_float()},\n {\"name\": \"assignee\", \"datatype\": dbt.type_string()},\n {\"name\": \"created\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"creator\", \"datatype\": dbt.type_string()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"due_date\", \"datatype\": \"date\"},\n {\"name\": \"environment\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"issue_type\", \"datatype\": dbt.type_int()},\n {\"name\": \"key\", \"datatype\": dbt.type_string()},\n\n {\"name\": \"original_estimate\", \"datatype\": dbt.type_float()},\n {\"name\": \"parent_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"priority\", \"datatype\": dbt.type_int()},\n {\"name\": \"project\", \"datatype\": dbt.type_int()},\n {\"name\": \"remaining_estimate\", \"datatype\": dbt.type_float()},\n {\"name\": \"reporter\", \"datatype\": dbt.type_string()},\n {\"name\": \"resolution\", \"datatype\": dbt.type_int()},\n {\"name\": \"resolved\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_int()},\n {\"name\": \"status_category_changed\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"summary\", \"datatype\": dbt.type_string()},\n {\"name\": \"time_spent\", \"datatype\": dbt.type_float()},\n {\"name\": \"updated\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"work_ratio\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1485598, "supported_languages": null}, "macro.jira_source.get_status_columns": {"name": "get_status_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_status_columns.sql", "original_file_path": "macros/get_status_columns.sql", "unique_id": "macro.jira_source.get_status_columns", "macro_sql": "{% macro get_status_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"status_category_id\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.14927, "supported_languages": null}, "macro.jira_source.get_status_category_columns": {"name": "get_status_category_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_status_category_columns.sql", "original_file_path": "macros/get_status_category_columns.sql", "unique_id": "macro.jira_source.get_status_category_columns", "macro_sql": "{% macro get_status_category_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.149771, "supported_languages": null}, "macro.jira_source.get_issue_field_history_columns": {"name": "get_issue_field_history_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_issue_field_history_columns.sql", "original_file_path": "macros/get_issue_field_history_columns.sql", "unique_id": "macro.jira_source.get_issue_field_history_columns", "macro_sql": "{% macro get_issue_field_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"field_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"issue_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{% if target.type == 'redshift' %}\n {{ columns.append( {\"name\": \"time\", \"datatype\": dbt.type_timestamp(), \"quote\": True } ) }}\n{% elif target.type == 'snowflake' %}\n {{ columns.append( {\"name\": \"TIME\", \"datatype\": dbt.type_timestamp(), \"quote\": True } ) }}\n{% else %}\n {{ columns.append( {\"name\": \"time\", \"datatype\": dbt.type_timestamp()} ) }}\n{% endif %}\n\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.151053, "supported_languages": null}, "macro.jira_source.get_comment_columns": {"name": "get_comment_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_comment_columns.sql", "original_file_path": "macros/get_comment_columns.sql", "unique_id": "macro.jira_source.get_comment_columns", "macro_sql": "{% macro get_comment_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"author_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"body\", \"datatype\": dbt.type_string()},\n {\"name\": \"created\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"is_public\", \"datatype\": \"boolean\"},\n {\"name\": \"issue_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"update_author_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.152137, "supported_languages": null}, "macro.jira_source.get_field_columns": {"name": "get_field_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_field_columns.sql", "original_file_path": "macros/get_field_columns.sql", "unique_id": "macro.jira_source.get_field_columns", "macro_sql": "{% macro get_field_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_array\", \"datatype\": \"boolean\"},\n {\"name\": \"is_custom\", \"datatype\": \"boolean\"},\n {\"name\": \"name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1528, "supported_languages": null}, "macro.jira_source.get_version_columns": {"name": "get_version_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_version_columns.sql", "original_file_path": "macros/get_version_columns.sql", "unique_id": "macro.jira_source.get_version_columns", "macro_sql": "{% macro get_version_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"archived\", \"datatype\": \"boolean\"},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"overdue\", \"datatype\": \"boolean\"},\n {\"name\": \"project_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"release_date\", \"datatype\": \"date\"},\n {\"name\": \"released\", \"datatype\": \"boolean\"},\n {\"name\": \"start_date\", \"datatype\": \"date\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.153916, "supported_languages": null}, "macro.jira_source.get_field_option_columns": {"name": "get_field_option_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_field_option_columns.sql", "original_file_path": "macros/get_field_option_columns.sql", "unique_id": "macro.jira_source.get_field_option_columns", "macro_sql": "{% macro get_field_option_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"parent_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.154509, "supported_languages": null}, "macro.jira_source.get_issue_multiselect_history_columns": {"name": "get_issue_multiselect_history_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_issue_multiselect_history_columns.sql", "original_file_path": "macros/get_issue_multiselect_history_columns.sql", "unique_id": "macro.jira_source.get_issue_multiselect_history_columns", "macro_sql": "{% macro get_issue_multiselect_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"field_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"issue_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{% if target.type == 'redshift' %}\n {{ columns.append( {\"name\": \"time\", \"datatype\": dbt.type_timestamp(), \"quote\": True } ) }}\n{% elif target.type == 'snowflake' %}\n {{ columns.append( {\"name\": \"TIME\", \"datatype\": dbt.type_timestamp(), \"quote\": True } ) }}\n{% else %}\n {{ columns.append( {\"name\": \"time\", \"datatype\": dbt.type_timestamp()} ) }}\n{% endif %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.155898, "supported_languages": null}, "macro.jira_source.get_epic_columns": {"name": "get_epic_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_epic_columns.sql", "original_file_path": "macros/get_epic_columns.sql", "unique_id": "macro.jira_source.get_epic_columns", "macro_sql": "{% macro get_epic_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"done\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"key\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"summary\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.156673, "supported_languages": null}, "macro.jira_source.get_issue_type_columns": {"name": "get_issue_type_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_issue_type_columns.sql", "original_file_path": "macros/get_issue_type_columns.sql", "unique_id": "macro.jira_source.get_issue_type_columns", "macro_sql": "{% macro get_issue_type_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"subtask\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.157341, "supported_languages": null}, "macro.jira_source.get_user_columns": {"name": "get_user_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_user_columns.sql", "original_file_path": "macros/get_user_columns.sql", "unique_id": "macro.jira_source.get_user_columns", "macro_sql": "{% macro get_user_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"email\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"locale\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"time_zone\", \"datatype\": dbt.type_string()},\n {\"name\": \"username\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1582239, "supported_languages": null}, "macro.jira_source.get_project_columns": {"name": "get_project_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_project_columns.sql", "original_file_path": "macros/get_project_columns.sql", "unique_id": "macro.jira_source.get_project_columns", "macro_sql": "{% macro get_project_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"key\", \"datatype\": dbt.type_string()},\n {\"name\": \"lead_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"permission_scheme_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"project_category_id\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.15921, "supported_languages": null}, "macro.jira_source.get_resolution_columns": {"name": "get_resolution_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_resolution_columns.sql", "original_file_path": "macros/get_resolution_columns.sql", "unique_id": "macro.jira_source.get_resolution_columns", "macro_sql": "{% macro get_resolution_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.1598039, "supported_languages": null}, "macro.jira_source.get_component_columns": {"name": "get_component_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_component_columns.sql", "original_file_path": "macros/get_component_columns.sql", "unique_id": "macro.jira_source.get_component_columns", "macro_sql": "{% macro get_component_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"project_id\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.160491, "supported_languages": null}, "macro.jira_source.get_priority_columns": {"name": "get_priority_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_priority_columns.sql", "original_file_path": "macros/get_priority_columns.sql", "unique_id": "macro.jira_source.get_priority_columns", "macro_sql": "{% macro get_priority_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.161079, "supported_languages": null}, "macro.jira_source.get_sprint_columns": {"name": "get_sprint_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_sprint_columns.sql", "original_file_path": "macros/get_sprint_columns.sql", "unique_id": "macro.jira_source.get_sprint_columns", "macro_sql": "{% macro get_sprint_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"board_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"complete_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"end_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_date\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1695163462.161961, "supported_languages": null}}, "docs": {"doc.dbt.__overview__": {"name": "__overview__", "resource_type": "doc", "package_name": "dbt", "path": "overview.md", "original_file_path": "docs/overview.md", "unique_id": "doc.dbt.__overview__", "block_contents": "### Welcome!\n\nWelcome to the auto-generated documentation for your dbt project!\n\n### Navigation\n\nYou can use the `Project` and `Database` navigation tabs on the left side of the window to explore the models\nin your project.\n\n#### Project Tab\nThe `Project` tab mirrors the directory structure of your dbt project. In this tab, you can see all of the\nmodels defined in your dbt project, as well as models imported from dbt packages.\n\n#### Database Tab\nThe `Database` tab also exposes your models, but in a format that looks more like a database explorer. This view\nshows relations (tables and views) grouped into database schemas. Note that ephemeral models are _not_ shown\nin this interface, as they do not exist in the database.\n\n### Graph Exploration\nYou can click the blue icon on the bottom-right corner of the page to view the lineage graph of your models.\n\nOn model pages, you'll see the immediate parents and children of the model you're exploring. By clicking the `Expand`\nbutton at the top-right of this lineage pane, you'll be able to see all of the models that are used to build,\nor are built from, the model you're exploring.\n\nOnce expanded, you'll be able to use the `--select` and `--exclude` model selection syntax to filter the\nmodels in the graph. For more information on model selection, check out the [dbt docs](https://docs.getdbt.com/docs/model-selection-syntax).\n\nNote that you can also right-click on models to interactively filter and explore the graph.\n\n---\n\n### More information\n\n- [What is dbt](https://docs.getdbt.com/docs/introduction)?\n- Read the [dbt viewpoint](https://docs.getdbt.com/docs/viewpoint)\n- [Installation](https://docs.getdbt.com/docs/installation)\n- Join the [dbt Community](https://www.getdbt.com/community/) for questions and discussion"}}, "exposures": {}, "metrics": {}, "groups": {}, "selectors": {}, "disabled": {}, "parent_map": {"seed.jira_integration_tests.issue_link": [], "seed.jira_integration_tests.issue_type": [], "seed.jira_integration_tests.project_board": [], "seed.jira_integration_tests.resolution": [], "seed.jira_integration_tests.version": [], "seed.jira_integration_tests.status": [], "seed.jira_integration_tests.user_group": [], "seed.jira_integration_tests.component": [], "seed.jira_integration_tests.project": [], "seed.jira_integration_tests.issue_multiselect_history": [], "seed.jira_integration_tests.comment": [], "seed.jira_integration_tests.issue": [], "seed.jira_integration_tests.sprint": [], "seed.jira_integration_tests.field_option": [], "seed.jira_integration_tests.epic": [], "seed.jira_integration_tests.field": [], "seed.jira_integration_tests.user": [], "seed.jira_integration_tests.priority": [], "seed.jira_integration_tests.status_category": [], "seed.jira_integration_tests.issue_field_history": [], "seed.jira_integration_tests.project_category": [], "model.jira.jira__daily_issue_field_history": ["model.jira.int_jira__field_history_scd", "model.jira.int_jira__field_history_scd", "model.jira.int_jira__issue_calendar_spine", "model.jira_source.stg_jira__component", "model.jira_source.stg_jira__field_option", "model.jira_source.stg_jira__issue_type", "model.jira_source.stg_jira__status"], "model.jira.jira__user_enhanced": ["model.jira.int_jira__user_metrics", "model.jira.jira__issue_enhanced", "model.jira_source.stg_jira__user"], "model.jira.jira__issue_enhanced": ["model.jira.int_jira__issue_join", "model.jira.int_jira__issue_join", "model.jira.jira__daily_issue_field_history", "model.jira.jira__daily_issue_field_history"], "model.jira.jira__project_enhanced": ["model.jira.int_jira__project_metrics", "model.jira.jira__issue_enhanced", "model.jira_source.stg_jira__component", "model.jira_source.stg_jira__project", "model.jira_source.stg_jira__user"], "model.jira.int_jira__issue_type_parents": ["model.jira.int_jira__issue_epic", "model.jira_source.stg_jira__issue", "model.jira_source.stg_jira__issue_type"], "model.jira.int_jira__issue_epic": ["model.jira.int_jira__issue_field_history"], "model.jira.int_jira__user_metrics": ["model.jira.jira__issue_enhanced"], "model.jira.int_jira__issue_join": ["model.jira.int_jira__issue_assign_resolution", "model.jira.int_jira__issue_comments", "model.jira.int_jira__issue_sprint", "model.jira.int_jira__issue_users", "model.jira.int_jira__issue_versions", "model.jira_source.stg_jira__priority", "model.jira_source.stg_jira__project", "model.jira_source.stg_jira__resolution", "model.jira_source.stg_jira__status", "model.jira_source.stg_jira__status_category"], "model.jira.int_jira__issue_assign_resolution": ["model.jira.int_jira__issue_field_history"], "model.jira.int_jira__issue_versions": ["model.jira.int_jira__issue_multiselect_history", "model.jira_source.stg_jira__version"], "model.jira.int_jira__issue_users": ["model.jira.int_jira__issue_type_parents", "model.jira.int_jira__issue_type_parents", "model.jira_source.stg_jira__user"], "model.jira.int_jira__issue_sprint": ["model.jira.int_jira__issue_multiselect_history", "model.jira_source.stg_jira__sprint"], "model.jira.int_jira__issue_comments": ["model.jira_source.stg_jira__comment", "model.jira_source.stg_jira__user"], "model.jira.int_jira__project_metrics": ["model.jira.jira__issue_enhanced"], "model.jira.int_jira__issue_multiselect_history": ["model.jira_source.stg_jira__field", "model.jira_source.stg_jira__issue_multiselect_history"], "model.jira.int_jira__pivot_daily_field_history": ["model.jira.int_jira__daily_field_history"], "model.jira.int_jira__issue_calendar_spine": ["model.jira.int_jira__field_history_scd", "model.jira_source.stg_jira__issue"], "model.jira.int_jira__agg_multiselect_history": ["model.jira.int_jira__issue_multiselect_history"], "model.jira.int_jira__field_history_scd": ["model.jira.int_jira__pivot_daily_field_history", "model.jira.int_jira__pivot_daily_field_history"], "model.jira.int_jira__combine_field_histories": ["model.jira.int_jira__agg_multiselect_history", "model.jira.int_jira__issue_field_history"], "model.jira.int_jira__issue_field_history": ["model.jira_source.stg_jira__field", "model.jira_source.stg_jira__issue_field_history"], "model.jira.int_jira__daily_field_history": ["model.jira.int_jira__combine_field_histories"], "model.jira_source.stg_jira__comment": ["model.jira_source.stg_jira__comment_tmp", "model.jira_source.stg_jira__comment_tmp"], "model.jira_source.stg_jira__project": ["model.jira_source.stg_jira__project_tmp", "model.jira_source.stg_jira__project_tmp"], "model.jira_source.stg_jira__issue_field_history": ["model.jira_source.stg_jira__issue_field_history_tmp", "model.jira_source.stg_jira__issue_field_history_tmp"], "model.jira_source.stg_jira__version": ["model.jira_source.stg_jira__version_tmp", "model.jira_source.stg_jira__version_tmp"], "model.jira_source.stg_jira__sprint": ["model.jira_source.stg_jira__sprint_tmp", "model.jira_source.stg_jira__sprint_tmp"], "model.jira_source.stg_jira__field_option": ["model.jira_source.stg_jira__field_option_tmp", "model.jira_source.stg_jira__field_option_tmp"], "model.jira_source.stg_jira__field": ["model.jira_source.stg_jira__field_tmp", "model.jira_source.stg_jira__field_tmp"], "model.jira_source.stg_jira__resolution": ["model.jira_source.stg_jira__resolution_tmp", "model.jira_source.stg_jira__resolution_tmp"], "model.jira_source.stg_jira__status": ["model.jira_source.stg_jira__status_tmp", "model.jira_source.stg_jira__status_tmp"], "model.jira_source.stg_jira__issue": ["model.jira_source.stg_jira__issue_tmp", "model.jira_source.stg_jira__issue_tmp"], "model.jira_source.stg_jira__status_category": ["model.jira_source.stg_jira__status_category_tmp", "model.jira_source.stg_jira__status_category_tmp"], "model.jira_source.stg_jira__issue_multiselect_history": ["model.jira_source.stg_jira__issue_multiselect_history_tmp", "model.jira_source.stg_jira__issue_multiselect_history_tmp"], "model.jira_source.stg_jira__issue_type": ["model.jira_source.stg_jira__issue_type_tmp", "model.jira_source.stg_jira__issue_type_tmp"], "model.jira_source.stg_jira__issue_link": ["model.jira_source.stg_jira__issue_link_tmp", "model.jira_source.stg_jira__issue_link_tmp"], "model.jira_source.stg_jira__component": ["model.jira_source.stg_jira__component_tmp", "model.jira_source.stg_jira__component_tmp"], "model.jira_source.stg_jira__user": ["model.jira_source.stg_jira__user_tmp", "model.jira_source.stg_jira__user_tmp"], "model.jira_source.stg_jira__priority": ["model.jira_source.stg_jira__priority_tmp", "model.jira_source.stg_jira__priority_tmp"], "model.jira_source.stg_jira__version_tmp": ["source.jira_source.jira.version"], "model.jira_source.stg_jira__status_category_tmp": ["source.jira_source.jira.status_category"], "model.jira_source.stg_jira__field_option_tmp": ["source.jira_source.jira.field_option"], "model.jira_source.stg_jira__issue_multiselect_history_tmp": ["source.jira_source.jira.issue_multiselect_history"], "model.jira_source.stg_jira__issue_type_tmp": ["source.jira_source.jira.issue_type"], "model.jira_source.stg_jira__sprint_tmp": ["source.jira_source.jira.sprint"], "model.jira_source.stg_jira__status_tmp": ["source.jira_source.jira.status"], "model.jira_source.stg_jira__project_tmp": ["source.jira_source.jira.project"], "model.jira_source.stg_jira__comment_tmp": ["source.jira_source.jira.comment"], "model.jira_source.stg_jira__issue_field_history_tmp": ["source.jira_source.jira.issue_field_history"], "model.jira_source.stg_jira__issue_link_tmp": ["source.jira_source.jira.issue_link"], "model.jira_source.stg_jira__field_tmp": ["source.jira_source.jira.field"], "model.jira_source.stg_jira__user_tmp": ["source.jira_source.jira.user"], "model.jira_source.stg_jira__issue_tmp": ["source.jira_source.jira.issue"], "model.jira_source.stg_jira__priority_tmp": ["source.jira_source.jira.priority"], "model.jira_source.stg_jira__component_tmp": ["source.jira_source.jira.component"], "model.jira_source.stg_jira__resolution_tmp": ["source.jira_source.jira.resolution"], "test.jira.unique_jira__daily_issue_field_history_issue_day_id.75c24d3154": ["model.jira.jira__daily_issue_field_history"], "test.jira.not_null_jira__daily_issue_field_history_issue_day_id.d13b058bcd": ["model.jira.jira__daily_issue_field_history"], "test.jira.unique_jira__issue_enhanced_issue_id.fec6e723ee": ["model.jira.jira__issue_enhanced"], "test.jira.not_null_jira__issue_enhanced_issue_id.6b18e0db38": ["model.jira.jira__issue_enhanced"], "test.jira.unique_jira__project_enhanced_project_id.c18e39faef": ["model.jira.jira__project_enhanced"], "test.jira.not_null_jira__project_enhanced_project_id.4f7c58f1d4": ["model.jira.jira__project_enhanced"], "test.jira.unique_jira__user_enhanced_user_id.c9ee73454a": ["model.jira.jira__user_enhanced"], "test.jira.not_null_jira__user_enhanced_user_id.aecc00744a": ["model.jira.jira__user_enhanced"], "test.jira.unique_int_jira__issue_join_issue_id.0bd360ec4b": ["model.jira.int_jira__issue_join"], "test.jira.not_null_int_jira__issue_join_issue_id.53391b21a6": ["model.jira.int_jira__issue_join"], "test.jira.unique_int_jira__project_metrics_project_id.154ccc194e": ["model.jira.int_jira__project_metrics"], "test.jira.not_null_int_jira__project_metrics_project_id.1542338148": ["model.jira.int_jira__project_metrics"], "test.jira.unique_int_jira__user_metrics_user_id.c042bcdd66": ["model.jira.int_jira__user_metrics"], "test.jira.not_null_int_jira__user_metrics_user_id.2143177b14": ["model.jira.int_jira__user_metrics"], "test.jira.unique_int_jira__issue_comments_issue_id.26e3f11046": ["model.jira.int_jira__issue_comments"], "test.jira.not_null_int_jira__issue_comments_issue_id.9f16878e45": ["model.jira.int_jira__issue_comments"], "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_epic_issue_id__epic_issue_id.9ddee9201b": ["model.jira.int_jira__issue_epic"], "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_sprint_issue_id__current_sprint_id.aafda24567": ["model.jira.int_jira__issue_sprint"], "test.jira.unique_int_jira__issue_type_parents_issue_id.c07f8c6af3": ["model.jira.int_jira__issue_type_parents"], "test.jira.not_null_int_jira__issue_type_parents_issue_id.8dd98255b0": ["model.jira.int_jira__issue_type_parents"], "test.jira.unique_int_jira__issue_users_issue_id.e3a5962431": ["model.jira.int_jira__issue_users"], "test.jira.not_null_int_jira__issue_users_issue_id.480b7b6beb": ["model.jira.int_jira__issue_users"], "test.jira.unique_int_jira__agg_multiselect_history_batch_id.14b3dea579": ["model.jira.int_jira__agg_multiselect_history"], "test.jira.not_null_int_jira__agg_multiselect_history_batch_id.7d6d2460a8": ["model.jira.int_jira__agg_multiselect_history"], "test.jira.unique_int_jira__combine_field_histories_combined_history_id.5b6b492428": ["model.jira.int_jira__combine_field_histories"], "test.jira.not_null_int_jira__combine_field_histories_combined_history_id.943e81a794": ["model.jira.int_jira__combine_field_histories"], "test.jira.unique_int_jira__issue_calendar_spine_issue_day_id.c49483d2e5": ["model.jira.int_jira__issue_calendar_spine"], "test.jira.not_null_int_jira__issue_calendar_spine_issue_day_id.a9512b8e8a": ["model.jira.int_jira__issue_calendar_spine"], "test.jira.unique_int_jira__daily_field_history_issue_field_day_id.bfd34ced78": ["model.jira.int_jira__daily_field_history"], "test.jira.not_null_int_jira__daily_field_history_issue_field_day_id.c910c3df84": ["model.jira.int_jira__daily_field_history"], "test.jira.unique_int_jira__pivot_daily_field_history_issue_day_id.46c6f9a842": ["model.jira.int_jira__pivot_daily_field_history"], "test.jira.not_null_int_jira__pivot_daily_field_history_issue_day_id.b697c971fd": ["model.jira.int_jira__pivot_daily_field_history"], "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_field_history_field_id__issue_id__updated_at.34d1b3eaa1": ["model.jira.int_jira__issue_field_history"], "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_multiselect_history__fivetran_id__updated_at.aad394167d": ["model.jira.int_jira__issue_multiselect_history"], "test.jira.unique_int_jira__issue_assign_resolution_issue_id.f41f7c00ab": ["model.jira.int_jira__issue_assign_resolution"], "test.jira.not_null_int_jira__issue_assign_resolution_issue_id.b3af89c733": ["model.jira.int_jira__issue_assign_resolution"], "test.jira.unique_int_jira__field_history_scd_issue_day_id.21b932e949": ["model.jira.int_jira__field_history_scd"], "test.jira.not_null_int_jira__field_history_scd_issue_day_id.327ac0856c": ["model.jira.int_jira__field_history_scd"], "test.jira.unique_int_jira__issue_versions_issue_id.e2a88132de": ["model.jira.int_jira__issue_versions"], "test.jira.not_null_int_jira__issue_versions_issue_id.54c4cd445e": ["model.jira.int_jira__issue_versions"], "test.jira_source.unique_stg_jira__comment_comment_id.004104fac5": ["model.jira_source.stg_jira__comment"], "test.jira_source.not_null_stg_jira__comment_comment_id.5dec28a22a": ["model.jira_source.stg_jira__comment"], "test.jira_source.unique_stg_jira__component_component_id.1773ebe913": ["model.jira_source.stg_jira__component"], "test.jira_source.not_null_stg_jira__component_component_id.2f017ad5ad": ["model.jira_source.stg_jira__component"], "test.jira_source.unique_stg_jira__field_field_id.df7b462fff": ["model.jira_source.stg_jira__field"], "test.jira_source.not_null_stg_jira__field_field_id.34424f1c2b": ["model.jira_source.stg_jira__field"], "test.jira_source.not_null_stg_jira__field_option_field_id.1b1f37b358": ["model.jira_source.stg_jira__field_option"], "test.jira_source.unique_stg_jira__issue_issue_id.7bb0ee7230": ["model.jira_source.stg_jira__issue"], "test.jira_source.not_null_stg_jira__issue_issue_id.13a4fbe132": ["model.jira_source.stg_jira__issue"], "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_field_history_field_id__issue_id__updated_at.c01ecbb82c": ["model.jira_source.stg_jira__issue_field_history"], "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_multiselect_history__fivetran_id__updated_at.4dd2d1c5a8": ["model.jira_source.stg_jira__issue_multiselect_history"], "test.jira_source.unique_stg_jira__issue_type_issue_type_id.a89d34aa41": ["model.jira_source.stg_jira__issue_type"], "test.jira_source.not_null_stg_jira__issue_type_issue_type_id.57419fc343": ["model.jira_source.stg_jira__issue_type"], "test.jira_source.unique_stg_jira__priority_priority_id.79b77ea5d2": ["model.jira_source.stg_jira__priority"], "test.jira_source.not_null_stg_jira__priority_priority_id.ec0c873363": ["model.jira_source.stg_jira__priority"], "test.jira_source.unique_stg_jira__project_project_id.58d321d374": ["model.jira_source.stg_jira__project"], "test.jira_source.not_null_stg_jira__project_project_id.996fe19522": ["model.jira_source.stg_jira__project"], "test.jira_source.unique_stg_jira__resolution_resolution_id.b3acb37c87": ["model.jira_source.stg_jira__resolution"], "test.jira_source.not_null_stg_jira__resolution_resolution_id.1c04bac8a4": ["model.jira_source.stg_jira__resolution"], "test.jira_source.unique_stg_jira__sprint_sprint_id.8a73555fed": ["model.jira_source.stg_jira__sprint"], "test.jira_source.not_null_stg_jira__sprint_sprint_id.899b4b77d7": ["model.jira_source.stg_jira__sprint"], "test.jira_source.unique_stg_jira__status_status_id.0449241b95": ["model.jira_source.stg_jira__status"], "test.jira_source.not_null_stg_jira__status_status_id.b32a8a0d84": ["model.jira_source.stg_jira__status"], "test.jira_source.unique_stg_jira__status_category_status_category_id.99c869330a": ["model.jira_source.stg_jira__status_category"], "test.jira_source.not_null_stg_jira__status_category_status_category_id.7a89cdfcf0": ["model.jira_source.stg_jira__status_category"], "test.jira_source.unique_stg_jira__user_user_id.a397e1a23f": ["model.jira_source.stg_jira__user"], "test.jira_source.not_null_stg_jira__user_user_id.b2153f97d2": ["model.jira_source.stg_jira__user"], "test.jira_source.unique_stg_jira__version_version_id.08231bd017": ["model.jira_source.stg_jira__version"], "test.jira_source.not_null_stg_jira__version_version_id.03877ce324": ["model.jira_source.stg_jira__version"], "source.jira_source.jira.comment": [], "source.jira_source.jira.component": [], "source.jira_source.jira.field": [], "source.jira_source.jira.field_option": [], "source.jira_source.jira.issue": [], "source.jira_source.jira.issue_field_history": [], "source.jira_source.jira.issue_link": [], "source.jira_source.jira.issue_multiselect_history": [], "source.jira_source.jira.issue_type": [], "source.jira_source.jira.priority": [], "source.jira_source.jira.project": [], "source.jira_source.jira.resolution": [], "source.jira_source.jira.sprint": [], "source.jira_source.jira.status": [], "source.jira_source.jira.status_category": [], "source.jira_source.jira.user": [], "source.jira_source.jira.version": []}, "child_map": {"seed.jira_integration_tests.issue_link": [], "seed.jira_integration_tests.issue_type": [], "seed.jira_integration_tests.project_board": [], "seed.jira_integration_tests.resolution": [], "seed.jira_integration_tests.version": [], "seed.jira_integration_tests.status": [], "seed.jira_integration_tests.user_group": [], "seed.jira_integration_tests.component": [], "seed.jira_integration_tests.project": [], "seed.jira_integration_tests.issue_multiselect_history": [], "seed.jira_integration_tests.comment": [], "seed.jira_integration_tests.issue": [], "seed.jira_integration_tests.sprint": [], "seed.jira_integration_tests.field_option": [], "seed.jira_integration_tests.epic": [], "seed.jira_integration_tests.field": [], "seed.jira_integration_tests.user": [], "seed.jira_integration_tests.priority": [], "seed.jira_integration_tests.status_category": [], "seed.jira_integration_tests.issue_field_history": [], "seed.jira_integration_tests.project_category": [], "model.jira.jira__daily_issue_field_history": ["model.jira.jira__issue_enhanced", "model.jira.jira__issue_enhanced", "test.jira.not_null_jira__daily_issue_field_history_issue_day_id.d13b058bcd", "test.jira.unique_jira__daily_issue_field_history_issue_day_id.75c24d3154"], "model.jira.jira__user_enhanced": ["test.jira.not_null_jira__user_enhanced_user_id.aecc00744a", "test.jira.unique_jira__user_enhanced_user_id.c9ee73454a"], "model.jira.jira__issue_enhanced": ["model.jira.int_jira__project_metrics", "model.jira.int_jira__user_metrics", "model.jira.jira__project_enhanced", "model.jira.jira__user_enhanced", "test.jira.not_null_jira__issue_enhanced_issue_id.6b18e0db38", "test.jira.unique_jira__issue_enhanced_issue_id.fec6e723ee"], "model.jira.jira__project_enhanced": ["test.jira.not_null_jira__project_enhanced_project_id.4f7c58f1d4", "test.jira.unique_jira__project_enhanced_project_id.c18e39faef"], "model.jira.int_jira__issue_type_parents": ["model.jira.int_jira__issue_users", "model.jira.int_jira__issue_users", "test.jira.not_null_int_jira__issue_type_parents_issue_id.8dd98255b0", "test.jira.unique_int_jira__issue_type_parents_issue_id.c07f8c6af3"], "model.jira.int_jira__issue_epic": ["model.jira.int_jira__issue_type_parents", "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_epic_issue_id__epic_issue_id.9ddee9201b"], "model.jira.int_jira__user_metrics": ["model.jira.jira__user_enhanced", "test.jira.not_null_int_jira__user_metrics_user_id.2143177b14", "test.jira.unique_int_jira__user_metrics_user_id.c042bcdd66"], "model.jira.int_jira__issue_join": ["model.jira.jira__issue_enhanced", "model.jira.jira__issue_enhanced", "test.jira.not_null_int_jira__issue_join_issue_id.53391b21a6", "test.jira.unique_int_jira__issue_join_issue_id.0bd360ec4b"], "model.jira.int_jira__issue_assign_resolution": ["model.jira.int_jira__issue_join", "test.jira.not_null_int_jira__issue_assign_resolution_issue_id.b3af89c733", "test.jira.unique_int_jira__issue_assign_resolution_issue_id.f41f7c00ab"], "model.jira.int_jira__issue_versions": ["model.jira.int_jira__issue_join", "test.jira.not_null_int_jira__issue_versions_issue_id.54c4cd445e", "test.jira.unique_int_jira__issue_versions_issue_id.e2a88132de"], "model.jira.int_jira__issue_users": ["model.jira.int_jira__issue_join", "test.jira.not_null_int_jira__issue_users_issue_id.480b7b6beb", "test.jira.unique_int_jira__issue_users_issue_id.e3a5962431"], "model.jira.int_jira__issue_sprint": ["model.jira.int_jira__issue_join", "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_sprint_issue_id__current_sprint_id.aafda24567"], "model.jira.int_jira__issue_comments": ["model.jira.int_jira__issue_join", "test.jira.not_null_int_jira__issue_comments_issue_id.9f16878e45", "test.jira.unique_int_jira__issue_comments_issue_id.26e3f11046"], "model.jira.int_jira__project_metrics": ["model.jira.jira__project_enhanced", "test.jira.not_null_int_jira__project_metrics_project_id.1542338148", "test.jira.unique_int_jira__project_metrics_project_id.154ccc194e"], "model.jira.int_jira__issue_multiselect_history": ["model.jira.int_jira__agg_multiselect_history", "model.jira.int_jira__issue_sprint", "model.jira.int_jira__issue_versions", "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_multiselect_history__fivetran_id__updated_at.aad394167d"], "model.jira.int_jira__pivot_daily_field_history": ["model.jira.int_jira__field_history_scd", "model.jira.int_jira__field_history_scd", "test.jira.not_null_int_jira__pivot_daily_field_history_issue_day_id.b697c971fd", "test.jira.unique_int_jira__pivot_daily_field_history_issue_day_id.46c6f9a842"], "model.jira.int_jira__issue_calendar_spine": ["model.jira.jira__daily_issue_field_history", "test.jira.not_null_int_jira__issue_calendar_spine_issue_day_id.a9512b8e8a", "test.jira.unique_int_jira__issue_calendar_spine_issue_day_id.c49483d2e5"], "model.jira.int_jira__agg_multiselect_history": ["model.jira.int_jira__combine_field_histories", "test.jira.not_null_int_jira__agg_multiselect_history_batch_id.7d6d2460a8", "test.jira.unique_int_jira__agg_multiselect_history_batch_id.14b3dea579"], "model.jira.int_jira__field_history_scd": ["model.jira.int_jira__issue_calendar_spine", "model.jira.jira__daily_issue_field_history", "model.jira.jira__daily_issue_field_history", "test.jira.not_null_int_jira__field_history_scd_issue_day_id.327ac0856c", "test.jira.unique_int_jira__field_history_scd_issue_day_id.21b932e949"], "model.jira.int_jira__combine_field_histories": ["model.jira.int_jira__daily_field_history", "test.jira.not_null_int_jira__combine_field_histories_combined_history_id.943e81a794", "test.jira.unique_int_jira__combine_field_histories_combined_history_id.5b6b492428"], "model.jira.int_jira__issue_field_history": ["model.jira.int_jira__combine_field_histories", "model.jira.int_jira__issue_assign_resolution", "model.jira.int_jira__issue_epic", "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_field_history_field_id__issue_id__updated_at.34d1b3eaa1"], "model.jira.int_jira__daily_field_history": ["model.jira.int_jira__pivot_daily_field_history", "test.jira.not_null_int_jira__daily_field_history_issue_field_day_id.c910c3df84", "test.jira.unique_int_jira__daily_field_history_issue_field_day_id.bfd34ced78"], "model.jira_source.stg_jira__comment": ["model.jira.int_jira__issue_comments", "test.jira_source.not_null_stg_jira__comment_comment_id.5dec28a22a", "test.jira_source.unique_stg_jira__comment_comment_id.004104fac5"], "model.jira_source.stg_jira__project": ["model.jira.int_jira__issue_join", "model.jira.jira__project_enhanced", "test.jira_source.not_null_stg_jira__project_project_id.996fe19522", "test.jira_source.unique_stg_jira__project_project_id.58d321d374"], "model.jira_source.stg_jira__issue_field_history": ["model.jira.int_jira__issue_field_history", "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_field_history_field_id__issue_id__updated_at.c01ecbb82c"], "model.jira_source.stg_jira__version": ["model.jira.int_jira__issue_versions", "test.jira_source.not_null_stg_jira__version_version_id.03877ce324", "test.jira_source.unique_stg_jira__version_version_id.08231bd017"], "model.jira_source.stg_jira__sprint": ["model.jira.int_jira__issue_sprint", "test.jira_source.not_null_stg_jira__sprint_sprint_id.899b4b77d7", "test.jira_source.unique_stg_jira__sprint_sprint_id.8a73555fed"], "model.jira_source.stg_jira__field_option": ["model.jira.jira__daily_issue_field_history", "test.jira_source.not_null_stg_jira__field_option_field_id.1b1f37b358"], "model.jira_source.stg_jira__field": ["model.jira.int_jira__issue_field_history", "model.jira.int_jira__issue_multiselect_history", "test.jira_source.not_null_stg_jira__field_field_id.34424f1c2b", "test.jira_source.unique_stg_jira__field_field_id.df7b462fff"], "model.jira_source.stg_jira__resolution": ["model.jira.int_jira__issue_join", "test.jira_source.not_null_stg_jira__resolution_resolution_id.1c04bac8a4", "test.jira_source.unique_stg_jira__resolution_resolution_id.b3acb37c87"], "model.jira_source.stg_jira__status": ["model.jira.int_jira__issue_join", "model.jira.jira__daily_issue_field_history", "test.jira_source.not_null_stg_jira__status_status_id.b32a8a0d84", "test.jira_source.unique_stg_jira__status_status_id.0449241b95"], "model.jira_source.stg_jira__issue": ["model.jira.int_jira__issue_calendar_spine", "model.jira.int_jira__issue_type_parents", "test.jira_source.not_null_stg_jira__issue_issue_id.13a4fbe132", "test.jira_source.unique_stg_jira__issue_issue_id.7bb0ee7230"], "model.jira_source.stg_jira__status_category": ["model.jira.int_jira__issue_join", "test.jira_source.not_null_stg_jira__status_category_status_category_id.7a89cdfcf0", "test.jira_source.unique_stg_jira__status_category_status_category_id.99c869330a"], "model.jira_source.stg_jira__issue_multiselect_history": ["model.jira.int_jira__issue_multiselect_history", "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_multiselect_history__fivetran_id__updated_at.4dd2d1c5a8"], "model.jira_source.stg_jira__issue_type": ["model.jira.int_jira__issue_type_parents", "model.jira.jira__daily_issue_field_history", "test.jira_source.not_null_stg_jira__issue_type_issue_type_id.57419fc343", "test.jira_source.unique_stg_jira__issue_type_issue_type_id.a89d34aa41"], "model.jira_source.stg_jira__issue_link": [], "model.jira_source.stg_jira__component": ["model.jira.jira__daily_issue_field_history", "model.jira.jira__project_enhanced", "test.jira_source.not_null_stg_jira__component_component_id.2f017ad5ad", "test.jira_source.unique_stg_jira__component_component_id.1773ebe913"], "model.jira_source.stg_jira__user": ["model.jira.int_jira__issue_comments", "model.jira.int_jira__issue_users", "model.jira.jira__project_enhanced", "model.jira.jira__user_enhanced", "test.jira_source.not_null_stg_jira__user_user_id.b2153f97d2", "test.jira_source.unique_stg_jira__user_user_id.a397e1a23f"], "model.jira_source.stg_jira__priority": ["model.jira.int_jira__issue_join", "test.jira_source.not_null_stg_jira__priority_priority_id.ec0c873363", "test.jira_source.unique_stg_jira__priority_priority_id.79b77ea5d2"], "model.jira_source.stg_jira__version_tmp": ["model.jira_source.stg_jira__version", "model.jira_source.stg_jira__version"], "model.jira_source.stg_jira__status_category_tmp": ["model.jira_source.stg_jira__status_category", "model.jira_source.stg_jira__status_category"], "model.jira_source.stg_jira__field_option_tmp": ["model.jira_source.stg_jira__field_option", "model.jira_source.stg_jira__field_option"], "model.jira_source.stg_jira__issue_multiselect_history_tmp": ["model.jira_source.stg_jira__issue_multiselect_history", "model.jira_source.stg_jira__issue_multiselect_history"], "model.jira_source.stg_jira__issue_type_tmp": ["model.jira_source.stg_jira__issue_type", "model.jira_source.stg_jira__issue_type"], "model.jira_source.stg_jira__sprint_tmp": ["model.jira_source.stg_jira__sprint", "model.jira_source.stg_jira__sprint"], "model.jira_source.stg_jira__status_tmp": ["model.jira_source.stg_jira__status", "model.jira_source.stg_jira__status"], "model.jira_source.stg_jira__project_tmp": ["model.jira_source.stg_jira__project", "model.jira_source.stg_jira__project"], "model.jira_source.stg_jira__comment_tmp": ["model.jira_source.stg_jira__comment", "model.jira_source.stg_jira__comment"], "model.jira_source.stg_jira__issue_field_history_tmp": ["model.jira_source.stg_jira__issue_field_history", "model.jira_source.stg_jira__issue_field_history"], "model.jira_source.stg_jira__issue_link_tmp": ["model.jira_source.stg_jira__issue_link", "model.jira_source.stg_jira__issue_link"], "model.jira_source.stg_jira__field_tmp": ["model.jira_source.stg_jira__field", "model.jira_source.stg_jira__field"], "model.jira_source.stg_jira__user_tmp": ["model.jira_source.stg_jira__user", "model.jira_source.stg_jira__user"], "model.jira_source.stg_jira__issue_tmp": ["model.jira_source.stg_jira__issue", "model.jira_source.stg_jira__issue"], "model.jira_source.stg_jira__priority_tmp": ["model.jira_source.stg_jira__priority", "model.jira_source.stg_jira__priority"], "model.jira_source.stg_jira__component_tmp": ["model.jira_source.stg_jira__component", "model.jira_source.stg_jira__component"], "model.jira_source.stg_jira__resolution_tmp": ["model.jira_source.stg_jira__resolution", "model.jira_source.stg_jira__resolution"], "test.jira.unique_jira__daily_issue_field_history_issue_day_id.75c24d3154": [], "test.jira.not_null_jira__daily_issue_field_history_issue_day_id.d13b058bcd": [], "test.jira.unique_jira__issue_enhanced_issue_id.fec6e723ee": [], "test.jira.not_null_jira__issue_enhanced_issue_id.6b18e0db38": [], "test.jira.unique_jira__project_enhanced_project_id.c18e39faef": [], "test.jira.not_null_jira__project_enhanced_project_id.4f7c58f1d4": [], "test.jira.unique_jira__user_enhanced_user_id.c9ee73454a": [], "test.jira.not_null_jira__user_enhanced_user_id.aecc00744a": [], "test.jira.unique_int_jira__issue_join_issue_id.0bd360ec4b": [], "test.jira.not_null_int_jira__issue_join_issue_id.53391b21a6": [], "test.jira.unique_int_jira__project_metrics_project_id.154ccc194e": [], "test.jira.not_null_int_jira__project_metrics_project_id.1542338148": [], "test.jira.unique_int_jira__user_metrics_user_id.c042bcdd66": [], "test.jira.not_null_int_jira__user_metrics_user_id.2143177b14": [], "test.jira.unique_int_jira__issue_comments_issue_id.26e3f11046": [], "test.jira.not_null_int_jira__issue_comments_issue_id.9f16878e45": [], "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_epic_issue_id__epic_issue_id.9ddee9201b": [], "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_sprint_issue_id__current_sprint_id.aafda24567": [], "test.jira.unique_int_jira__issue_type_parents_issue_id.c07f8c6af3": [], "test.jira.not_null_int_jira__issue_type_parents_issue_id.8dd98255b0": [], "test.jira.unique_int_jira__issue_users_issue_id.e3a5962431": [], "test.jira.not_null_int_jira__issue_users_issue_id.480b7b6beb": [], "test.jira.unique_int_jira__agg_multiselect_history_batch_id.14b3dea579": [], "test.jira.not_null_int_jira__agg_multiselect_history_batch_id.7d6d2460a8": [], "test.jira.unique_int_jira__combine_field_histories_combined_history_id.5b6b492428": [], "test.jira.not_null_int_jira__combine_field_histories_combined_history_id.943e81a794": [], "test.jira.unique_int_jira__issue_calendar_spine_issue_day_id.c49483d2e5": [], "test.jira.not_null_int_jira__issue_calendar_spine_issue_day_id.a9512b8e8a": [], "test.jira.unique_int_jira__daily_field_history_issue_field_day_id.bfd34ced78": [], "test.jira.not_null_int_jira__daily_field_history_issue_field_day_id.c910c3df84": [], "test.jira.unique_int_jira__pivot_daily_field_history_issue_day_id.46c6f9a842": [], "test.jira.not_null_int_jira__pivot_daily_field_history_issue_day_id.b697c971fd": [], "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_field_history_field_id__issue_id__updated_at.34d1b3eaa1": [], "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_multiselect_history__fivetran_id__updated_at.aad394167d": [], "test.jira.unique_int_jira__issue_assign_resolution_issue_id.f41f7c00ab": [], "test.jira.not_null_int_jira__issue_assign_resolution_issue_id.b3af89c733": [], "test.jira.unique_int_jira__field_history_scd_issue_day_id.21b932e949": [], "test.jira.not_null_int_jira__field_history_scd_issue_day_id.327ac0856c": [], "test.jira.unique_int_jira__issue_versions_issue_id.e2a88132de": [], "test.jira.not_null_int_jira__issue_versions_issue_id.54c4cd445e": [], "test.jira_source.unique_stg_jira__comment_comment_id.004104fac5": [], "test.jira_source.not_null_stg_jira__comment_comment_id.5dec28a22a": [], "test.jira_source.unique_stg_jira__component_component_id.1773ebe913": [], "test.jira_source.not_null_stg_jira__component_component_id.2f017ad5ad": [], "test.jira_source.unique_stg_jira__field_field_id.df7b462fff": [], "test.jira_source.not_null_stg_jira__field_field_id.34424f1c2b": [], "test.jira_source.not_null_stg_jira__field_option_field_id.1b1f37b358": [], "test.jira_source.unique_stg_jira__issue_issue_id.7bb0ee7230": [], "test.jira_source.not_null_stg_jira__issue_issue_id.13a4fbe132": [], "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_field_history_field_id__issue_id__updated_at.c01ecbb82c": [], "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_multiselect_history__fivetran_id__updated_at.4dd2d1c5a8": [], "test.jira_source.unique_stg_jira__issue_type_issue_type_id.a89d34aa41": [], "test.jira_source.not_null_stg_jira__issue_type_issue_type_id.57419fc343": [], "test.jira_source.unique_stg_jira__priority_priority_id.79b77ea5d2": [], "test.jira_source.not_null_stg_jira__priority_priority_id.ec0c873363": [], "test.jira_source.unique_stg_jira__project_project_id.58d321d374": [], "test.jira_source.not_null_stg_jira__project_project_id.996fe19522": [], "test.jira_source.unique_stg_jira__resolution_resolution_id.b3acb37c87": [], "test.jira_source.not_null_stg_jira__resolution_resolution_id.1c04bac8a4": [], "test.jira_source.unique_stg_jira__sprint_sprint_id.8a73555fed": [], "test.jira_source.not_null_stg_jira__sprint_sprint_id.899b4b77d7": [], "test.jira_source.unique_stg_jira__status_status_id.0449241b95": [], "test.jira_source.not_null_stg_jira__status_status_id.b32a8a0d84": [], "test.jira_source.unique_stg_jira__status_category_status_category_id.99c869330a": [], "test.jira_source.not_null_stg_jira__status_category_status_category_id.7a89cdfcf0": [], "test.jira_source.unique_stg_jira__user_user_id.a397e1a23f": [], "test.jira_source.not_null_stg_jira__user_user_id.b2153f97d2": [], "test.jira_source.unique_stg_jira__version_version_id.08231bd017": [], "test.jira_source.not_null_stg_jira__version_version_id.03877ce324": [], "source.jira_source.jira.comment": ["model.jira_source.stg_jira__comment_tmp"], "source.jira_source.jira.component": ["model.jira_source.stg_jira__component_tmp"], "source.jira_source.jira.field": ["model.jira_source.stg_jira__field_tmp"], "source.jira_source.jira.field_option": ["model.jira_source.stg_jira__field_option_tmp"], "source.jira_source.jira.issue": ["model.jira_source.stg_jira__issue_tmp"], "source.jira_source.jira.issue_field_history": ["model.jira_source.stg_jira__issue_field_history_tmp"], "source.jira_source.jira.issue_link": ["model.jira_source.stg_jira__issue_link_tmp"], "source.jira_source.jira.issue_multiselect_history": ["model.jira_source.stg_jira__issue_multiselect_history_tmp"], "source.jira_source.jira.issue_type": ["model.jira_source.stg_jira__issue_type_tmp"], "source.jira_source.jira.priority": ["model.jira_source.stg_jira__priority_tmp"], "source.jira_source.jira.project": ["model.jira_source.stg_jira__project_tmp"], "source.jira_source.jira.resolution": ["model.jira_source.stg_jira__resolution_tmp"], "source.jira_source.jira.sprint": ["model.jira_source.stg_jira__sprint_tmp"], "source.jira_source.jira.status": ["model.jira_source.stg_jira__status_tmp"], "source.jira_source.jira.status_category": ["model.jira_source.stg_jira__status_category_tmp"], "source.jira_source.jira.user": ["model.jira_source.stg_jira__user_tmp"], "source.jira_source.jira.version": ["model.jira_source.stg_jira__version_tmp"]}, "group_map": {}} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v11.json", "dbt_version": "1.7.10", "generated_at": "2024-03-21T15:31:49.285760Z", "invocation_id": "ca58038f-9947-4199-a5f3-eec45b0edb02", "env": {}, "project_name": "jira_integration_tests", "project_id": "5f759e264a5963f1044a1500d3c2f166", "user_id": "8929baf0-9bc1-477e-9a57-eb8b0db4da62", "send_anonymous_usage_stats": true, "adapter_type": "postgres"}, "nodes": {"seed.jira_integration_tests.issue_link": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "issue_link", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "issue_link.csv", "original_file_path": "seeds/issue_link.csv", "unique_id": "seed.jira_integration_tests.issue_link", "fqn": ["jira_integration_tests", "issue_link"], "alias": "issue_link", "checksum": {"name": "sha256", "checksum": "312367c7b35868eceb3a002ba6b94c5cecbfe639dc0ca20da132ee8bf813ef36"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1711035089.772413, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"issue_link\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.issue_type": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "issue_type", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "issue_type.csv", "original_file_path": "seeds/issue_type.csv", "unique_id": "seed.jira_integration_tests.issue_type", "fqn": ["jira_integration_tests", "issue_type"], "alias": "issue_type", "checksum": {"name": "sha256", "checksum": "9344e04a1519453df3001300b845a3febed8ec3c6adb9dc4a57be4695abfe24a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1711035089.8393128, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"issue_type\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.project_board": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "project_board", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "project_board.csv", "original_file_path": "seeds/project_board.csv", "unique_id": "seed.jira_integration_tests.project_board", "fqn": ["jira_integration_tests", "project_board"], "alias": "project_board", "checksum": {"name": "sha256", "checksum": "bcbdbd043112e24554554ccc7203522657dc21fde3882f34f946384d05cbbd63"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1711035089.8435981, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"project_board\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.resolution": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "resolution", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "resolution.csv", "original_file_path": "seeds/resolution.csv", "unique_id": "seed.jira_integration_tests.resolution", "fqn": ["jira_integration_tests", "resolution"], "alias": "resolution", "checksum": {"name": "sha256", "checksum": "86c776b9cdb4865f4e446010c04dea71cfd63de917fb14cff8237b707c493600"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1711035089.85493, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"resolution\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.version": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "version", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "version.csv", "original_file_path": "seeds/version.csv", "unique_id": "seed.jira_integration_tests.version", "fqn": ["jira_integration_tests", "version"], "alias": "version", "checksum": {"name": "sha256", "checksum": "9d4a930396e2d9bef0d8ddfe95be3d37fa0d9d6d4da794ea3c8db3033803f1d5"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1711035089.864361, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"version\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.status": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "status", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "status.csv", "original_file_path": "seeds/status.csv", "unique_id": "seed.jira_integration_tests.status", "fqn": ["jira_integration_tests", "status"], "alias": "status", "checksum": {"name": "sha256", "checksum": "8151fe8575891a3f2b4dde0458a53bc2955d011e755d0e7e81e95110e36d324b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1711035089.868607, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"status\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.user_group": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "user_group", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "user_group.csv", "original_file_path": "seeds/user_group.csv", "unique_id": "seed.jira_integration_tests.user_group", "fqn": ["jira_integration_tests", "user_group"], "alias": "user_group", "checksum": {"name": "sha256", "checksum": "7fd3cb7309fa49d028293f7f3c8c4f0eb205d0a290db961630238c0fb575b97f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1711035089.870364, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"user_group\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.component": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "component", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "component.csv", "original_file_path": "seeds/component.csv", "unique_id": "seed.jira_integration_tests.component", "fqn": ["jira_integration_tests", "component"], "alias": "component", "checksum": {"name": "sha256", "checksum": "31d1c1e8028eb23e7d394de3280fca30c98405d19a73d7e13f5f66f3859c1d7b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "bigint", "project_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}", "project_id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"}}, "created_at": 1711035089.873245, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"component\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.project": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "project", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "project.csv", "original_file_path": "seeds/project.csv", "unique_id": "seed.jira_integration_tests.project", "fqn": ["jira_integration_tests", "project"], "alias": "project", "checksum": {"name": "sha256", "checksum": "775af5e807b5cd3c6f1e3f675747350d5b168d7139268f4d8c3a054971443365"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1711035089.87494, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"project\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.issue_multiselect_history": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "issue_multiselect_history", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "issue_multiselect_history.csv", "original_file_path": "seeds/issue_multiselect_history.csv", "unique_id": "seed.jira_integration_tests.issue_multiselect_history", "fqn": ["jira_integration_tests", "issue_multiselect_history"], "alias": "issue_multiselect_history", "checksum": {"name": "sha256", "checksum": "5bcb65e84d671b5bbe1936c059e86c03e51c0fe8f8bf0bb022f9a2e0a2e85ee3"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "time": "timestamp", "issue_id": "bigint", "value": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"time": "timestamp", "issue_id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}", "value": "{{ 'string' if target.name in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1711035089.8764548, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"issue_multiselect_history\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.comment": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "comment", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "comment.csv", "original_file_path": "seeds/comment.csv", "unique_id": "seed.jira_integration_tests.comment", "fqn": ["jira_integration_tests", "comment"], "alias": "comment", "checksum": {"name": "sha256", "checksum": "6935f79d9f0e496a33d3a3d2fe79b130ffffc4631a10b0607b25ef73c01bd036"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "bigint", "created": "timestamp", "issue_id": "bigint", "updated": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}", "created": "timestamp", "issue_id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}", "updated": "timestamp"}}, "created_at": 1711035089.8781161, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"comment\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.issue": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "issue", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "issue.csv", "original_file_path": "seeds/issue.csv", "unique_id": "seed.jira_integration_tests.issue", "fqn": ["jira_integration_tests", "issue"], "alias": "issue", "checksum": {"name": "sha256", "checksum": "5049afd8b9527c788c9dbffd893865f84d72cea3467bed648ae06f2400782c85"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "bigint", "created": "timestamp", "work_ratio": "float", "resolved": "timestamp", "updated": "timestamp", "assignee": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}", "created": "timestamp", "work_ratio": "float", "resolved": "timestamp", "updated": "timestamp", "assignee": "{{ 'string' if target.name in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1711035089.879872, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"issue\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.sprint": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "sprint", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "sprint.csv", "original_file_path": "seeds/sprint.csv", "unique_id": "seed.jira_integration_tests.sprint", "fqn": ["jira_integration_tests", "sprint"], "alias": "sprint", "checksum": {"name": "sha256", "checksum": "bf7457f18bc5e4324d86754429e6a5d22477179a5f12b5dde1e70ba474858aaa"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "bigint", "complete_date": "timestamp", "end_date": "timestamp", "start_date": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}", "complete_date": "timestamp", "end_date": "timestamp", "start_date": "timestamp"}}, "created_at": 1711035089.8822799, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"sprint\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.field_option": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "field_option", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "field_option.csv", "original_file_path": "seeds/field_option.csv", "unique_id": "seed.jira_integration_tests.field_option", "fqn": ["jira_integration_tests", "field_option"], "alias": "field_option", "checksum": {"name": "sha256", "checksum": "244566dcb2b76ecb13c849a94dfcc4f90f81ebb18ec7035b133ab110f6bebe5e"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"}}, "created_at": 1711035089.8836422, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"field_option\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.epic": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "epic", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "epic.csv", "original_file_path": "seeds/epic.csv", "unique_id": "seed.jira_integration_tests.epic", "fqn": ["jira_integration_tests", "epic"], "alias": "epic", "checksum": {"name": "sha256", "checksum": "1ead0f0e22b5ec22e64a1d66ef3168474b40bfc36d1b1f4620a508a2c3df5ecc"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"}}, "created_at": 1711035089.8849862, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"epic\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.field": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "field", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "field.csv", "original_file_path": "seeds/field.csv", "unique_id": "seed.jira_integration_tests.field", "fqn": ["jira_integration_tests", "field"], "alias": "field", "checksum": {"name": "sha256", "checksum": "8034e34e347d6921ec34cfcb94ac2cbcd2a0f07ce242dfa4ce363e86c34a8c69"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"id": "{{ 'string' if target.name in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1711035089.8865201, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"field\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.user": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "user", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "user.csv", "original_file_path": "seeds/user.csv", "unique_id": "seed.jira_integration_tests.user", "fqn": ["jira_integration_tests", "user"], "alias": "user", "checksum": {"name": "sha256", "checksum": "b75650429987423d1a8641f89c134178419589280941f32938d658f91355c060"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1711035089.8882098, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"user\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.priority": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "priority", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "priority.csv", "original_file_path": "seeds/priority.csv", "unique_id": "seed.jira_integration_tests.priority", "fqn": ["jira_integration_tests", "priority"], "alias": "priority", "checksum": {"name": "sha256", "checksum": "b19c19420674ce84b71591bfab9aedd574d9c2626a49e27d68b307b16cff9832"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1711035089.889834, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"priority\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.status_category": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "status_category", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "status_category.csv", "original_file_path": "seeds/status_category.csv", "unique_id": "seed.jira_integration_tests.status_category", "fqn": ["jira_integration_tests", "status_category"], "alias": "status_category", "checksum": {"name": "sha256", "checksum": "a51b50ed4dfe4e40dc90ec2eef680d51fe14af805a63f369f9521a9ca3fed9fd"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1711035089.8911638, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"status_category\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.issue_field_history": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "issue_field_history", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "issue_field_history.csv", "original_file_path": "seeds/issue_field_history.csv", "unique_id": "seed.jira_integration_tests.issue_field_history", "fqn": ["jira_integration_tests", "issue_field_history"], "alias": "issue_field_history", "checksum": {"name": "sha256", "checksum": "cef5f42761e1da4804c5562d92f9c847631d325046f1f67b24d937746f15d280"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "time": "timestamp", "issue_id": "bigint", "value": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"time": "timestamp", "issue_id": "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}", "value": "{{ 'string' if target.name in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1711035089.8924952, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"issue_field_history\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "seed.jira_integration_tests.project_category": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "project_category", "resource_type": "seed", "package_name": "jira_integration_tests", "path": "project_category.csv", "original_file_path": "seeds/project_category.csv", "unique_id": "seed.jira_integration_tests.project_category", "fqn": ["jira_integration_tests", "project_category"], "alias": "project_category", "checksum": {"name": "sha256", "checksum": "815d04bd97ee55374555b17b08ecf47b6a16b095893071b61d57947418019e51"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1711035089.893877, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"project_category\"", "raw_code": "", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "depends_on": {"macros": []}}, "model.jira.jira__daily_issue_field_history": {"database": "postgres", "schema": "jira_integrations_tests_33_jira", "name": "jira__daily_issue_field_history", "resource_type": "model", "package_name": "jira", "path": "jira__daily_issue_field_history.sql", "original_file_path": "models/jira__daily_issue_field_history.sql", "unique_id": "model.jira.jira__daily_issue_field_history", "fqn": ["jira", "jira__daily_issue_field_history"], "alias": "jira__daily_issue_field_history", "checksum": {"name": "sha256", "checksum": "8cc82db997c52f87710d9e221d972b04670b316a4d853c57614f0b462308c22d"}, "config": {"enabled": true, "alias": null, "schema": "jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "issue_day_id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected", "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "Each record represents a snapshot of an issue's selected fields (as specified in the `issue_history_columns` variable + sprint and status by default) on a given day. Each issue will have a record for every day in which it was open and/or being updated. For currently open issues, the latest date will be the current date, and for closed issues, this will be the last time the issue was resolved OR updated in any way (plus a configurable buffer afterward, set to a month by default). Note: this is an incremental model.\n", "columns": {"date_day": {"name": "date_day", "description": "Date on which the issue had these field values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` with these values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_day_id": {"name": "issue_day_id", "description": "Surrogate key hashed on `date_day` and `issue_id`", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint": {"name": "sprint", "description": "The ID of the sprint that an issue is slotted into on a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "The ID of the status that an issue has on a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "The name of the status that an issue has on a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "jira", "partition_by": {"field": "date_day", "data_type": "date"}, "unique_key": "issue_day_id", "incremental_strategy": "delete+insert", "file_format": "delta"}, "created_at": 1711035090.522869, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira\".\"jira__daily_issue_field_history\"", "raw_code": "{{\n config(\n materialized='incremental',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='issue_day_id',\n incremental_strategy = 'merge' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n-- grab column names that were pivoted out\n{%- set pivot_data_columns = adapter.get_columns_in_relation(ref('int_jira__field_history_scd')) -%}\n\n-- in intermediate/field_history/\nwith pivoted_daily_history as (\n\n select * \n from {{ ref('int_jira__field_history_scd') }}\n\n {% if is_incremental() %}\n \n where valid_starting_on >= (select max(date_day) from {{ this }} )\n\n-- If no issue fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist \n-- those values into the future.\n\n), most_recent_data as ( \n select \n *\n from {{ this }}\n where date_day = (select max(date_day) from {{ this }} )\n\n{% endif %}\n\n), field_option as (\n \n select *\n from {{ var('field_option') }}\n),\n\nstatuses as (\n \n select *\n from {{ var('status') }}\n),\n\nissue_types as (\n \n select *\n from {{ var('issue_type') }}\n),\n\n{% if var('jira_using_components', True) %}\ncomponents as (\n\n select * \n from {{ var('component') }}\n),\n{% endif %}\n\n-- in intermediate/field_history/\ncalendar as (\n\n select *\n from {{ ref('int_jira__issue_calendar_spine') }}\n\n {% if is_incremental() %}\n where date_day >= (select max(date_day) from {{ this }} )\n {% endif %}\n),\n\njoined as (\n\n select\n calendar.date_day,\n calendar.issue_id\n\n {% if is_incremental() %} \n {% for col in pivot_data_columns %}\n {% if col.name|lower == 'components' and var('jira_using_components', True) %}\n , coalesce(pivoted_daily_history.components, most_recent_data.components) as components\n\n {% elif col.name|lower not in ['issue_day_id', 'issue_id', 'valid_starting_on', 'components'] %} \n , coalesce(pivoted_daily_history.{{ col.name }}, most_recent_data.{{ col.name }}) as {{ col.name }}\n\n {% endif %}\n {% endfor %} \n\n {% else %}\n {% for col in pivot_data_columns %}\n {% if col.name|lower == 'components' and var('jira_using_components', True) %}\n , pivoted_daily_history.components \n\n {% elif col.name|lower not in ['issue_day_id', 'issue_id', 'valid_starting_on', 'components'] %} \n , pivoted_daily_history.{{ col.name }}\n\n {% endif %}\n {% endfor %} \n {% endif %}\n \n from calendar\n left join pivoted_daily_history \n on calendar.issue_id = pivoted_daily_history.issue_id\n and calendar.date_day = pivoted_daily_history.valid_starting_on\n \n {% if is_incremental() %}\n left join most_recent_data\n on calendar.issue_id = most_recent_data.issue_id\n and calendar.date_day = most_recent_data.date_day\n {% endif %}\n),\n\nset_values as (\n select\n date_day,\n issue_id,\n joined.status_id,\n sum( case when joined.status_id is null then 0 else 1 end) over ( partition by issue_id\n order by date_day rows unbounded preceding) as status_id_field_partition\n\n -- list of exception columns\n {% set exception_cols = ['issue_id', 'issue_day_id', 'valid_starting_on', 'status', 'status_id', 'components', 'issue_type'] %}\n\n {% for col in pivot_data_columns %}\n {% if col.name|lower == 'components' and var('jira_using_components', True) %}\n , coalesce(components.component_name, joined.components) as components\n , sum(case when joined.components is null then 0 else 1 end) over (partition by issue_id order by date_day rows unbounded preceding) as component_field_partition\n\n {% elif col.name|lower == 'issue_type' %}\n , coalesce(issue_types.issue_type_name, joined.issue_type) as issue_type\n , sum(case when joined.issue_type is null then 0 else 1 end) over (partition by issue_id order by date_day rows unbounded preceding) as issue_type_field_partition\n\n {% elif col.name|lower not in exception_cols %}\n , coalesce(field_option_{{ col.name }}.field_option_name, joined.{{ col.name }}) as {{ col.name }}\n -- create a batch/partition once a new value is provided\n , sum( case when joined.{{ col.name }} is null then 0 else 1 end) over ( partition by issue_id\n order by date_day rows unbounded preceding) as {{ col.name }}_field_partition\n\n {% endif %}\n {% endfor %}\n\n from joined\n\n {% for col in pivot_data_columns %}\n {% if col.name|lower == 'components' and var('jira_using_components', True) %}\n left join components \n on cast(components.component_id as {{ dbt.type_string() }}) = joined.components\n \n {% elif col.name|lower == 'issue_type' %}\n left join issue_types \n on cast(issue_types.issue_type_id as {{ dbt.type_string() }}) = joined.issue_type\n\n {% elif col.name|lower not in exception_cols %}\n left join field_option as field_option_{{ col.name }}\n on cast(field_option_{{ col.name }}.field_id as {{ dbt.type_string() }}) = joined.{{ col.name }}\n\n {% endif %}\n {% endfor %}\n),\n\nfill_values as (\n\n select \n date_day,\n issue_id,\n first_value( status_id ) over (\n partition by issue_id, status_id_field_partition \n order by date_day asc rows between unbounded preceding and current row) as status_id\n\n {% for col in pivot_data_columns %}\n {% if col.name|lower == 'components' and var('jira_using_components', True) %}\n , first_value(components) over (\n partition by issue_id, component_field_partition \n order by date_day asc rows between unbounded preceding and current row) as components\n\n {% elif col.name|lower not in ['issue_id', 'issue_day_id', 'valid_starting_on', 'status', 'status_id', 'components'] %}\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by issue_id, {{ col.name }}_field_partition \n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n\n {% endif %}\n {% endfor %}\n\n from set_values\n),\n\nfix_null_values as (\n\n select \n date_day,\n issue_id\n\n {% for col in pivot_data_columns %}\n {% if col.name|lower == 'components' and var('jira_using_components', True) %}\n , case when components = 'is_null' then null else components end as components\n\n {% elif col.name|lower not in ['issue_id','issue_day_id','valid_starting_on', 'status', 'components'] %}\n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when {{ col.name }} = 'is_null' then null else {{ col.name }} end as {{ col.name }}\n\n {% endif %}\n {% endfor %}\n\n from fill_values\n\n),\n\nsurrogate_key as (\n\n select\n fix_null_values.date_day,\n fix_null_values.issue_id,\n statuses.status_name as status\n\n {% for col in pivot_data_columns %}\n {% if col.name|lower == 'components' and var('jira_using_components', True) %}\n , fix_null_values.components as components\n\n {% elif col.name|lower not in ['issue_id','issue_day_id','valid_starting_on', 'status', 'components'] %} \n , fix_null_values.{{ col.name }} as {{ col.name }}\n\n {% endif %}\n {% endfor %}\n\n , {{ dbt_utils.generate_surrogate_key(['date_day','issue_id']) }} as issue_day_id\n\n from fix_null_values\n\n left join statuses\n on cast(statuses.status_id as {{ dbt.type_string() }}) = fix_null_values.status_id\n)\n\nselect *\nfrom surrogate_key", "language": "sql", "refs": [{"name": "int_jira__field_history_scd", "package": null, "version": null}, {"name": "int_jira__field_history_scd", "package": null, "version": null}, {"name": "stg_jira__field_option", "package": null, "version": null}, {"name": "stg_jira__status", "package": null, "version": null}, {"name": "stg_jira__issue_type", "package": null, "version": null}, {"name": "stg_jira__component", "package": null, "version": null}, {"name": "int_jira__issue_calendar_spine", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.generate_surrogate_key", "macro.dbt.type_string"], "nodes": ["model.jira.int_jira__field_history_scd", "model.jira_source.stg_jira__field_option", "model.jira_source.stg_jira__status", "model.jira_source.stg_jira__issue_type", "model.jira_source.stg_jira__component", "model.jira.int_jira__issue_calendar_spine"]}, "compiled_path": "target/compiled/jira/models/jira__daily_issue_field_history.sql", "compiled": true, "compiled_code": "\n\n-- grab column names that were pivoted out-- in intermediate/field_history/\nwith pivoted_daily_history as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__field_history_scd\"\n\n \n \n where valid_starting_on >= (select max(date_day) from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__daily_issue_field_history\" )\n\n-- If no issue fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist \n-- those values into the future.\n\n), most_recent_data as ( \n select \n *\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__daily_issue_field_history\"\n where date_day = (select max(date_day) from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__daily_issue_field_history\" )\n\n\n\n), field_option as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field_option\"\n),\n\nstatuses as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status\"\n),\n\nissue_types as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_type\"\n),\n\n\ncomponents as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__component\"\n),\n\n\n-- in intermediate/field_history/\ncalendar as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_calendar_spine\"\n\n \n where date_day >= (select max(date_day) from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__daily_issue_field_history\" )\n \n),\n\njoined as (\n\n select\n calendar.date_day,\n calendar.issue_id\n\n \n \n \n \n \n \n \n \n \n , coalesce(pivoted_daily_history.status_id, most_recent_data.status_id) as status_id\n\n \n \n \n , coalesce(pivoted_daily_history.status, most_recent_data.status) as status\n\n \n \n \n , coalesce(pivoted_daily_history.sprint, most_recent_data.sprint) as sprint\n\n \n \n \n , coalesce(pivoted_daily_history.summary, most_recent_data.summary) as summary\n\n \n \n \n , coalesce(pivoted_daily_history.story_points, most_recent_data.story_points) as story_points\n\n \n \n \n , coalesce(pivoted_daily_history.components, most_recent_data.components) as components\n\n \n \n\n \n \n from calendar\n left join pivoted_daily_history \n on calendar.issue_id = pivoted_daily_history.issue_id\n and calendar.date_day = pivoted_daily_history.valid_starting_on\n \n \n left join most_recent_data\n on calendar.issue_id = most_recent_data.issue_id\n and calendar.date_day = most_recent_data.date_day\n \n),\n\nset_values as (\n select\n date_day,\n issue_id,\n joined.status_id,\n sum( case when joined.status_id is null then 0 else 1 end) over ( partition by issue_id\n order by date_day rows unbounded preceding) as status_id_field_partition\n\n -- list of exception columns\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n , coalesce(field_option_sprint.field_option_name, joined.sprint) as sprint\n -- create a batch/partition once a new value is provided\n , sum( case when joined.sprint is null then 0 else 1 end) over ( partition by issue_id\n order by date_day rows unbounded preceding) as sprint_field_partition\n\n \n \n \n , coalesce(field_option_summary.field_option_name, joined.summary) as summary\n -- create a batch/partition once a new value is provided\n , sum( case when joined.summary is null then 0 else 1 end) over ( partition by issue_id\n order by date_day rows unbounded preceding) as summary_field_partition\n\n \n \n \n , coalesce(field_option_story_points.field_option_name, joined.story_points) as story_points\n -- create a batch/partition once a new value is provided\n , sum( case when joined.story_points is null then 0 else 1 end) over ( partition by issue_id\n order by date_day rows unbounded preceding) as story_points_field_partition\n\n \n \n \n , coalesce(components.component_name, joined.components) as components\n , sum(case when joined.components is null then 0 else 1 end) over (partition by issue_id order by date_day rows unbounded preceding) as component_field_partition\n\n \n \n\n from joined\n\n \n \n \n \n \n \n \n \n \n \n \n \n left join field_option as field_option_sprint\n on cast(field_option_sprint.field_id as TEXT) = joined.sprint\n\n \n \n \n left join field_option as field_option_summary\n on cast(field_option_summary.field_id as TEXT) = joined.summary\n\n \n \n \n left join field_option as field_option_story_points\n on cast(field_option_story_points.field_id as TEXT) = joined.story_points\n\n \n \n \n left join components \n on cast(components.component_id as TEXT) = joined.components\n \n \n \n),\n\nfill_values as (\n\n select \n date_day,\n issue_id,\n first_value( status_id ) over (\n partition by issue_id, status_id_field_partition \n order by date_day asc rows between unbounded preceding and current row) as status_id\n\n \n \n \n \n \n \n \n \n \n \n \n \n -- grab the value that started this batch/partition\n , first_value( sprint ) over (\n partition by issue_id, sprint_field_partition \n order by date_day asc rows between unbounded preceding and current row) as sprint\n\n \n \n \n -- grab the value that started this batch/partition\n , first_value( summary ) over (\n partition by issue_id, summary_field_partition \n order by date_day asc rows between unbounded preceding and current row) as summary\n\n \n \n \n -- grab the value that started this batch/partition\n , first_value( story_points ) over (\n partition by issue_id, story_points_field_partition \n order by date_day asc rows between unbounded preceding and current row) as story_points\n\n \n \n \n , first_value(components) over (\n partition by issue_id, component_field_partition \n order by date_day asc rows between unbounded preceding and current row) as components\n\n \n \n\n from set_values\n),\n\nfix_null_values as (\n\n select \n date_day,\n issue_id\n\n \n \n \n \n \n \n \n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when status_id = 'is_null' then null else status_id end as status_id\n\n \n \n \n \n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when sprint = 'is_null' then null else sprint end as sprint\n\n \n \n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when summary = 'is_null' then null else summary end as summary\n\n \n \n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when story_points = 'is_null' then null else story_points end as story_points\n\n \n \n \n , case when components = 'is_null' then null else components end as components\n\n \n \n\n from fill_values\n\n),\n\nsurrogate_key as (\n\n select\n fix_null_values.date_day,\n fix_null_values.issue_id,\n statuses.status_name as status\n\n \n \n \n \n \n \n \n \n , fix_null_values.status_id as status_id\n\n \n \n \n \n \n , fix_null_values.sprint as sprint\n\n \n \n \n , fix_null_values.summary as summary\n\n \n \n \n , fix_null_values.story_points as story_points\n\n \n \n \n , fix_null_values.components as components\n\n \n \n\n , md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as issue_day_id\n\n from fix_null_values\n\n left join statuses\n on cast(statuses.status_id as TEXT) = fix_null_values.status_id\n)\n\nselect *\nfrom surrogate_key", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.jira__user_enhanced": {"database": "postgres", "schema": "jira_integrations_tests_33_jira", "name": "jira__user_enhanced", "resource_type": "model", "package_name": "jira", "path": "jira__user_enhanced.sql", "original_file_path": "models/jira__user_enhanced.sql", "unique_id": "model.jira.jira__user_enhanced", "fqn": ["jira", "jira__user_enhanced"], "alias": "jira__user_enhanced", "checksum": {"name": "sha256", "checksum": "6f7332740533b307bc99ce9cf8fc6cf3e91cd88860b14b2c986ec56f0826fdbf"}, "config": {"enabled": true, "alias": null, "schema": "jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of users enriched with their projects, and the volume and velocity of their issues.\n", "columns": {"user_id": {"name": "user_id", "description": "Unique ID of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "Email associated with the user acccount.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "locale": {"name": "locale", "description": "The Java locale of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "user_display_name": {"name": "user_display_name", "description": "Name of the user as it appears in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_zone": {"name": "time_zone", "description": "The user's timezone, as defined in their settings.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "username": {"name": "username", "description": "Account username.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "projects": {"name": "projects", "description": "Comma-separated list of projects on which the user has been assigned to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_closed_issues": {"name": "count_closed_issues", "description": "The number of issues that the user has closed (while being assigned to).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_open_issues": {"name": "count_open_issues", "description": "The number of currently open issues that the user is assigned to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_close_time_seconds": {"name": "avg_close_time_seconds", "description": "The average time taken to close issues since assignment, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_seconds": {"name": "avg_age_currently_open_seconds", "description": "Tjhe average age of a user's currently open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_close_time_seconds": {"name": "median_close_time_seconds", "description": "The median time taken to close issues since assignment, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_seconds": {"name": "median_age_currently_open_seconds", "description": "The median age of a user's currently open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_close_time_days": {"name": "avg_close_time_days", "description": "The average time taken to close issues since assignment, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_days": {"name": "avg_age_currently_open_days", "description": "The average age of a user's currently open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_close_time_days": {"name": "median_close_time_days", "description": "The median time taken to close issues since assignment, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_days": {"name": "median_age_currently_open_days", "description": "The median age of a user's currently open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira"}, "created_at": 1711035090.5413098, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira\".\"jira__user_enhanced\"", "raw_code": "with jira_user as (\n\n select *\n from {{ var('user') }}\n),\n\nuser_metrics as (\n\n select *\n from {{ ref('int_jira__user_metrics') }}\n),\n\nissue as (\n\n select *\n from {{ ref('jira__issue_enhanced') }} \n),\n\nuser_project as (\n\n select \n assignee_user_id,\n project_name\n\n from issue\n group by 1,2\n\n),\n\nagg_user_projects as (\n\n select \n assignee_user_id,\n {{ fivetran_utils.string_agg( \"project_name\", \"', '\" ) }} as projects\n\n from user_project\n group by 1\n),\n\nuser_join as (\n\n select\n jira_user.*,\n agg_user_projects.projects, -- projects they've worked on issues for\n coalesce(user_metrics.count_closed_issues, 0) as count_closed_issues,\n coalesce(user_metrics.count_open_issues, 0) as count_open_issues,\n\n -- days\n user_metrics.avg_close_time_days,\n user_metrics.avg_age_currently_open_days,\n \n user_metrics.median_close_time_days,\n user_metrics.median_age_currently_open_days,\n\n -- seconds\n user_metrics.avg_close_time_seconds,\n user_metrics.avg_age_currently_open_seconds,\n \n user_metrics.median_close_time_seconds,\n user_metrics.median_age_currently_open_seconds\n\n from jira_user \n left join user_metrics on jira_user.user_id = user_metrics.user_id\n left join agg_user_projects on jira_user.user_id = agg_user_projects.assignee_user_id\n)\n\nselect * from user_join", "language": "sql", "refs": [{"name": "stg_jira__user", "package": null, "version": null}, {"name": "int_jira__user_metrics", "package": null, "version": null}, {"name": "jira__issue_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.fivetran_utils.string_agg"], "nodes": ["model.jira_source.stg_jira__user", "model.jira.int_jira__user_metrics", "model.jira.jira__issue_enhanced"]}, "compiled_path": "target/compiled/jira/models/jira__user_enhanced.sql", "compiled": true, "compiled_code": "with __dbt__cte__int_jira__user_metrics as (\nwith issue as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\" \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_close_time_seconds,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_age_currently_open_seconds\n\n from issue\n\n group by 1 \n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics\n), jira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nuser_metrics as (\n\n select *\n from __dbt__cte__int_jira__user_metrics\n),\n\nissue as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\" \n),\n\nuser_project as (\n\n select \n assignee_user_id,\n project_name\n\n from issue\n group by 1,2\n\n),\n\nagg_user_projects as (\n\n select \n assignee_user_id,\n \n string_agg(project_name, ', ')\n\n as projects\n\n from user_project\n group by 1\n),\n\nuser_join as (\n\n select\n jira_user.*,\n agg_user_projects.projects, -- projects they've worked on issues for\n coalesce(user_metrics.count_closed_issues, 0) as count_closed_issues,\n coalesce(user_metrics.count_open_issues, 0) as count_open_issues,\n\n -- days\n user_metrics.avg_close_time_days,\n user_metrics.avg_age_currently_open_days,\n \n user_metrics.median_close_time_days,\n user_metrics.median_age_currently_open_days,\n\n -- seconds\n user_metrics.avg_close_time_seconds,\n user_metrics.avg_age_currently_open_seconds,\n \n user_metrics.median_close_time_seconds,\n user_metrics.median_age_currently_open_seconds\n\n from jira_user \n left join user_metrics on jira_user.user_id = user_metrics.user_id\n left join agg_user_projects on jira_user.user_id = agg_user_projects.assignee_user_id\n)\n\nselect * from user_join", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__user_metrics", "sql": " __dbt__cte__int_jira__user_metrics as (\nwith issue as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\" \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_close_time_seconds,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_age_currently_open_seconds\n\n from issue\n\n group by 1 \n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.jira__issue_enhanced": {"database": "postgres", "schema": "jira_integrations_tests_33_jira", "name": "jira__issue_enhanced", "resource_type": "model", "package_name": "jira", "path": "jira__issue_enhanced.sql", "original_file_path": "models/jira__issue_enhanced.sql", "unique_id": "model.jira.jira__issue_enhanced", "fqn": ["jira", "jira__issue_enhanced"], "alias": "jira__issue_enhanced", "checksum": {"name": "sha256", "checksum": "3911ef6e5f3db8553093420c2190db79cb30bda524e3a086eaf852b79004ab6b"}, "config": {"enabled": true, "alias": null, "schema": "jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "The core issue table, enhanced with current-status attributes from foreign-key-related tables, and metrics regarding resolutions and assignments.\n", "columns": {"issue_id": {"name": "issue_id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_name": {"name": "issue_name", "description": "Title of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue was last updated in some way.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type": {"name": "issue_type", "description": "Name of the issue type (ie Epic, Task, Subtask, any custom types).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the issue was created (in UTC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_description": {"name": "issue_description", "description": "The issue description, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "Calendar day on which the issue is due, if a due date is provided.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "environment": {"name": "environment", "description": "Text field describing the environment in which the issue occurred (ie \"IE9 on Windows 7\").", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_user_id": {"name": "assignee_user_id", "description": "Foreign key referencing the ID of the `user` currently assigned to this task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_name": {"name": "assignee_name", "description": "User display name of the person currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_user_id": {"name": "reporter_user_id", "description": "Foreign key referencing the ID of the `user` who reported the issue. This differs from the `issue.creator` column in that the reporter can be changed in-app, though it is initialized as the creator.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_name": {"name": "reporter_name", "description": "User display name of the person who reported the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_timezone": {"name": "assignee_timezone", "description": "Timezone of the user currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_email": {"name": "assignee_email", "description": "Email associated with the user currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_key": {"name": "issue_key", "description": "UI-facing id of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_id": {"name": "parent_issue_id", "description": "Self-referencing ID of the parent `issue`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_name": {"name": "parent_issue_name", "description": "Title of the parent issue/epic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_key": {"name": "parent_issue_key", "description": "Issue key of the sub-issue's parent/epic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_type": {"name": "parent_issue_type", "description": "Name of the type of issue that the parent is.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_priority": {"name": "current_priority", "description": "Name of the issue's current priority as it appears in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the `project` that the issue belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_name": {"name": "project_name", "description": "Title of the issue's project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_type": {"name": "resolution_type", "description": "Display name of the type of resolution that closed the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolved_at": {"name": "resolved_at", "description": "Timestamp of when the issue was resolved (ie completed, marked as duplicate). If an issue is un-resolved, this will be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_status": {"name": "current_status", "description": "Title of the category of status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_changed_at": {"name": "status_changed_at", "description": "Timestamp of when the status was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_sprint_id": {"name": "current_sprint_id", "description": "Foreign key referencing the current `sprint` associate with the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_sprint_name": {"name": "current_sprint_name", "description": "Title of the current sprint associated with the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_sprint_changes": {"name": "count_sprint_changes", "description": "The total number of sprints that the issue has belonged to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_active_sprint": {"name": "is_active_sprint", "description": "Yes, if the sprint started after the current time and if the sprint ends in the future.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_completed_at": {"name": "sprint_completed_at", "description": "Timestamp of when the sprint was completed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_ended_at": {"name": "sprint_ended_at", "description": "Timestamp of when the sprint is planned to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_started_at": {"name": "sprint_started_at", "description": "Timestamp of when the sprint began.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint": {"name": "sprint", "description": "List of associated sprint IDs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "ID of the associated status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "original_estimate_seconds": {"name": "original_estimate_seconds", "description": "The original estimate of how long working on this issue would take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "remaining_estimate_seconds": {"name": "remaining_estimate_seconds", "description": "The estimate of how much longer working on this issue will take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_spent_seconds": {"name": "time_spent_seconds", "description": "The time that was spent working on this issue, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "work_ratio": {"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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "conversation": {"name": "conversation", "description": "Line-separated list of comments made on this issue, including the timestamp and author name of each comment.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_comments": {"name": "count_comments", "description": "The number of comments made on this issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_assigned_at": {"name": "first_assigned_at", "description": "Timestamp of when the issue was first assigned to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_assigned_at": {"name": "last_assigned_at", "description": "Timestamp of when the issue was last assigned to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_resolved_at": {"name": "first_resolved_at", "description": "Timestamp of when the issue was first resolved.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "open_duration_seconds": {"name": "open_duration_seconds", "description": "The number of seconds that the issue has spent open (until resolution, or the current timestamp).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "any_assignment_duration_seconds": {"name": "any_assignment_duration_seconds", "description": "The number of seconds that the issue has spent assigned (until resolution, or the current timestamp).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_assignment_duration_seconds": {"name": "last_assignment_duration_seconds", "description": "The number of seconds that the issue has spent assigned to the current/most recent user (until resolution, or the current timestamp).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "creator_user_id": {"name": "creator_user_id", "description": "Foreign key referencing the `user` who first created the issue. Cannot be changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type_id": {"name": "issue_type_id", "description": "Foreign key referencing the ID of the `issue_type`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority_id": {"name": "priority_id", "description": "Foreign key referencing the ID of the issue's current `priority`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_id": {"name": "resolution_id", "description": "Foreign key referencing the ID of the issue's type of `resolution`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Foreign key referencing the ID of the issue's `status` (the step that the issue is currently at in the project's workflow).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_parent_epic": {"name": "is_parent_epic", "description": "Boolean that is true if the parent is an epic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_email": {"name": "reporter_email", "description": "Email associated with the user who reported this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_timezone": {"name": "reporter_timezone", "description": "Timezone of the user currently who reported this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "affects_versions": {"name": "affects_versions", "description": "Comma-separated list of the names of project versions that this issue affects.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fixes_versions": {"name": "fixes_versions", "description": "Comma-separated list of the names of project versions that this issue fixes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_status_category": {"name": "current_status_category", "description": "Title of the umbrella status category that the issue is currently in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira"}, "created_at": 1711035090.534806, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\"", "raw_code": "with issue as (\n\n select *\n from {{ ref('int_jira__issue_join' ) }}\n),\n\n{%- set pivot_data_columns = adapter.get_columns_in_relation(ref('jira__daily_issue_field_history')) -%}\n\n{%- set issue_data_columns = adapter.get_columns_in_relation(ref('int_jira__issue_join' )) -%}\n{%- set issue_data_columns_clean = [] -%}\n\n{%- for k in issue_data_columns -%}\n {{ issue_data_columns_clean.append(k.name|lower)|default(\"\", True) }}\n{%- endfor -%}\n\ndaily_issue_field_history as (\n \n select\n *,\n row_number() over (partition by issue_id order by date_day desc) = 1 as latest_record\n from {{ ref('jira__daily_issue_field_history')}}\n\n),\n\nlatest_issue_field_history as (\n \n select\n *\n from daily_issue_field_history\n where latest_record\n),\n\nfinal as (\n\n select \n \n issue.*,\n\n {{ dbt.datediff('created_at', \"coalesce(resolved_at, \" ~ dbt.current_timestamp_backcompat() ~ ')', 'second') }} open_duration_seconds,\n\n -- this will be null if no one has been assigned\n {{ dbt.datediff('first_assigned_at', \"coalesce(resolved_at, \" ~ dbt.current_timestamp_backcompat() ~ ')', 'second') }} any_assignment_duration_seconds,\n\n -- if an issue is not currently assigned this will not be null\n {{ dbt.datediff('last_assigned_at', \"coalesce(resolved_at, \" ~ dbt.current_timestamp_backcompat() ~ ')', 'second') }} last_assignment_duration_seconds \n\n {% for col in pivot_data_columns if col.name|lower not in issue_data_columns_clean %} \n {%- if col.name|lower not in ['issue_day_id','issue_id','latest_record', 'date_day'] -%}\n , {{ col.name }}\n {%- endif -%}\n {% endfor %}\n\n from issue\n \n left join latest_issue_field_history \n on issue.issue_id = latest_issue_field_history.issue_id\n \n)\n\nselect *\nfrom final", "language": "sql", "refs": [{"name": "int_jira__issue_join", "package": null, "version": null}, {"name": "jira__daily_issue_field_history", "package": null, "version": null}, {"name": "int_jira__issue_join", "package": null, "version": null}, {"name": "jira__daily_issue_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.current_timestamp_backcompat", "macro.dbt.datediff"], "nodes": ["model.jira.int_jira__issue_join", "model.jira.jira__daily_issue_field_history"]}, "compiled_path": "target/compiled/jira/models/jira__issue_enhanced.sql", "compiled": true, "compiled_code": "with issue as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_join\"\n),daily_issue_field_history as (\n \n select\n *,\n row_number() over (partition by issue_id order by date_day desc) = 1 as latest_record\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__daily_issue_field_history\"\n\n),\n\nlatest_issue_field_history as (\n \n select\n *\n from daily_issue_field_history\n where latest_record\n),\n\nfinal as (\n\n select \n \n issue.*,\n\n \n (\n (\n (\n ((coalesce(resolved_at, \n current_timestamp::timestamp\n))::date - (created_at)::date)\n * 24 + date_part('hour', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp) - date_part('hour', (created_at)::timestamp))\n * 60 + date_part('minute', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp) - date_part('minute', (created_at)::timestamp))\n * 60 + floor(date_part('second', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp)) - floor(date_part('second', (created_at)::timestamp)))\n open_duration_seconds,\n\n -- this will be null if no one has been assigned\n \n (\n (\n (\n ((coalesce(resolved_at, \n current_timestamp::timestamp\n))::date - (first_assigned_at)::date)\n * 24 + date_part('hour', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp) - date_part('hour', (first_assigned_at)::timestamp))\n * 60 + date_part('minute', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp) - date_part('minute', (first_assigned_at)::timestamp))\n * 60 + floor(date_part('second', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp)) - floor(date_part('second', (first_assigned_at)::timestamp)))\n any_assignment_duration_seconds,\n\n -- if an issue is not currently assigned this will not be null\n \n (\n (\n (\n ((coalesce(resolved_at, \n current_timestamp::timestamp\n))::date - (last_assigned_at)::date)\n * 24 + date_part('hour', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp) - date_part('hour', (last_assigned_at)::timestamp))\n * 60 + date_part('minute', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp) - date_part('minute', (last_assigned_at)::timestamp))\n * 60 + floor(date_part('second', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp)) - floor(date_part('second', (last_assigned_at)::timestamp)))\n last_assignment_duration_seconds \n\n , status, sprint, summary, story_points, components\n\n from issue\n \n left join latest_issue_field_history \n on issue.issue_id = latest_issue_field_history.issue_id\n \n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.jira__project_enhanced": {"database": "postgres", "schema": "jira_integrations_tests_33_jira", "name": "jira__project_enhanced", "resource_type": "model", "package_name": "jira", "path": "jira__project_enhanced.sql", "original_file_path": "models/jira__project_enhanced.sql", "unique_id": "model.jira.jira__project_enhanced", "fqn": ["jira", "jira__project_enhanced"], "alias": "jira__project_enhanced", "checksum": {"name": "sha256", "checksum": "214672c28dde6208559758526fd1c6881211d5668b061387a02b196173a461d0"}, "config": {"enabled": true, "alias": null, "schema": "jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of projects enriched with data about its lead, epics, components, and volume and velocity of worktime.\n", "columns": {"project_id": {"name": "project_id", "description": "Unique ID of the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_description": {"name": "project_description", "description": "Description of the project, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_key": {"name": "project_key", "description": "UI-facing ID of the project. This becomes the default prefix for tasks created within this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_lead_user_id": {"name": "project_lead_user_id", "description": "Foreign key referencing the ID of the `user` who leads this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_name": {"name": "project_name", "description": "Title of the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "permission_scheme_id": {"name": "permission_scheme_id", "description": "Foreign key referencing the ID of the `permission_scheme` that the project ascribes to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_category_id": {"name": "project_category_id", "description": "Foreign key referencing the ID of the `project_category` that the project is associated with, if any.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_lead_user_name": {"name": "project_lead_user_name", "description": "User display name of the person leading this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_lead_email": {"name": "project_lead_email", "description": "Email associated with the project lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "epics": {"name": "epics", "description": "Comma-separated list of epics worked on in this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "components": {"name": "components", "description": "Comma-separated list of components of this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_closed_issues": {"name": "count_closed_issues", "description": "The number of issues closed in this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_open_issues": {"name": "count_open_issues", "description": "The number of currently un-resolved issues in the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_open_assigned_issues": {"name": "count_open_assigned_issues", "description": "The number of currently open and currently assigned issues in the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_close_time_seconds": {"name": "avg_close_time_seconds", "description": "The average time taken to close issues, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_assigned_close_time_seconds": {"name": "avg_assigned_close_time_seconds", "description": "The average time taken to close issues from their first assignment, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_seconds": {"name": "avg_age_currently_open_seconds", "description": "The average age of any currently-open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_assigned_seconds": {"name": "avg_age_currently_open_assigned_seconds", "description": "The average age of any currently-open issues, from their first assignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_close_time_seconds": {"name": "median_close_time_seconds", "description": "The median time taken to close issues, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_seconds": {"name": "median_age_currently_open_seconds", "description": "The median age of any currently-open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_assigned_close_time_seconds": {"name": "median_assigned_close_time_seconds", "description": "The median time taken to close issues from their first assignment, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_assigned_seconds": {"name": "median_age_currently_open_assigned_seconds", "description": "The median age of any currently-open issues, from their first assignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_close_time_days": {"name": "avg_close_time_days", "description": "The average time taken to close issues, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_assigned_close_time_days": {"name": "avg_assigned_close_time_days", "description": "The average time taken to close issues from their first assignment, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_days": {"name": "avg_age_currently_open_days", "description": "The average age of any currently-open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_assigned_days": {"name": "avg_age_currently_open_assigned_days", "description": "The average age of any currently-open issues, from their first assignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_close_time_days": {"name": "median_close_time_days", "description": "The median time taken to close issues, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_days": {"name": "median_age_currently_open_days", "description": "The median age of any currently-open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_assigned_close_time_days": {"name": "median_assigned_close_time_days", "description": "The median time taken to close issues from their first assignment, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_assigned_days": {"name": "median_age_currently_open_assigned_days", "description": "The median age of any currently-open issues, from their first assignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira"}, "created_at": 1711035090.5395782, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira\".\"jira__project_enhanced\"", "raw_code": "with project as (\n\n select *\n from {{ var('project') }}\n),\n\nproject_metrics as (\n\n select * \n from {{ ref('int_jira__project_metrics') }}\n),\n\n-- user is reserved in AWS\njira_user as (\n-- to grab the project lead\n select *\n from {{ var('user') }}\n),\n\nagg_epics as (\n\n select \n project_id,\n {{ fivetran_utils.string_agg( \"issue_name\", \"', '\" ) }} as epics\n\n from {{ ref('jira__issue_enhanced') }}\n where lower(issue_type) = 'epic'\n -- should we limit to active epics?\n group by 1\n\n),\n\n{% if var('jira_using_components', True) %}\n\nagg_components as (\n -- i'm just aggregating the components here, but perhaps pivoting out components (and epics) \n -- into columns where the values are the number of issues completed and/or open would be more valuable\n select \n project_id,\n {{ fivetran_utils.string_agg( \"component_name\", \"', '\" ) }} as components\n\n from {{ var('component') }}\n\n group by 1\n),\n\n{% endif %}\n\nproject_join as (\n\n select\n project.*,\n jira_user.user_display_name as project_lead_user_name,\n jira_user.email as project_lead_email,\n agg_epics.epics,\n \n {% if var('jira_using_components', True) %}\n agg_components.components,\n {% endif %}\n\n coalesce(project_metrics.count_closed_issues, 0) as count_closed_issues,\n coalesce(project_metrics.count_open_issues, 0) as count_open_issues,\n coalesce(project_metrics.count_open_assigned_issues, 0) as count_open_assigned_issues,\n\n -- days\n project_metrics.avg_close_time_days,\n project_metrics.avg_assigned_close_time_days,\n\n project_metrics.avg_age_currently_open_days,\n project_metrics.avg_age_currently_open_assigned_days,\n\n project_metrics.median_close_time_days, \n project_metrics.median_age_currently_open_days,\n project_metrics.median_assigned_close_time_days,\n project_metrics.median_age_currently_open_assigned_days,\n\n -- seconds\n project_metrics.avg_close_time_seconds,\n project_metrics.avg_assigned_close_time_seconds,\n\n project_metrics.avg_age_currently_open_seconds,\n project_metrics.avg_age_currently_open_assigned_seconds,\n\n project_metrics.median_close_time_seconds, \n project_metrics.median_age_currently_open_seconds,\n project_metrics.median_assigned_close_time_seconds,\n project_metrics.median_age_currently_open_assigned_seconds\n\n from project\n left join project_metrics on project.project_id = project_metrics.project_id\n left join jira_user on project.project_lead_user_id = jira_user.user_id\n left join agg_epics on project.project_id = agg_epics.project_id \n \n {% if var('jira_using_components', True) %}\n left join agg_components on project.project_id = agg_components.project_id \n {% endif %}\n\n)\n\nselect * from project_join", "language": "sql", "refs": [{"name": "stg_jira__project", "package": null, "version": null}, {"name": "int_jira__project_metrics", "package": null, "version": null}, {"name": "stg_jira__user", "package": null, "version": null}, {"name": "jira__issue_enhanced", "package": null, "version": null}, {"name": "stg_jira__component", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.fivetran_utils.string_agg"], "nodes": ["model.jira_source.stg_jira__project", "model.jira.int_jira__project_metrics", "model.jira_source.stg_jira__user", "model.jira.jira__issue_enhanced", "model.jira_source.stg_jira__component"]}, "compiled_path": "target/compiled/jira/models/jira__project_enhanced.sql", "compiled": true, "compiled_code": "with __dbt__cte__int_jira__project_metrics as (\nwith issue as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\"\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_seconds,\n\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_assigned_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n group by project_id \n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as numeric(28,6) ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as numeric(28,6) ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics\n), project as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__project\"\n),\n\nproject_metrics as (\n\n select * \n from __dbt__cte__int_jira__project_metrics\n),\n\n-- user is reserved in AWS\njira_user as (\n-- to grab the project lead\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nagg_epics as (\n\n select \n project_id,\n \n string_agg(issue_name, ', ')\n\n as epics\n\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\"\n where lower(issue_type) = 'epic'\n -- should we limit to active epics?\n group by 1\n\n),\n\n\n\nagg_components as (\n -- i'm just aggregating the components here, but perhaps pivoting out components (and epics) \n -- into columns where the values are the number of issues completed and/or open would be more valuable\n select \n project_id,\n \n string_agg(component_name, ', ')\n\n as components\n\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__component\"\n\n group by 1\n),\n\n\n\nproject_join as (\n\n select\n project.*,\n jira_user.user_display_name as project_lead_user_name,\n jira_user.email as project_lead_email,\n agg_epics.epics,\n \n \n agg_components.components,\n \n\n coalesce(project_metrics.count_closed_issues, 0) as count_closed_issues,\n coalesce(project_metrics.count_open_issues, 0) as count_open_issues,\n coalesce(project_metrics.count_open_assigned_issues, 0) as count_open_assigned_issues,\n\n -- days\n project_metrics.avg_close_time_days,\n project_metrics.avg_assigned_close_time_days,\n\n project_metrics.avg_age_currently_open_days,\n project_metrics.avg_age_currently_open_assigned_days,\n\n project_metrics.median_close_time_days, \n project_metrics.median_age_currently_open_days,\n project_metrics.median_assigned_close_time_days,\n project_metrics.median_age_currently_open_assigned_days,\n\n -- seconds\n project_metrics.avg_close_time_seconds,\n project_metrics.avg_assigned_close_time_seconds,\n\n project_metrics.avg_age_currently_open_seconds,\n project_metrics.avg_age_currently_open_assigned_seconds,\n\n project_metrics.median_close_time_seconds, \n project_metrics.median_age_currently_open_seconds,\n project_metrics.median_assigned_close_time_seconds,\n project_metrics.median_age_currently_open_assigned_seconds\n\n from project\n left join project_metrics on project.project_id = project_metrics.project_id\n left join jira_user on project.project_lead_user_id = jira_user.user_id\n left join agg_epics on project.project_id = agg_epics.project_id \n \n \n left join agg_components on project.project_id = agg_components.project_id \n \n\n)\n\nselect * from project_join", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__project_metrics", "sql": " __dbt__cte__int_jira__project_metrics as (\nwith issue as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\"\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_seconds,\n\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_assigned_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n group by project_id \n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as numeric(28,6) ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as numeric(28,6) ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__issue_type_parents": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__issue_type_parents", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__issue_type_parents.sql", "original_file_path": "models/intermediate/int_jira__issue_type_parents.sql", "unique_id": "model.jira.int_jira__issue_type_parents", "fqn": ["jira", "intermediate", "int_jira__issue_type_parents"], "alias": "int_jira__issue_type_parents", "checksum": {"name": "sha256", "checksum": "1979f566661216c2f889b351999c778535da5881076d6ca3f55c23f562d09a43"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table relating issues with data regarding their parent issues (which may be epics). Contains all columns present in `stg_jira__issue`.\n", "columns": {"issue_id": {"name": "issue_id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_id": {"name": "parent_issue_id", "description": "Unique ID of the parent issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "revised_parent_issue_id": {"name": "revised_parent_issue_id", "description": "Unique ID of the parent issue, coalesced with the ID of any linked epics (in classic projects).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type": {"name": "issue_type", "description": "Name of the issue type (ie Epic, Task, Subtask, any custom types).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_name": {"name": "issue_name", "description": "Title of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_key": {"name": "issue_key", "description": "UI-facing id of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_type": {"name": "parent_issue_type", "description": "Name of the parent issue type (ie Epic, Task, Subtask, any custom types).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_name": {"name": "parent_issue_name", "description": "Title of the parent issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_key": {"name": "parent_issue_key", "description": "UI-facing id of the parent issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_parent_epic": {"name": "is_parent_epic", "description": "Boolean that is true if the parent is an epic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_user_id": {"name": "assignee_user_id", "description": "Foreign key referencing the ID of the `user` currently assigned to this task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the issue was created (in UTC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "creator_user_id": {"name": "creator_user_id", "description": "Foreign key referencing the `user` who first created the issue. Cannot be changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_description": {"name": "issue_description", "description": "The issue description, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "Calendar day on which the issue is due, if a due date is provided.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "environment": {"name": "environment", "description": "Text field describing the environment in which the issue occurred (ie \"IE9 on Windows 7\").", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type_id": {"name": "issue_type_id", "description": "Foreign key referencing the ID of the `issue_type`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "original_estimate_seconds": {"name": "original_estimate_seconds", "description": "The original estimate of how long working on this issue would take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority_id": {"name": "priority_id", "description": "Foreign key referencing the ID of the issue's current `priority`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the ID of the `project` that the issue belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "remaining_estimate_seconds": {"name": "remaining_estimate_seconds", "description": "The estimate of how much longer working on this issue will take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_user_id": {"name": "reporter_user_id", "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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_id": {"name": "resolution_id", "description": "Foreign key referencing the ID of the issue's type of `resolution`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolved_at": {"name": "resolved_at", "description": "Timestamp of when the issue was resolved (ie completed, marked as duplicate). If an issue is un-resolved, this will be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Foreign key referencing the ID of the issue's `status` (the step that the issue is currently at in the project's workflow).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_changed_at": {"name": "status_changed_at", "description": "Timestamp of when the status was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_spent_seconds": {"name": "time_spent_seconds", "description": "The time that was spent working on this issue, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue was last updated in some way.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "work_ratio": {"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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "int_jira"}, "created_at": 1711035090.603095, "relation_name": "\"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_type_parents\"", "raw_code": "{{\n config(\n materialized='table'\n )\n}}\n-- needs to be a view to use the dbt_utils.star macro in int_jira__issue_users\n\nwith issue as (\n\n select * \n from {{ var('issue') }}\n \n),\n\nissue_type as (\n\n select *\n from {{ var('issue_type') }}\n), \n-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\n\nissues_w_epics as (\n\n select * \n from {{ ref('int_jira__issue_epic')}}\n\n), \n\nissue_enriched_with_epics as (\n\n select\n \n issue.*,\n coalesce(cast(parent_issue_id as {{ dbt.type_string() }}), cast(epic_issue_id as {{ dbt.type_string() }})) as revised_parent_issue_id\n \n from issue\n \n left join issues_w_epics on issues_w_epics.issue_id = issue.issue_id\n\n), \n\nissue_w_types as (\n\n select \n\n issue_enriched_with_epics.*,\n issue_type.issue_type_name as issue_type\n \n from issue_enriched_with_epics \n \n left join issue_type on issue_type.issue_type_id = issue_enriched_with_epics.issue_type_id\n),\n\nadd_parent_info as (\n\n select\n issue_w_types.*,\n parent.issue_type as parent_issue_type,\n parent.issue_name as parent_issue_name,\n parent.issue_key as parent_issue_key,\n lower(coalesce(parent.issue_type, '')) = 'epic' as is_parent_epic\n\n from\n issue_w_types\n\n -- do a left join so we can grab all issue types from this table in `issue_join`\n left join issue_w_types as parent \n on cast(issue_w_types.revised_parent_issue_id as {{ dbt.type_string() }}) = cast(parent.issue_id as {{ dbt.type_string() }})\n\n)\n\nselect * \nfrom add_parent_info", "language": "sql", "refs": [{"name": "stg_jira__issue", "package": null, "version": null}, {"name": "stg_jira__issue_type", "package": null, "version": null}, {"name": "int_jira__issue_epic", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.type_string"], "nodes": ["model.jira_source.stg_jira__issue", "model.jira_source.stg_jira__issue_type", "model.jira.int_jira__issue_epic"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__issue_type_parents.sql", "compiled": true, "compiled_code": "\n-- needs to be a view to use the dbt_utils.star macro in int_jira__issue_users\n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_epic as (\n-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\nwith epic_field_history as (\n\n select *\n from __dbt__cte__int_jira__issue_field_history\n where lower(field_name) like 'epic%link'\n \n),\n\norder_epic_links as (\n\n select\n issue_id,\n cast(field_value as TEXT ) as epic_issue_id,\n\n row_number() over (\n partition by issue_id order by updated_at desc\n ) as row_num\n\n from epic_field_history\n),\n\nlast_epic_link as (\n\n select \n issue_id, \n epic_issue_id \n \n from order_epic_links\n where row_num = 1\n)\n\nselect *\nfrom last_epic_link\n), issue as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue\"\n \n),\n\nissue_type as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_type\"\n), \n-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\n\nissues_w_epics as (\n\n select * \n from __dbt__cte__int_jira__issue_epic\n\n), \n\nissue_enriched_with_epics as (\n\n select\n \n issue.*,\n coalesce(cast(parent_issue_id as TEXT), cast(epic_issue_id as TEXT)) as revised_parent_issue_id\n \n from issue\n \n left join issues_w_epics on issues_w_epics.issue_id = issue.issue_id\n\n), \n\nissue_w_types as (\n\n select \n\n issue_enriched_with_epics.*,\n issue_type.issue_type_name as issue_type\n \n from issue_enriched_with_epics \n \n left join issue_type on issue_type.issue_type_id = issue_enriched_with_epics.issue_type_id\n),\n\nadd_parent_info as (\n\n select\n issue_w_types.*,\n parent.issue_type as parent_issue_type,\n parent.issue_name as parent_issue_name,\n parent.issue_key as parent_issue_key,\n lower(coalesce(parent.issue_type, '')) = 'epic' as is_parent_epic\n\n from\n issue_w_types\n\n -- do a left join so we can grab all issue types from this table in `issue_join`\n left join issue_w_types as parent \n on cast(issue_w_types.revised_parent_issue_id as TEXT) = cast(parent.issue_id as TEXT)\n\n)\n\nselect * \nfrom add_parent_info", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_epic", "sql": " __dbt__cte__int_jira__issue_epic as (\n-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\nwith epic_field_history as (\n\n select *\n from __dbt__cte__int_jira__issue_field_history\n where lower(field_name) like 'epic%link'\n \n),\n\norder_epic_links as (\n\n select\n issue_id,\n cast(field_value as TEXT ) as epic_issue_id,\n\n row_number() over (\n partition by issue_id order by updated_at desc\n ) as row_num\n\n from epic_field_history\n),\n\nlast_epic_link as (\n\n select \n issue_id, \n epic_issue_id \n \n from order_epic_links\n where row_num = 1\n)\n\nselect *\nfrom last_epic_link\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__issue_epic": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__issue_epic", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__issue_epic.sql", "original_file_path": "models/intermediate/int_jira__issue_epic.sql", "unique_id": "model.jira.int_jira__issue_epic", "fqn": ["jira", "intermediate", "int_jira__issue_epic"], "alias": "int_jira__issue_epic", "checksum": {"name": "sha256", "checksum": "4a8e9567640bb14ebf47aa0faef2721d043fc701b943a6f5dc05ac0080ca2d61"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table associating **classic-project** issues with the epics they are linked to. This is necessary because issue-epic relationships are represented differently in next-gen vs classic projects. In next-gen projects, epics are stored as an issue's parent issue, whereas in classic projects epics are captured in the 'epic link' field in `issue_field_history`. Next-gen issues will not appear in this table.\n", "columns": {"issue_id": {"name": "issue_id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "epic_issue_id": {"name": "epic_issue_id", "description": "Unique ID of the epic associated with this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira"}, "created_at": 1711035090.601086, "relation_name": null, "raw_code": "-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\nwith epic_field_history as (\n\n select *\n from {{ ref('int_jira__issue_field_history') }}\n where lower(field_name) like 'epic%link'\n \n),\n\norder_epic_links as (\n\n select\n issue_id,\n cast(field_value as {{ dbt.type_string() }} ) as epic_issue_id,\n\n row_number() over (\n partition by issue_id order by updated_at desc\n ) as row_num\n\n from epic_field_history\n),\n\nlast_epic_link as (\n\n select \n issue_id, \n epic_issue_id \n \n from order_epic_links\n where row_num = 1\n)\n\nselect *\nfrom last_epic_link", "language": "sql", "refs": [{"name": "int_jira__issue_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.type_string"], "nodes": ["model.jira.int_jira__issue_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__issue_epic.sql", "compiled": true, "compiled_code": "-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), epic_field_history as (\n\n select *\n from __dbt__cte__int_jira__issue_field_history\n where lower(field_name) like 'epic%link'\n \n),\n\norder_epic_links as (\n\n select\n issue_id,\n cast(field_value as TEXT ) as epic_issue_id,\n\n row_number() over (\n partition by issue_id order by updated_at desc\n ) as row_num\n\n from epic_field_history\n),\n\nlast_epic_link as (\n\n select \n issue_id, \n epic_issue_id \n \n from order_epic_links\n where row_num = 1\n)\n\nselect *\nfrom last_epic_link", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__user_metrics": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__user_metrics", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__user_metrics.sql", "original_file_path": "models/intermediate/int_jira__user_metrics.sql", "unique_id": "model.jira.int_jira__user_metrics", "fqn": ["jira", "intermediate", "int_jira__user_metrics"], "alias": "int_jira__user_metrics", "checksum": {"name": "sha256", "checksum": "27f13c63391f270b80286ca2f76421e83092f5511701120a88866bb7440ee196"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table calculating issue-related metrics per user.", "columns": {"user_id": {"name": "user_id", "description": "Unique ID of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_closed_issues": {"name": "count_closed_issues", "description": "The number of issues that the user has closed (while being assigned to).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_open_issues": {"name": "count_open_issues", "description": "The number of currently open issues that the user is assigned to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_close_time_seconds": {"name": "avg_close_time_seconds", "description": "The average time taken to close issues since assignment, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_seconds": {"name": "avg_age_currently_open_seconds", "description": "The average age of a user's currently open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_close_time_seconds": {"name": "median_close_time_seconds", "description": "The median time taken to close issues since assignment, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_seconds": {"name": "median_age_currently_open_seconds", "description": "The median age of a user's currently open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_close_time_days": {"name": "avg_close_time_days", "description": "The average time taken to close issues since assignment, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_days": {"name": "avg_age_currently_open_days", "description": "The average age of a user's currently open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_close_time_days": {"name": "median_close_time_days", "description": "The median time taken to close issues since assignment, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_days": {"name": "median_age_currently_open_days", "description": "The median age of a user's currently open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira"}, "created_at": 1711035090.600353, "relation_name": null, "raw_code": "with issue as (\n\n select *\n from {{ ref('jira__issue_enhanced') }} \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( {{ fivetran_utils.percentile(percentile_field='case when resolved_at is not null then last_assignment_duration_seconds end', \n partition_field='assignee_user_id', percent='0.5') }} as {{ dbt.type_numeric() }}), 0) as median_close_time_seconds,\n round( cast( {{ fivetran_utils.percentile(percentile_field='case when resolved_at is null then last_assignment_duration_seconds end', \n partition_field='assignee_user_id', percent='0.5') }} as {{ dbt.type_numeric() }}), 0) as median_age_currently_open_seconds\n\n from issue\n\n {% if target.type == 'postgres' %} group by 1 {% endif %}\n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as {{ dbt.type_numeric() }} ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as {{ dbt.type_numeric() }} ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics", "language": "sql", "refs": [{"name": "jira__issue_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.fivetran_utils.percentile", "macro.dbt.type_numeric"], "nodes": ["model.jira.jira__issue_enhanced"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__user_metrics.sql", "compiled": true, "compiled_code": "with issue as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\" \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_close_time_seconds,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_age_currently_open_seconds\n\n from issue\n\n group by 1 \n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__issue_join": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__issue_join", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__issue_join.sql", "original_file_path": "models/intermediate/int_jira__issue_join.sql", "unique_id": "model.jira.int_jira__issue_join", "fqn": ["jira", "intermediate", "int_jira__issue_join"], "alias": "int_jira__issue_join", "checksum": {"name": "sha256", "checksum": "e2341a474736d8b1aa18864caa56c4b69aacd3f0f42ad2fd6a23014021f6307d"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "The core issue table, enhanced with current-status attributes from foreign-key-related tables, and metrics regarding resolutions and assignments.\n", "columns": {"issue_id": {"name": "issue_id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_name": {"name": "issue_name", "description": "Title of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue was last updated in some way.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type": {"name": "issue_type", "description": "Name of the issue type (ie Epic, Task, Subtask, any custom types).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type_id": {"name": "issue_type_id", "description": "Foreign key referencing the ID of the `issue_type`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the issue was created (in UTC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_description": {"name": "issue_description", "description": "The issue description, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "Calendar day on which the issue is due, if a due date is provided.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "environment": {"name": "environment", "description": "Text field describing the environment in which the issue occurred (ie \"IE9 on Windows 7\").", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_user_id": {"name": "assignee_user_id", "description": "Foreign key referencing the ID of the `user` currently assigned to this task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_name": {"name": "assignee_name", "description": "User display name of the person currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_user_id": {"name": "reporter_user_id", "description": "Foreign key referencing the ID of the `user` who reported the issue. This differs from the `issue.creator` column in that the reporter can be changed in-app, though it is initialized as the creator.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_name": {"name": "reporter_name", "description": "User display name of the person who reported the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_timezone": {"name": "assignee_timezone", "description": "Timezone of the user currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_email": {"name": "assignee_email", "description": "Email associated with the user currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_key": {"name": "issue_key", "description": "UI-facing id of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_id": {"name": "parent_issue_id", "description": "Self-referencing ID of the parent `issue`, which may be an epic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_name": {"name": "parent_issue_name", "description": "Title of the parent issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_key": {"name": "parent_issue_key", "description": "Issue key of the sub-issue's parent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_type": {"name": "parent_issue_type", "description": "Name of the type of issue that the parent is.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_priority": {"name": "current_priority", "description": "Name of the issue's current priority as it appears in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority_id": {"name": "priority_id", "description": "Foreign key referencing the ID of the issue's current `priority`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the `project` that the issue belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_name": {"name": "project_name", "description": "Title of the issue's project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_type": {"name": "resolution_type", "description": "Display name of the type of resolution that closed the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolved_at": {"name": "resolved_at", "description": "Timestamp of when the issue was resolved (ie completed, marked as duplicate). If an issue is un-resolved, this will be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_id": {"name": "resolution_id", "description": "Foreign key referencing the ID of the issue's type of `resolution`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_status": {"name": "current_status", "description": "Title of the category of status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Foreign key referencing the ID of the issue's `status` (the step that the issue is currently at in the project's workflow).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_changed_at": {"name": "status_changed_at", "description": "Timestamp of when the status was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_sprint_id": {"name": "current_sprint_id", "description": "Foreign key referencing the `sprint` that the issue is currently in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_sprint_name": {"name": "current_sprint_name", "description": "Title of the issue's sprint.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_sprint_changes": {"name": "count_sprint_changes", "description": "The total number of sprints that the issue has belonged to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_active_sprint": {"name": "is_active_sprint", "description": "Yes, if the sprint started after the current time and if the sprint ends in the future.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_completed_at": {"name": "sprint_completed_at", "description": "Timestamp of when the sprint was completed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_ended_at": {"name": "sprint_ended_at", "description": "Timestamp of when the sprint is planned to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_started_at": {"name": "sprint_started_at", "description": "Timestamp of when the sprint began.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "original_estimate_seconds": {"name": "original_estimate_seconds", "description": "The original estimate of how long working on this issue would take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "remaining_estimate_seconds": {"name": "remaining_estimate_seconds", "description": "The estimate of how much longer working on this issue will take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_spent_seconds": {"name": "time_spent_seconds", "description": "The time that was spent working on this issue, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "work_ratio": {"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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "conversation": {"name": "conversation", "description": "Line-separated list of comments made on this issue, including the timestamp and author name of each comment.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_comments": {"name": "count_comments", "description": "The number of comments made on this issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_assigned_at": {"name": "first_assigned_at", "description": "Timestamp of when the issue was first assigned to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_assigned_at": {"name": "last_assigned_at", "description": "Timestamp of when the issue was last assigned to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_resolved_at": {"name": "first_resolved_at", "description": "Timestamp of when the issue was first resolved.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_email": {"name": "reporter_email", "description": "Email associated with the user who reported this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_timezone": {"name": "reporter_timezone", "description": "Timezone of the user currently who reported this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_parent_epic": {"name": "is_parent_epic", "description": "Boolean that is true if the parent is an epic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "creator_user_id": {"name": "creator_user_id", "description": "Foreign key referencing the `user` who first created the issue. Cannot be changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "affects_versions": {"name": "affects_versions", "description": "Comma-separated list of the names of project versions that this issue affects.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fixes_versions": {"name": "fixes_versions", "description": "Comma-separated list of the names of project versions that this issue fixes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_status_category": {"name": "current_status_category", "description": "Title of the umbrella status category that the issue is currently in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "int_jira"}, "created_at": 1711035090.5990021, "relation_name": "\"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_join\"", "raw_code": "{{\n config(\n materialized = 'table'\n )\n}}\n\nwith issue as (\n\n select *\n from {{ ref('int_jira__issue_users') }}\n\n),\n\nproject as (\n\n select * \n from {{ var('project') }}\n),\n\nstatus as (\n\n select * \n from {{ var('status') }}\n),\n\nstatus_category as (\n\n select * \n from {{ var('status_category') }}\n),\n\nresolution as (\n\n select * \n from {{ var('resolution') }}\n),\n\n{% if var('jira_using_priorities', True) %}\npriority as (\n\n select * \n from {{ var('priority') }}\n),\n{% endif %}\n\n{% if var('jira_using_sprints', True) %}\nissue_sprint as (\n\n select *\n from {{ ref('int_jira__issue_sprint') }}\n),\n{% endif %}\n\n{% if var('jira_include_comments', True) %}\nissue_comments as (\n\n select * \n from {{ ref('int_jira__issue_comments') }}\n),\n{% endif %}\n\nissue_assignments_and_resolutions as (\n \n select *\n from {{ ref('int_jira__issue_assign_resolution')}}\n\n),\n\n{% if var('jira_using_versions', True) %}\nissue_versions as (\n\n select *\n from {{ ref('int_jira__issue_versions') }}\n),\n{% endif %}\n\njoin_issue as (\n\n select\n issue.* \n\n ,project.project_name as project_name\n\n ,status.status_name as current_status\n ,status_category.status_category_name as current_status_category \n ,resolution.resolution_name as resolution_type\n {% if var('jira_using_priorities', True) %}\n ,priority.priority_name as current_priority\n\t{% endif %}\n\n {% if var('jira_using_sprints', True) %}\n ,issue_sprint.current_sprint_id\n ,issue_sprint.current_sprint_name\n ,coalesce(issue_sprint.count_sprint_changes, 0) as count_sprint_changes\n ,issue_sprint.sprint_started_at\n ,issue_sprint.sprint_ended_at\n ,issue_sprint.sprint_completed_at\n ,coalesce(issue_sprint.sprint_started_at <= {{ dbt.current_timestamp_backcompat() }}\n and coalesce(issue_sprint.sprint_completed_at, {{ dbt.current_timestamp_backcompat() }}) >= {{ dbt.current_timestamp_backcompat() }} \n , false) as is_active_sprint -- If sprint doesn't have a start date, default to false. If it does have a start date, but no completed date, this means that the sprint is active. The ended_at timestamp is irrelevant here.\n {% endif %}\n\n ,issue_assignments_and_resolutions.first_assigned_at\n ,issue_assignments_and_resolutions.last_assigned_at\n ,issue_assignments_and_resolutions.first_resolved_at\n\n {% if var('jira_using_versions', True) %}\n ,issue_versions.fixes_versions\n ,issue_versions.affects_versions\n {% endif %}\n\n {% if var('jira_include_comments', True) %}\n ,issue_comments.conversation\n ,coalesce(issue_comments.count_comments, 0) as count_comments\n {% endif %}\n \n from issue\n left join project on project.project_id = issue.project_id\n left join status on status.status_id = issue.status_id\n left join status_category on status.status_category_id = status_category.status_category_id\n left join resolution on resolution.resolution_id = issue.resolution_id\n\t{% if var('jira_using_priorities', True) %}\n left join priority on priority.priority_id = issue.priority_id\n\t{% endif %}\n left join issue_assignments_and_resolutions on issue_assignments_and_resolutions.issue_id = issue.issue_id\n\n {% if var('jira_using_versions', True) %}\n left join issue_versions on issue_versions.issue_id = issue.issue_id\n {% endif %}\n \n {% if var('jira_using_sprints', True) %}\n left join issue_sprint on issue_sprint.issue_id = issue.issue_id\n {% endif %}\n\n {% if var('jira_include_comments', True) %}\n left join issue_comments on issue_comments.issue_id = issue.issue_id\n {% endif %}\n)\n\nselect * \nfrom join_issue", "language": "sql", "refs": [{"name": "int_jira__issue_users", "package": null, "version": null}, {"name": "stg_jira__project", "package": null, "version": null}, {"name": "stg_jira__status", "package": null, "version": null}, {"name": "stg_jira__status_category", "package": null, "version": null}, {"name": "stg_jira__resolution", "package": null, "version": null}, {"name": "stg_jira__priority", "package": null, "version": null}, {"name": "int_jira__issue_sprint", "package": null, "version": null}, {"name": "int_jira__issue_comments", "package": null, "version": null}, {"name": "int_jira__issue_assign_resolution", "package": null, "version": null}, {"name": "int_jira__issue_versions", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.current_timestamp_backcompat"], "nodes": ["model.jira.int_jira__issue_users", "model.jira_source.stg_jira__project", "model.jira_source.stg_jira__status", "model.jira_source.stg_jira__status_category", "model.jira_source.stg_jira__resolution", "model.jira_source.stg_jira__priority", "model.jira.int_jira__issue_sprint", "model.jira.int_jira__issue_comments", "model.jira.int_jira__issue_assign_resolution", "model.jira.int_jira__issue_versions"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__issue_join.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_jira__issue_users as (\n-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n \n\n select\n issue_id,\n coalesce(cast(revised_parent_issue_id as TEXT), cast(parent_issue_id as TEXT)) as parent_issue_id,\n\n \"original_estimate_seconds\",\n \"remaining_estimate_seconds\",\n \"time_spent_seconds\",\n \"assignee_user_id\",\n \"created_at\",\n \"resolved_at\",\n \"creator_user_id\",\n \"issue_description\",\n \"due_date\",\n \"environment\",\n \"issue_type_id\",\n \"issue_key\",\n \"priority_id\",\n \"project_id\",\n \"reporter_user_id\",\n \"resolution_id\",\n \"status_id\",\n \"status_changed_at\",\n \"issue_name\",\n \"updated_at\",\n \"work_ratio\",\n \"_fivetran_synced\",\n \"issue_type\",\n \"parent_issue_type\",\n \"parent_issue_name\",\n \"parent_issue_key\",\n \"is_parent_epic\"\n\n\n \n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_type_parents\"\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join\n), __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_sprint as (\n\n\nwith sprint as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__sprint\"\n\n),\n\nfield_history as (\n\n -- sprints don't appear to be capable of multiselect in the UI...\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n),\n\nsprint_field_history as (\n\n select \n field_history.*,\n sprint.*,\n row_number() over (\n partition by field_history.issue_id \n order by field_history.updated_at desc, sprint.started_at desc \n ) as row_num\n from field_history\n join sprint on field_history.field_value = cast(sprint.sprint_id as TEXT)\n where lower(field_history.field_name) = 'sprint'\n),\n\n\nlast_sprint as (\n\n select *\n from sprint_field_history\n \n where row_num = 1\n\n), \n\nsprint_rollovers as (\n\n select \n issue_id,\n count(distinct case when field_value is not null then field_value end) as count_sprint_changes\n \n from sprint_field_history\n group by 1\n\n),\n\nissue_sprint as (\n\n select \n last_sprint.issue_id,\n last_sprint.field_value as current_sprint_id,\n last_sprint.sprint_name as current_sprint_name,\n last_sprint.board_id,\n last_sprint.started_at as sprint_started_at,\n last_sprint.ended_at as sprint_ended_at,\n last_sprint.completed_at as sprint_completed_at,\n coalesce(sprint_rollovers.count_sprint_changes, 0) as count_sprint_changes\n\n from \n last_sprint \n left join sprint_rollovers on sprint_rollovers.issue_id = last_sprint.issue_id\n \n)\n\nselect * from issue_sprint\n), __dbt__cte__int_jira__issue_comments as (\n\n\nwith comment as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment\"\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n \n string_agg(comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body, '\\n')\n\n as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments\n), __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_assign_resolution as (\nwith issue_field_history as (\n \n select *\n from __dbt__cte__int_jira__issue_field_history\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates\n), __dbt__cte__int_jira__issue_versions as (\n\n\nwith version as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version\"\n),\n\nversion_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as integer) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n \n string_agg(version.version_name, ', ')\n\n as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final\n), issue as (\n\n select *\n from __dbt__cte__int_jira__issue_users\n\n),\n\nproject as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__project\"\n),\n\nstatus as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status\"\n),\n\nstatus_category as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status_category\"\n),\n\nresolution as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__resolution\"\n),\n\n\npriority as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__priority\"\n),\n\n\n\nissue_sprint as (\n\n select *\n from __dbt__cte__int_jira__issue_sprint\n),\n\n\n\nissue_comments as (\n\n select * \n from __dbt__cte__int_jira__issue_comments\n),\n\n\nissue_assignments_and_resolutions as (\n \n select *\n from __dbt__cte__int_jira__issue_assign_resolution\n\n),\n\n\nissue_versions as (\n\n select *\n from __dbt__cte__int_jira__issue_versions\n),\n\n\njoin_issue as (\n\n select\n issue.* \n\n ,project.project_name as project_name\n\n ,status.status_name as current_status\n ,status_category.status_category_name as current_status_category \n ,resolution.resolution_name as resolution_type\n \n ,priority.priority_name as current_priority\n\t\n\n \n ,issue_sprint.current_sprint_id\n ,issue_sprint.current_sprint_name\n ,coalesce(issue_sprint.count_sprint_changes, 0) as count_sprint_changes\n ,issue_sprint.sprint_started_at\n ,issue_sprint.sprint_ended_at\n ,issue_sprint.sprint_completed_at\n ,coalesce(issue_sprint.sprint_started_at <= \n current_timestamp::timestamp\n\n and coalesce(issue_sprint.sprint_completed_at, \n current_timestamp::timestamp\n) >= \n current_timestamp::timestamp\n \n , false) as is_active_sprint -- If sprint doesn't have a start date, default to false. If it does have a start date, but no completed date, this means that the sprint is active. The ended_at timestamp is irrelevant here.\n \n\n ,issue_assignments_and_resolutions.first_assigned_at\n ,issue_assignments_and_resolutions.last_assigned_at\n ,issue_assignments_and_resolutions.first_resolved_at\n\n \n ,issue_versions.fixes_versions\n ,issue_versions.affects_versions\n \n\n \n ,issue_comments.conversation\n ,coalesce(issue_comments.count_comments, 0) as count_comments\n \n \n from issue\n left join project on project.project_id = issue.project_id\n left join status on status.status_id = issue.status_id\n left join status_category on status.status_category_id = status_category.status_category_id\n left join resolution on resolution.resolution_id = issue.resolution_id\n\t\n left join priority on priority.priority_id = issue.priority_id\n\t\n left join issue_assignments_and_resolutions on issue_assignments_and_resolutions.issue_id = issue.issue_id\n\n \n left join issue_versions on issue_versions.issue_id = issue.issue_id\n \n \n \n left join issue_sprint on issue_sprint.issue_id = issue.issue_id\n \n\n \n left join issue_comments on issue_comments.issue_id = issue.issue_id\n \n)\n\nselect * \nfrom join_issue", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_users", "sql": " __dbt__cte__int_jira__issue_users as (\n-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n \n\n select\n issue_id,\n coalesce(cast(revised_parent_issue_id as TEXT), cast(parent_issue_id as TEXT)) as parent_issue_id,\n\n \"original_estimate_seconds\",\n \"remaining_estimate_seconds\",\n \"time_spent_seconds\",\n \"assignee_user_id\",\n \"created_at\",\n \"resolved_at\",\n \"creator_user_id\",\n \"issue_description\",\n \"due_date\",\n \"environment\",\n \"issue_type_id\",\n \"issue_key\",\n \"priority_id\",\n \"project_id\",\n \"reporter_user_id\",\n \"resolution_id\",\n \"status_id\",\n \"status_changed_at\",\n \"issue_name\",\n \"updated_at\",\n \"work_ratio\",\n \"_fivetran_synced\",\n \"issue_type\",\n \"parent_issue_type\",\n \"parent_issue_name\",\n \"parent_issue_key\",\n \"is_parent_epic\"\n\n\n \n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_type_parents\"\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join\n)"}, {"id": "model.jira.int_jira__issue_multiselect_history", "sql": " __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_sprint", "sql": " __dbt__cte__int_jira__issue_sprint as (\n\n\nwith sprint as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__sprint\"\n\n),\n\nfield_history as (\n\n -- sprints don't appear to be capable of multiselect in the UI...\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n),\n\nsprint_field_history as (\n\n select \n field_history.*,\n sprint.*,\n row_number() over (\n partition by field_history.issue_id \n order by field_history.updated_at desc, sprint.started_at desc \n ) as row_num\n from field_history\n join sprint on field_history.field_value = cast(sprint.sprint_id as TEXT)\n where lower(field_history.field_name) = 'sprint'\n),\n\n\nlast_sprint as (\n\n select *\n from sprint_field_history\n \n where row_num = 1\n\n), \n\nsprint_rollovers as (\n\n select \n issue_id,\n count(distinct case when field_value is not null then field_value end) as count_sprint_changes\n \n from sprint_field_history\n group by 1\n\n),\n\nissue_sprint as (\n\n select \n last_sprint.issue_id,\n last_sprint.field_value as current_sprint_id,\n last_sprint.sprint_name as current_sprint_name,\n last_sprint.board_id,\n last_sprint.started_at as sprint_started_at,\n last_sprint.ended_at as sprint_ended_at,\n last_sprint.completed_at as sprint_completed_at,\n coalesce(sprint_rollovers.count_sprint_changes, 0) as count_sprint_changes\n\n from \n last_sprint \n left join sprint_rollovers on sprint_rollovers.issue_id = last_sprint.issue_id\n \n)\n\nselect * from issue_sprint\n)"}, {"id": "model.jira.int_jira__issue_comments", "sql": " __dbt__cte__int_jira__issue_comments as (\n\n\nwith comment as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment\"\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n \n string_agg(comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body, '\\n')\n\n as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments\n)"}, {"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_assign_resolution", "sql": " __dbt__cte__int_jira__issue_assign_resolution as (\nwith issue_field_history as (\n \n select *\n from __dbt__cte__int_jira__issue_field_history\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates\n)"}, {"id": "model.jira.int_jira__issue_versions", "sql": " __dbt__cte__int_jira__issue_versions as (\n\n\nwith version as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version\"\n),\n\nversion_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as integer) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n \n string_agg(version.version_name, ', ')\n\n as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__issue_assign_resolution": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__issue_assign_resolution", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__issue_assign_resolution.sql", "original_file_path": "models/intermediate/int_jira__issue_assign_resolution.sql", "unique_id": "model.jira.int_jira__issue_assign_resolution", "fqn": ["jira", "intermediate", "int_jira__issue_assign_resolution"], "alias": "int_jira__issue_assign_resolution", "checksum": {"name": "sha256", "checksum": "dfb7de85baf9a3c025c42a119b3b72d723e07a91e884bf1f53615e68285ff6cb"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table grabbing dates related to the assignment and resolution of issues.", "columns": {"first_assigned_at": {"name": "first_assigned_at", "description": "Timestamp of when the issue was first assigned to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_assigned_at": {"name": "last_assigned_at", "description": "Timestamp of when the issue was last assigned to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_resolved_at": {"name": "first_resolved_at", "description": "Timestamp of when the issue was first resolved.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` that was assigned or resolved.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira"}, "created_at": 1711035090.610005, "relation_name": null, "raw_code": "with issue_field_history as (\n \n select *\n from {{ ref('int_jira__issue_field_history') }}\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates", "language": "sql", "refs": [{"name": "int_jira__issue_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": [], "nodes": ["model.jira.int_jira__issue_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__issue_assign_resolution.sql", "compiled": true, "compiled_code": "with __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), issue_field_history as (\n \n select *\n from __dbt__cte__int_jira__issue_field_history\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__issue_versions": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__issue_versions", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__issue_versions.sql", "original_file_path": "models/intermediate/int_jira__issue_versions.sql", "unique_id": "model.jira.int_jira__issue_versions", "fqn": ["jira", "intermediate", "int_jira__issue_versions"], "alias": "int_jira__issue_versions", "checksum": {"name": "sha256", "checksum": "d4f8c46a4d4cb7b328602ff032618139bc7fe834f102395d67846a1d1b8810a4"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table associating issues with the versions that they fix and/or affect. \n", "columns": {"issue_id": {"name": "issue_id", "description": "Foreign key referencing the `issue` tagged with these versions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "affects_versions": {"name": "affects_versions", "description": "Comma-separated list of the names of project versions that this issue affects.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fixes_versions": {"name": "fixes_versions", "description": "Comma-separated list of the names of project versions that this issue fixes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira", "enabled": true}, "created_at": 1711035090.610618, "relation_name": null, "raw_code": "{{ config(enabled=var('jira_using_versions', True)) }}\n\nwith version as (\n\n select *\n from {{ var('version') }}\n),\n\nversion_history as (\n\n select *\n from {{ ref('int_jira__issue_multiselect_history') }}\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as {{ dbt.type_int() }}) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n {{ fivetran_utils.string_agg('version.version_name', \"', '\") }} as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final", "language": "sql", "refs": [{"name": "stg_jira__version", "package": null, "version": null}, {"name": "int_jira__issue_multiselect_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.fivetran_utils.string_agg"], "nodes": ["model.jira_source.stg_jira__version", "model.jira.int_jira__issue_multiselect_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__issue_versions.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), version as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version\"\n),\n\nversion_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as integer) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n \n string_agg(version.version_name, ', ')\n\n as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_multiselect_history", "sql": " __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__issue_users": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__issue_users", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__issue_users.sql", "original_file_path": "models/intermediate/int_jira__issue_users.sql", "unique_id": "model.jira.int_jira__issue_users", "fqn": ["jira", "intermediate", "int_jira__issue_users"], "alias": "int_jira__issue_users", "checksum": {"name": "sha256", "checksum": "bcbeb4be872065b0ec243d200e767baf08d6809f4fee08dd53577bfa2ad51ad3"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table relating issues to attributes about their assignees and reporters. Builds off of the `int_jira__issue_type_parents` model.\n", "columns": {"issue_id": {"name": "issue_id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_name": {"name": "assignee_name", "description": "User display name of the person currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_name": {"name": "reporter_name", "description": "User display name of the person who reported the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_timezone": {"name": "assignee_timezone", "description": "Timezone of the user currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_email": {"name": "assignee_email", "description": "Email associated with the user currently assigned this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_email": {"name": "reporter_email", "description": "Email associated with the user who reported this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_timezone": {"name": "reporter_timezone", "description": "Timezone of the user currently who reported this issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_id": {"name": "parent_issue_id", "description": "Unique ID of the parent issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type": {"name": "issue_type", "description": "Name of the issue type (ie Epic, Task, Subtask, any custom types).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_name": {"name": "issue_name", "description": "Title of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_key": {"name": "issue_key", "description": "UI-facing id of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_type": {"name": "parent_issue_type", "description": "Name of the parent issue type (ie Epic, Task, Subtask, any custom types).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_name": {"name": "parent_issue_name", "description": "Title of the parent issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_key": {"name": "parent_issue_key", "description": "UI-facing id of the parent issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_parent_epic": {"name": "is_parent_epic", "description": "Boolean that is true if the parent is an epic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_user_id": {"name": "assignee_user_id", "description": "Foreign key referencing the ID of the `user` currently assigned to this task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the issue was created (in UTC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "creator_user_id": {"name": "creator_user_id", "description": "Foreign key referencing the `user` who first created the issue. Cannot be changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_description": {"name": "issue_description", "description": "The issue description, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "Calendar day on which the issue is due, if a due date is provided.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "environment": {"name": "environment", "description": "Text field describing the environment in which the issue occurred (ie \"IE9 on Windows 7\").", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type_id": {"name": "issue_type_id", "description": "Foreign key referencing the ID of the `issue_type`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "original_estimate_seconds": {"name": "original_estimate_seconds", "description": "The original estimate of how long working on this issue would take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority_id": {"name": "priority_id", "description": "Foreign key referencing the ID of the issue's current `priority`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the ID of the `project` that the issue belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "remaining_estimate_seconds": {"name": "remaining_estimate_seconds", "description": "The estimate of how much longer working on this issue will take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_user_id": {"name": "reporter_user_id", "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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_id": {"name": "resolution_id", "description": "Foreign key referencing the ID of the issue's type of `resolution`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolved_at": {"name": "resolved_at", "description": "Timestamp of when the issue was resolved (ie completed, marked as duplicate). If an issue is un-resolved, this will be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Foreign key referencing the ID of the issue's `status` (the step that the issue is currently at in the project's workflow).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_changed_at": {"name": "status_changed_at", "description": "Timestamp of when the status was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_spent_seconds": {"name": "time_spent_seconds", "description": "The time that was spent working on this issue, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue was last updated in some way.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "work_ratio": {"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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira"}, "created_at": 1711035090.604127, "relation_name": null, "raw_code": "-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n {% set except_columns = [\"revised_parent_issue_id\", \"parent_issue_id\", \"issue_id\"] %}\n\n select\n issue_id,\n coalesce(cast(revised_parent_issue_id as {{ dbt.type_string() }}), cast(parent_issue_id as {{ dbt.type_string() }})) as parent_issue_id,\n\n {{ dbt_utils.star(from=ref('int_jira__issue_type_parents'), \n except=except_columns) }}\n\n\n \n from {{ ref('int_jira__issue_type_parents') }}\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from {{ var('user') }}\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join", "language": "sql", "refs": [{"name": "int_jira__issue_type_parents", "package": null, "version": null}, {"name": "int_jira__issue_type_parents", "package": null, "version": null}, {"name": "stg_jira__user", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt_utils.star"], "nodes": ["model.jira.int_jira__issue_type_parents", "model.jira_source.stg_jira__user"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__issue_users.sql", "compiled": true, "compiled_code": "-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n \n\n select\n issue_id,\n coalesce(cast(revised_parent_issue_id as TEXT), cast(parent_issue_id as TEXT)) as parent_issue_id,\n\n \"original_estimate_seconds\",\n \"remaining_estimate_seconds\",\n \"time_spent_seconds\",\n \"assignee_user_id\",\n \"created_at\",\n \"resolved_at\",\n \"creator_user_id\",\n \"issue_description\",\n \"due_date\",\n \"environment\",\n \"issue_type_id\",\n \"issue_key\",\n \"priority_id\",\n \"project_id\",\n \"reporter_user_id\",\n \"resolution_id\",\n \"status_id\",\n \"status_changed_at\",\n \"issue_name\",\n \"updated_at\",\n \"work_ratio\",\n \"_fivetran_synced\",\n \"issue_type\",\n \"parent_issue_type\",\n \"parent_issue_name\",\n \"parent_issue_key\",\n \"is_parent_epic\"\n\n\n \n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_type_parents\"\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__issue_sprint": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__issue_sprint", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__issue_sprint.sql", "original_file_path": "models/intermediate/int_jira__issue_sprint.sql", "unique_id": "model.jira.int_jira__issue_sprint", "fqn": ["jira", "intermediate", "int_jira__issue_sprint"], "alias": "int_jira__issue_sprint", "checksum": {"name": "sha256", "checksum": "db877518ad36ad7d838a637fa39dcadaa99b94fe8abf8787ac2f1c00cbefd97c"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table relating issues to the sprints they currently belong to.", "columns": {"issue_id": {"name": "issue_id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_sprint_id": {"name": "current_sprint_id", "description": "Unique ID of the sprint.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "current_sprint_name": {"name": "current_sprint_name", "description": "Title of the sprint.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "board_id": {"name": "board_id", "description": "Foreign key referencing the ID of the `board` that the sprint lives in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_started_at": {"name": "sprint_started_at", "description": "Timestamp of when the sprint began.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_ended_at": {"name": "sprint_ended_at", "description": "Timestamp of when the sprint is planned to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_completed_at": {"name": "sprint_completed_at", "description": "Timestamp of when the sprint was completed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_sprint_changes": {"name": "count_sprint_changes", "description": "The total number of sprints that the issue has belonged to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira", "enabled": true}, "created_at": 1711035090.602006, "relation_name": null, "raw_code": "{{ config(enabled=var('jira_using_sprints', True)) }}\n\nwith sprint as (\n\n select * \n from {{ var('sprint') }}\n\n),\n\nfield_history as (\n\n -- sprints don't appear to be capable of multiselect in the UI...\n select *\n from {{ ref('int_jira__issue_multiselect_history') }}\n\n),\n\nsprint_field_history as (\n\n select \n field_history.*,\n sprint.*,\n row_number() over (\n partition by field_history.issue_id \n order by field_history.updated_at desc, sprint.started_at desc \n ) as row_num\n from field_history\n join sprint on field_history.field_value = cast(sprint.sprint_id as {{ dbt.type_string() }})\n where lower(field_history.field_name) = 'sprint'\n),\n\n\nlast_sprint as (\n\n select *\n from sprint_field_history\n \n where row_num = 1\n\n), \n\nsprint_rollovers as (\n\n select \n issue_id,\n count(distinct case when field_value is not null then field_value end) as count_sprint_changes\n \n from sprint_field_history\n group by 1\n\n),\n\nissue_sprint as (\n\n select \n last_sprint.issue_id,\n last_sprint.field_value as current_sprint_id,\n last_sprint.sprint_name as current_sprint_name,\n last_sprint.board_id,\n last_sprint.started_at as sprint_started_at,\n last_sprint.ended_at as sprint_ended_at,\n last_sprint.completed_at as sprint_completed_at,\n coalesce(sprint_rollovers.count_sprint_changes, 0) as count_sprint_changes\n\n from \n last_sprint \n left join sprint_rollovers on sprint_rollovers.issue_id = last_sprint.issue_id\n \n)\n\nselect * from issue_sprint", "language": "sql", "refs": [{"name": "stg_jira__sprint", "package": null, "version": null}, {"name": "int_jira__issue_multiselect_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.type_string"], "nodes": ["model.jira_source.stg_jira__sprint", "model.jira.int_jira__issue_multiselect_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__issue_sprint.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), sprint as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__sprint\"\n\n),\n\nfield_history as (\n\n -- sprints don't appear to be capable of multiselect in the UI...\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n),\n\nsprint_field_history as (\n\n select \n field_history.*,\n sprint.*,\n row_number() over (\n partition by field_history.issue_id \n order by field_history.updated_at desc, sprint.started_at desc \n ) as row_num\n from field_history\n join sprint on field_history.field_value = cast(sprint.sprint_id as TEXT)\n where lower(field_history.field_name) = 'sprint'\n),\n\n\nlast_sprint as (\n\n select *\n from sprint_field_history\n \n where row_num = 1\n\n), \n\nsprint_rollovers as (\n\n select \n issue_id,\n count(distinct case when field_value is not null then field_value end) as count_sprint_changes\n \n from sprint_field_history\n group by 1\n\n),\n\nissue_sprint as (\n\n select \n last_sprint.issue_id,\n last_sprint.field_value as current_sprint_id,\n last_sprint.sprint_name as current_sprint_name,\n last_sprint.board_id,\n last_sprint.started_at as sprint_started_at,\n last_sprint.ended_at as sprint_ended_at,\n last_sprint.completed_at as sprint_completed_at,\n coalesce(sprint_rollovers.count_sprint_changes, 0) as count_sprint_changes\n\n from \n last_sprint \n left join sprint_rollovers on sprint_rollovers.issue_id = last_sprint.issue_id\n \n)\n\nselect * from issue_sprint", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_multiselect_history", "sql": " __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__issue_comments": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__issue_comments", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__issue_comments.sql", "original_file_path": "models/intermediate/int_jira__issue_comments.sql", "unique_id": "model.jira.int_jira__issue_comments", "fqn": ["jira", "intermediate", "int_jira__issue_comments"], "alias": "int_jira__issue_comments", "checksum": {"name": "sha256", "checksum": "7775067304651e37ed93c0ec86a2f54c83c24d31ab5205e16b0a075b58b84dfe"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table aggregating issue comments into conversations.", "columns": {"issue_id": {"name": "issue_id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "conversation": {"name": "conversation", "description": "Line-separated list of comments made on this issue, including the timestamp and author name of each comment.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_comments": {"name": "count_comments", "description": "The number of comments made on this issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira", "enabled": true}, "created_at": 1711035090.60066, "relation_name": null, "raw_code": "{{ config(enabled=var('jira_include_comments', True)) }}\n\nwith comment as (\n\n select *\n from {{ var('comment') }}\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from {{ var('user') }}\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n {{ fivetran_utils.string_agg( \"comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body\", \"'\\\\n'\" ) }} as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments", "language": "sql", "refs": [{"name": "stg_jira__comment", "package": null, "version": null}, {"name": "stg_jira__user", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.fivetran_utils.string_agg"], "nodes": ["model.jira_source.stg_jira__comment", "model.jira_source.stg_jira__user"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__issue_comments.sql", "compiled": true, "compiled_code": "\n\nwith comment as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment\"\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n \n string_agg(comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body, '\\n')\n\n as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__project_metrics": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__project_metrics", "resource_type": "model", "package_name": "jira", "path": "intermediate/int_jira__project_metrics.sql", "original_file_path": "models/intermediate/int_jira__project_metrics.sql", "unique_id": "model.jira.int_jira__project_metrics", "fqn": ["jira", "intermediate", "int_jira__project_metrics"], "alias": "int_jira__project_metrics", "checksum": {"name": "sha256", "checksum": "67da27ce216c6bf42dd56d65afaaa732571f82e27aae73934ad43f73f86b6178"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table calculating issue-related metrics per project.", "columns": {"project_id": {"name": "project_id", "description": "Unique ID of the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_closed_issues": {"name": "count_closed_issues", "description": "The number of issues closed in this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_open_issues": {"name": "count_open_issues", "description": "The number of currently un-resolved issues in the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "count_open_assigned_issues": {"name": "count_open_assigned_issues", "description": "The number of currently open and currently assigned issues in the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_close_time_seconds": {"name": "avg_close_time_seconds", "description": "The average time taken to close issues, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_assigned_close_time_seconds": {"name": "avg_assigned_close_time_seconds", "description": "The average time taken to close issues from their first assignment, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_seconds": {"name": "avg_age_currently_open_seconds", "description": "The average age of any currently-open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_assigned_seconds": {"name": "avg_age_currently_open_assigned_seconds", "description": "The average age of any currently-open issues, from their first assignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_close_time_seconds": {"name": "median_close_time_seconds", "description": "The median time taken to close issues, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_seconds": {"name": "median_age_currently_open_seconds", "description": "The median age of any currently-open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_assigned_close_time_seconds": {"name": "median_assigned_close_time_seconds", "description": "The median time taken to close issues from their first assignment, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_assigned_seconds": {"name": "median_age_currently_open_assigned_seconds", "description": "The median age of any currently-open issues, from their first assignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_close_time_days": {"name": "avg_close_time_days", "description": "The average time taken to close issues, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_assigned_close_time_days": {"name": "avg_assigned_close_time_days", "description": "The average time taken to close issues from their first assignment, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_days": {"name": "avg_age_currently_open_days", "description": "The average age of any currently-open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "avg_age_currently_open_assigned_days": {"name": "avg_age_currently_open_assigned_days", "description": "The average age of any currently-open issues, from their first assignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_close_time_days": {"name": "median_close_time_days", "description": "The median time taken to close issues, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_days": {"name": "median_age_currently_open_days", "description": "The median age of any currently-open issues.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_assigned_close_time_days": {"name": "median_assigned_close_time_days", "description": "The median time taken to close issues from their first assignment, in days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "median_age_currently_open_assigned_days": {"name": "median_age_currently_open_assigned_days", "description": "The median age of any currently-open issues, from their first assignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira"}, "created_at": 1711035090.599894, "relation_name": null, "raw_code": "with issue as (\n\n select * \n from {{ ref('jira__issue_enhanced') }}\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( {{ fivetran_utils.percentile(percentile_field='case when resolved_at is not null then open_duration_seconds end', \n partition_field='project_id', percent='0.5') }} as {{ dbt.type_numeric() }} ), 0) as median_close_time_seconds,\n round( cast({{ fivetran_utils.percentile(percentile_field='case when resolved_at is null then open_duration_seconds end', \n partition_field='project_id', percent='0.5') }} as {{ dbt.type_numeric() }} ), 0) as median_age_currently_open_seconds,\n\n round( cast({{ fivetran_utils.percentile(percentile_field='case when resolved_at is not null then any_assignment_duration_seconds end', \n partition_field='project_id', percent='0.5') }} as {{ dbt.type_numeric() }} ), 0) as median_assigned_close_time_seconds,\n round( cast({{ fivetran_utils.percentile(percentile_field='case when resolved_at is null then any_assignment_duration_seconds end', \n partition_field='project_id', percent='0.5') }} as {{ dbt.type_numeric() }} ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n {% if target.type == 'postgres' %} group by project_id {% endif %}\n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as {{ dbt.type_numeric() }} ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as {{ dbt.type_numeric() }} ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as {{ dbt.type_numeric() }} ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as {{ dbt.type_numeric() }} ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as {{ dbt.type_numeric() }} ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics", "language": "sql", "refs": [{"name": "jira__issue_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.fivetran_utils.percentile", "macro.dbt.type_numeric"], "nodes": ["model.jira.jira__issue_enhanced"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira__project_metrics.sql", "compiled": true, "compiled_code": "with issue as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\"\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_seconds,\n\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_assigned_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n group by project_id \n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as numeric(28,6) ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as numeric(28,6) ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__issue_multiselect_history": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__issue_multiselect_history", "resource_type": "model", "package_name": "jira", "path": "intermediate/field_history/int_jira__issue_multiselect_history.sql", "original_file_path": "models/intermediate/field_history/int_jira__issue_multiselect_history.sql", "unique_id": "model.jira.int_jira__issue_multiselect_history", "fqn": ["jira", "intermediate", "field_history", "int_jira__issue_multiselect_history"], "alias": "int_jira__issue_multiselect_history", "checksum": {"name": "sha256", "checksum": "58dd631d9f703aaf2571578adb22943919b6d52c39b10de180aa76eff513d76e"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of every value that each array-type (multiselect) field has been set to. Each row will pertain to **one** value. This model serves to append the `field_name` to each record.\n", "columns": {"_fivetran_id": {"name": "_fivetran_id", "description": "Fivetran-generated ID hashed on field, issue, and value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue field was updated to included this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_id": {"name": "field_id", "description": "Foreign key referencing the ID of the `field` that was changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_value": {"name": "field_value", "description": "Content of the value of that the field was set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_name": {"name": "field_name", "description": "Name of the field as it appears on issue cards.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira"}, "created_at": 1711035090.60968, "relation_name": null, "raw_code": "with issue_multiselect_history as (\n\n select *\n from {{ var('issue_multiselect_history') }}\n \n), \n\nfields as (\n \n select *\n from {{ var('field') }}\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined", "language": "sql", "refs": [{"name": "stg_jira__issue_multiselect_history", "package": null, "version": null}, {"name": "stg_jira__field", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": [], "nodes": ["model.jira_source.stg_jira__issue_multiselect_history", "model.jira_source.stg_jira__field"]}, "compiled_path": "target/compiled/jira/models/intermediate/field_history/int_jira__issue_multiselect_history.sql", "compiled": true, "compiled_code": "with issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__pivot_daily_field_history": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__pivot_daily_field_history", "resource_type": "model", "package_name": "jira", "path": "intermediate/field_history/int_jira__pivot_daily_field_history.sql", "original_file_path": "models/intermediate/field_history/int_jira__pivot_daily_field_history.sql", "unique_id": "model.jira.int_jira__pivot_daily_field_history", "fqn": ["jira", "intermediate", "field_history", "int_jira__pivot_daily_field_history"], "alias": "int_jira__pivot_daily_field_history", "checksum": {"name": "sha256", "checksum": "a6f55597ea7b9e244ce56fa39acfacc44cb41e5fd27a9ebf4ee4b514a10551d6"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "issue_day_id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected", "partition_by": {"field": "valid_starting_on", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "Table pivoting out the fields in `int_jira__daily_field_history` into columns, in which the value of each field column is the latest value updated a given day.\n", "columns": {"valid_starting_on": {"name": "valid_starting_on", "description": "Calendar date of when the field was changed to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint": {"name": "sprint", "description": "The ID of the sprint that an issue is slotted into on a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "The ID of the status that an issue has on a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_day_id": {"name": "issue_day_id", "description": "Unique ID hashed on `valid_starting_on` and `issue_field_history`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "int_jira", "partition_by": {"field": "valid_starting_on", "data_type": "date"}, "unique_key": "issue_day_id", "incremental_strategy": "delete+insert", "file_format": "delta"}, "created_at": 1711035090.608844, "relation_name": "\"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__pivot_daily_field_history\"", "raw_code": "{{\n config(\n materialized='incremental',\n partition_by = {'field': 'valid_starting_on', 'data_type': 'date'}\n if target.type not in ['spark','databricks'] else ['valid_starting_on'],\n unique_key='issue_day_id',\n incremental_strategy = 'merge' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n-- latest value per issue field (already limited included fields to sprint, status, and var(issue_field_history_columns))\nwith daily_field_history as (\n\n select * \n from {{ ref('int_jira__daily_field_history') }}\n\n {% if is_incremental() %}\n where valid_starting_on >= (select max(valid_starting_on) from {{ this }} )\n {% endif %}\n),\n\npivot_out as (\n\n -- pivot out default columns (status and sprint) and others specified in the var(issue_field_history_columns)\n -- only days on which a field value was actively changed will have a non-null value. the nulls will need to \n -- be backfilled in the final jira__daily_issue_field_history model\n select \n valid_starting_on, \n issue_id,\n max(case when lower(field_id) = 'status' then field_value end) as status,\n max(case when lower(field_name) = 'sprint' then field_value end) as sprint\n\n {% for col in var('issue_field_history_columns', []) -%}\n ,\n max(case when lower(field_name) = '{{ col|lower }}' then field_value end) as {{ dbt_utils.slugify(col) | replace(' ', '_') | lower }}\n {% endfor -%}\n\n from daily_field_history\n\n group by 1,2\n),\n\nsurrogate_key as (\n\n select \n *,\n {{ dbt_utils.generate_surrogate_key(['valid_starting_on','issue_id']) }} as issue_day_id\n\n from pivot_out\n)\n\nselect * from surrogate_key", "language": "sql", "refs": [{"name": "int_jira__daily_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.slugify", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.jira.int_jira__daily_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/field_history/int_jira__pivot_daily_field_history.sql", "compiled": true, "compiled_code": "\n\n-- latest value per issue field (already limited included fields to sprint, status, and var(issue_field_history_columns))\nwith daily_field_history as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__daily_field_history\"\n\n \n where valid_starting_on >= (select max(valid_starting_on) from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__pivot_daily_field_history\" )\n \n),\n\npivot_out as (\n\n -- pivot out default columns (status and sprint) and others specified in the var(issue_field_history_columns)\n -- only days on which a field value was actively changed will have a non-null value. the nulls will need to \n -- be backfilled in the final jira__daily_issue_field_history model\n select \n valid_starting_on, \n issue_id,\n max(case when lower(field_id) = 'status' then field_value end) as status,\n max(case when lower(field_name) = 'sprint' then field_value end) as sprint\n\n ,\n max(case when lower(field_name) = 'summary' then field_value end) as summary\n ,\n max(case when lower(field_name) = 'story points' then field_value end) as story_points\n ,\n max(case when lower(field_name) = 'components' then field_value end) as components\n from daily_field_history\n\n group by 1,2\n),\n\nsurrogate_key as (\n\n select \n *,\n md5(cast(coalesce(cast(valid_starting_on as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as issue_day_id\n\n from pivot_out\n)\n\nselect * from surrogate_key", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__issue_calendar_spine": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__issue_calendar_spine", "resource_type": "model", "package_name": "jira", "path": "intermediate/field_history/int_jira__issue_calendar_spine.sql", "original_file_path": "models/intermediate/field_history/int_jira__issue_calendar_spine.sql", "unique_id": "model.jira.int_jira__issue_calendar_spine", "fqn": ["jira", "intermediate", "field_history", "int_jira__issue_calendar_spine"], "alias": "int_jira__issue_calendar_spine", "checksum": {"name": "sha256", "checksum": "bbd5267be5180bf3eda82de804c7159fd925ddb90864ae3cfb081f29f81ff952"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "issue_day_id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected", "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "Table relating every issue to every day it was open (plus a buffer of one month, in case the issue is re-opened, as this model is materialized incrementally).\n", "columns": {"date_day": {"name": "date_day", "description": "Calendar date on which the issue was open.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the unique ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_day_id": {"name": "issue_day_id", "description": "Unique ID hashed on `date_day` and `issue_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "earliest_open_until_date": {"name": "earliest_open_until_date", "description": "Used for incremental materialization logic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "int_jira", "partition_by": {"field": "date_day", "data_type": "date"}, "unique_key": "issue_day_id", "incremental_strategy": "delete+insert", "file_format": "delta"}, "created_at": 1711035090.608033, "relation_name": "\"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_calendar_spine\"", "raw_code": "{{\n config(\n materialized='incremental',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='issue_day_id',\n incremental_strategy = 'merge' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\nwith spine as (\n\n {% if execute %}\n {% set first_date_query %}\n -- start at the first created issue\n select min( created ) as min_date from {{ source('jira','issue') }}\n {% endset %}\n {% set first_date = run_query(first_date_query).columns[0][0]|string %}\n \n {% else %} {% set first_date = \"2016-01-01\" %}\n {% endif %}\n\n\n select * \n from (\n {{\n dbt_utils.date_spine(\n datepart = \"day\", \n start_date = \"cast('\" ~ first_date[0:10] ~ \"' as date)\", \n end_date = dbt.dateadd(\"week\", 1, dbt.current_timestamp_in_utc_backcompat())\n ) \n }} \n ) as date_spine\n\n {% if is_incremental() %}\n -- compare to the earliest possible open_until date so that if a resolved issue is updated after a long period of inactivity, we don't need a full refresh\n -- essentially we need to be able to backfill\n where cast( date_day as date) >= (select min(earliest_open_until_date) from {{ this }} )\n {% endif %}\n),\n\nissue_history_scd as (\n \n select *\n from {{ ref('int_jira__field_history_scd') }}\n),\n\nissue_dates as (\n\n select\n issue_history_scd.issue_id,\n cast( {{ dbt.date_trunc('day', 'issue.created_at') }} as date) as created_on,\n -- resolved_at will become null if an issue is marked as un-resolved. if this sorta thing happens often, you may want to run full-refreshes of the field_history models often\n -- if it's not resolved include everything up to today. if it is, look at the last time it was updated \n cast({{ dbt.date_trunc('day', 'case when issue.resolved_at is null then ' ~ dbt.current_timestamp_in_utc_backcompat() ~ ' else cast(issue_history_scd.valid_starting_on as ' ~ dbt.type_timestamp() ~ ') end') }} as date) as open_until\n from issue_history_scd\n left join {{ var('issue') }} as issue\n on issue_history_scd.issue_id = issue.issue_id\n),\n\nissue_spine as (\n\n select \n cast(spine.date_day as date) as date_day,\n issue_dates.issue_id,\n -- will take the table-wide min of this in the incremental block at the top of this model\n min(issue_dates.open_until) as earliest_open_until_date\n\n from spine \n join issue_dates on\n issue_dates.created_on <= spine.date_day\n and {{ dbt.dateadd('month', var('jira_issue_history_buffer', 1), 'issue_dates.open_until') }} >= spine.date_day\n -- if we cut off issues, we're going to have to do a full refresh to catch issues that have been un-resolved\n\n group by 1,2\n),\n\nsurrogate_key as (\n\n select \n date_day,\n issue_id,\n {{ dbt_utils.generate_surrogate_key(['date_day','issue_id']) }} as issue_day_id,\n earliest_open_until_date\n\n from issue_spine\n\n where date_day <= cast( {{ dbt.date_trunc('day',dbt.current_timestamp_in_utc_backcompat()) }} as date)\n)\nselect * from surrogate_key", "language": "sql", "refs": [{"name": "int_jira__field_history_scd", "package": null, "version": null}, {"name": "stg_jira__issue", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.current_timestamp_in_utc_backcompat", "macro.dbt.dateadd", "macro.dbt_utils.date_spine", "macro.dbt.is_incremental", "macro.dbt.date_trunc", "macro.dbt.type_timestamp", "macro.dbt_utils.generate_surrogate_key", "macro.dbt.run_query"], "nodes": ["model.jira.int_jira__field_history_scd", "model.jira_source.stg_jira__issue"]}, "compiled_path": "target/compiled/jira/models/intermediate/field_history/int_jira__issue_calendar_spine.sql", "compiled": true, "compiled_code": "\n\nwith spine as (\n\n \n \n \n \n \n\n\n select * \n from (\n \n\n\n\n\n\nwith rawdata as (\n\n \n\n \n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n \n p0.generated_number * power(2, 0)\n + \n \n p1.generated_number * power(2, 1)\n + \n \n p2.generated_number * power(2, 2)\n + \n \n p3.generated_number * power(2, 3)\n + \n \n p4.generated_number * power(2, 4)\n + \n \n p5.generated_number * power(2, 5)\n + \n \n p6.generated_number * power(2, 6)\n + \n \n p7.generated_number * power(2, 7)\n + \n \n p8.generated_number * power(2, 8)\n + \n \n p9.generated_number * power(2, 9)\n + \n \n p10.generated_number * power(2, 10)\n \n \n + 1\n as generated_number\n\n from\n\n \n p as p0\n cross join \n \n p as p1\n cross join \n \n p as p2\n cross join \n \n p as p3\n cross join \n \n p as p4\n cross join \n \n p as p5\n cross join \n \n p as p6\n cross join \n \n p as p7\n cross join \n \n p as p8\n cross join \n \n p as p9\n cross join \n \n p as p10\n \n \n\n )\n\n select *\n from unioned\n where generated_number <= 1457\n order by generated_number\n\n\n\n),\n\nall_periods as (\n\n select (\n \n\n cast('2020-04-01' as date) + ((interval '1 day') * (row_number() over (order by 1) - 1))\n\n\n ) as date_day\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_day <= \n\n \n (current_timestamp at time zone 'utc')::timestamp\n + ((interval '1 week') * (1))\n\n\n\n)\n\nselect * from filtered\n\n \n ) as date_spine\n\n \n -- compare to the earliest possible open_until date so that if a resolved issue is updated after a long period of inactivity, we don't need a full refresh\n -- essentially we need to be able to backfill\n where cast( date_day as date) >= (select min(earliest_open_until_date) from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_calendar_spine\" )\n \n),\n\nissue_history_scd as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__field_history_scd\"\n),\n\nissue_dates as (\n\n select\n issue_history_scd.issue_id,\n cast( date_trunc('day', issue.created_at) as date) as created_on,\n -- resolved_at will become null if an issue is marked as un-resolved. if this sorta thing happens often, you may want to run full-refreshes of the field_history models often\n -- if it's not resolved include everything up to today. if it is, look at the last time it was updated \n cast(date_trunc('day', case when issue.resolved_at is null then \n (current_timestamp at time zone 'utc')::timestamp\n else cast(issue_history_scd.valid_starting_on as timestamp) end) as date) as open_until\n from issue_history_scd\n left join \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue\" as issue\n on issue_history_scd.issue_id = issue.issue_id\n),\n\nissue_spine as (\n\n select \n cast(spine.date_day as date) as date_day,\n issue_dates.issue_id,\n -- will take the table-wide min of this in the incremental block at the top of this model\n min(issue_dates.open_until) as earliest_open_until_date\n\n from spine \n join issue_dates on\n issue_dates.created_on <= spine.date_day\n and \n\n issue_dates.open_until + ((interval '1 month') * (1))\n\n >= spine.date_day\n -- if we cut off issues, we're going to have to do a full refresh to catch issues that have been un-resolved\n\n group by 1,2\n),\n\nsurrogate_key as (\n\n select \n date_day,\n issue_id,\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as issue_day_id,\n earliest_open_until_date\n\n from issue_spine\n\n where date_day <= cast( date_trunc('day', \n (current_timestamp at time zone 'utc')::timestamp\n) as date)\n)\nselect * from surrogate_key", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__agg_multiselect_history": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__agg_multiselect_history", "resource_type": "model", "package_name": "jira", "path": "intermediate/field_history/int_jira__agg_multiselect_history.sql", "original_file_path": "models/intermediate/field_history/int_jira__agg_multiselect_history.sql", "unique_id": "model.jira.int_jira__agg_multiselect_history", "fqn": ["jira", "intermediate", "field_history", "int_jira__agg_multiselect_history"], "alias": "int_jira__agg_multiselect_history", "checksum": {"name": "sha256", "checksum": "ac596d51d82bf11d5f85d83b7f1b14024d9673e04cea0fce13ed730fbbc0b60f"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "batch_id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected", "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "Table aggregating batches of multiselect field values, which are split out individually in `issue_multiselect_history`. This is necessary to combine the 2 issue field history tables together.\n", "columns": {"field_id": {"name": "field_id", "description": "Foreign key referencing the ID of the `field` that was changed.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue field was updated to included this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "batch_id": {"name": "batch_id", "description": "Unique key hashed on field_id, issue_id, and updated_at.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_values": {"name": "field_values", "description": "Comma-separated list of the batch's values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Calendar date on which the batch of values was applied to the issue field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_name": {"name": "field_name", "description": "Name of the field as it appears on issue cards.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "int_jira", "partition_by": {"field": "date_day", "data_type": "date"}, "unique_key": "batch_id", "incremental_strategy": "delete+insert", "file_format": "delta"}, "created_at": 1711035090.605282, "relation_name": "\"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__agg_multiselect_history\"", "raw_code": "{{\n config(\n materialized='incremental',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='batch_id',\n incremental_strategy = 'merge' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n-- issue_multiselect_history splits out an array-type field into multiple rows with unique individual values\n-- to combine with issue_field_history we need to aggregate the multiselect field values.\n\nwith issue_multiselect_history as (\n\n select *\n from {{ ref('int_jira__issue_multiselect_history') }}\n\n {% if is_incremental() %}\n -- always refresh the most recent day of data\n where cast(updated_at as date) >= {{ dbt.dateadd('day', -1, '(select max(date_day) from ' ~ this ~ ')') }}\n {% endif %}\n\n),\n\n-- each field value has its own row, but each batch of values for that field has the same timestamp\nbatch_updates as (\n\n select \n *,\n {{ dbt_utils.generate_surrogate_key([var('jira_field_grain', 'field_id'), 'issue_id', 'updated_at']) }} as batch_id\n\n from issue_multiselect_history \n),\n\nconsolidate_batches as (\n\n select \n field_id,\n field_name,\n issue_id,\n updated_at,\n batch_id,\n cast( {{ dbt.date_trunc('day', 'updated_at') }} as date) as date_day,\n\n -- if the field refers to an object captured in a table elsewhere (ie sprint, users, field_option for custom fields),\n -- the value is actually a foreign key to that table. \n {{ fivetran_utils.string_agg('batch_updates.field_value', \"', '\") }} as field_values \n\n from batch_updates\n\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom consolidate_batches", "language": "sql", "refs": [{"name": "int_jira__issue_multiselect_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.generate_surrogate_key", "macro.dbt.date_trunc", "macro.fivetran_utils.string_agg", "macro.dbt.dateadd"], "nodes": ["model.jira.int_jira__issue_multiselect_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/field_history/int_jira__agg_multiselect_history.sql", "compiled": true, "compiled_code": "\n\n-- issue_multiselect_history splits out an array-type field into multiple rows with unique individual values\n-- to combine with issue_field_history we need to aggregate the multiselect field values.\n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), issue_multiselect_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n \n -- always refresh the most recent day of data\n where cast(updated_at as date) >= \n\n (select max(date_day) from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__agg_multiselect_history\") + ((interval '1 day') * (-1))\n\n\n \n\n),\n\n-- each field value has its own row, but each batch of values for that field has the same timestamp\nbatch_updates as (\n\n select \n *,\n md5(cast(coalesce(cast(field_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(updated_at as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as batch_id\n\n from issue_multiselect_history \n),\n\nconsolidate_batches as (\n\n select \n field_id,\n field_name,\n issue_id,\n updated_at,\n batch_id,\n cast( date_trunc('day', updated_at) as date) as date_day,\n\n -- if the field refers to an object captured in a table elsewhere (ie sprint, users, field_option for custom fields),\n -- the value is actually a foreign key to that table. \n \n string_agg(batch_updates.field_value, ', ')\n\n as field_values \n\n from batch_updates\n\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom consolidate_batches", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_multiselect_history", "sql": " __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__field_history_scd": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__field_history_scd", "resource_type": "model", "package_name": "jira", "path": "intermediate/field_history/int_jira__field_history_scd.sql", "original_file_path": "models/intermediate/field_history/int_jira__field_history_scd.sql", "unique_id": "model.jira.int_jira__field_history_scd", "fqn": ["jira", "intermediate", "field_history", "int_jira__field_history_scd"], "alias": "int_jira__field_history_scd", "checksum": {"name": "sha256", "checksum": "b85132de5613eaf47fd7c8726a80a037dc9fb3806ea42c480ff2aaabf05aa3c2"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Slowly-changing-dimension model that fills values from differnt fields in the pivoted daily history model. Note: this is the singular field history-related model that is not incremental (materialized as table)\n", "columns": {"valid_starting_on": {"name": "valid_starting_on", "description": "Calendar date of when the field was changed to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint": {"name": "sprint", "description": "The ID of the sprint that an issue is slotted into on a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "The ID of the status that an issue has on a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_day_id": {"name": "issue_day_id", "description": "Unique ID hashed on `valid_starting_on` and `issue_field_history`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "int_jira"}, "created_at": 1711035090.610337, "relation_name": "\"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__field_history_scd\"", "raw_code": "{{ config( materialized='table') }}\n\n{%- set issue_columns = adapter.get_columns_in_relation(ref('int_jira__pivot_daily_field_history')) -%}\n\nwith change_data as (\n\n select *\n from {{ ref('int_jira__pivot_daily_field_history') }}\n\n), set_values as (\n\n select \n valid_starting_on, \n issue_id,\n issue_day_id,\n status as status_id,\n sum( case when status is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as status_id_field_partition\n\n {% for col in issue_columns if col.name|lower not in ['valid_starting_on','issue_id','issue_day_id'] %} \n , {{ col.name }}\n -- create a batch/partition once a new value is provided\n , sum( case when {{ col.name }} is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as {{ col.name }}_field_partition\n\n {% endfor %}\n \n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes field values if that field was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid \n select \n valid_starting_on, \n issue_id,\n issue_day_id,\n first_value( status ) over (\n partition by issue_id, status_id_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as status_id\n \n {% for col in issue_columns if col.name|lower not in ['valid_starting_on','issue_id','issue_day_id'] %} \n\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by issue_id, {{ col.name }}_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as {{ col.name }}\n\n {% endfor %}\n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "language": "sql", "refs": [{"name": "int_jira__pivot_daily_field_history", "package": null, "version": null}, {"name": "int_jira__pivot_daily_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": [], "nodes": ["model.jira.int_jira__pivot_daily_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/field_history/int_jira__field_history_scd.sql", "compiled": true, "compiled_code": "with change_data as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__pivot_daily_field_history\"\n\n), set_values as (\n\n select \n valid_starting_on, \n issue_id,\n issue_day_id,\n status as status_id,\n sum( case when status is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as status_id_field_partition\n\n \n , status\n -- create a batch/partition once a new value is provided\n , sum( case when status is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as status_field_partition\n\n \n , sprint\n -- create a batch/partition once a new value is provided\n , sum( case when sprint is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as sprint_field_partition\n\n \n , summary\n -- create a batch/partition once a new value is provided\n , sum( case when summary is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as summary_field_partition\n\n \n , story_points\n -- create a batch/partition once a new value is provided\n , sum( case when story_points is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as story_points_field_partition\n\n \n , components\n -- create a batch/partition once a new value is provided\n , sum( case when components is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as components_field_partition\n\n \n \n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes field values if that field was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid \n select \n valid_starting_on, \n issue_id,\n issue_day_id,\n first_value( status ) over (\n partition by issue_id, status_id_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as status_id\n \n \n\n -- grab the value that started this batch/partition\n , first_value( status ) over (\n partition by issue_id, status_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as status\n\n \n\n -- grab the value that started this batch/partition\n , first_value( sprint ) over (\n partition by issue_id, sprint_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as sprint\n\n \n\n -- grab the value that started this batch/partition\n , first_value( summary ) over (\n partition by issue_id, summary_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as summary\n\n \n\n -- grab the value that started this batch/partition\n , first_value( story_points ) over (\n partition by issue_id, story_points_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as story_points\n\n \n\n -- grab the value that started this batch/partition\n , first_value( components ) over (\n partition by issue_id, components_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as components\n\n \n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__combine_field_histories": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__combine_field_histories", "resource_type": "model", "package_name": "jira", "path": "intermediate/field_history/int_jira__combine_field_histories.sql", "original_file_path": "models/intermediate/field_history/int_jira__combine_field_histories.sql", "unique_id": "model.jira.int_jira__combine_field_histories", "fqn": ["jira", "intermediate", "field_history", "int_jira__combine_field_histories"], "alias": "int_jira__combine_field_histories", "checksum": {"name": "sha256", "checksum": "fd22ab106ece79d6e5b3db018884b200e6f6731ec774a23cf0e674e158e32861"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "combined_history_id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected", "partition_by": {"field": "valid_starting_on", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "Table combining `issue_field_history` with the aggregated `issue_multiselect_history`.", "columns": {"field_id": {"name": "field_id", "description": "Foreign key referencing the unique ID of the `field` that was changed.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_value": {"name": "field_value", "description": "A singular or comma-separated list of field values, depending on if the field is an array type. Note: these values are IDs referencing either `field_option`, `sprint`, `issue` (ie for epics), `user` (ie for assignees), etc. This depends on what the field is (the value could also be a date, a freeform description, etc).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "valid_starting_at": {"name": "valid_starting_at", "description": "Timestamp of when the field was updated to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "valid_ending_at": {"name": "valid_ending_at", "description": "Timestamp of when the field was updated to a new value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "valid_starting_on": {"name": "valid_starting_on", "description": "Calendar date of when the field was changed to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "combined_history_id": {"name": "combined_history_id", "description": "Unique ID hashed on `field_id`, `issue_id`, and `valid_starting_at`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_name": {"name": "field_name", "description": "Name of the field as it appears on issue cards.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "int_jira", "partition_by": {"field": "valid_starting_on", "data_type": "date"}, "unique_key": "combined_history_id", "incremental_strategy": "delete+insert", "file_format": "delta"}, "created_at": 1711035090.607571, "relation_name": "\"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__combine_field_histories\"", "raw_code": "{{\n config(\n materialized='incremental',\n partition_by = {'field': 'valid_starting_on', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['valid_starting_on'],\n unique_key='combined_history_id',\n incremental_strategy = 'merge' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\nwith issue_field_history as (\n\n select * from {{ ref('int_jira__issue_field_history') }}\n\n {% if is_incremental() %}\n where cast( updated_at as date) >= (select max(valid_starting_on) from {{ this }} )\n {% endif %}\n),\n\nissue_multiselect_batch_history as (\n\n select * from {{ ref('int_jira__agg_multiselect_history') }}\n\n {% if is_incremental() %}\n where cast( updated_at as date) >= (select max(valid_starting_on) from {{ this }} )\n {% endif %}\n),\n\ncombine_field_history as (\n-- combining all the field histories together\n select \n field_id,\n issue_id,\n updated_at,\n field_value,\n field_name\n\n from issue_field_history\n\n union all\n\n select \n field_id,\n issue_id,\n updated_at,\n field_values as field_value, -- this is an aggregated list but we'll just call it field_value\n field_name\n\n from issue_multiselect_batch_history\n),\n\nget_valid_dates as (\n\n\n select \n field_id,\n issue_id,\n field_value,\n field_name,\n updated_at as valid_starting_at,\n\n -- this value is valid until the next value is updated\n lead(updated_at, 1) over(partition by issue_id, {{ var('jira_field_grain', 'field_id') }} order by updated_at asc) as valid_ending_at, \n\n cast( {{ dbt.date_trunc('day', 'updated_at') }} as date) as valid_starting_on\n\n from combine_field_history\n\n),\n\nsurrogate_key as (\n\n select \n *,\n {{ dbt_utils.generate_surrogate_key(['field_id', 'issue_id', 'valid_starting_at']) }} as combined_history_id\n\n from get_valid_dates\n\n)\n\nselect * from surrogate_key", "language": "sql", "refs": [{"name": "int_jira__issue_field_history", "package": null, "version": null}, {"name": "int_jira__agg_multiselect_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt.date_trunc", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.jira.int_jira__issue_field_history", "model.jira.int_jira__agg_multiselect_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/field_history/int_jira__combine_field_histories.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), issue_field_history as (\n\n select * from __dbt__cte__int_jira__issue_field_history\n\n \n where cast( updated_at as date) >= (select max(valid_starting_on) from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__combine_field_histories\" )\n \n),\n\nissue_multiselect_batch_history as (\n\n select * from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__agg_multiselect_history\"\n\n \n where cast( updated_at as date) >= (select max(valid_starting_on) from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__combine_field_histories\" )\n \n),\n\ncombine_field_history as (\n-- combining all the field histories together\n select \n field_id,\n issue_id,\n updated_at,\n field_value,\n field_name\n\n from issue_field_history\n\n union all\n\n select \n field_id,\n issue_id,\n updated_at,\n field_values as field_value, -- this is an aggregated list but we'll just call it field_value\n field_name\n\n from issue_multiselect_batch_history\n),\n\nget_valid_dates as (\n\n\n select \n field_id,\n issue_id,\n field_value,\n field_name,\n updated_at as valid_starting_at,\n\n -- this value is valid until the next value is updated\n lead(updated_at, 1) over(partition by issue_id, field_id order by updated_at asc) as valid_ending_at, \n\n cast( date_trunc('day', updated_at) as date) as valid_starting_on\n\n from combine_field_history\n\n),\n\nsurrogate_key as (\n\n select \n *,\n md5(cast(coalesce(cast(field_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(valid_starting_at as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as combined_history_id\n\n from get_valid_dates\n\n)\n\nselect * from surrogate_key", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__issue_field_history": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__issue_field_history", "resource_type": "model", "package_name": "jira", "path": "intermediate/field_history/int_jira__issue_field_history.sql", "original_file_path": "models/intermediate/field_history/int_jira__issue_field_history.sql", "unique_id": "model.jira.int_jira__issue_field_history", "fqn": ["jira", "intermediate", "field_history", "int_jira__issue_field_history"], "alias": "int_jira__issue_field_history", "checksum": {"name": "sha256", "checksum": "9af932ec0b9725d5db555ea44bbfeac1fd0495f0d40797bddbca3a9ce7f59ac7"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "ephemeral", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of every value that each **custom non-array** (not multiselect) field has been set to. This model serves to append the `field_name` to each record.\n", "columns": {"field_id": {"name": "field_id", "description": "Foreign key referencing the ID of the `field` that was changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue field was set to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_value": {"name": "field_value", "description": "Content of the value of that the field was set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_name": {"name": "field_name", "description": "Name of the field as it appears on issue cards.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "ephemeral", "schema": "int_jira"}, "created_at": 1711035090.6092129, "relation_name": null, "raw_code": "with field_history as (\n\n select *\n from {{ var('issue_field_history') }}\n \n), \n\nfields as (\n \n select *\n from {{ var('field') }}\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined", "language": "sql", "refs": [{"name": "stg_jira__issue_field_history", "package": null, "version": null}, {"name": "stg_jira__field", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": [], "nodes": ["model.jira_source.stg_jira__issue_field_history", "model.jira_source.stg_jira__field"]}, "compiled_path": "target/compiled/jira/models/intermediate/field_history/int_jira__issue_field_history.sql", "compiled": true, "compiled_code": "with field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira.int_jira__daily_field_history": {"database": "postgres", "schema": "jira_integrations_tests_33_int_jira", "name": "int_jira__daily_field_history", "resource_type": "model", "package_name": "jira", "path": "intermediate/field_history/int_jira__daily_field_history.sql", "original_file_path": "models/intermediate/field_history/int_jira__daily_field_history.sql", "unique_id": "model.jira.int_jira__daily_field_history", "fqn": ["jira", "intermediate", "field_history", "int_jira__daily_field_history"], "alias": "int_jira__daily_field_history", "checksum": {"name": "sha256", "checksum": "a4e680ff834f7230296e589fed89eaaefb81506974cc041442e4733a9c931e01"}, "config": {"enabled": true, "alias": null, "schema": "int_jira", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "issue_field_day_id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected", "partition_by": {"field": "valid_starting_on", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "Table in which each row represents the latest field value (for `sprint`, `status` and any columns specified by `issue_field_history_columns`) actively changed on a given day for each issue.\n", "columns": {"field_id": {"name": "field_id", "description": "Foreign key referencing the unique ID of the `field` that was changed.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_value": {"name": "field_value", "description": "A singular or comma-separated list of field values, depending on if the field is an array type. Note: these values are IDs referencing either `field_option`, `sprint`, `issue` (ie for epics), `user` (ie for assignees), etc. This depends on what the field is (the value could also be a date, a freeform description, etc).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_name": {"name": "field_name", "description": "Name of the field as it appears on issue cards.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "valid_starting_at": {"name": "valid_starting_at", "description": "Timestamp of when the field was updated to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "valid_ending_at": {"name": "valid_ending_at", "description": "Timestamp of when the field was updated to a new value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "valid_starting_on": {"name": "valid_starting_on", "description": "Calendar date of when the field was changed to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_field_day_id": {"name": "issue_field_day_id", "description": "Unique ID hashed on `field_id`, `issue_id`, and `valid_starting_on`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira://models/intermediate/int_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "int_jira", "partition_by": {"field": "valid_starting_on", "data_type": "date"}, "unique_key": "issue_field_day_id", "incremental_strategy": "delete+insert", "file_format": "delta"}, "created_at": 1711035090.608528, "relation_name": "\"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__daily_field_history\"", "raw_code": "{{\n config(\n materialized='incremental',\n partition_by = {'field': 'valid_starting_on', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['valid_starting_on'],\n unique_key='issue_field_day_id',\n incremental_strategy = 'merge' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\nwith combined_field_histories as (\n\n select * \n from {{ ref('int_jira__combine_field_histories') }}\n\n {% if is_incremental() %}\n where valid_starting_on >= (select max(valid_starting_on) from {{ this }} )\n {% endif %}\n),\n\n\nlimit_to_relevant_fields as (\n\n-- let's remove unncessary rows moving forward and grab field names \n select \n combined_field_histories.*\n\n from combined_field_histories\n\n where lower(field_id) = 'status' \n or lower(field_name) in ('sprint'\n {%- for col in var('issue_field_history_columns', []) -%}\n ,'{{ (col|lower) }}'\n {%- endfor -%} )\n \n),\n\norder_daily_values as (\n\n select \n *,\n\n -- want to grab last value for an issue's field for each day\n row_number() over (\n partition by valid_starting_on, issue_id, {{ var('jira_field_grain', 'field_id') }}\n order by valid_starting_at desc\n ) as row_num\n\n from limit_to_relevant_fields\n),\n\n-- only looking at the latest value for each day\nget_latest_daily_value as (\n\n select * \n from order_daily_values\n\n where row_num = 1\n), \n\nfinal as (\n\n select\n field_id,\n issue_id,\n field_name,\n\n -- doing this to figure out what values are actually null and what needs to be backfilled in jira__daily_issue_field_history\n case when field_value is null then 'is_null' else field_value end as field_value,\n valid_starting_at,\n valid_ending_at, \n valid_starting_on,\n\n {{ dbt_utils.generate_surrogate_key([var('jira_field_grain', 'field_id'),'issue_id', 'valid_starting_on']) }} as issue_field_day_id\n \n from get_latest_daily_value\n)\n\nselect * from final", "language": "sql", "refs": [{"name": "int_jira__combine_field_histories", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.jira.int_jira__combine_field_histories"]}, "compiled_path": "target/compiled/jira/models/intermediate/field_history/int_jira__daily_field_history.sql", "compiled": true, "compiled_code": "\n\nwith combined_field_histories as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__combine_field_histories\"\n\n \n where valid_starting_on >= (select max(valid_starting_on) from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__daily_field_history\" )\n \n),\n\n\nlimit_to_relevant_fields as (\n\n-- let's remove unncessary rows moving forward and grab field names \n select \n combined_field_histories.*\n\n from combined_field_histories\n\n where lower(field_id) = 'status' \n or lower(field_name) in ('sprint','summary','story points','components')\n \n),\n\norder_daily_values as (\n\n select \n *,\n\n -- want to grab last value for an issue's field for each day\n row_number() over (\n partition by valid_starting_on, issue_id, field_id\n order by valid_starting_at desc\n ) as row_num\n\n from limit_to_relevant_fields\n),\n\n-- only looking at the latest value for each day\nget_latest_daily_value as (\n\n select * \n from order_daily_values\n\n where row_num = 1\n), \n\nfinal as (\n\n select\n field_id,\n issue_id,\n field_name,\n\n -- doing this to figure out what values are actually null and what needs to be backfilled in jira__daily_issue_field_history\n case when field_value is null then 'is_null' else field_value end as field_value,\n valid_starting_at,\n valid_ending_at, \n valid_starting_on,\n\n md5(cast(coalesce(cast(field_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(valid_starting_on as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as issue_field_day_id\n \n from get_latest_daily_value\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__comment": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__comment", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__comment.sql", "original_file_path": "models/stg_jira__comment.sql", "unique_id": "model.jira_source.stg_jira__comment", "fqn": ["jira_source", "stg_jira__comment"], "alias": "stg_jira__comment", "checksum": {"name": "sha256", "checksum": "fa341c67127360137d40d0172515c1d2daee1fa728ba23273dc0155ab463a02d"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of comments made on issues.", "columns": {"comment_id": {"name": "comment_id", "description": "Unique ID of the comment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "author_user_id": {"name": "author_user_id", "description": "Foreign key referencing the `user` id of the comment's author.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "body": {"name": "body", "description": "Content of the comment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the comment was created. TODO - get timezone clarification", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_public": {"name": "is_public", "description": "Boolean that is true if the comment is visible to all users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the id of the `issue` that was commented on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_update_user_id": {"name": "last_update_user_id", "description": "Foreign key referencing the id of the `user` who last updated this comment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_updated_at": {"name": "last_updated_at", "description": "Timestamp of when the comment was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1711035090.672788, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__comment_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__comment_tmp')),\n staging_columns=get_comment_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n author_id as author_user_id,\n body,\n cast(created as {{ dbt.type_timestamp() }}) as created_at,\n id as comment_id,\n issue_id,\n is_public,\n update_author_id as last_update_user_id,\n cast(updated as {{ dbt.type_timestamp() }}) as last_updated_at,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__comment_tmp", "package": null, "version": null}, {"name": "stg_jira__comment_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_comment_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp"], "nodes": ["model.jira_source.stg_jira__comment_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__comment.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n author_id\n \n as \n \n author_id\n \n, \n \n \n body\n \n as \n \n body\n \n, \n \n \n created\n \n as \n \n created\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_public\n \n as \n \n is_public\n \n, \n \n \n issue_id\n \n as \n \n issue_id\n \n, \n \n \n update_author_id\n \n as \n \n update_author_id\n \n, \n \n \n updated\n \n as \n \n updated\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n author_id as author_user_id,\n body,\n cast(created as timestamp) as created_at,\n id as comment_id,\n issue_id,\n is_public,\n update_author_id as last_update_user_id,\n cast(updated as timestamp) as last_updated_at,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__project": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__project", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__project.sql", "original_file_path": "models/stg_jira__project.sql", "unique_id": "model.jira_source.stg_jira__project", "fqn": ["jira_source", "stg_jira__project"], "alias": "stg_jira__project", "checksum": {"name": "sha256", "checksum": "b79355d418e10ba5291f50718372e85750c439981b28e786fd401fe7d51bd6fb"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of all projects in your organization.", "columns": {"project_id": {"name": "project_id", "description": "Unique ID of the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_description": {"name": "project_description", "description": "Description of the project, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_key": {"name": "project_key", "description": "UI-facing ID of the project. This becomes the default prefix for tasks created within this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_lead_user_id": {"name": "project_lead_user_id", "description": "Foreign key referencing the ID of the `user` who leads this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_name": {"name": "project_name", "description": "Title of the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "permission_scheme_id": {"name": "permission_scheme_id", "description": "Foreign key referencing the ID of the `permission_scheme` that the project ascribes to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_category_id": {"name": "project_category_id", "description": "Foreign key referencing the ID of the `project_category` that the project is associated with, if any.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1711035090.67957, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__project\"", "raw_code": "with base as (\n \n select *\n from {{ ref('stg_jira__project_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__project_tmp')),\n staging_columns=get_project_columns()\n )\n }}\n from base\n\n),\n\nfinal as (\n\n select \n description as project_description,\n id as project_id,\n key as project_key,\n lead_id as project_lead_user_id,\n name as project_name,\n project_category_id,\n permission_scheme_id,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__project_tmp", "package": null, "version": null}, {"name": "stg_jira__project_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_project_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__project_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__project.sql", "compiled": true, "compiled_code": "with base as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__project_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n key\n \n as \n \n key\n \n, \n \n \n lead_id\n \n as \n \n lead_id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n permission_scheme_id\n \n as \n \n permission_scheme_id\n \n, \n \n \n project_category_id\n \n as \n \n project_category_id\n \n\n\n\n from base\n\n),\n\nfinal as (\n\n select \n description as project_description,\n id as project_id,\n key as project_key,\n lead_id as project_lead_user_id,\n name as project_name,\n project_category_id,\n permission_scheme_id,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__issue_field_history": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_field_history", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__issue_field_history.sql", "original_file_path": "models/stg_jira__issue_field_history.sql", "unique_id": "model.jira_source.stg_jira__issue_field_history", "fqn": ["jira_source", "stg_jira__issue_field_history"], "alias": "stg_jira__issue_field_history", "checksum": {"name": "sha256", "checksum": "fcf7634e1e37282dd645903f1dfef83c567b4cb60c51588d12f64e9ccb75cf3a"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of every value that each **custom non-array** (not multiselect) field has been set to.", "columns": {"field_id": {"name": "field_id", "description": "Foreign key referencing the ID of the `field` that was changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue field was set to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_value": {"name": "field_value", "description": "Content of the value of that the field was set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1711035090.677514, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__issue_field_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__issue_field_history_tmp')),\n staging_columns=get_issue_field_history_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n cast(field_id as {{ dbt.type_string() }}) as field_id,\n issue_id,\n {% if target.type == 'snowflake' -%}\n cast(\"TIME\" as {{ dbt.type_timestamp() }})\n {% elif target.type == 'redshift' -%}\n cast(\"time\" as {{ dbt.type_timestamp() }})\n {% else -%}\n cast(time as {{ dbt.type_timestamp() }})\n {% endif %} as updated_at,\n value as field_value,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__issue_field_history_tmp", "package": null, "version": null}, {"name": "stg_jira__issue_field_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_issue_field_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_string", "macro.dbt.type_timestamp"], "nodes": ["model.jira_source.stg_jira__issue_field_history_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__issue_field_history.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n field_id\n \n as \n \n field_id\n \n, \n \n \n issue_id\n \n as \n \n issue_id\n \n, \n \n \n value\n \n as \n \n value\n \n, \n \n \n time\n \n as \n \n time\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n cast(field_id as TEXT) as field_id,\n issue_id,\n cast(time as timestamp)\n as updated_at,\n value as field_value,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__version": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__version", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__version.sql", "original_file_path": "models/stg_jira__version.sql", "unique_id": "model.jira_source.stg_jira__version", "fqn": ["jira_source", "stg_jira__version"], "alias": "stg_jira__version", "checksum": {"name": "sha256", "checksum": "434f782b5a4f48238db3a2d933d43ca785164c5998ea04976d668ec08e6e72eb"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of project versions in your organization.", "columns": {"is_archived": {"name": "is_archived", "description": "Boolean that is true if the project version has been archived.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "The optional description given to the version.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "version_id": {"name": "version_id", "description": "Unique ID of the version.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "version_name": {"name": "version_name", "description": "Unique name of the version.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_overdue": {"name": "is_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.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the `PROJECT` to which this version is attached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "release_date": {"name": "release_date", "description": "The optional release date of the version. Expressed in ISO 8601 format (yyyy-mm-dd).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_released": {"name": "is_released", "description": "Boolean that is true if the version has been released. If the version is released a request to release again is ignored", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "start_date": {"name": "start_date", "description": "The start date of the version. Expressed in ISO 8601 format (yyyy-mm-dd).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source", "enabled": true}, "created_at": 1711035090.684671, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version\"", "raw_code": "{{ config(enabled=var('jira_using_versions', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_jira__version_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__version_tmp')),\n staging_columns=get_version_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n archived as is_archived,\n description,\n id as version_id,\n name as version_name,\n overdue as is_overdue,\n project_id,\n cast(release_date as {{ dbt.type_timestamp() }}) as release_date,\n released as is_released,\n cast(start_date as {{ dbt.type_timestamp() }}) as start_date\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__version_tmp", "package": null, "version": null}, {"name": "stg_jira__version_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_version_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp"], "nodes": ["model.jira_source.stg_jira__version_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__version.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n archived\n \n as \n \n archived\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n overdue\n \n as \n \n overdue\n \n, \n \n \n project_id\n \n as \n \n project_id\n \n, \n \n \n release_date\n \n as \n \n release_date\n \n, \n \n \n released\n \n as \n \n released\n \n, \n \n \n start_date\n \n as \n \n start_date\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n archived as is_archived,\n description,\n id as version_id,\n name as version_name,\n overdue as is_overdue,\n project_id,\n cast(release_date as timestamp) as release_date,\n released as is_released,\n cast(start_date as timestamp) as start_date\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__sprint": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__sprint", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__sprint.sql", "original_file_path": "models/stg_jira__sprint.sql", "unique_id": "model.jira_source.stg_jira__sprint", "fqn": ["jira_source", "stg_jira__sprint"], "alias": "stg_jira__sprint", "checksum": {"name": "sha256", "checksum": "b4084b61bc03413dbf58fe8746462aee01f531417e1988f0019cb52d96700a9e"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of all sprints.", "columns": {"sprint_id": {"name": "sprint_id", "description": "Unique ID of the sprint.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "board_id": {"name": "board_id", "description": "Foreign key referencing the ID of the `board` that the sprint lives in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "completed_at": {"name": "completed_at", "description": "Timestamp of when the sprint was completed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "ended_at": {"name": "ended_at", "description": "Timestamp of when the sprint is planned to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sprint_name": {"name": "sprint_name", "description": "Title of the sprint.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "started_at": {"name": "started_at", "description": "Timestamp of when the sprint began.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source", "enabled": true}, "created_at": 1711035090.681121, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__sprint\"", "raw_code": "{{ config(enabled=var('jira_using_sprints', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_jira__sprint_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__sprint_tmp')),\n staging_columns=get_sprint_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n id as sprint_id,\n name as sprint_name,\n board_id,\n cast(complete_date as {{ dbt.type_timestamp() }}) as completed_at,\n cast(end_date as {{ dbt.type_timestamp() }}) as ended_at,\n cast(start_date as {{ dbt.type_timestamp() }}) as started_at,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__sprint_tmp", "package": null, "version": null}, {"name": "stg_jira__sprint_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_sprint_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp"], "nodes": ["model.jira_source.stg_jira__sprint_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__sprint.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__sprint_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n board_id\n \n as \n \n board_id\n \n, \n \n \n complete_date\n \n as \n \n complete_date\n \n, \n \n \n end_date\n \n as \n \n end_date\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n start_date\n \n as \n \n start_date\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n id as sprint_id,\n name as sprint_name,\n board_id,\n cast(complete_date as timestamp) as completed_at,\n cast(end_date as timestamp) as ended_at,\n cast(start_date as timestamp) as started_at,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__field_option": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__field_option", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__field_option.sql", "original_file_path": "models/stg_jira__field_option.sql", "unique_id": "model.jira_source.stg_jira__field_option", "fqn": ["jira_source", "stg_jira__field_option"], "alias": "stg_jira__field_option", "checksum": {"name": "sha256", "checksum": "e7c7ad10cee2d5593f5be8c482bce4f0e4aac610ab4ee178b8ab73c3e0a16738"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of all options related to custom fields.", "columns": {"field_id": {"name": "field_id", "description": "The ID of the custom field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_field_id": {"name": "parent_field_id", "description": "The ID of the parent custom field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_option_name": {"name": "field_option_name", "description": "Name of the field option.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1711035090.6754282, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field_option\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__field_option_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__field_option_tmp')),\n staging_columns=get_field_option_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n id as field_id,\n parent_id as parent_field_id,\n name as field_option_name\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__field_option_tmp", "package": null, "version": null}, {"name": "stg_jira__field_option_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_field_option_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__field_option_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__field_option.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field_option_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n id\n \n as \n \n id\n \n, \n cast(null as integer) as \n \n parent_id\n \n , \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n name\n \n as \n \n name\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n id as field_id,\n parent_id as parent_field_id,\n name as field_option_name\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__field": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__field", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__field.sql", "original_file_path": "models/stg_jira__field.sql", "unique_id": "model.jira_source.stg_jira__field", "fqn": ["jira_source", "stg_jira__field"], "alias": "stg_jira__field", "checksum": {"name": "sha256", "checksum": "33c7c1d6d05d2e5c1d8d76552859b08fea705f306452653addd7e8cbb2b4b386"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of all issue fields.", "columns": {"field_id": {"name": "field_id", "description": "Unique ID of the field. Default fields will have descriptive IDs, whereas custom field IDs will be `'customfield_#####'`.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_array": {"name": "is_array", "description": "Boolean that is true if a field can have multiple values (is mulitselect).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_custom": {"name": "is_custom", "description": "Boolean that is true if the field is custom to this organization, and false if it is default to Jira.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_name": {"name": "field_name", "description": "Name of the field as it appears on issue cards.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1711035090.674888, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__field_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__field_tmp')),\n staging_columns=get_field_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n cast(id as {{ dbt.type_string() }}) as field_id,\n is_array,\n is_custom,\n name as field_name,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__field_tmp", "package": null, "version": null}, {"name": "stg_jira__field_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_field_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_string"], "nodes": ["model.jira_source.stg_jira__field_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__field.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_array\n \n as \n \n is_array\n \n, \n \n \n is_custom\n \n as \n \n is_custom\n \n, \n \n \n name\n \n as \n \n name\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n cast(id as TEXT) as field_id,\n is_array,\n is_custom,\n name as field_name,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__resolution": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__resolution", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__resolution.sql", "original_file_path": "models/stg_jira__resolution.sql", "unique_id": "model.jira_source.stg_jira__resolution", "fqn": ["jira_source", "stg_jira__resolution"], "alias": "stg_jira__resolution", "checksum": {"name": "sha256", "checksum": "d3166819dd7a36ee0cabef9cc658eaf00f35770a7a2decdce0ef635afee78537"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table storing the types of resolutions used by your organization.", "columns": {"resolution_id": {"name": "resolution_id", "description": "Unique ID of the resolution type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_description": {"name": "resolution_description", "description": "Description given to the resolution.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_name": {"name": "resolution_name", "description": "Display name of the resolution.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1711035090.680127, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__resolution\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__resolution_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__resolution_tmp')),\n staging_columns=get_resolution_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n description as resolution_description,\n id as resolution_id,\n name as resolution_name,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__resolution_tmp", "package": null, "version": null}, {"name": "stg_jira__resolution_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_resolution_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__resolution_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__resolution.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__resolution_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n description as resolution_description,\n id as resolution_id,\n name as resolution_name,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__status": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__status", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__status.sql", "original_file_path": "models/stg_jira__status.sql", "unique_id": "model.jira_source.stg_jira__status", "fqn": ["jira_source", "stg_jira__status"], "alias": "stg_jira__status", "checksum": {"name": "sha256", "checksum": "648c813903f25664f0814e811e0d78023933601777f17ad4ee32a831477bc6e6"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of project-level statuses (which may have the same umbrella `status_category`).", "columns": {"status_id": {"name": "status_id", "description": "Unique ID of the project status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_description": {"name": "status_description", "description": "Description of the project status. Different projects may all have a status called \"Backlog\", but their definitions of \"backlog\" may differ.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_name": {"name": "status_name", "description": "Title of the status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_category_id": {"name": "status_category_id", "description": "Foreign key referencing the ID of the `status_category` that this project status falls under.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1711035090.681891, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__status_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__status_tmp')),\n staging_columns=get_status_columns()\n )\n }}\n from base\n),\n\nfinal as (\n\n select\n description as status_description,\n id as status_id,\n name as status_name,\n status_category_id,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__status_tmp", "package": null, "version": null}, {"name": "stg_jira__status_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_status_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__status_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__status.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n status_category_id\n \n as \n \n status_category_id\n \n\n\n\n from base\n),\n\nfinal as (\n\n select\n description as status_description,\n id as status_id,\n name as status_name,\n status_category_id,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__issue": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__issue.sql", "original_file_path": "models/stg_jira__issue.sql", "unique_id": "model.jira_source.stg_jira__issue", "fqn": ["jira_source", "stg_jira__issue"], "alias": "stg_jira__issue", "checksum": {"name": "sha256", "checksum": "170eb579c650ace587974f1d0bce133fccad8f95b433491804d5a79537a9a825"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of all issues in your organization's Jira (captures soft deletes).", "columns": {"issue_id": {"name": "issue_id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee_user_id": {"name": "assignee_user_id", "description": "Foreign key referencing the ID of the `user` currently assigned to this task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the issue was created (in UTC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "creator_user_id": {"name": "creator_user_id", "description": "Foreign key referencing the `user` who first created the issue. Cannot be changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_description": {"name": "issue_description", "description": "The issue description, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "Calendar day on which the issue is due, if a due date is provided.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "environment": {"name": "environment", "description": "Text field describing the environment in which the issue occurred (ie \"IE9 on Windows 7\").", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type_id": {"name": "issue_type_id", "description": "Foreign key referencing the ID of the `issue_type`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_key": {"name": "issue_key", "description": "UI-facing id of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "original_estimate_seconds": {"name": "original_estimate_seconds", "description": "The original estimate of how long working on this issue would take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_issue_id": {"name": "parent_issue_id", "description": "Self-referencing ID of the parent `issue`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority_id": {"name": "priority_id", "description": "Foreign key referencing the ID of the issue's current `priority`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the ID of the `project` that the issue belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "remaining_estimate_seconds": {"name": "remaining_estimate_seconds", "description": "The estimate of how much longer working on this issue will take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter_user_id": {"name": "reporter_user_id", "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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution_id": {"name": "resolution_id", "description": "Foreign key referencing the ID of the issue's type of `resolution`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolved_at": {"name": "resolved_at", "description": "Timestamp of when the issue was resolved (ie completed, marked as duplicate). If an issue is un-resolved, this will be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Foreign key referencing the ID of the issue's `status` (the step that the issue is currently at in the project's workflow).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_changed_at": {"name": "status_changed_at", "description": "Timestamp of when the status was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_name": {"name": "issue_name", "description": "Title of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_spent_seconds": {"name": "time_spent_seconds", "description": "The time that was spent working on this issue, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue was last updated in some way.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "work_ratio": {"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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1711035090.677124, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue\"", "raw_code": "with base as (\n \n select * \n from {{ ref('stg_jira__issue_tmp') }}\n where not coalesce(_fivetran_deleted, false)\n),\n\nfields as (\n\n select \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__issue_tmp')),\n staging_columns=get_issue_columns()\n )\n }}\n from base\n),\n\nfinal as (\n\n select\n coalesce(original_estimate, _original_estimate) as original_estimate_seconds,\n coalesce(remaining_estimate, _remaining_estimate) as remaining_estimate_seconds,\n coalesce(time_spent, _time_spent) as time_spent_seconds,\n assignee as assignee_user_id,\n cast(created as {{ dbt.type_timestamp() }}) as created_at,\n cast(resolved as {{ dbt.type_timestamp() }}) as resolved_at,\n creator as creator_user_id,\n description as issue_description,\n due_date,\n environment,\n id as issue_id,\n issue_type as issue_type_id,\n key as issue_key,\n parent_id as parent_issue_id,\n priority as priority_id,\n project as project_id,\n reporter as reporter_user_id,\n resolution as resolution_id,\n status as status_id,\n cast(status_category_changed as {{ dbt.type_timestamp() }}) as status_changed_at,\n summary as issue_name,\n cast(updated as {{ dbt.type_timestamp() }}) as updated_at,\n work_ratio,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__issue_tmp", "package": null, "version": null}, {"name": "stg_jira__issue_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_issue_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp"], "nodes": ["model.jira_source.stg_jira__issue_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__issue.sql", "compiled": true, "compiled_code": "with base as (\n \n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_tmp\"\n where not coalesce(_fivetran_deleted, false)\n),\n\nfields as (\n\n select \n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _original_estimate\n \n as \n \n _original_estimate\n \n, \n \n \n _remaining_estimate\n \n as \n \n _remaining_estimate\n \n, \n \n \n _time_spent\n \n as \n \n _time_spent\n \n, \n \n \n assignee\n \n as \n \n assignee\n \n, \n \n \n created\n \n as \n \n created\n \n, \n \n \n creator\n \n as \n \n creator\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n due_date\n \n as \n \n due_date\n \n, \n \n \n environment\n \n as \n \n environment\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n issue_type\n \n as \n \n issue_type\n \n, \n \n \n key\n \n as \n \n key\n \n, \n \n \n original_estimate\n \n as \n \n original_estimate\n \n, \n \n \n parent_id\n \n as \n \n parent_id\n \n, \n \n \n priority\n \n as \n \n priority\n \n, \n \n \n project\n \n as \n \n project\n \n, \n \n \n remaining_estimate\n \n as \n \n remaining_estimate\n \n, \n \n \n reporter\n \n as \n \n reporter\n \n, \n \n \n resolution\n \n as \n \n resolution\n \n, \n \n \n resolved\n \n as \n \n resolved\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n status_category_changed\n \n as \n \n status_category_changed\n \n, \n \n \n summary\n \n as \n \n summary\n \n, \n \n \n time_spent\n \n as \n \n time_spent\n \n, \n \n \n updated\n \n as \n \n updated\n \n, \n \n \n work_ratio\n \n as \n \n work_ratio\n \n\n\n\n from base\n),\n\nfinal as (\n\n select\n coalesce(original_estimate, _original_estimate) as original_estimate_seconds,\n coalesce(remaining_estimate, _remaining_estimate) as remaining_estimate_seconds,\n coalesce(time_spent, _time_spent) as time_spent_seconds,\n assignee as assignee_user_id,\n cast(created as timestamp) as created_at,\n cast(resolved as timestamp) as resolved_at,\n creator as creator_user_id,\n description as issue_description,\n due_date,\n environment,\n id as issue_id,\n issue_type as issue_type_id,\n key as issue_key,\n parent_id as parent_issue_id,\n priority as priority_id,\n project as project_id,\n reporter as reporter_user_id,\n resolution as resolution_id,\n status as status_id,\n cast(status_category_changed as timestamp) as status_changed_at,\n summary as issue_name,\n cast(updated as timestamp) as updated_at,\n work_ratio,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__status_category": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__status_category", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__status_category.sql", "original_file_path": "models/stg_jira__status_category.sql", "unique_id": "model.jira_source.stg_jira__status_category", "fqn": ["jira_source", "stg_jira__status_category"], "alias": "stg_jira__status_category", "checksum": {"name": "sha256", "checksum": "0538d696e06e0ae46775aa83259452432eb850d0c075429b2bda9ab6dcd6fc0a"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of umbrella status categories.", "columns": {"status_category_id": {"name": "status_category_id", "description": "Unique ID of the status category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_category_name": {"name": "status_category_name", "description": "Title of the status category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1711035090.682595, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status_category\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__status_category_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__status_category_tmp')),\n staging_columns=get_status_category_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n id as status_category_id,\n name as status_category_name\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__status_category_tmp", "package": null, "version": null}, {"name": "stg_jira__status_category_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_status_category_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__status_category_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__status_category.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status_category_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n id as status_category_id,\n name as status_category_name\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__issue_multiselect_history": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_multiselect_history", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__issue_multiselect_history.sql", "original_file_path": "models/stg_jira__issue_multiselect_history.sql", "unique_id": "model.jira_source.stg_jira__issue_multiselect_history", "fqn": ["jira_source", "stg_jira__issue_multiselect_history"], "alias": "stg_jira__issue_multiselect_history", "checksum": {"name": "sha256", "checksum": "38851dbe46150dd061aeef1b0ab2b8644c4f4e0f61121cb079e69448d16e6c12"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of every value that each array-type (multiselect) field has been set to. Each row will pertain to **one** value.\n", "columns": {"_fivetran_id": {"name": "_fivetran_id", "description": "Fivetran-generated ID hashed on field, issue, and value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the issue field was updated to included this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_id": {"name": "field_id", "description": "Foreign key referencing the ID of the `field` that was changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_value": {"name": "field_value", "description": "Content of the value of that the field was set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1711035090.677866, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__issue_multiselect_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__issue_multiselect_history_tmp')),\n staging_columns=get_issue_multiselect_history_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n _fivetran_id,\n cast(field_id as {{ dbt.type_string() }}) as field_id,\n issue_id,\n {% if target.type == 'snowflake' %}\n cast(\"TIME\" as {{ dbt.type_timestamp() }})\n {% elif target.type == 'redshift' %}\n cast(\"time\" as {{ dbt.type_timestamp() }})\n {% else %}\n cast(time as {{ dbt.type_timestamp() }})\n {% endif %} as updated_at,\n value as field_value,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__issue_multiselect_history_tmp", "package": null, "version": null}, {"name": "stg_jira__issue_multiselect_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_issue_multiselect_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_string", "macro.dbt.type_timestamp"], "nodes": ["model.jira_source.stg_jira__issue_multiselect_history_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__issue_multiselect_history.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_id\n \n as \n \n _fivetran_id\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n field_id\n \n as \n \n field_id\n \n, \n \n \n issue_id\n \n as \n \n issue_id\n \n, \n \n \n value\n \n as \n \n value\n \n, \n \n \n time\n \n as \n \n time\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n _fivetran_id,\n cast(field_id as TEXT) as field_id,\n issue_id,\n \n cast(time as timestamp)\n as updated_at,\n value as field_value,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__issue_type": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_type", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__issue_type.sql", "original_file_path": "models/stg_jira__issue_type.sql", "unique_id": "model.jira_source.stg_jira__issue_type", "fqn": ["jira_source", "stg_jira__issue_type"], "alias": "stg_jira__issue_type", "checksum": {"name": "sha256", "checksum": "605f5eb9aee0eca280a7c9186d69c378ee3649cd35e495ed387e0a8c19b9cb64"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table containing information about issue types. Issue types can have identical names in different projects, but they may have differing descriptions.\n", "columns": {"issue_type_id": {"name": "issue_type_id", "description": "Unique ID of the issue type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Project-level description given to the issue type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type_name": {"name": "issue_type_name", "description": "Name of the issue type (ie Epic, Task, Subtask, any custom types)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_subtask": {"name": "is_subtask", "description": "Boolean that is true if this type of issue is a subtask.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1711035090.678608, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_type\"", "raw_code": "with base as (\n\n select * from \n {{ ref('stg_jira__issue_type_tmp') }}\n),\n\nfields as (\n\n select \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__issue_type_tmp')),\n staging_columns=get_issue_type_columns()\n )\n }}\n from base\n),\n\nfinal as (\n\n select\n description,\n id as issue_type_id,\n name as issue_type_name,\n subtask as is_subtask,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__issue_type_tmp", "package": null, "version": null}, {"name": "stg_jira__issue_type_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_issue_type_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__issue_type_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__issue_type.sql", "compiled": true, "compiled_code": "with base as (\n\n select * from \n \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_type_tmp\"\n),\n\nfields as (\n\n select \n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n subtask\n \n as \n \n subtask\n \n\n\n\n from base\n),\n\nfinal as (\n\n select\n description,\n id as issue_type_id,\n name as issue_type_name,\n subtask as is_subtask,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__issue_link": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_link", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__issue_link.sql", "original_file_path": "models/stg_jira__issue_link.sql", "unique_id": "model.jira_source.stg_jira__issue_link", "fqn": ["jira_source", "stg_jira__issue_link"], "alias": "stg_jira__issue_link", "checksum": {"name": "sha256", "checksum": "fc0c48e8a36c14a9eefcb66e9c39e9723f507f4c2b6f2c92c872dad2b81e66ed"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of relationships (links) created between issues. Issue links can include blockers, clones/duplicates, and general relationships.\n", "columns": {"issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` that is the subject of this relationship (the linker).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "related_issue_id": {"name": "related_issue_id", "description": "Foreign key referencing the ID of the `issue` that is the object of this relationship (the linkee).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "relationship": {"name": "relationship", "description": "The nature of the link between the two issues (\"blocks\", \"is duplicated by\", \"relates to\", etc.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1711035090.6762729, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_link\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__issue_link_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__issue_link_tmp')),\n staging_columns=get_issue_link_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n issue_id,\n related_issue_id,\n relationship,\n _fivetran_synced \n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__issue_link_tmp", "package": null, "version": null}, {"name": "stg_jira__issue_link_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_issue_link_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__issue_link_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__issue_link.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_link_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n issue_id\n \n as \n \n issue_id\n \n, \n \n \n related_issue_id\n \n as \n \n related_issue_id\n \n, \n \n \n relationship\n \n as \n \n relationship\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n issue_id,\n related_issue_id,\n relationship,\n _fivetran_synced \n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__component": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__component", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__component.sql", "original_file_path": "models/stg_jira__component.sql", "unique_id": "model.jira_source.stg_jira__component", "fqn": ["jira_source", "stg_jira__component"], "alias": "stg_jira__component", "checksum": {"name": "sha256", "checksum": "22f31e1f8c71e992171ead7a23e0c61d654dab19ebec7e227c741a704887783d"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of project components (subsections to group issues).", "columns": {"component_id": {"name": "component_id", "description": "ID of the component.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "component_description": {"name": "component_description", "description": "Description given to the component.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "component_name": {"name": "component_name", "description": "UI-facing name of the component.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the id of the component's `project`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source", "enabled": true}, "created_at": 1711035090.674304, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__component\"", "raw_code": "{{ config(enabled=var('jira_using_components', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_jira__component_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__component_tmp')),\n staging_columns=get_component_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n description as component_description,\n id as component_id,\n name as component_name,\n project_id,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__component_tmp", "package": null, "version": null}, {"name": "stg_jira__component_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_component_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__component_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__component.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__component_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n project_id\n \n as \n \n project_id\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n description as component_description,\n id as component_id,\n name as component_name,\n project_id,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__user": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__user", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__user.sql", "original_file_path": "models/stg_jira__user.sql", "unique_id": "model.jira_source.stg_jira__user", "fqn": ["jira_source", "stg_jira__user"], "alias": "stg_jira__user", "checksum": {"name": "sha256", "checksum": "95b85f878a0a0784390ff0c1738c4bf709902531870b71fee4165f1628d4faa3"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of users associated with your organization.", "columns": {"user_id": {"name": "user_id", "description": "Unique ID of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "Email associated with the user acccount.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "locale": {"name": "locale", "description": "The Java locale of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "user_display_name": {"name": "user_display_name", "description": "Name of the user as it appears in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_zone": {"name": "time_zone", "description": "The user's timezone, as defined in their settings.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "username": {"name": "username", "description": "Account username.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source"}, "created_at": 1711035090.683063, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"", "raw_code": "with base as (\n\n select * \n from {{ ref('stg_jira__user_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__user_tmp')),\n staging_columns=get_user_columns()\n )\n }}\n from base\n),\n\nfinal as (\n\n select \n email,\n id as user_id,\n locale,\n name as user_display_name,\n time_zone,\n username,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__user_tmp", "package": null, "version": null}, {"name": "stg_jira__user_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_user_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__user_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__user.sql", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n locale\n \n as \n \n locale\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n time_zone\n \n as \n \n time_zone\n \n, \n \n \n username\n \n as \n \n username\n \n\n\n\n from base\n),\n\nfinal as (\n\n select \n email,\n id as user_id,\n locale,\n name as user_display_name,\n time_zone,\n username,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__priority": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__priority", "resource_type": "model", "package_name": "jira_source", "path": "stg_jira__priority.sql", "original_file_path": "models/stg_jira__priority.sql", "unique_id": "model.jira_source.stg_jira__priority", "fqn": ["jira_source", "stg_jira__priority"], "alias": "stg_jira__priority", "checksum": {"name": "sha256", "checksum": "e6627a12758dece0969f5a6a38eb6370b52aa55b1f958539729945d64ea44ea0"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Table of issue priority levels (global).", "columns": {"priority_id": {"name": "priority_id", "description": "Unique ID of the priority level.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority_description": {"name": "priority_description", "description": "Description of the priority level.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority_name": {"name": "priority_name", "description": "Name of the priority as it appears in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "jira_source://models/stg_jira.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "jira_source", "enabled": true}, "created_at": 1711035090.6791391, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__priority\"", "raw_code": "{{ config(enabled=var('jira_using_priorities', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_jira__priority_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_jira__priority_tmp')),\n staging_columns=get_priority_columns()\n )\n }}\n from base\n),\n\nfinal as (\n \n select \n description as priority_description,\n id as priority_id,\n name as priority_name,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "refs": [{"name": "stg_jira__priority_tmp", "package": null, "version": null}, {"name": "stg_jira__priority_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.jira_source.get_priority_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.jira_source.stg_jira__priority_tmp"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira__priority.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__priority_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n description as priority_description,\n id as priority_id,\n name as priority_name,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__version_tmp": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__version_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__version_tmp.sql", "original_file_path": "models/tmp/stg_jira__version_tmp.sql", "unique_id": "model.jira_source.stg_jira__version_tmp", "fqn": ["jira_source", "tmp", "stg_jira__version_tmp"], "alias": "stg_jira__version_tmp", "checksum": {"name": "sha256", "checksum": "4e16bea890df92fe2393d1e151479ee51ed270f40d9b4ba3f922d858787c347e"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source", "enabled": true}, "created_at": 1711035090.37968, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version_tmp\"", "raw_code": "{{ config(enabled=var('jira_using_versions', True)) }}\n\nselect * \nfrom {{ var('version') }}", "language": "sql", "refs": [], "sources": [["jira", "version"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.version"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__version_tmp.sql", "compiled": true, "compiled_code": "\n\nselect * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"version\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__status_category_tmp": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__status_category_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__status_category_tmp.sql", "original_file_path": "models/tmp/stg_jira__status_category_tmp.sql", "unique_id": "model.jira_source.stg_jira__status_category_tmp", "fqn": ["jira_source", "tmp", "stg_jira__status_category_tmp"], "alias": "stg_jira__status_category_tmp", "checksum": {"name": "sha256", "checksum": "ce976a7afa132349c28940f9d387b3e635c9a6dd2576844347910580ea592a4b"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1711035090.3837922, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status_category_tmp\"", "raw_code": "select * \nfrom {{ var('status_category') }}", "language": "sql", "refs": [], "sources": [["jira", "status_category"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.status_category"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__status_category_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"status_category\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__field_option_tmp": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__field_option_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__field_option_tmp.sql", "original_file_path": "models/tmp/stg_jira__field_option_tmp.sql", "unique_id": "model.jira_source.stg_jira__field_option_tmp", "fqn": ["jira_source", "tmp", "stg_jira__field_option_tmp"], "alias": "stg_jira__field_option_tmp", "checksum": {"name": "sha256", "checksum": "cb1e64625d369889104ada54bf610b9aa36e1623853ae29ae24bd8f5bb4b2437"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1711035090.387232, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field_option_tmp\"", "raw_code": "select * \nfrom {{ var('field_option') }}", "language": "sql", "refs": [], "sources": [["jira", "field_option"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.field_option"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__field_option_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"field_option\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__issue_multiselect_history_tmp": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_multiselect_history_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__issue_multiselect_history_tmp.sql", "original_file_path": "models/tmp/stg_jira__issue_multiselect_history_tmp.sql", "unique_id": "model.jira_source.stg_jira__issue_multiselect_history_tmp", "fqn": ["jira_source", "tmp", "stg_jira__issue_multiselect_history_tmp"], "alias": "stg_jira__issue_multiselect_history_tmp", "checksum": {"name": "sha256", "checksum": "faf8d7e362472ef899552eba8ee39c1fa8a1b803f64a639d6f481400861bc24a"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1711035090.3909729, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history_tmp\"", "raw_code": "select * \nfrom {{ var('issue_multiselect_history') }}", "language": "sql", "refs": [], "sources": [["jira", "issue_multiselect_history"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.issue_multiselect_history"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__issue_multiselect_history_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"issue_multiselect_history\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__issue_type_tmp": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_type_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__issue_type_tmp.sql", "original_file_path": "models/tmp/stg_jira__issue_type_tmp.sql", "unique_id": "model.jira_source.stg_jira__issue_type_tmp", "fqn": ["jira_source", "tmp", "stg_jira__issue_type_tmp"], "alias": "stg_jira__issue_type_tmp", "checksum": {"name": "sha256", "checksum": "166aa9a9ce724421198262fb67dd01b9130712cada1defcd20a991308676e5d0"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1711035090.395539, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_type_tmp\"", "raw_code": "select * \nfrom {{ var('issue_type') }}", "language": "sql", "refs": [], "sources": [["jira", "issue_type"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.issue_type"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__issue_type_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"issue_type\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__sprint_tmp": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__sprint_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__sprint_tmp.sql", "original_file_path": "models/tmp/stg_jira__sprint_tmp.sql", "unique_id": "model.jira_source.stg_jira__sprint_tmp", "fqn": ["jira_source", "tmp", "stg_jira__sprint_tmp"], "alias": "stg_jira__sprint_tmp", "checksum": {"name": "sha256", "checksum": "a21fcc01937bc59051bdd08532e3cf8535b078b2204f659f9ef98817dfb0c463"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source", "enabled": true}, "created_at": 1711035090.3989701, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__sprint_tmp\"", "raw_code": "{{ config(enabled=var('jira_using_sprints', True)) }}\n\nselect * \nfrom {{ var('sprint') }}", "language": "sql", "refs": [], "sources": [["jira", "sprint"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.sprint"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__sprint_tmp.sql", "compiled": true, "compiled_code": "\n\nselect * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"sprint\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__status_tmp": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__status_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__status_tmp.sql", "original_file_path": "models/tmp/stg_jira__status_tmp.sql", "unique_id": "model.jira_source.stg_jira__status_tmp", "fqn": ["jira_source", "tmp", "stg_jira__status_tmp"], "alias": "stg_jira__status_tmp", "checksum": {"name": "sha256", "checksum": "206c9a7f6e35d22a162df8e6d1ae4c121382af956e056ca619faff9986ab16b3"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1711035090.4026508, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status_tmp\"", "raw_code": "select * \nfrom {{ var('status') }}", "language": "sql", "refs": [], "sources": [["jira", "status"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.status"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__status_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"status\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__project_tmp": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__project_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__project_tmp.sql", "original_file_path": "models/tmp/stg_jira__project_tmp.sql", "unique_id": "model.jira_source.stg_jira__project_tmp", "fqn": ["jira_source", "tmp", "stg_jira__project_tmp"], "alias": "stg_jira__project_tmp", "checksum": {"name": "sha256", "checksum": "776cf64136ff22eaa9fddcb5b4aadd58e5b295800ffd8b3a2c3871ed22531599"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1711035090.406023, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__project_tmp\"", "raw_code": "select * \nfrom {{ var('project') }}", "language": "sql", "refs": [], "sources": [["jira", "project"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.project"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__project_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"project\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__comment_tmp": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__comment_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__comment_tmp.sql", "original_file_path": "models/tmp/stg_jira__comment_tmp.sql", "unique_id": "model.jira_source.stg_jira__comment_tmp", "fqn": ["jira_source", "tmp", "stg_jira__comment_tmp"], "alias": "stg_jira__comment_tmp", "checksum": {"name": "sha256", "checksum": "50e78fc23c6041b43d46c0adf7f6cf3c1e2375ef3410fbdd2f527028d9830880"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1711035090.409347, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment_tmp\"", "raw_code": "select * \nfrom {{ var('comment') }}", "language": "sql", "refs": [], "sources": [["jira", "comment"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.comment"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__comment_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"comment\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__issue_field_history_tmp": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_field_history_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__issue_field_history_tmp.sql", "original_file_path": "models/tmp/stg_jira__issue_field_history_tmp.sql", "unique_id": "model.jira_source.stg_jira__issue_field_history_tmp", "fqn": ["jira_source", "tmp", "stg_jira__issue_field_history_tmp"], "alias": "stg_jira__issue_field_history_tmp", "checksum": {"name": "sha256", "checksum": "037b5bef93c17b862d1969a35a66f10feb507b34d943b093c13ace0298b5d855"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1711035090.413611, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history_tmp\"", "raw_code": "select * \nfrom {{ var('issue_field_history') }}", "language": "sql", "refs": [], "sources": [["jira", "issue_field_history"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.issue_field_history"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__issue_field_history_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"issue_field_history\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__issue_link_tmp": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_link_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__issue_link_tmp.sql", "original_file_path": "models/tmp/stg_jira__issue_link_tmp.sql", "unique_id": "model.jira_source.stg_jira__issue_link_tmp", "fqn": ["jira_source", "tmp", "stg_jira__issue_link_tmp"], "alias": "stg_jira__issue_link_tmp", "checksum": {"name": "sha256", "checksum": "deb68ea3ff7d2f0d254d06e07829733756ce80efb7af5209e5ae43840b8e254a"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1711035090.417309, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_link_tmp\"", "raw_code": "select * \nfrom {{ var('issue_link') }}", "language": "sql", "refs": [], "sources": [["jira", "issue_link"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.issue_link"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__issue_link_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"issue_link\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__field_tmp": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__field_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__field_tmp.sql", "original_file_path": "models/tmp/stg_jira__field_tmp.sql", "unique_id": "model.jira_source.stg_jira__field_tmp", "fqn": ["jira_source", "tmp", "stg_jira__field_tmp"], "alias": "stg_jira__field_tmp", "checksum": {"name": "sha256", "checksum": "aa842b8fc7fa2e61d4b04634ddae4948afce86a6c1ba37197e01c5baeef8f374"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1711035090.4212759, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field_tmp\"", "raw_code": "select * \nfrom {{ var('field') }}", "language": "sql", "refs": [], "sources": [["jira", "field"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.field"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__field_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"field\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__user_tmp": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__user_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__user_tmp.sql", "original_file_path": "models/tmp/stg_jira__user_tmp.sql", "unique_id": "model.jira_source.stg_jira__user_tmp", "fqn": ["jira_source", "tmp", "stg_jira__user_tmp"], "alias": "stg_jira__user_tmp", "checksum": {"name": "sha256", "checksum": "c6665b2e96c3536ab07cdc0fe31225a7be4766df0c7c353e3ade197bc8498279"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1711035090.424746, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user_tmp\"", "raw_code": "select * \nfrom {{ var('user') }}", "language": "sql", "refs": [], "sources": [["jira", "user"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.user"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__user_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"user\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__issue_tmp": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__issue_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__issue_tmp.sql", "original_file_path": "models/tmp/stg_jira__issue_tmp.sql", "unique_id": "model.jira_source.stg_jira__issue_tmp", "fqn": ["jira_source", "tmp", "stg_jira__issue_tmp"], "alias": "stg_jira__issue_tmp", "checksum": {"name": "sha256", "checksum": "2f84522aea28fb2bef123eff34648c4777747064de156efaad69c053d3b06092"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1711035090.428797, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_tmp\"", "raw_code": "select * \nfrom {{ var('issue') }}", "language": "sql", "refs": [], "sources": [["jira", "issue"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.issue"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__issue_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"issue\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__priority_tmp": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__priority_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__priority_tmp.sql", "original_file_path": "models/tmp/stg_jira__priority_tmp.sql", "unique_id": "model.jira_source.stg_jira__priority_tmp", "fqn": ["jira_source", "tmp", "stg_jira__priority_tmp"], "alias": "stg_jira__priority_tmp", "checksum": {"name": "sha256", "checksum": "fbf5591edc6a4fe1924c3bbe137b6f3fc42854924553faa1192f73b72e0a6aeb"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source", "enabled": true}, "created_at": 1711035090.433459, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__priority_tmp\"", "raw_code": "{{ config(enabled=var('jira_using_priorities', True)) }}\n\nselect * from {{ var('priority') }}", "language": "sql", "refs": [], "sources": [["jira", "priority"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.priority"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__priority_tmp.sql", "compiled": true, "compiled_code": "\n\nselect * from \"postgres\".\"jira_integrations_tests_33\".\"priority\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__component_tmp": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__component_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__component_tmp.sql", "original_file_path": "models/tmp/stg_jira__component_tmp.sql", "unique_id": "model.jira_source.stg_jira__component_tmp", "fqn": ["jira_source", "tmp", "stg_jira__component_tmp"], "alias": "stg_jira__component_tmp", "checksum": {"name": "sha256", "checksum": "968da15f4a8dbb9e51d593dd0a95ff6081d5b2e3d8f0eb8daedaf2c283decd3c"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source", "enabled": true}, "created_at": 1711035090.437818, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__component_tmp\"", "raw_code": "{{ config(enabled=var('jira_using_components', True)) }}\n\nselect * \nfrom {{ var('component') }}", "language": "sql", "refs": [], "sources": [["jira", "component"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.component"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__component_tmp.sql", "compiled": true, "compiled_code": "\n\nselect * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"component\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.jira_source.stg_jira__resolution_tmp": {"database": "postgres", "schema": "jira_integrations_tests_33_jira_source", "name": "stg_jira__resolution_tmp", "resource_type": "model", "package_name": "jira_source", "path": "tmp/stg_jira__resolution_tmp.sql", "original_file_path": "models/tmp/stg_jira__resolution_tmp.sql", "unique_id": "model.jira_source.stg_jira__resolution_tmp", "fqn": ["jira_source", "tmp", "stg_jira__resolution_tmp"], "alias": "stg_jira__resolution_tmp", "checksum": {"name": "sha256", "checksum": "4254df90446b8911d6664fb429ae20adfb05cfe415bed40e5563a5d5bb63786a"}, "config": {"enabled": true, "alias": null, "schema": "jira_source", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "jira_source"}, "created_at": 1711035090.4424572, "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__resolution_tmp\"", "raw_code": "select * \nfrom {{ var('resolution') }}", "language": "sql", "refs": [], "sources": [["jira", "resolution"]], "metrics": [], "depends_on": {"macros": [], "nodes": ["source.jira_source.jira.resolution"]}, "compiled_path": "target/compiled/jira_source/models/tmp/stg_jira__resolution_tmp.sql", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"resolution\"", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "test.jira.unique_jira__daily_issue_field_history_issue_day_id.75c24d3154": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_day_id", "model": "{{ get_where_subquery(ref('jira__daily_issue_field_history')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_jira__daily_issue_field_history_issue_day_id", "resource_type": "test", "package_name": "jira", "path": "unique_jira__daily_issue_field_history_issue_day_id.sql", "original_file_path": "models/jira.yml", "unique_id": "test.jira.unique_jira__daily_issue_field_history_issue_day_id.75c24d3154", "fqn": ["jira", "unique_jira__daily_issue_field_history_issue_day_id"], "alias": "unique_jira__daily_issue_field_history_issue_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.588777, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "jira__daily_issue_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.jira__daily_issue_field_history"]}, "compiled_path": "target/compiled/jira/models/jira.yml/unique_jira__daily_issue_field_history_issue_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__daily_issue_field_history\"\nwhere issue_day_id is not null\ngroup by issue_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_day_id", "file_key_name": "models.jira__daily_issue_field_history", "attached_node": "model.jira.jira__daily_issue_field_history"}, "test.jira.not_null_jira__daily_issue_field_history_issue_day_id.d13b058bcd": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_day_id", "model": "{{ get_where_subquery(ref('jira__daily_issue_field_history')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_jira__daily_issue_field_history_issue_day_id", "resource_type": "test", "package_name": "jira", "path": "not_null_jira__daily_issue_field_history_issue_day_id.sql", "original_file_path": "models/jira.yml", "unique_id": "test.jira.not_null_jira__daily_issue_field_history_issue_day_id.d13b058bcd", "fqn": ["jira", "not_null_jira__daily_issue_field_history_issue_day_id"], "alias": "not_null_jira__daily_issue_field_history_issue_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.590127, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "jira__daily_issue_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.jira__daily_issue_field_history"]}, "compiled_path": "target/compiled/jira/models/jira.yml/not_null_jira__daily_issue_field_history_issue_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_day_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__daily_issue_field_history\"\nwhere issue_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_day_id", "file_key_name": "models.jira__daily_issue_field_history", "attached_node": "model.jira.jira__daily_issue_field_history"}, "test.jira.unique_jira__issue_enhanced_issue_id.fec6e723ee": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('jira__issue_enhanced')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_jira__issue_enhanced_issue_id", "resource_type": "test", "package_name": "jira", "path": "unique_jira__issue_enhanced_issue_id.sql", "original_file_path": "models/jira.yml", "unique_id": "test.jira.unique_jira__issue_enhanced_issue_id.fec6e723ee", "fqn": ["jira", "unique_jira__issue_enhanced_issue_id"], "alias": "unique_jira__issue_enhanced_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.5911522, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "jira__issue_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.jira__issue_enhanced"]}, "compiled_path": "target/compiled/jira/models/jira.yml/unique_jira__issue_enhanced_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\"\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.jira__issue_enhanced", "attached_node": "model.jira.jira__issue_enhanced"}, "test.jira.not_null_jira__issue_enhanced_issue_id.6b18e0db38": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('jira__issue_enhanced')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_jira__issue_enhanced_issue_id", "resource_type": "test", "package_name": "jira", "path": "not_null_jira__issue_enhanced_issue_id.sql", "original_file_path": "models/jira.yml", "unique_id": "test.jira.not_null_jira__issue_enhanced_issue_id.6b18e0db38", "fqn": ["jira", "not_null_jira__issue_enhanced_issue_id"], "alias": "not_null_jira__issue_enhanced_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.592373, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "jira__issue_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.jira__issue_enhanced"]}, "compiled_path": "target/compiled/jira/models/jira.yml/not_null_jira__issue_enhanced_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\"\nwhere issue_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.jira__issue_enhanced", "attached_node": "model.jira.jira__issue_enhanced"}, "test.jira.unique_jira__project_enhanced_project_id.c18e39faef": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "project_id", "model": "{{ get_where_subquery(ref('jira__project_enhanced')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_jira__project_enhanced_project_id", "resource_type": "test", "package_name": "jira", "path": "unique_jira__project_enhanced_project_id.sql", "original_file_path": "models/jira.yml", "unique_id": "test.jira.unique_jira__project_enhanced_project_id.c18e39faef", "fqn": ["jira", "unique_jira__project_enhanced_project_id"], "alias": "unique_jira__project_enhanced_project_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.5934799, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "jira__project_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.jira__project_enhanced"]}, "compiled_path": "target/compiled/jira/models/jira.yml/unique_jira__project_enhanced_project_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n project_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__project_enhanced\"\nwhere project_id is not null\ngroup by project_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "project_id", "file_key_name": "models.jira__project_enhanced", "attached_node": "model.jira.jira__project_enhanced"}, "test.jira.not_null_jira__project_enhanced_project_id.4f7c58f1d4": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "project_id", "model": "{{ get_where_subquery(ref('jira__project_enhanced')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_jira__project_enhanced_project_id", "resource_type": "test", "package_name": "jira", "path": "not_null_jira__project_enhanced_project_id.sql", "original_file_path": "models/jira.yml", "unique_id": "test.jira.not_null_jira__project_enhanced_project_id.4f7c58f1d4", "fqn": ["jira", "not_null_jira__project_enhanced_project_id"], "alias": "not_null_jira__project_enhanced_project_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.5947552, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "jira__project_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.jira__project_enhanced"]}, "compiled_path": "target/compiled/jira/models/jira.yml/not_null_jira__project_enhanced_project_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect project_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__project_enhanced\"\nwhere project_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "project_id", "file_key_name": "models.jira__project_enhanced", "attached_node": "model.jira.jira__project_enhanced"}, "test.jira.unique_jira__user_enhanced_user_id.c9ee73454a": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('jira__user_enhanced')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_jira__user_enhanced_user_id", "resource_type": "test", "package_name": "jira", "path": "unique_jira__user_enhanced_user_id.sql", "original_file_path": "models/jira.yml", "unique_id": "test.jira.unique_jira__user_enhanced_user_id.c9ee73454a", "fqn": ["jira", "unique_jira__user_enhanced_user_id"], "alias": "unique_jira__user_enhanced_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.5957499, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "jira__user_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.jira__user_enhanced"]}, "compiled_path": "target/compiled/jira/models/jira.yml/unique_jira__user_enhanced_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n user_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__user_enhanced\"\nwhere user_id is not null\ngroup by user_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "models.jira__user_enhanced", "attached_node": "model.jira.jira__user_enhanced"}, "test.jira.not_null_jira__user_enhanced_user_id.aecc00744a": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('jira__user_enhanced')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_jira__user_enhanced_user_id", "resource_type": "test", "package_name": "jira", "path": "not_null_jira__user_enhanced_user_id.sql", "original_file_path": "models/jira.yml", "unique_id": "test.jira.not_null_jira__user_enhanced_user_id.aecc00744a", "fqn": ["jira", "not_null_jira__user_enhanced_user_id"], "alias": "not_null_jira__user_enhanced_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.596789, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "jira__user_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.jira__user_enhanced"]}, "compiled_path": "target/compiled/jira/models/jira.yml/not_null_jira__user_enhanced_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect user_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__user_enhanced\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "models.jira__user_enhanced", "attached_node": "model.jira.jira__user_enhanced"}, "test.jira.unique_int_jira__issue_join_issue_id.0bd360ec4b": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_join')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_int_jira__issue_join_issue_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__issue_join_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__issue_join_issue_id.0bd360ec4b", "fqn": ["jira", "intermediate", "unique_int_jira__issue_join_issue_id"], "alias": "unique_int_jira__issue_join_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.611155, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_join", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_join"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__issue_join_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_join\"\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_join", "attached_node": "model.jira.int_jira__issue_join"}, "test.jira.not_null_int_jira__issue_join_issue_id.53391b21a6": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_join')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_int_jira__issue_join_issue_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__issue_join_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__issue_join_issue_id.53391b21a6", "fqn": ["jira", "intermediate", "not_null_int_jira__issue_join_issue_id"], "alias": "not_null_int_jira__issue_join_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.6127, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_join", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_join"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__issue_join_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_id\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_join\"\nwhere issue_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_join", "attached_node": "model.jira.int_jira__issue_join"}, "test.jira.unique_int_jira__project_metrics_project_id.154ccc194e": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "project_id", "model": "{{ get_where_subquery(ref('int_jira__project_metrics')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_int_jira__project_metrics_project_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__project_metrics_project_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__project_metrics_project_id.154ccc194e", "fqn": ["jira", "intermediate", "unique_int_jira__project_metrics_project_id"], "alias": "unique_int_jira__project_metrics_project_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.614002, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__project_metrics", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__project_metrics"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__project_metrics_project_id.sql", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__project_metrics as (\nwith issue as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\"\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_seconds,\n\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_assigned_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n group by project_id \n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as numeric(28,6) ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as numeric(28,6) ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics\n) select\n project_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__project_metrics\nwhere project_id is not null\ngroup by project_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__project_metrics", "sql": " __dbt__cte__int_jira__project_metrics as (\nwith issue as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\"\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_seconds,\n\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_assigned_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n group by project_id \n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as numeric(28,6) ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as numeric(28,6) ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "project_id", "file_key_name": "models.int_jira__project_metrics", "attached_node": "model.jira.int_jira__project_metrics"}, "test.jira.not_null_int_jira__project_metrics_project_id.1542338148": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "project_id", "model": "{{ get_where_subquery(ref('int_jira__project_metrics')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_int_jira__project_metrics_project_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__project_metrics_project_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__project_metrics_project_id.1542338148", "fqn": ["jira", "intermediate", "not_null_int_jira__project_metrics_project_id"], "alias": "not_null_int_jira__project_metrics_project_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.615187, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__project_metrics", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__project_metrics"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__project_metrics_project_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__project_metrics as (\nwith issue as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\"\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_seconds,\n\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_assigned_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n group by project_id \n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as numeric(28,6) ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as numeric(28,6) ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics\n) select project_id\nfrom __dbt__cte__int_jira__project_metrics\nwhere project_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__project_metrics", "sql": " __dbt__cte__int_jira__project_metrics as (\nwith issue as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\"\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_seconds,\n\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_assigned_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n group by project_id \n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as numeric(28,6) ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as numeric(28,6) ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "project_id", "file_key_name": "models.int_jira__project_metrics", "attached_node": "model.jira.int_jira__project_metrics"}, "test.jira.unique_int_jira__user_metrics_user_id.c042bcdd66": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('int_jira__user_metrics')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_int_jira__user_metrics_user_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__user_metrics_user_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__user_metrics_user_id.c042bcdd66", "fqn": ["jira", "intermediate", "unique_int_jira__user_metrics_user_id"], "alias": "unique_int_jira__user_metrics_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.616496, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__user_metrics", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__user_metrics"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__user_metrics_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__user_metrics as (\nwith issue as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\" \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_close_time_seconds,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_age_currently_open_seconds\n\n from issue\n\n group by 1 \n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics\n) select\n user_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__user_metrics\nwhere user_id is not null\ngroup by user_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__user_metrics", "sql": " __dbt__cte__int_jira__user_metrics as (\nwith issue as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\" \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_close_time_seconds,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_age_currently_open_seconds\n\n from issue\n\n group by 1 \n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "models.int_jira__user_metrics", "attached_node": "model.jira.int_jira__user_metrics"}, "test.jira.not_null_int_jira__user_metrics_user_id.2143177b14": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('int_jira__user_metrics')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_int_jira__user_metrics_user_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__user_metrics_user_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__user_metrics_user_id.2143177b14", "fqn": ["jira", "intermediate", "not_null_int_jira__user_metrics_user_id"], "alias": "not_null_int_jira__user_metrics_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.617523, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__user_metrics", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__user_metrics"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__user_metrics_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__user_metrics as (\nwith issue as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\" \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_close_time_seconds,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_age_currently_open_seconds\n\n from issue\n\n group by 1 \n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics\n) select user_id\nfrom __dbt__cte__int_jira__user_metrics\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__user_metrics", "sql": " __dbt__cte__int_jira__user_metrics as (\nwith issue as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\" \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_close_time_seconds,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_age_currently_open_seconds\n\n from issue\n\n group by 1 \n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "models.int_jira__user_metrics", "attached_node": "model.jira.int_jira__user_metrics"}, "test.jira.unique_int_jira__issue_comments_issue_id.26e3f11046": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_comments')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_int_jira__issue_comments_issue_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__issue_comments_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__issue_comments_issue_id.26e3f11046", "fqn": ["jira", "intermediate", "unique_int_jira__issue_comments_issue_id"], "alias": "unique_int_jira__issue_comments_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.6188211, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_comments", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_comments"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__issue_comments_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__issue_comments as (\n\n\nwith comment as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment\"\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n \n string_agg(comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body, '\\n')\n\n as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments\n) select\n issue_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__issue_comments\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_comments", "sql": " __dbt__cte__int_jira__issue_comments as (\n\n\nwith comment as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment\"\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n \n string_agg(comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body, '\\n')\n\n as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_comments", "attached_node": "model.jira.int_jira__issue_comments"}, "test.jira.not_null_int_jira__issue_comments_issue_id.9f16878e45": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_comments')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_int_jira__issue_comments_issue_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__issue_comments_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__issue_comments_issue_id.9f16878e45", "fqn": ["jira", "intermediate", "not_null_int_jira__issue_comments_issue_id"], "alias": "not_null_int_jira__issue_comments_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.619851, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_comments", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_comments"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__issue_comments_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__issue_comments as (\n\n\nwith comment as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment\"\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n \n string_agg(comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body, '\\n')\n\n as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments\n) select issue_id\nfrom __dbt__cte__int_jira__issue_comments\nwhere issue_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_comments", "sql": " __dbt__cte__int_jira__issue_comments as (\n\n\nwith comment as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment\"\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n \n string_agg(comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body, '\\n')\n\n as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_comments", "attached_node": "model.jira.int_jira__issue_comments"}, "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_epic_issue_id__epic_issue_id.9ddee9201b": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["issue_id", "epic_issue_id"], "model": "{{ get_where_subquery(ref('int_jira__issue_epic')) }}"}, "namespace": "dbt_utils"}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_int_jira__issue_epic_issue_id__epic_issue_id", "resource_type": "test", "package_name": "jira", "path": "dbt_utils_unique_combination_o_4f049bddcf29586e6c474b917f4874cb.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_epic_issue_id__epic_issue_id.9ddee9201b", "fqn": ["jira", "intermediate", "dbt_utils_unique_combination_of_columns_int_jira__issue_epic_issue_id__epic_issue_id"], "alias": "dbt_utils_unique_combination_o_4f049bddcf29586e6c474b917f4874cb", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_4f049bddcf29586e6c474b917f4874cb", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_4f049bddcf29586e6c474b917f4874cb"}, "created_at": 1711035090.620841, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_4f049bddcf29586e6c474b917f4874cb\") }}", "language": "sql", "refs": [{"name": "int_jira__issue_epic", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_epic"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/dbt_utils_unique_combination_o_4f049bddcf29586e6c474b917f4874cb.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_epic as (\n-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\nwith epic_field_history as (\n\n select *\n from __dbt__cte__int_jira__issue_field_history\n where lower(field_name) like 'epic%link'\n \n),\n\norder_epic_links as (\n\n select\n issue_id,\n cast(field_value as TEXT ) as epic_issue_id,\n\n row_number() over (\n partition by issue_id order by updated_at desc\n ) as row_num\n\n from epic_field_history\n),\n\nlast_epic_link as (\n\n select \n issue_id, \n epic_issue_id \n \n from order_epic_links\n where row_num = 1\n)\n\nselect *\nfrom last_epic_link\n), validation_errors as (\n\n select\n issue_id, epic_issue_id\n from __dbt__cte__int_jira__issue_epic\n group by issue_id, epic_issue_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_epic", "sql": " __dbt__cte__int_jira__issue_epic as (\n-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\nwith epic_field_history as (\n\n select *\n from __dbt__cte__int_jira__issue_field_history\n where lower(field_name) like 'epic%link'\n \n),\n\norder_epic_links as (\n\n select\n issue_id,\n cast(field_value as TEXT ) as epic_issue_id,\n\n row_number() over (\n partition by issue_id order by updated_at desc\n ) as row_num\n\n from epic_field_history\n),\n\nlast_epic_link as (\n\n select \n issue_id, \n epic_issue_id \n \n from order_epic_links\n where row_num = 1\n)\n\nselect *\nfrom last_epic_link\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": null, "file_key_name": "models.int_jira__issue_epic", "attached_node": "model.jira.int_jira__issue_epic"}, "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_sprint_issue_id__current_sprint_id.aafda24567": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["issue_id", "current_sprint_id"], "model": "{{ get_where_subquery(ref('int_jira__issue_sprint')) }}"}, "namespace": "dbt_utils"}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_int_jira__issue_sprint_issue_id__current_sprint_id", "resource_type": "test", "package_name": "jira", "path": "dbt_utils_unique_combination_o_61e230a0d389713fafe23af01c58f2d3.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_sprint_issue_id__current_sprint_id.aafda24567", "fqn": ["jira", "intermediate", "dbt_utils_unique_combination_of_columns_int_jira__issue_sprint_issue_id__current_sprint_id"], "alias": "dbt_utils_unique_combination_o_61e230a0d389713fafe23af01c58f2d3", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_61e230a0d389713fafe23af01c58f2d3", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_61e230a0d389713fafe23af01c58f2d3"}, "created_at": 1711035090.628777, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_61e230a0d389713fafe23af01c58f2d3\") }}", "language": "sql", "refs": [{"name": "int_jira__issue_sprint", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_sprint"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/dbt_utils_unique_combination_o_61e230a0d389713fafe23af01c58f2d3.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_sprint as (\n\n\nwith sprint as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__sprint\"\n\n),\n\nfield_history as (\n\n -- sprints don't appear to be capable of multiselect in the UI...\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n),\n\nsprint_field_history as (\n\n select \n field_history.*,\n sprint.*,\n row_number() over (\n partition by field_history.issue_id \n order by field_history.updated_at desc, sprint.started_at desc \n ) as row_num\n from field_history\n join sprint on field_history.field_value = cast(sprint.sprint_id as TEXT)\n where lower(field_history.field_name) = 'sprint'\n),\n\n\nlast_sprint as (\n\n select *\n from sprint_field_history\n \n where row_num = 1\n\n), \n\nsprint_rollovers as (\n\n select \n issue_id,\n count(distinct case when field_value is not null then field_value end) as count_sprint_changes\n \n from sprint_field_history\n group by 1\n\n),\n\nissue_sprint as (\n\n select \n last_sprint.issue_id,\n last_sprint.field_value as current_sprint_id,\n last_sprint.sprint_name as current_sprint_name,\n last_sprint.board_id,\n last_sprint.started_at as sprint_started_at,\n last_sprint.ended_at as sprint_ended_at,\n last_sprint.completed_at as sprint_completed_at,\n coalesce(sprint_rollovers.count_sprint_changes, 0) as count_sprint_changes\n\n from \n last_sprint \n left join sprint_rollovers on sprint_rollovers.issue_id = last_sprint.issue_id\n \n)\n\nselect * from issue_sprint\n), validation_errors as (\n\n select\n issue_id, current_sprint_id\n from __dbt__cte__int_jira__issue_sprint\n group by issue_id, current_sprint_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_multiselect_history", "sql": " __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_sprint", "sql": " __dbt__cte__int_jira__issue_sprint as (\n\n\nwith sprint as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__sprint\"\n\n),\n\nfield_history as (\n\n -- sprints don't appear to be capable of multiselect in the UI...\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n),\n\nsprint_field_history as (\n\n select \n field_history.*,\n sprint.*,\n row_number() over (\n partition by field_history.issue_id \n order by field_history.updated_at desc, sprint.started_at desc \n ) as row_num\n from field_history\n join sprint on field_history.field_value = cast(sprint.sprint_id as TEXT)\n where lower(field_history.field_name) = 'sprint'\n),\n\n\nlast_sprint as (\n\n select *\n from sprint_field_history\n \n where row_num = 1\n\n), \n\nsprint_rollovers as (\n\n select \n issue_id,\n count(distinct case when field_value is not null then field_value end) as count_sprint_changes\n \n from sprint_field_history\n group by 1\n\n),\n\nissue_sprint as (\n\n select \n last_sprint.issue_id,\n last_sprint.field_value as current_sprint_id,\n last_sprint.sprint_name as current_sprint_name,\n last_sprint.board_id,\n last_sprint.started_at as sprint_started_at,\n last_sprint.ended_at as sprint_ended_at,\n last_sprint.completed_at as sprint_completed_at,\n coalesce(sprint_rollovers.count_sprint_changes, 0) as count_sprint_changes\n\n from \n last_sprint \n left join sprint_rollovers on sprint_rollovers.issue_id = last_sprint.issue_id\n \n)\n\nselect * from issue_sprint\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": null, "file_key_name": "models.int_jira__issue_sprint", "attached_node": "model.jira.int_jira__issue_sprint"}, "test.jira.unique_int_jira__issue_type_parents_issue_id.c07f8c6af3": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_type_parents')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_int_jira__issue_type_parents_issue_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__issue_type_parents_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__issue_type_parents_issue_id.c07f8c6af3", "fqn": ["jira", "intermediate", "unique_int_jira__issue_type_parents_issue_id"], "alias": "unique_int_jira__issue_type_parents_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.631787, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_type_parents", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_type_parents"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__issue_type_parents_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_type_parents\"\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_type_parents", "attached_node": "model.jira.int_jira__issue_type_parents"}, "test.jira.not_null_int_jira__issue_type_parents_issue_id.8dd98255b0": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_type_parents')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_int_jira__issue_type_parents_issue_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__issue_type_parents_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__issue_type_parents_issue_id.8dd98255b0", "fqn": ["jira", "intermediate", "not_null_int_jira__issue_type_parents_issue_id"], "alias": "not_null_int_jira__issue_type_parents_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.633089, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_type_parents", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_type_parents"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__issue_type_parents_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_id\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_type_parents\"\nwhere issue_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_type_parents", "attached_node": "model.jira.int_jira__issue_type_parents"}, "test.jira.unique_int_jira__issue_users_issue_id.e3a5962431": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_users')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_int_jira__issue_users_issue_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__issue_users_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__issue_users_issue_id.e3a5962431", "fqn": ["jira", "intermediate", "unique_int_jira__issue_users_issue_id"], "alias": "unique_int_jira__issue_users_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.6344588, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_users", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_users"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__issue_users_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__issue_users as (\n-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n \n\n select\n issue_id,\n coalesce(cast(revised_parent_issue_id as TEXT), cast(parent_issue_id as TEXT)) as parent_issue_id,\n\n \"original_estimate_seconds\",\n \"remaining_estimate_seconds\",\n \"time_spent_seconds\",\n \"assignee_user_id\",\n \"created_at\",\n \"resolved_at\",\n \"creator_user_id\",\n \"issue_description\",\n \"due_date\",\n \"environment\",\n \"issue_type_id\",\n \"issue_key\",\n \"priority_id\",\n \"project_id\",\n \"reporter_user_id\",\n \"resolution_id\",\n \"status_id\",\n \"status_changed_at\",\n \"issue_name\",\n \"updated_at\",\n \"work_ratio\",\n \"_fivetran_synced\",\n \"issue_type\",\n \"parent_issue_type\",\n \"parent_issue_name\",\n \"parent_issue_key\",\n \"is_parent_epic\"\n\n\n \n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_type_parents\"\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join\n) select\n issue_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__issue_users\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_users", "sql": " __dbt__cte__int_jira__issue_users as (\n-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n \n\n select\n issue_id,\n coalesce(cast(revised_parent_issue_id as TEXT), cast(parent_issue_id as TEXT)) as parent_issue_id,\n\n \"original_estimate_seconds\",\n \"remaining_estimate_seconds\",\n \"time_spent_seconds\",\n \"assignee_user_id\",\n \"created_at\",\n \"resolved_at\",\n \"creator_user_id\",\n \"issue_description\",\n \"due_date\",\n \"environment\",\n \"issue_type_id\",\n \"issue_key\",\n \"priority_id\",\n \"project_id\",\n \"reporter_user_id\",\n \"resolution_id\",\n \"status_id\",\n \"status_changed_at\",\n \"issue_name\",\n \"updated_at\",\n \"work_ratio\",\n \"_fivetran_synced\",\n \"issue_type\",\n \"parent_issue_type\",\n \"parent_issue_name\",\n \"parent_issue_key\",\n \"is_parent_epic\"\n\n\n \n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_type_parents\"\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_users", "attached_node": "model.jira.int_jira__issue_users"}, "test.jira.not_null_int_jira__issue_users_issue_id.480b7b6beb": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_users')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_int_jira__issue_users_issue_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__issue_users_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__issue_users_issue_id.480b7b6beb", "fqn": ["jira", "intermediate", "not_null_int_jira__issue_users_issue_id"], "alias": "not_null_int_jira__issue_users_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.6358778, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_users", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_users"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__issue_users_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__issue_users as (\n-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n \n\n select\n issue_id,\n coalesce(cast(revised_parent_issue_id as TEXT), cast(parent_issue_id as TEXT)) as parent_issue_id,\n\n \"original_estimate_seconds\",\n \"remaining_estimate_seconds\",\n \"time_spent_seconds\",\n \"assignee_user_id\",\n \"created_at\",\n \"resolved_at\",\n \"creator_user_id\",\n \"issue_description\",\n \"due_date\",\n \"environment\",\n \"issue_type_id\",\n \"issue_key\",\n \"priority_id\",\n \"project_id\",\n \"reporter_user_id\",\n \"resolution_id\",\n \"status_id\",\n \"status_changed_at\",\n \"issue_name\",\n \"updated_at\",\n \"work_ratio\",\n \"_fivetran_synced\",\n \"issue_type\",\n \"parent_issue_type\",\n \"parent_issue_name\",\n \"parent_issue_key\",\n \"is_parent_epic\"\n\n\n \n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_type_parents\"\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join\n) select issue_id\nfrom __dbt__cte__int_jira__issue_users\nwhere issue_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_users", "sql": " __dbt__cte__int_jira__issue_users as (\n-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n \n\n select\n issue_id,\n coalesce(cast(revised_parent_issue_id as TEXT), cast(parent_issue_id as TEXT)) as parent_issue_id,\n\n \"original_estimate_seconds\",\n \"remaining_estimate_seconds\",\n \"time_spent_seconds\",\n \"assignee_user_id\",\n \"created_at\",\n \"resolved_at\",\n \"creator_user_id\",\n \"issue_description\",\n \"due_date\",\n \"environment\",\n \"issue_type_id\",\n \"issue_key\",\n \"priority_id\",\n \"project_id\",\n \"reporter_user_id\",\n \"resolution_id\",\n \"status_id\",\n \"status_changed_at\",\n \"issue_name\",\n \"updated_at\",\n \"work_ratio\",\n \"_fivetran_synced\",\n \"issue_type\",\n \"parent_issue_type\",\n \"parent_issue_name\",\n \"parent_issue_key\",\n \"is_parent_epic\"\n\n\n \n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_type_parents\"\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_users", "attached_node": "model.jira.int_jira__issue_users"}, "test.jira.unique_int_jira__agg_multiselect_history_batch_id.14b3dea579": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "batch_id", "model": "{{ get_where_subquery(ref('int_jira__agg_multiselect_history')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_int_jira__agg_multiselect_history_batch_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__agg_multiselect_history_batch_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__agg_multiselect_history_batch_id.14b3dea579", "fqn": ["jira", "intermediate", "unique_int_jira__agg_multiselect_history_batch_id"], "alias": "unique_int_jira__agg_multiselect_history_batch_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.636993, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__agg_multiselect_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__agg_multiselect_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__agg_multiselect_history_batch_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n batch_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__agg_multiselect_history\"\nwhere batch_id is not null\ngroup by batch_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "batch_id", "file_key_name": "models.int_jira__agg_multiselect_history", "attached_node": "model.jira.int_jira__agg_multiselect_history"}, "test.jira.not_null_int_jira__agg_multiselect_history_batch_id.7d6d2460a8": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "batch_id", "model": "{{ get_where_subquery(ref('int_jira__agg_multiselect_history')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_int_jira__agg_multiselect_history_batch_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__agg_multiselect_history_batch_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__agg_multiselect_history_batch_id.7d6d2460a8", "fqn": ["jira", "intermediate", "not_null_int_jira__agg_multiselect_history_batch_id"], "alias": "not_null_int_jira__agg_multiselect_history_batch_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.6383429, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__agg_multiselect_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__agg_multiselect_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__agg_multiselect_history_batch_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect batch_id\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__agg_multiselect_history\"\nwhere batch_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "batch_id", "file_key_name": "models.int_jira__agg_multiselect_history", "attached_node": "model.jira.int_jira__agg_multiselect_history"}, "test.jira.unique_int_jira__combine_field_histories_combined_history_id.5b6b492428": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "combined_history_id", "model": "{{ get_where_subquery(ref('int_jira__combine_field_histories')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_int_jira__combine_field_histories_combined_history_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__combine_field_histories_combined_history_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__combine_field_histories_combined_history_id.5b6b492428", "fqn": ["jira", "intermediate", "unique_int_jira__combine_field_histories_combined_history_id"], "alias": "unique_int_jira__combine_field_histories_combined_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.639617, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__combine_field_histories", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__combine_field_histories"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__combine_field_histories_combined_history_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n combined_history_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__combine_field_histories\"\nwhere combined_history_id is not null\ngroup by combined_history_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "combined_history_id", "file_key_name": "models.int_jira__combine_field_histories", "attached_node": "model.jira.int_jira__combine_field_histories"}, "test.jira.not_null_int_jira__combine_field_histories_combined_history_id.943e81a794": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "combined_history_id", "model": "{{ get_where_subquery(ref('int_jira__combine_field_histories')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_int_jira__combine_field_histories_combined_history_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__combine_field_histories_combined_history_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__combine_field_histories_combined_history_id.943e81a794", "fqn": ["jira", "intermediate", "not_null_int_jira__combine_field_histories_combined_history_id"], "alias": "not_null_int_jira__combine_field_histories_combined_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.640743, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__combine_field_histories", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__combine_field_histories"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__combine_field_histories_combined_history_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect combined_history_id\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__combine_field_histories\"\nwhere combined_history_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "combined_history_id", "file_key_name": "models.int_jira__combine_field_histories", "attached_node": "model.jira.int_jira__combine_field_histories"}, "test.jira.unique_int_jira__issue_calendar_spine_issue_day_id.c49483d2e5": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_day_id", "model": "{{ get_where_subquery(ref('int_jira__issue_calendar_spine')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_int_jira__issue_calendar_spine_issue_day_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__issue_calendar_spine_issue_day_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__issue_calendar_spine_issue_day_id.c49483d2e5", "fqn": ["jira", "intermediate", "unique_int_jira__issue_calendar_spine_issue_day_id"], "alias": "unique_int_jira__issue_calendar_spine_issue_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.642675, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_calendar_spine", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_calendar_spine"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__issue_calendar_spine_issue_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_calendar_spine\"\nwhere issue_day_id is not null\ngroup by issue_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_day_id", "file_key_name": "models.int_jira__issue_calendar_spine", "attached_node": "model.jira.int_jira__issue_calendar_spine"}, "test.jira.not_null_int_jira__issue_calendar_spine_issue_day_id.a9512b8e8a": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_day_id", "model": "{{ get_where_subquery(ref('int_jira__issue_calendar_spine')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_int_jira__issue_calendar_spine_issue_day_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__issue_calendar_spine_issue_day_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__issue_calendar_spine_issue_day_id.a9512b8e8a", "fqn": ["jira", "intermediate", "not_null_int_jira__issue_calendar_spine_issue_day_id"], "alias": "not_null_int_jira__issue_calendar_spine_issue_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.643886, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_calendar_spine", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_calendar_spine"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__issue_calendar_spine_issue_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_day_id\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_calendar_spine\"\nwhere issue_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_day_id", "file_key_name": "models.int_jira__issue_calendar_spine", "attached_node": "model.jira.int_jira__issue_calendar_spine"}, "test.jira.unique_int_jira__daily_field_history_issue_field_day_id.bfd34ced78": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_field_day_id", "model": "{{ get_where_subquery(ref('int_jira__daily_field_history')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_int_jira__daily_field_history_issue_field_day_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__daily_field_history_issue_field_day_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__daily_field_history_issue_field_day_id.bfd34ced78", "fqn": ["jira", "intermediate", "unique_int_jira__daily_field_history_issue_field_day_id"], "alias": "unique_int_jira__daily_field_history_issue_field_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.645041, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__daily_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__daily_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__daily_field_history_issue_field_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_field_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__daily_field_history\"\nwhere issue_field_day_id is not null\ngroup by issue_field_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_field_day_id", "file_key_name": "models.int_jira__daily_field_history", "attached_node": "model.jira.int_jira__daily_field_history"}, "test.jira.not_null_int_jira__daily_field_history_issue_field_day_id.c910c3df84": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_field_day_id", "model": "{{ get_where_subquery(ref('int_jira__daily_field_history')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_int_jira__daily_field_history_issue_field_day_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__daily_field_history_issue_field_day_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__daily_field_history_issue_field_day_id.c910c3df84", "fqn": ["jira", "intermediate", "not_null_int_jira__daily_field_history_issue_field_day_id"], "alias": "not_null_int_jira__daily_field_history_issue_field_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.646346, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__daily_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__daily_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__daily_field_history_issue_field_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_field_day_id\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__daily_field_history\"\nwhere issue_field_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_field_day_id", "file_key_name": "models.int_jira__daily_field_history", "attached_node": "model.jira.int_jira__daily_field_history"}, "test.jira.unique_int_jira__pivot_daily_field_history_issue_day_id.46c6f9a842": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_day_id", "model": "{{ get_where_subquery(ref('int_jira__pivot_daily_field_history')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_int_jira__pivot_daily_field_history_issue_day_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__pivot_daily_field_history_issue_day_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__pivot_daily_field_history_issue_day_id.46c6f9a842", "fqn": ["jira", "intermediate", "unique_int_jira__pivot_daily_field_history_issue_day_id"], "alias": "unique_int_jira__pivot_daily_field_history_issue_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.647627, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__pivot_daily_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__pivot_daily_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__pivot_daily_field_history_issue_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__pivot_daily_field_history\"\nwhere issue_day_id is not null\ngroup by issue_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_day_id", "file_key_name": "models.int_jira__pivot_daily_field_history", "attached_node": "model.jira.int_jira__pivot_daily_field_history"}, "test.jira.not_null_int_jira__pivot_daily_field_history_issue_day_id.b697c971fd": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_day_id", "model": "{{ get_where_subquery(ref('int_jira__pivot_daily_field_history')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_int_jira__pivot_daily_field_history_issue_day_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__pivot_daily_field_history_issue_day_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__pivot_daily_field_history_issue_day_id.b697c971fd", "fqn": ["jira", "intermediate", "not_null_int_jira__pivot_daily_field_history_issue_day_id"], "alias": "not_null_int_jira__pivot_daily_field_history_issue_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.649009, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__pivot_daily_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__pivot_daily_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__pivot_daily_field_history_issue_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_day_id\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__pivot_daily_field_history\"\nwhere issue_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_day_id", "file_key_name": "models.int_jira__pivot_daily_field_history", "attached_node": "model.jira.int_jira__pivot_daily_field_history"}, "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_field_history_field_id__issue_id__updated_at.34d1b3eaa1": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["field_id", "issue_id", "updated_at"], "model": "{{ get_where_subquery(ref('int_jira__issue_field_history')) }}"}, "namespace": "dbt_utils"}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_int_jira__issue_field_history_field_id__issue_id__updated_at", "resource_type": "test", "package_name": "jira", "path": "dbt_utils_unique_combination_o_6a26d6675a6f68d7ad230e5b0d114426.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_field_history_field_id__issue_id__updated_at.34d1b3eaa1", "fqn": ["jira", "intermediate", "dbt_utils_unique_combination_of_columns_int_jira__issue_field_history_field_id__issue_id__updated_at"], "alias": "dbt_utils_unique_combination_o_6a26d6675a6f68d7ad230e5b0d114426", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_6a26d6675a6f68d7ad230e5b0d114426", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_6a26d6675a6f68d7ad230e5b0d114426"}, "created_at": 1711035090.650073, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_6a26d6675a6f68d7ad230e5b0d114426\") }}", "language": "sql", "refs": [{"name": "int_jira__issue_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_field_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/dbt_utils_unique_combination_o_6a26d6675a6f68d7ad230e5b0d114426.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), validation_errors as (\n\n select\n field_id, issue_id, updated_at\n from __dbt__cte__int_jira__issue_field_history\n group by field_id, issue_id, updated_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": null, "file_key_name": "models.int_jira__issue_field_history", "attached_node": "model.jira.int_jira__issue_field_history"}, "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_multiselect_history__fivetran_id__updated_at.aad394167d": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["_fivetran_id", "updated_at"], "model": "{{ get_where_subquery(ref('int_jira__issue_multiselect_history')) }}"}, "namespace": "dbt_utils"}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_int_jira__issue_multiselect_history__fivetran_id__updated_at", "resource_type": "test", "package_name": "jira", "path": "dbt_utils_unique_combination_o_3302141fdcb5257bdeed7d73028a6b10.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_multiselect_history__fivetran_id__updated_at.aad394167d", "fqn": ["jira", "intermediate", "dbt_utils_unique_combination_of_columns_int_jira__issue_multiselect_history__fivetran_id__updated_at"], "alias": "dbt_utils_unique_combination_o_3302141fdcb5257bdeed7d73028a6b10", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_3302141fdcb5257bdeed7d73028a6b10", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_3302141fdcb5257bdeed7d73028a6b10"}, "created_at": 1711035090.653526, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_3302141fdcb5257bdeed7d73028a6b10\") }}", "language": "sql", "refs": [{"name": "int_jira__issue_multiselect_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_multiselect_history"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/dbt_utils_unique_combination_o_3302141fdcb5257bdeed7d73028a6b10.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), validation_errors as (\n\n select\n _fivetran_id, updated_at\n from __dbt__cte__int_jira__issue_multiselect_history\n group by _fivetran_id, updated_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_multiselect_history", "sql": " __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": null, "file_key_name": "models.int_jira__issue_multiselect_history", "attached_node": "model.jira.int_jira__issue_multiselect_history"}, "test.jira.unique_int_jira__issue_assign_resolution_issue_id.f41f7c00ab": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_assign_resolution')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_int_jira__issue_assign_resolution_issue_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__issue_assign_resolution_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__issue_assign_resolution_issue_id.f41f7c00ab", "fqn": ["jira", "intermediate", "unique_int_jira__issue_assign_resolution_issue_id"], "alias": "unique_int_jira__issue_assign_resolution_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.656659, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_assign_resolution", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_assign_resolution"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__issue_assign_resolution_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_assign_resolution as (\nwith issue_field_history as (\n \n select *\n from __dbt__cte__int_jira__issue_field_history\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates\n) select\n issue_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__issue_assign_resolution\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_assign_resolution", "sql": " __dbt__cte__int_jira__issue_assign_resolution as (\nwith issue_field_history as (\n \n select *\n from __dbt__cte__int_jira__issue_field_history\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_assign_resolution", "attached_node": "model.jira.int_jira__issue_assign_resolution"}, "test.jira.not_null_int_jira__issue_assign_resolution_issue_id.b3af89c733": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_assign_resolution')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_int_jira__issue_assign_resolution_issue_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__issue_assign_resolution_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__issue_assign_resolution_issue_id.b3af89c733", "fqn": ["jira", "intermediate", "not_null_int_jira__issue_assign_resolution_issue_id"], "alias": "not_null_int_jira__issue_assign_resolution_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.657999, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_assign_resolution", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_assign_resolution"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__issue_assign_resolution_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_assign_resolution as (\nwith issue_field_history as (\n \n select *\n from __dbt__cte__int_jira__issue_field_history\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates\n) select issue_id\nfrom __dbt__cte__int_jira__issue_assign_resolution\nwhere issue_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_field_history", "sql": " __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_assign_resolution", "sql": " __dbt__cte__int_jira__issue_assign_resolution as (\nwith issue_field_history as (\n \n select *\n from __dbt__cte__int_jira__issue_field_history\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_assign_resolution", "attached_node": "model.jira.int_jira__issue_assign_resolution"}, "test.jira.unique_int_jira__field_history_scd_issue_day_id.21b932e949": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_day_id", "model": "{{ get_where_subquery(ref('int_jira__field_history_scd')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_int_jira__field_history_scd_issue_day_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__field_history_scd_issue_day_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__field_history_scd_issue_day_id.21b932e949", "fqn": ["jira", "intermediate", "unique_int_jira__field_history_scd_issue_day_id"], "alias": "unique_int_jira__field_history_scd_issue_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.659028, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__field_history_scd", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__field_history_scd"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__field_history_scd_issue_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__field_history_scd\"\nwhere issue_day_id is not null\ngroup by issue_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_day_id", "file_key_name": "models.int_jira__field_history_scd", "attached_node": "model.jira.int_jira__field_history_scd"}, "test.jira.not_null_int_jira__field_history_scd_issue_day_id.327ac0856c": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_day_id", "model": "{{ get_where_subquery(ref('int_jira__field_history_scd')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_int_jira__field_history_scd_issue_day_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__field_history_scd_issue_day_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__field_history_scd_issue_day_id.327ac0856c", "fqn": ["jira", "intermediate", "not_null_int_jira__field_history_scd_issue_day_id"], "alias": "not_null_int_jira__field_history_scd_issue_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.660067, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__field_history_scd", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__field_history_scd"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__field_history_scd_issue_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_day_id\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__field_history_scd\"\nwhere issue_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_day_id", "file_key_name": "models.int_jira__field_history_scd", "attached_node": "model.jira.int_jira__field_history_scd"}, "test.jira.unique_int_jira__issue_versions_issue_id.e2a88132de": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_versions')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_int_jira__issue_versions_issue_id", "resource_type": "test", "package_name": "jira", "path": "unique_int_jira__issue_versions_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.unique_int_jira__issue_versions_issue_id.e2a88132de", "fqn": ["jira", "intermediate", "unique_int_jira__issue_versions_issue_id"], "alias": "unique_int_jira__issue_versions_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.661073, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_versions", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_versions"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/unique_int_jira__issue_versions_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_versions as (\n\n\nwith version as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version\"\n),\n\nversion_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as integer) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n \n string_agg(version.version_name, ', ')\n\n as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final\n) select\n issue_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__issue_versions\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_multiselect_history", "sql": " __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_versions", "sql": " __dbt__cte__int_jira__issue_versions as (\n\n\nwith version as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version\"\n),\n\nversion_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as integer) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n \n string_agg(version.version_name, ', ')\n\n as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_versions", "attached_node": "model.jira.int_jira__issue_versions"}, "test.jira.not_null_int_jira__issue_versions_issue_id.54c4cd445e": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('int_jira__issue_versions')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_int_jira__issue_versions_issue_id", "resource_type": "test", "package_name": "jira", "path": "not_null_int_jira__issue_versions_issue_id.sql", "original_file_path": "models/intermediate/int_jira.yml", "unique_id": "test.jira.not_null_int_jira__issue_versions_issue_id.54c4cd445e", "fqn": ["jira", "intermediate", "not_null_int_jira__issue_versions_issue_id"], "alias": "not_null_int_jira__issue_versions_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.662234, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "int_jira__issue_versions", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira.int_jira__issue_versions"]}, "compiled_path": "target/compiled/jira/models/intermediate/int_jira.yml/not_null_int_jira__issue_versions_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_versions as (\n\n\nwith version as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version\"\n),\n\nversion_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as integer) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n \n string_agg(version.version_name, ', ')\n\n as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final\n) select issue_id\nfrom __dbt__cte__int_jira__issue_versions\nwhere issue_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.jira.int_jira__issue_multiselect_history", "sql": " __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n)"}, {"id": "model.jira.int_jira__issue_versions", "sql": " __dbt__cte__int_jira__issue_versions as (\n\n\nwith version as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version\"\n),\n\nversion_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as integer) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n \n string_agg(version.version_name, ', ')\n\n as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.int_jira__issue_versions", "attached_node": "model.jira.int_jira__issue_versions"}, "test.jira_source.unique_stg_jira__comment_comment_id.004104fac5": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "comment_id", "model": "{{ get_where_subquery(ref('stg_jira__comment')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_stg_jira__comment_comment_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__comment_comment_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__comment_comment_id.004104fac5", "fqn": ["jira_source", "unique_stg_jira__comment_comment_id"], "alias": "unique_stg_jira__comment_comment_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.6852942, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__comment", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__comment"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__comment_comment_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n comment_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment\"\nwhere comment_id is not null\ngroup by comment_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "comment_id", "file_key_name": "models.stg_jira__comment", "attached_node": "model.jira_source.stg_jira__comment"}, "test.jira_source.not_null_stg_jira__comment_comment_id.5dec28a22a": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "comment_id", "model": "{{ get_where_subquery(ref('stg_jira__comment')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_stg_jira__comment_comment_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__comment_comment_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__comment_comment_id.5dec28a22a", "fqn": ["jira_source", "not_null_stg_jira__comment_comment_id"], "alias": "not_null_stg_jira__comment_comment_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.686502, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__comment", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__comment"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__comment_comment_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect comment_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment\"\nwhere comment_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "comment_id", "file_key_name": "models.stg_jira__comment", "attached_node": "model.jira_source.stg_jira__comment"}, "test.jira_source.unique_stg_jira__component_component_id.1773ebe913": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "component_id", "model": "{{ get_where_subquery(ref('stg_jira__component')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_stg_jira__component_component_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__component_component_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__component_component_id.1773ebe913", "fqn": ["jira_source", "unique_stg_jira__component_component_id"], "alias": "unique_stg_jira__component_component_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.687509, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__component", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__component"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__component_component_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n component_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__component\"\nwhere component_id is not null\ngroup by component_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "component_id", "file_key_name": "models.stg_jira__component", "attached_node": "model.jira_source.stg_jira__component"}, "test.jira_source.not_null_stg_jira__component_component_id.2f017ad5ad": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "component_id", "model": "{{ get_where_subquery(ref('stg_jira__component')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_stg_jira__component_component_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__component_component_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__component_component_id.2f017ad5ad", "fqn": ["jira_source", "not_null_stg_jira__component_component_id"], "alias": "not_null_stg_jira__component_component_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.6885371, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__component", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__component"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__component_component_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect component_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__component\"\nwhere component_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "component_id", "file_key_name": "models.stg_jira__component", "attached_node": "model.jira_source.stg_jira__component"}, "test.jira_source.unique_stg_jira__field_field_id.df7b462fff": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "field_id", "model": "{{ get_where_subquery(ref('stg_jira__field')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_stg_jira__field_field_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__field_field_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__field_field_id.df7b462fff", "fqn": ["jira_source", "unique_stg_jira__field_field_id"], "alias": "unique_stg_jira__field_field_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.6895602, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__field", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__field"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__field_field_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n field_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\nwhere field_id is not null\ngroup by field_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "field_id", "file_key_name": "models.stg_jira__field", "attached_node": "model.jira_source.stg_jira__field"}, "test.jira_source.not_null_stg_jira__field_field_id.34424f1c2b": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "field_id", "model": "{{ get_where_subquery(ref('stg_jira__field')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_stg_jira__field_field_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__field_field_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__field_field_id.34424f1c2b", "fqn": ["jira_source", "not_null_stg_jira__field_field_id"], "alias": "not_null_stg_jira__field_field_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.690807, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__field", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__field"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__field_field_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect field_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\nwhere field_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "field_id", "file_key_name": "models.stg_jira__field", "attached_node": "model.jira_source.stg_jira__field"}, "test.jira_source.not_null_stg_jira__field_option_field_id.1b1f37b358": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "field_id", "model": "{{ get_where_subquery(ref('stg_jira__field_option')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_stg_jira__field_option_field_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__field_option_field_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__field_option_field_id.1b1f37b358", "fqn": ["jira_source", "not_null_stg_jira__field_option_field_id"], "alias": "not_null_stg_jira__field_option_field_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.691819, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__field_option", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__field_option"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__field_option_field_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect field_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field_option\"\nwhere field_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "field_id", "file_key_name": "models.stg_jira__field_option", "attached_node": "model.jira_source.stg_jira__field_option"}, "test.jira_source.unique_stg_jira__issue_issue_id.7bb0ee7230": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('stg_jira__issue')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_stg_jira__issue_issue_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__issue_issue_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__issue_issue_id.7bb0ee7230", "fqn": ["jira_source", "unique_stg_jira__issue_issue_id"], "alias": "unique_stg_jira__issue_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.693235, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__issue", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__issue"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__issue_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue\"\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.stg_jira__issue", "attached_node": "model.jira_source.stg_jira__issue"}, "test.jira_source.not_null_stg_jira__issue_issue_id.13a4fbe132": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_id", "model": "{{ get_where_subquery(ref('stg_jira__issue')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_stg_jira__issue_issue_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__issue_issue_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__issue_issue_id.13a4fbe132", "fqn": ["jira_source", "not_null_stg_jira__issue_issue_id"], "alias": "not_null_stg_jira__issue_issue_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.694394, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__issue", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__issue"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__issue_issue_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue\"\nwhere issue_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_id", "file_key_name": "models.stg_jira__issue", "attached_node": "model.jira_source.stg_jira__issue"}, "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_field_history_field_id__issue_id__updated_at.c01ecbb82c": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["field_id", "issue_id", "updated_at"], "model": "{{ get_where_subquery(ref('stg_jira__issue_field_history')) }}"}, "namespace": "dbt_utils"}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_stg_jira__issue_field_history_field_id__issue_id__updated_at", "resource_type": "test", "package_name": "jira_source", "path": "dbt_utils_unique_combination_o_ad5994a65a5d4b3bfa1a17202d1e378f.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_field_history_field_id__issue_id__updated_at.c01ecbb82c", "fqn": ["jira_source", "dbt_utils_unique_combination_of_columns_stg_jira__issue_field_history_field_id__issue_id__updated_at"], "alias": "dbt_utils_unique_combination_o_ad5994a65a5d4b3bfa1a17202d1e378f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_ad5994a65a5d4b3bfa1a17202d1e378f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_ad5994a65a5d4b3bfa1a17202d1e378f"}, "created_at": 1711035090.695703, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_ad5994a65a5d4b3bfa1a17202d1e378f\") }}", "language": "sql", "refs": [{"name": "stg_jira__issue_field_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__issue_field_history"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/dbt_utils_unique_combination_o_ad5994a65a5d4b3bfa1a17202d1e378f.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n field_id, issue_id, updated_at\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n group by field_id, issue_id, updated_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": null, "file_key_name": "models.stg_jira__issue_field_history", "attached_node": "model.jira_source.stg_jira__issue_field_history"}, "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_multiselect_history__fivetran_id__updated_at.4dd2d1c5a8": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["_fivetran_id", "updated_at"], "model": "{{ get_where_subquery(ref('stg_jira__issue_multiselect_history')) }}"}, "namespace": "dbt_utils"}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_stg_jira__issue_multiselect_history__fivetran_id__updated_at", "resource_type": "test", "package_name": "jira_source", "path": "dbt_utils_unique_combination_o_69e37ee91ecaf0ffc104992c26624396.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_multiselect_history__fivetran_id__updated_at.4dd2d1c5a8", "fqn": ["jira_source", "dbt_utils_unique_combination_of_columns_stg_jira__issue_multiselect_history__fivetran_id__updated_at"], "alias": "dbt_utils_unique_combination_o_69e37ee91ecaf0ffc104992c26624396", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_69e37ee91ecaf0ffc104992c26624396", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_69e37ee91ecaf0ffc104992c26624396"}, "created_at": 1711035090.6988559, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_69e37ee91ecaf0ffc104992c26624396\") }}", "language": "sql", "refs": [{"name": "stg_jira__issue_multiselect_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__issue_multiselect_history"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/dbt_utils_unique_combination_o_69e37ee91ecaf0ffc104992c26624396.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n _fivetran_id, updated_at\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n group by _fivetran_id, updated_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": null, "file_key_name": "models.stg_jira__issue_multiselect_history", "attached_node": "model.jira_source.stg_jira__issue_multiselect_history"}, "test.jira_source.unique_stg_jira__issue_type_issue_type_id.a89d34aa41": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "issue_type_id", "model": "{{ get_where_subquery(ref('stg_jira__issue_type')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_stg_jira__issue_type_issue_type_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__issue_type_issue_type_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__issue_type_issue_type_id.a89d34aa41", "fqn": ["jira_source", "unique_stg_jira__issue_type_issue_type_id"], "alias": "unique_stg_jira__issue_type_issue_type_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.701577, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__issue_type", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__issue_type"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__issue_type_issue_type_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_type_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_type\"\nwhere issue_type_id is not null\ngroup by issue_type_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_type_id", "file_key_name": "models.stg_jira__issue_type", "attached_node": "model.jira_source.stg_jira__issue_type"}, "test.jira_source.not_null_stg_jira__issue_type_issue_type_id.57419fc343": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "issue_type_id", "model": "{{ get_where_subquery(ref('stg_jira__issue_type')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_stg_jira__issue_type_issue_type_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__issue_type_issue_type_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__issue_type_issue_type_id.57419fc343", "fqn": ["jira_source", "not_null_stg_jira__issue_type_issue_type_id"], "alias": "not_null_stg_jira__issue_type_issue_type_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.702942, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__issue_type", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__issue_type"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__issue_type_issue_type_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_type_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_type\"\nwhere issue_type_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "issue_type_id", "file_key_name": "models.stg_jira__issue_type", "attached_node": "model.jira_source.stg_jira__issue_type"}, "test.jira_source.unique_stg_jira__priority_priority_id.79b77ea5d2": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "priority_id", "model": "{{ get_where_subquery(ref('stg_jira__priority')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_stg_jira__priority_priority_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__priority_priority_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__priority_priority_id.79b77ea5d2", "fqn": ["jira_source", "unique_stg_jira__priority_priority_id"], "alias": "unique_stg_jira__priority_priority_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.7040682, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__priority", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__priority"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__priority_priority_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n priority_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__priority\"\nwhere priority_id is not null\ngroup by priority_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "priority_id", "file_key_name": "models.stg_jira__priority", "attached_node": "model.jira_source.stg_jira__priority"}, "test.jira_source.not_null_stg_jira__priority_priority_id.ec0c873363": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "priority_id", "model": "{{ get_where_subquery(ref('stg_jira__priority')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_stg_jira__priority_priority_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__priority_priority_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__priority_priority_id.ec0c873363", "fqn": ["jira_source", "not_null_stg_jira__priority_priority_id"], "alias": "not_null_stg_jira__priority_priority_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.705455, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__priority", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__priority"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__priority_priority_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect priority_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__priority\"\nwhere priority_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "priority_id", "file_key_name": "models.stg_jira__priority", "attached_node": "model.jira_source.stg_jira__priority"}, "test.jira_source.unique_stg_jira__project_project_id.58d321d374": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "project_id", "model": "{{ get_where_subquery(ref('stg_jira__project')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_stg_jira__project_project_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__project_project_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__project_project_id.58d321d374", "fqn": ["jira_source", "unique_stg_jira__project_project_id"], "alias": "unique_stg_jira__project_project_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.706613, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__project", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__project"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__project_project_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n project_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__project\"\nwhere project_id is not null\ngroup by project_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "project_id", "file_key_name": "models.stg_jira__project", "attached_node": "model.jira_source.stg_jira__project"}, "test.jira_source.not_null_stg_jira__project_project_id.996fe19522": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "project_id", "model": "{{ get_where_subquery(ref('stg_jira__project')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_stg_jira__project_project_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__project_project_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__project_project_id.996fe19522", "fqn": ["jira_source", "not_null_stg_jira__project_project_id"], "alias": "not_null_stg_jira__project_project_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.707734, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__project", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__project"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__project_project_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect project_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__project\"\nwhere project_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "project_id", "file_key_name": "models.stg_jira__project", "attached_node": "model.jira_source.stg_jira__project"}, "test.jira_source.unique_stg_jira__resolution_resolution_id.b3acb37c87": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "resolution_id", "model": "{{ get_where_subquery(ref('stg_jira__resolution')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_stg_jira__resolution_resolution_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__resolution_resolution_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__resolution_resolution_id.b3acb37c87", "fqn": ["jira_source", "unique_stg_jira__resolution_resolution_id"], "alias": "unique_stg_jira__resolution_resolution_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.708786, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__resolution", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__resolution"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__resolution_resolution_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n resolution_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__resolution\"\nwhere resolution_id is not null\ngroup by resolution_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "resolution_id", "file_key_name": "models.stg_jira__resolution", "attached_node": "model.jira_source.stg_jira__resolution"}, "test.jira_source.not_null_stg_jira__resolution_resolution_id.1c04bac8a4": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "resolution_id", "model": "{{ get_where_subquery(ref('stg_jira__resolution')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_stg_jira__resolution_resolution_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__resolution_resolution_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__resolution_resolution_id.1c04bac8a4", "fqn": ["jira_source", "not_null_stg_jira__resolution_resolution_id"], "alias": "not_null_stg_jira__resolution_resolution_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.7099771, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__resolution", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__resolution"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__resolution_resolution_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect resolution_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__resolution\"\nwhere resolution_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "resolution_id", "file_key_name": "models.stg_jira__resolution", "attached_node": "model.jira_source.stg_jira__resolution"}, "test.jira_source.unique_stg_jira__sprint_sprint_id.8a73555fed": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "sprint_id", "model": "{{ get_where_subquery(ref('stg_jira__sprint')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_stg_jira__sprint_sprint_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__sprint_sprint_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__sprint_sprint_id.8a73555fed", "fqn": ["jira_source", "unique_stg_jira__sprint_sprint_id"], "alias": "unique_stg_jira__sprint_sprint_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.711356, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__sprint", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__sprint"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__sprint_sprint_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n sprint_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__sprint\"\nwhere sprint_id is not null\ngroup by sprint_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "sprint_id", "file_key_name": "models.stg_jira__sprint", "attached_node": "model.jira_source.stg_jira__sprint"}, "test.jira_source.not_null_stg_jira__sprint_sprint_id.899b4b77d7": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "sprint_id", "model": "{{ get_where_subquery(ref('stg_jira__sprint')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_stg_jira__sprint_sprint_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__sprint_sprint_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__sprint_sprint_id.899b4b77d7", "fqn": ["jira_source", "not_null_stg_jira__sprint_sprint_id"], "alias": "not_null_stg_jira__sprint_sprint_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.7124841, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__sprint", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__sprint"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__sprint_sprint_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect sprint_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__sprint\"\nwhere sprint_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "sprint_id", "file_key_name": "models.stg_jira__sprint", "attached_node": "model.jira_source.stg_jira__sprint"}, "test.jira_source.unique_stg_jira__status_status_id.0449241b95": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "status_id", "model": "{{ get_where_subquery(ref('stg_jira__status')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_stg_jira__status_status_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__status_status_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__status_status_id.0449241b95", "fqn": ["jira_source", "unique_stg_jira__status_status_id"], "alias": "unique_stg_jira__status_status_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.713859, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__status", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__status"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__status_status_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n status_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status\"\nwhere status_id is not null\ngroup by status_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status_id", "file_key_name": "models.stg_jira__status", "attached_node": "model.jira_source.stg_jira__status"}, "test.jira_source.not_null_stg_jira__status_status_id.b32a8a0d84": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "status_id", "model": "{{ get_where_subquery(ref('stg_jira__status')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_stg_jira__status_status_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__status_status_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__status_status_id.b32a8a0d84", "fqn": ["jira_source", "not_null_stg_jira__status_status_id"], "alias": "not_null_stg_jira__status_status_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.7148979, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__status", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__status"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__status_status_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect status_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status\"\nwhere status_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status_id", "file_key_name": "models.stg_jira__status", "attached_node": "model.jira_source.stg_jira__status"}, "test.jira_source.unique_stg_jira__status_category_status_category_id.99c869330a": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "status_category_id", "model": "{{ get_where_subquery(ref('stg_jira__status_category')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_stg_jira__status_category_status_category_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__status_category_status_category_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__status_category_status_category_id.99c869330a", "fqn": ["jira_source", "unique_stg_jira__status_category_status_category_id"], "alias": "unique_stg_jira__status_category_status_category_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.716083, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__status_category", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__status_category"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__status_category_status_category_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n status_category_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status_category\"\nwhere status_category_id is not null\ngroup by status_category_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status_category_id", "file_key_name": "models.stg_jira__status_category", "attached_node": "model.jira_source.stg_jira__status_category"}, "test.jira_source.not_null_stg_jira__status_category_status_category_id.7a89cdfcf0": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "status_category_id", "model": "{{ get_where_subquery(ref('stg_jira__status_category')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_stg_jira__status_category_status_category_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__status_category_status_category_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__status_category_status_category_id.7a89cdfcf0", "fqn": ["jira_source", "not_null_stg_jira__status_category_status_category_id"], "alias": "not_null_stg_jira__status_category_status_category_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.717061, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__status_category", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__status_category"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__status_category_status_category_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect status_category_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status_category\"\nwhere status_category_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status_category_id", "file_key_name": "models.stg_jira__status_category", "attached_node": "model.jira_source.stg_jira__status_category"}, "test.jira_source.unique_stg_jira__user_user_id.a397e1a23f": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('stg_jira__user')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_stg_jira__user_user_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__user_user_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__user_user_id.a397e1a23f", "fqn": ["jira_source", "unique_stg_jira__user_user_id"], "alias": "unique_stg_jira__user_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.71807, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__user", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__user"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__user_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n user_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\nwhere user_id is not null\ngroup by user_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "models.stg_jira__user", "attached_node": "model.jira_source.stg_jira__user"}, "test.jira_source.not_null_stg_jira__user_user_id.b2153f97d2": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('stg_jira__user')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_stg_jira__user_user_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__user_user_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__user_user_id.b2153f97d2", "fqn": ["jira_source", "not_null_stg_jira__user_user_id"], "alias": "not_null_stg_jira__user_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.719098, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__user", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__user"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__user_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect user_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "models.stg_jira__user", "attached_node": "model.jira_source.stg_jira__user"}, "test.jira_source.unique_stg_jira__version_version_id.08231bd017": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "version_id", "model": "{{ get_where_subquery(ref('stg_jira__version')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "unique_stg_jira__version_version_id", "resource_type": "test", "package_name": "jira_source", "path": "unique_stg_jira__version_version_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.unique_stg_jira__version_version_id.08231bd017", "fqn": ["jira_source", "unique_stg_jira__version_version_id"], "alias": "unique_stg_jira__version_version_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.7201018, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__version", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__version"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/unique_stg_jira__version_version_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n version_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version\"\nwhere version_id is not null\ngroup by version_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version_id", "file_key_name": "models.stg_jira__version", "attached_node": "model.jira_source.stg_jira__version"}, "test.jira_source.not_null_stg_jira__version_version_id.03877ce324": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "version_id", "model": "{{ get_where_subquery(ref('stg_jira__version')) }}"}, "namespace": null}, "database": "postgres", "schema": "jira_integrations_tests_33_dbt_test__audit", "name": "not_null_stg_jira__version_version_id", "resource_type": "test", "package_name": "jira_source", "path": "not_null_stg_jira__version_version_id.sql", "original_file_path": "models/stg_jira.yml", "unique_id": "test.jira_source.not_null_stg_jira__version_version_id.03877ce324", "fqn": ["jira_source", "not_null_stg_jira__version_version_id"], "alias": "not_null_stg_jira__version_version_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1711035090.721271, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_jira__version", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.jira_source.stg_jira__version"]}, "compiled_path": "target/compiled/jira_source/models/stg_jira.yml/not_null_stg_jira__version_version_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect version_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version\"\nwhere version_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version_id", "file_key_name": "models.stg_jira__version", "attached_node": "model.jira_source.stg_jira__version"}}, "sources": {"source.jira_source.jira.comment": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "comment", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.comment", "fqn": ["jira_source", "jira", "comment"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "comment", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of comments made on issues.", "columns": {"id": {"name": "id", "description": "Unique ID of the comment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "author_id": {"name": "author_id", "description": "Foreign key referencing the `user` id of the comment's author.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "body": {"name": "body", "description": "Content of the comment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created": {"name": "created", "description": "Timestamp of when the comment was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_public": {"name": "is_public", "description": "Boolean that is true if the comment is visible to all users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the id of the `issue` that was commented on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "update_author_id": {"name": "update_author_id", "description": "Foreign key referencing the id of the `user` who last updated this comment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the comment was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"comment\"", "created_at": 1711035090.777042}, "source.jira_source.jira.component": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "component", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.component", "fqn": ["jira_source", "jira", "component"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "component", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of project components (subsections to group issues).\n", "columns": {"id": {"name": "id", "description": "ID of the component.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Description given to the component.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "UI-facing name of the component.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the id of the component's `project`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"component\"", "created_at": 1711035090.777199}, "source.jira_source.jira.field": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "field", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.field", "fqn": ["jira_source", "jira", "field"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "field", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of all issue fields.", "columns": {"id": {"name": "id", "description": "Unique ID of the field. Default fields will have descriptive IDs, whereas custom field IDs will be `'customfield_#####'`.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_array": {"name": "is_array", "description": "Boolean that is true if a field can have multiple values (is mulitselect).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_custom": {"name": "is_custom", "description": "Boolean that is true if the field is custom to this organization, and false if it is default to Jira.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the field as it appears on issue cards.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"field\"", "created_at": 1711035090.777291}, "source.jira_source.jira.field_option": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "field_option", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.field_option", "fqn": ["jira_source", "jira", "field_option"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "field_option", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of all options related to custom fields.", "columns": {"id": {"name": "id", "description": "The ID of the custom field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The ID of the parent custom field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the field option.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"field_option\"", "created_at": 1711035090.777374}, "source.jira_source.jira.issue": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "issue", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.issue", "fqn": ["jira_source", "jira", "issue"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "issue", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of all issues in your organization's Jira (captures soft deletes).", "columns": {"id": {"name": "id", "description": "Unique ID of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the row has been soft-deleted from the source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assignee": {"name": "assignee", "description": "Foreign key referencing the ID of the `user` currently assigned to this task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created": {"name": "created", "description": "Timestamp of when the issue was created (in UTC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "creator": {"name": "creator", "description": "Foreign key referencing the `user` who first created the issue. Cannot be changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "The issue description, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "Calendar day on which the issue is due, if a due date is provided.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "environment": {"name": "environment", "description": "Text field describing the environment in which the issue occurred (ie \"IE9 on Windows 7\").", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_type": {"name": "issue_type", "description": "Foreign key referencing the ID of the `issue_type`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "key": {"name": "key", "description": "UI-facing id of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed": {"name": "last_viewed", "description": "Timestamp of when the user who set up the connector last viewed the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "original_estimate": {"name": "original_estimate", "description": "The original estimate of how long working on this issue would take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "Self-referencing ID of the parent `issue`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority": {"name": "priority", "description": "Foreign key referencing the ID of the issue's current `priority`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project": {"name": "project", "description": "Foreign key referencing the ID of the `project` that the issue belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "remaining_estimate": {"name": "remaining_estimate", "description": "The estimate of how much longer working on this issue will take, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reporter": {"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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolution": {"name": "resolution", "description": "Foreign key referencing the ID of the issue's type of `resolution`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "resolved": {"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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"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).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_category_changed": {"name": "status_category_changed", "description": "Timestamp of when the status was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "summary": {"name": "summary", "description": "Title of the issue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_spent": {"name": "time_spent", "description": "The time that was spent working on this issue, in seconds.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the issue was last updated in some way.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "work_ratio": {"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.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"issue\"", "created_at": 1711035090.777484}, "source.jira_source.jira.issue_field_history": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "issue_field_history", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.issue_field_history", "fqn": ["jira_source", "jira", "issue_field_history"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "issue_field_history", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of every value that each **custom non-array** (not multiselect) field has been set to.", "columns": {"field_id": {"name": "field_id", "description": "Foreign key referencing the ID of the `field` that was changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time": {"name": "time", "description": "Timestamp of when the issue field was set to this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "value": {"name": "value", "description": "Content of the value of that the field was set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"issue_field_history\"", "created_at": 1711035090.7775629}, "source.jira_source.jira.issue_link": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "issue_link", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.issue_link", "fqn": ["jira_source", "jira", "issue_link"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "issue_link", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of relationships (links) created between issues. Issue links can include blockers, clones/duplicates, and general relationships.\n", "columns": {"issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` that is the subject of this relationship (the linker).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "related_issue_id": {"name": "related_issue_id", "description": "Foreign key referencing the ID of the `issue` that is the object of this relationship (the linkee).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "relationship": {"name": "relationship", "description": "The nature of the link between the two issues (\"blocks\", \"is duplicated by\", \"relates to\", etc.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"issue_link\"", "created_at": 1711035090.777641}, "source.jira_source.jira.issue_multiselect_history": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "issue_multiselect_history", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.issue_multiselect_history", "fqn": ["jira_source", "jira", "issue_multiselect_history"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "issue_multiselect_history", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of every value that each array-type (multiselect) field has been set to. Each row will pertain to **one** value.\n", "columns": {"_fivetran_id": {"name": "_fivetran_id", "description": "Fivetran-generated ID hashed on field, issue, and value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time": {"name": "time", "description": "Timestamp of when the issue field was updated to included this value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "field_id": {"name": "field_id", "description": "Foreign key referencing the ID of the `field` that was changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "issue_id": {"name": "issue_id", "description": "Foreign key referencing the ID of the `issue` whose field was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "value": {"name": "value", "description": "Content of the value of that the field was set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"issue_multiselect_history\"", "created_at": 1711035090.7777238}, "source.jira_source.jira.issue_type": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "issue_type", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.issue_type", "fqn": ["jira_source", "jira", "issue_type"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "issue_type", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table containing information about issue types. Issue types can have identical names in different projects, but they may have differing descriptions.\n", "columns": {"id": {"name": "id", "description": "Unique ID of the issue type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Project-level description given to the issue type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the issue type (ie Epic, Task, Subtask, any custom types)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "subtask": {"name": "subtask", "description": "Boolean that is true if this type of issue is a subtask.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"issue_type\"", "created_at": 1711035090.777802}, "source.jira_source.jira.priority": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "priority", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.priority", "fqn": ["jira_source", "jira", "priority"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "priority", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of issue priority levels (global).", "columns": {"id": {"name": "id", "description": "Unique ID of the priority level.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Description of the priority level.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the priority as it appears in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"priority\"", "created_at": 1711035090.777941}, "source.jira_source.jira.project": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "project", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.project", "fqn": ["jira_source", "jira", "project"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "project", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of all projects in your organization.", "columns": {"id": {"name": "id", "description": "Unique ID of the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Description of the project, if given.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "key": {"name": "key", "description": "UI-facing ID of the project. This becomes the default prefix for tasks created within this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_id": {"name": "lead_id", "description": "Foreign key referencing the ID of the `user` who leads this project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Title of the project.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "permission_scheme_id": {"name": "permission_scheme_id", "description": "Foreign key referencing the ID of the `permission_scheme` that the project ascribes to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_category_id": {"name": "project_category_id", "description": "Foreign key referencing the ID of the `project_category` that the project is associated with, if any.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_type_key": {"name": "project_type_key", "description": "ID of the type of project (ie 'software').", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"project\"", "created_at": 1711035090.7780259}, "source.jira_source.jira.resolution": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "resolution", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.resolution", "fqn": ["jira_source", "jira", "resolution"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "resolution", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table storing the types of resolutions used by your organization.", "columns": {"id": {"name": "id", "description": "Unique ID of the resolution type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Description given to the resolution.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Display name of the resolution.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"resolution\"", "created_at": 1711035090.778101}, "source.jira_source.jira.sprint": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "sprint", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.sprint", "fqn": ["jira_source", "jira", "sprint"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "sprint", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of all sprints.", "columns": {"id": {"name": "id", "description": "Unique ID of the sprint.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "board_id": {"name": "board_id", "description": "Foreign key referencing the ID of the `board` that the sprint lives in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "complete_date": {"name": "complete_date", "description": "Timestamp of when the sprint was completed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "end_date": {"name": "end_date", "description": "Timestamp of when the sprint is planned to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Title of the sprint.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "start_date": {"name": "start_date", "description": "Timestamp of when the sprint began.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"sprint\"", "created_at": 1711035090.778187}, "source.jira_source.jira.status": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "status", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.status", "fqn": ["jira_source", "jira", "status"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "status", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of project-level statuses (which may have the same umbrella `status_category`).", "columns": {"id": {"name": "id", "description": "Unique ID of the project status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Description of the project status. Different projects may all have a status called \"Backlog\", but their definitions of \"backlog\" may differ.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Title of the status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_category_id": {"name": "status_category_id", "description": "Foreign key referencing the ID of the `status_category` that this project status falls under.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"status\"", "created_at": 1711035090.778263}, "source.jira_source.jira.status_category": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "status_category", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.status_category", "fqn": ["jira_source", "jira", "status_category"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "status_category", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of overarching status categories.", "columns": {"id": {"name": "id", "description": "Unique ID of the status category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Title of the status category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"status_category\"", "created_at": 1711035090.778335}, "source.jira_source.jira.user": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "user", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.user", "fqn": ["jira_source", "jira", "user"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "user", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of users associated with your organization.", "columns": {"id": {"name": "id", "description": "Unique ID of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "Email associated with the user account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "locale": {"name": "locale", "description": "The Java locale of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the user as it appears in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_zone": {"name": "time_zone", "description": "The user's timezone, as defined in their settings.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "username": {"name": "username", "description": "Account username.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"user\"", "created_at": 1711035090.778414}, "source.jira_source.jira.version": {"database": "postgres", "schema": "jira_integrations_tests_33", "name": "version", "resource_type": "source", "package_name": "jira_source", "path": "models/src_jira.yml", "original_file_path": "models/src_jira.yml", "unique_id": "source.jira_source.jira.version", "fqn": ["jira_source", "jira", "version"], "source_name": "jira", "source_description": "", "loader": "fivetran", "identifier": "version", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of project versions in your organization.", "columns": {"archived": {"name": "archived", "description": "Boolean that is true if the project version has been archived.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "The optional description given to the version.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the version.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Unique name of the version.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "overdue": {"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.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the `PROJECT` to which this version is attached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "release_date": {"name": "release_date", "description": "The optional release date of the version. Expressed in ISO 8601 format (yyyy-mm-dd).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "released": {"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", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "start_date": {"name": "start_date", "description": "The start date of the version. Expressed in ISO 8601 format (yyyy-mm-dd).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"postgres\".\"jira_integrations_tests_33\".\"version\"", "created_at": 1711035090.778506}}, "macros": {"macro.dbt_postgres.postgres__current_timestamp": {"name": "postgres__current_timestamp", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp", "macro_sql": "{% macro postgres__current_timestamp() -%}\n now()\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.085899, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_string_as_time": {"name": "postgres__snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_string_as_time", "macro_sql": "{% macro postgres__snapshot_string_as_time(timestamp) -%}\n {%- set result = \"'\" ~ timestamp ~ \"'::timestamp without time zone\" -%}\n {{ return(result) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.08612, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_get_time": {"name": "postgres__snapshot_get_time", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_get_time", "macro_sql": "{% macro postgres__snapshot_get_time() -%}\n {{ current_timestamp() }}::timestamp without time zone\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.086226, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp_backcompat": {"name": "postgres__current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp_backcompat", "macro_sql": "{% macro postgres__current_timestamp_backcompat() %}\n current_timestamp::{{ type_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.0863302, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat": {"name": "postgres__current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat", "macro_sql": "{% macro postgres__current_timestamp_in_utc_backcompat() %}\n (current_timestamp at time zone 'utc')::{{ type_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.086433, "supported_languages": null}, "macro.dbt_postgres.postgres__get_catalog_relations": {"name": "postgres__get_catalog_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_postgres.postgres__get_catalog_relations", "macro_sql": "{% macro postgres__get_catalog_relations(information_schema, relations) -%}\n {%- call statement('catalog', fetch_result=True) -%}\n\n {#\n If the user has multiple databases set and the first one is wrong, this will fail.\n But we won't fail in the case where there are multiple quoting-difference-only dbs, which is better.\n #}\n {% set database = information_schema.database %}\n {{ adapter.verify_database(database) }}\n\n select\n '{{ database }}' as table_database,\n sch.nspname as table_schema,\n tbl.relname as table_name,\n case tbl.relkind\n when 'v' then 'VIEW'\n when 'm' then 'MATERIALIZED VIEW'\n else 'BASE TABLE'\n end as table_type,\n tbl_desc.description as table_comment,\n col.attname as column_name,\n col.attnum as column_index,\n pg_catalog.format_type(col.atttypid, col.atttypmod) as column_type,\n col_desc.description as column_comment,\n pg_get_userbyid(tbl.relowner) as table_owner\n\n from pg_catalog.pg_namespace sch\n join pg_catalog.pg_class tbl on tbl.relnamespace = sch.oid\n join pg_catalog.pg_attribute col on col.attrelid = tbl.oid\n left outer join pg_catalog.pg_description tbl_desc on (tbl_desc.objoid = tbl.oid and tbl_desc.objsubid = 0)\n left outer join pg_catalog.pg_description col_desc on (col_desc.objoid = tbl.oid and col_desc.objsubid = col.attnum)\n where (\n {%- for relation in relations -%}\n {%- if relation.identifier -%}\n (upper(sch.nspname) = upper('{{ relation.schema }}') and\n upper(tbl.relname) = upper('{{ relation.identifier }}'))\n {%- else-%}\n upper(sch.nspname) = upper('{{ relation.schema }}')\n {%- endif -%}\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n and not pg_is_other_temp_schema(sch.oid) -- not a temporary schema belonging to another session\n and tbl.relpersistence in ('p', 'u') -- [p]ermanent table or [u]nlogged table. Exclude [t]emporary tables\n and tbl.relkind in ('r', 'v', 'f', 'p', 'm') -- o[r]dinary table, [v]iew, [f]oreign table, [p]artitioned table, [m]aterialized view. Other values are [i]ndex, [S]equence, [c]omposite type, [t]OAST table\n and col.attnum > 0 -- negative numbers are used for system columns such as oid\n and not col.attisdropped -- column as not been dropped\n\n order by\n sch.nspname,\n tbl.relname,\n col.attnum\n\n {%- endcall -%}\n\n {{ return(load_result('catalog').table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.08785, "supported_languages": null}, "macro.dbt_postgres.postgres__get_catalog": {"name": "postgres__get_catalog", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_postgres.postgres__get_catalog", "macro_sql": "{% macro postgres__get_catalog(information_schema, schemas) -%}\n {%- set relations = [] -%}\n {%- for schema in schemas -%}\n {%- set dummy = relations.append({'schema': schema}) -%}\n {%- endfor -%}\n {{ return(postgres__get_catalog_relations(information_schema, relations)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.088193, "supported_languages": null}, "macro.dbt_postgres.postgres__get_relations": {"name": "postgres__get_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "unique_id": "macro.dbt_postgres.postgres__get_relations", "macro_sql": "{% macro postgres__get_relations() -%}\n\n {#\n -- in pg_depend, objid is the dependent, refobjid is the referenced object\n -- > a pg_depend entry indicates that the referenced object cannot be\n -- > dropped without also dropping the dependent object.\n #}\n\n {%- call statement('relations', fetch_result=True) -%}\n with relation as (\n select\n pg_rewrite.ev_class as class,\n pg_rewrite.oid as id\n from pg_rewrite\n ),\n class as (\n select\n oid as id,\n relname as name,\n relnamespace as schema,\n relkind as kind\n from pg_class\n ),\n dependency as (\n select distinct\n pg_depend.objid as id,\n pg_depend.refobjid as ref\n from pg_depend\n ),\n schema as (\n select\n pg_namespace.oid as id,\n pg_namespace.nspname as name\n from pg_namespace\n where nspname != 'information_schema' and nspname not like 'pg\\_%'\n ),\n referenced as (\n select\n relation.id AS id,\n referenced_class.name ,\n referenced_class.schema ,\n referenced_class.kind\n from relation\n join class as referenced_class on relation.class=referenced_class.id\n where referenced_class.kind in ('r', 'v', 'm')\n ),\n relationships as (\n select\n referenced.name as referenced_name,\n referenced.schema as referenced_schema_id,\n dependent_class.name as dependent_name,\n dependent_class.schema as dependent_schema_id,\n referenced.kind as kind\n from referenced\n join dependency on referenced.id=dependency.id\n join class as dependent_class on dependency.ref=dependent_class.id\n where\n (referenced.name != dependent_class.name or\n referenced.schema != dependent_class.schema)\n )\n\n select\n referenced_schema.name as referenced_schema,\n relationships.referenced_name as referenced_name,\n dependent_schema.name as dependent_schema,\n relationships.dependent_name as dependent_name\n from relationships\n join schema as dependent_schema on relationships.dependent_schema_id=dependent_schema.id\n join schema as referenced_schema on relationships.referenced_schema_id=referenced_schema.id\n group by referenced_schema, referenced_name, dependent_schema, dependent_name\n order by referenced_schema, referenced_name, dependent_schema, dependent_name;\n\n {%- endcall -%}\n\n {{ return(load_result('relations').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.088841, "supported_languages": null}, "macro.dbt_postgres.postgres_get_relations": {"name": "postgres_get_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "unique_id": "macro.dbt_postgres.postgres_get_relations", "macro_sql": "{% macro postgres_get_relations() %}\n {{ return(postgres__get_relations()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.0890062, "supported_languages": null}, "macro.dbt_postgres.postgres__create_table_as": {"name": "postgres__create_table_as", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__create_table_as", "macro_sql": "{% macro postgres__create_table_as(temporary, relation, sql) -%}\n {%- set unlogged = config.get('unlogged', default=false) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create {% if temporary -%}\n temporary\n {%- elif unlogged -%}\n unlogged\n {%- endif %} table {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {% endif -%}\n {% if contract_config.enforced and (not temporary) -%}\n {{ get_table_columns_and_constraints() }} ;\n insert into {{ relation }} (\n {{ adapter.dispatch('get_column_names', 'dbt')() }}\n )\n {%- set sql = get_select_subquery(sql) %}\n {% else %}\n as\n {% endif %}\n (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.default__get_column_names", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.097128, "supported_languages": null}, "macro.dbt_postgres.postgres__get_create_index_sql": {"name": "postgres__get_create_index_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_create_index_sql", "macro_sql": "{% macro postgres__get_create_index_sql(relation, index_dict) -%}\n {%- set index_config = adapter.parse_index(index_dict) -%}\n {%- set comma_separated_columns = \", \".join(index_config.columns) -%}\n {%- set index_name = index_config.render(relation) -%}\n\n create {% if index_config.unique -%}\n unique\n {%- endif %} index if not exists\n \"{{ index_name }}\"\n on {{ relation }} {% if index_config.type -%}\n using {{ index_config.type }}\n {%- endif %}\n ({{ comma_separated_columns }});\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.0976498, "supported_languages": null}, "macro.dbt_postgres.postgres__create_schema": {"name": "postgres__create_schema", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__create_schema", "macro_sql": "{% macro postgres__create_schema(relation) -%}\n {% if relation.database -%}\n {{ adapter.verify_database(relation.database) }}\n {%- endif -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier().include(database=False) }}\n {%- endcall -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.097952, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_schema": {"name": "postgres__drop_schema", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__drop_schema", "macro_sql": "{% macro postgres__drop_schema(relation) -%}\n {% if relation.database -%}\n {{ adapter.verify_database(relation.database) }}\n {%- endif -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier().include(database=False) }} cascade\n {%- endcall -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.09824, "supported_languages": null}, "macro.dbt_postgres.postgres__get_columns_in_relation": {"name": "postgres__get_columns_in_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_columns_in_relation", "macro_sql": "{% macro postgres__get_columns_in_relation(relation) -%}\n {% call statement('get_columns_in_relation', fetch_result=True) %}\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from {{ relation.information_schema('columns') }}\n where table_name = '{{ relation.identifier }}'\n {% if relation.schema %}\n and table_schema = '{{ relation.schema }}'\n {% endif %}\n order by ordinal_position\n\n {% endcall %}\n {% set table = load_result('get_columns_in_relation').table %}\n {{ return(sql_convert_columns_in_relation(table)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.sql_convert_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.09867, "supported_languages": null}, "macro.dbt_postgres.postgres__list_relations_without_caching": {"name": "postgres__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__list_relations_without_caching", "macro_sql": "{% macro postgres__list_relations_without_caching(schema_relation) %}\n {% call statement('list_relations_without_caching', fetch_result=True) -%}\n select\n '{{ schema_relation.database }}' as database,\n tablename as name,\n schemaname as schema,\n 'table' as type\n from pg_tables\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select\n '{{ schema_relation.database }}' as database,\n viewname as name,\n schemaname as schema,\n 'view' as type\n from pg_views\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select\n '{{ schema_relation.database }}' as database,\n matviewname as name,\n schemaname as schema,\n 'materialized_view' as type\n from pg_matviews\n where schemaname ilike '{{ schema_relation.schema }}'\n {% endcall %}\n {{ return(load_result('list_relations_without_caching').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.099348, "supported_languages": null}, "macro.dbt_postgres.postgres__information_schema_name": {"name": "postgres__information_schema_name", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__information_schema_name", "macro_sql": "{% macro postgres__information_schema_name(database) -%}\n {% if database_name -%}\n {{ adapter.verify_database(database_name) }}\n {%- endif -%}\n information_schema\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.099575, "supported_languages": null}, "macro.dbt_postgres.postgres__list_schemas": {"name": "postgres__list_schemas", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__list_schemas", "macro_sql": "{% macro postgres__list_schemas(database) %}\n {% if database -%}\n {{ adapter.verify_database(database) }}\n {%- endif -%}\n {% call statement('list_schemas', fetch_result=True, auto_begin=False) %}\n select distinct nspname from pg_namespace\n {% endcall %}\n {{ return(load_result('list_schemas').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.0999181, "supported_languages": null}, "macro.dbt_postgres.postgres__check_schema_exists": {"name": "postgres__check_schema_exists", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__check_schema_exists", "macro_sql": "{% macro postgres__check_schema_exists(information_schema, schema) -%}\n {% if information_schema.database -%}\n {{ adapter.verify_database(information_schema.database) }}\n {%- endif -%}\n {% call statement('check_schema_exists', fetch_result=True, auto_begin=False) %}\n select count(*) from pg_namespace where nspname = '{{ schema }}'\n {% endcall %}\n {{ return(load_result('check_schema_exists').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.100297, "supported_languages": null}, "macro.dbt_postgres.postgres__make_relation_with_suffix": {"name": "postgres__make_relation_with_suffix", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_relation_with_suffix", "macro_sql": "{% macro postgres__make_relation_with_suffix(base_relation, suffix, dstring) %}\n {% if dstring %}\n {% set dt = modules.datetime.datetime.now() %}\n {% set dtstring = dt.strftime(\"%H%M%S%f\") %}\n {% set suffix = suffix ~ dtstring %}\n {% endif %}\n {% set suffix_length = suffix|length %}\n {% set relation_max_name_length = base_relation.relation_max_name_length() %}\n {% if suffix_length > relation_max_name_length %}\n {% do exceptions.raise_compiler_error('Relation suffix is too long (' ~ suffix_length ~ ' characters). Maximum length is ' ~ relation_max_name_length ~ ' characters.') %}\n {% endif %}\n {% set identifier = base_relation.identifier[:relation_max_name_length - suffix_length] ~ suffix %}\n\n {{ return(base_relation.incorporate(path={\"identifier\": identifier })) }}\n\n {% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.101154, "supported_languages": null}, "macro.dbt_postgres.postgres__make_intermediate_relation": {"name": "postgres__make_intermediate_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_intermediate_relation", "macro_sql": "{% macro postgres__make_intermediate_relation(base_relation, suffix) %}\n {{ return(postgres__make_relation_with_suffix(base_relation, suffix, dstring=False)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.101366, "supported_languages": null}, "macro.dbt_postgres.postgres__make_temp_relation": {"name": "postgres__make_temp_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_temp_relation", "macro_sql": "{% macro postgres__make_temp_relation(base_relation, suffix) %}\n {% set temp_relation = postgres__make_relation_with_suffix(base_relation, suffix, dstring=True) %}\n {{ return(temp_relation.incorporate(path={\"schema\": none,\n \"database\": none})) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.101679, "supported_languages": null}, "macro.dbt_postgres.postgres__make_backup_relation": {"name": "postgres__make_backup_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_backup_relation", "macro_sql": "{% macro postgres__make_backup_relation(base_relation, backup_relation_type, suffix) %}\n {% set backup_relation = postgres__make_relation_with_suffix(base_relation, suffix, dstring=False) %}\n {{ return(backup_relation.incorporate(type=backup_relation_type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1019452, "supported_languages": null}, "macro.dbt_postgres.postgres_escape_comment": {"name": "postgres_escape_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres_escape_comment", "macro_sql": "{% macro postgres_escape_comment(comment) -%}\n {% if comment is not string %}\n {% do exceptions.raise_compiler_error('cannot escape a non-string: ' ~ comment) %}\n {% endif %}\n {%- set magic = '$dbt_comment_literal_block$' -%}\n {%- if magic in comment -%}\n {%- do exceptions.raise_compiler_error('The string ' ~ magic ~ ' is not allowed in comments.') -%}\n {%- endif -%}\n {{ magic }}{{ comment }}{{ magic }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.102484, "supported_languages": null}, "macro.dbt_postgres.postgres__alter_relation_comment": {"name": "postgres__alter_relation_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__alter_relation_comment", "macro_sql": "{% macro postgres__alter_relation_comment(relation, comment) %}\n {% set escaped_comment = postgres_escape_comment(comment) %}\n comment on {{ relation.type }} {{ relation }} is {{ escaped_comment }};\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.102731, "supported_languages": null}, "macro.dbt_postgres.postgres__alter_column_comment": {"name": "postgres__alter_column_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__alter_column_comment", "macro_sql": "{% macro postgres__alter_column_comment(relation, column_dict) %}\n {% set existing_columns = adapter.get_columns_in_relation(relation) | map(attribute=\"name\") | list %}\n {% for column_name in column_dict if (column_name in existing_columns) %}\n {% set comment = column_dict[column_name]['description'] %}\n {% set escaped_comment = postgres_escape_comment(comment) %}\n comment on column {{ relation }}.{{ adapter.quote(column_name) if column_dict[column_name]['quote'] else column_name }} is {{ escaped_comment }};\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.103284, "supported_languages": null}, "macro.dbt_postgres.postgres__get_show_grant_sql": {"name": "postgres__get_show_grant_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_show_grant_sql", "macro_sql": "\n\n{%- macro postgres__get_show_grant_sql(relation) -%}\n select grantee, privilege_type\n from {{ relation.information_schema('role_table_grants') }}\n where grantor = current_role\n and grantee != current_role\n and table_schema = '{{ relation.schema }}'\n and table_name = '{{ relation.identifier }}'\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.103474, "supported_languages": null}, "macro.dbt_postgres.postgres__copy_grants": {"name": "postgres__copy_grants", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__copy_grants", "macro_sql": "{% macro postgres__copy_grants() %}\n {{ return(False) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.103578, "supported_languages": null}, "macro.dbt_postgres.postgres__get_show_indexes_sql": {"name": "postgres__get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_show_indexes_sql", "macro_sql": "{% macro postgres__get_show_indexes_sql(relation) %}\n select\n i.relname as name,\n m.amname as method,\n ix.indisunique as \"unique\",\n array_to_string(array_agg(a.attname), ',') as column_names\n from pg_index ix\n join pg_class i\n on i.oid = ix.indexrelid\n join pg_am m\n on m.oid=i.relam\n join pg_class t\n on t.oid = ix.indrelid\n join pg_namespace n\n on n.oid = t.relnamespace\n join pg_attribute a\n on a.attrelid = t.oid\n and a.attnum = ANY(ix.indkey)\n where t.relname = '{{ relation.identifier }}'\n and n.nspname = '{{ relation.schema }}'\n and t.relkind in ('r', 'm')\n group by 1, 2, 3\n order by 1, 2, 3\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.103743, "supported_languages": null}, "macro.dbt_postgres.postgres__get_drop_index_sql": {"name": "postgres__get_drop_index_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_drop_index_sql", "macro_sql": "\n\n\n{%- macro postgres__get_drop_index_sql(relation, index_name) -%}\n drop index if exists \"{{ relation.schema }}\".\"{{ index_name }}\"\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.103868, "supported_languages": null}, "macro.dbt_postgres.postgres__get_incremental_default_sql": {"name": "postgres__get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/incremental_strategies.sql", "original_file_path": "macros/materializations/incremental_strategies.sql", "unique_id": "macro.dbt_postgres.postgres__get_incremental_default_sql", "macro_sql": "{% macro postgres__get_incremental_default_sql(arg_dict) %}\n\n {% if arg_dict[\"unique_key\"] %}\n {% do return(get_incremental_delete_insert_sql(arg_dict)) %}\n {% else %}\n {% do return(get_incremental_append_sql(arg_dict)) %}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_delete_insert_sql", "macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.104246, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_merge_sql": {"name": "postgres__snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshot_merge.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_merge_sql", "macro_sql": "{% macro postgres__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n update {{ target }}\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_scd_id::text = {{ target }}.dbt_scd_id::text\n and DBT_INTERNAL_SOURCE.dbt_change_type::text in ('update'::text, 'delete'::text)\n and {{ target }}.dbt_valid_to is null;\n\n insert into {{ target }} ({{ insert_cols_csv }})\n select {% for column in insert_cols -%}\n DBT_INTERNAL_SOURCE.{{ column }} {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_change_type::text = 'insert'::text;\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1049411, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_materialized_view": {"name": "postgres__drop_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_materialized_view", "macro_sql": "{% macro postgres__drop_materialized_view(relation) -%}\n drop materialized view if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.105085, "supported_languages": null}, "macro.dbt_postgres.postgres__describe_materialized_view": {"name": "postgres__describe_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/describe.sql", "original_file_path": "macros/relations/materialized_view/describe.sql", "unique_id": "macro.dbt_postgres.postgres__describe_materialized_view", "macro_sql": "{% macro postgres__describe_materialized_view(relation) %}\n -- for now just get the indexes, we don't need the name or the query yet\n {% set _indexes = run_query(get_show_indexes_sql(relation)) %}\n {% do return({'indexes': _indexes}) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.get_show_indexes_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.105369, "supported_languages": null}, "macro.dbt_postgres.postgres__refresh_materialized_view": {"name": "postgres__refresh_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt_postgres.postgres__refresh_materialized_view", "macro_sql": "{% macro postgres__refresh_materialized_view(relation) %}\n refresh materialized view {{ relation }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1054971, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_materialized_view_sql": {"name": "postgres__get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_materialized_view_sql", "macro_sql": "{% macro postgres__get_rename_materialized_view_sql(relation, new_name) %}\n alter materialized view {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1056588, "supported_languages": null}, "macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql": {"name": "postgres__get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql", "macro_sql": "{% macro postgres__get_alter_materialized_view_as_sql(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n) %}\n\n -- apply a full refresh immediately if needed\n {% if configuration_changes.requires_full_refresh %}\n\n {{ get_replace_sql(existing_relation, relation, sql) }}\n\n -- otherwise apply individual changes as needed\n {% else %}\n\n {{ postgres__update_indexes_on_materialized_view(relation, configuration_changes.indexes) }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_replace_sql", "macro.dbt_postgres.postgres__update_indexes_on_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.106554, "supported_languages": null}, "macro.dbt_postgres.postgres__update_indexes_on_materialized_view": {"name": "postgres__update_indexes_on_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__update_indexes_on_materialized_view", "macro_sql": "\n\n\n{%- macro postgres__update_indexes_on_materialized_view(relation, index_changes) -%}\n {{- log(\"Applying UPDATE INDEXES to: \" ~ relation) -}}\n\n {%- for _index_change in index_changes -%}\n {%- set _index = _index_change.context -%}\n\n {%- if _index_change.action == \"drop\" -%}\n\n {{ postgres__get_drop_index_sql(relation, _index.name) }};\n\n {%- elif _index_change.action == \"create\" -%}\n\n {{ postgres__get_create_index_sql(relation, _index.as_node_config) }}\n\n {%- endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_drop_index_sql", "macro.dbt_postgres.postgres__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.106997, "supported_languages": null}, "macro.dbt_postgres.postgres__get_materialized_view_configuration_changes": {"name": "postgres__get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__get_materialized_view_configuration_changes", "macro_sql": "{% macro postgres__get_materialized_view_configuration_changes(existing_relation, new_config) %}\n {% set _existing_materialized_view = postgres__describe_materialized_view(existing_relation) %}\n {% set _configuration_changes = existing_relation.get_materialized_view_config_change_collection(_existing_materialized_view, new_config) %}\n {% do return(_configuration_changes) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__describe_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1072571, "supported_languages": null}, "macro.dbt_postgres.postgres__get_create_materialized_view_as_sql": {"name": "postgres__get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt_postgres.postgres__get_create_materialized_view_as_sql", "macro_sql": "{% macro postgres__get_create_materialized_view_as_sql(relation, sql) %}\n create materialized view if not exists {{ relation }} as {{ sql }};\n\n {% for _index_dict in config.get('indexes', []) -%}\n {{- get_create_index_sql(relation, _index_dict) -}}\n {%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.107598, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_table": {"name": "postgres__drop_table", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_table", "macro_sql": "{% macro postgres__drop_table(relation) -%}\n drop table if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1077278, "supported_languages": null}, "macro.dbt_postgres.postgres__get_replace_table_sql": {"name": "postgres__get_replace_table_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt_postgres.postgres__get_replace_table_sql", "macro_sql": "{% macro postgres__get_replace_table_sql(relation, sql) -%}\n\n {%- set sql_header = config.get('sql_header', none) -%}\n {{ sql_header if sql_header is not none }}\n\n create or replace table {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {{ get_table_columns_and_constraints() }}\n {%- set sql = get_select_subquery(sql) %}\n {% endif %}\n as (\n {{ sql }}\n );\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.108358, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_table_sql": {"name": "postgres__get_rename_table_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_table_sql", "macro_sql": "{% macro postgres__get_rename_table_sql(relation, new_name) %}\n alter table {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1085172, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_view": {"name": "postgres__drop_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_view", "macro_sql": "{% macro postgres__drop_view(relation) -%}\n drop view if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.108639, "supported_languages": null}, "macro.dbt_postgres.postgres__get_replace_view_sql": {"name": "postgres__get_replace_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt_postgres.postgres__get_replace_view_sql", "macro_sql": "{% macro postgres__get_replace_view_sql(relation, sql) -%}\n\n {%- set sql_header = config.get('sql_header', none) -%}\n {{ sql_header if sql_header is not none }}\n\n create or replace view {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {%- endif %}\n as (\n {{ sql }}\n );\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.109175, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_view_sql": {"name": "postgres__get_rename_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_view_sql", "macro_sql": "{% macro postgres__get_rename_view_sql(relation, new_name) %}\n alter view {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.109338, "supported_languages": null}, "macro.dbt_postgres.postgres__dateadd": {"name": "postgres__dateadd", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt_postgres.postgres__dateadd", "macro_sql": "{% macro postgres__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {{ from_date_or_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1095319, "supported_languages": null}, "macro.dbt_postgres.postgres__listagg": {"name": "postgres__listagg", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt_postgres.postgres__listagg", "macro_sql": "{% macro postgres__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n array_to_string(\n (array_agg(\n {{ measure }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n ))[1:{{ limit_num }}],\n {{ delimiter_text }}\n )\n {%- else %}\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n )\n {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.11009, "supported_languages": null}, "macro.dbt_postgres.postgres__datediff": {"name": "postgres__datediff", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt_postgres.postgres__datediff", "macro_sql": "{% macro postgres__datediff(first_date, second_date, datepart) -%}\n\n {% if datepart == 'year' %}\n (date_part('year', ({{second_date}})::date) - date_part('year', ({{first_date}})::date))\n {% elif datepart == 'quarter' %}\n ({{ datediff(first_date, second_date, 'year') }} * 4 + date_part('quarter', ({{second_date}})::date) - date_part('quarter', ({{first_date}})::date))\n {% elif datepart == 'month' %}\n ({{ datediff(first_date, second_date, 'year') }} * 12 + date_part('month', ({{second_date}})::date) - date_part('month', ({{first_date}})::date))\n {% elif datepart == 'day' %}\n (({{second_date}})::date - ({{first_date}})::date)\n {% elif datepart == 'week' %}\n ({{ datediff(first_date, second_date, 'day') }} / 7 + case\n when date_part('dow', ({{first_date}})::timestamp) <= date_part('dow', ({{second_date}})::timestamp) then\n case when {{first_date}} <= {{second_date}} then 0 else -1 end\n else\n case when {{first_date}} <= {{second_date}} then 1 else 0 end\n end)\n {% elif datepart == 'hour' %}\n ({{ datediff(first_date, second_date, 'day') }} * 24 + date_part('hour', ({{second_date}})::timestamp) - date_part('hour', ({{first_date}})::timestamp))\n {% elif datepart == 'minute' %}\n ({{ datediff(first_date, second_date, 'hour') }} * 60 + date_part('minute', ({{second_date}})::timestamp) - date_part('minute', ({{first_date}})::timestamp))\n {% elif datepart == 'second' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60 + floor(date_part('second', ({{second_date}})::timestamp)) - floor(date_part('second', ({{first_date}})::timestamp)))\n {% elif datepart == 'millisecond' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60000 + floor(date_part('millisecond', ({{second_date}})::timestamp)) - floor(date_part('millisecond', ({{first_date}})::timestamp)))\n {% elif datepart == 'microsecond' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60000000 + floor(date_part('microsecond', ({{second_date}})::timestamp)) - floor(date_part('microsecond', ({{first_date}})::timestamp)))\n {% else %}\n {{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in postgres: {!r}\".format(datepart)) }}\n {% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1133142, "supported_languages": null}, "macro.dbt_postgres.postgres__any_value": {"name": "postgres__any_value", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt_postgres.postgres__any_value", "macro_sql": "{% macro postgres__any_value(expression) -%}\n\n min({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.113527, "supported_languages": null}, "macro.dbt_postgres.postgres__last_day": {"name": "postgres__last_day", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt_postgres.postgres__last_day", "macro_sql": "{% macro postgres__last_day(date, datepart) -%}\n\n {%- if datepart == 'quarter' -%}\n -- postgres dateadd does not support quarter interval.\n cast(\n {{dbt.dateadd('day', '-1',\n dbt.dateadd('month', '3', dbt.date_trunc(datepart, date))\n )}}\n as date)\n {%- else -%}\n {{dbt.default_last_day(date, datepart)}}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc", "macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1141272, "supported_languages": null}, "macro.dbt_postgres.postgres__split_part": {"name": "postgres__split_part", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt_postgres.postgres__split_part", "macro_sql": "{% macro postgres__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n {{ dbt.default__split_part(string_text, delimiter_text, part_number) }}\n {% else %}\n {{ dbt._split_part_negative(string_text, delimiter_text, part_number) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__split_part", "macro.dbt._split_part_negative"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.114531, "supported_languages": null}, "macro.dbt.run_hooks": {"name": "run_hooks", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.run_hooks", "macro_sql": "{% macro run_hooks(hooks, inside_transaction=True) %}\n {% for hook in hooks | selectattr('transaction', 'equalto', inside_transaction) %}\n {% if not inside_transaction and loop.first %}\n {% call statement(auto_begin=inside_transaction) %}\n commit;\n {% endcall %}\n {% endif %}\n {% set rendered = render(hook.get('sql')) | trim %}\n {% if (rendered | length) > 0 %}\n {% call statement(auto_begin=inside_transaction) %}\n {{ rendered }}\n {% endcall %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.115524, "supported_languages": null}, "macro.dbt.make_hook_config": {"name": "make_hook_config", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.11571, "supported_languages": null}, "macro.dbt.before_begin": {"name": "before_begin", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.before_begin", "macro_sql": "{% macro before_begin(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.11584, "supported_languages": null}, "macro.dbt.in_transaction": {"name": "in_transaction", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1159658, "supported_languages": null}, "macro.dbt.after_commit": {"name": "after_commit", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.after_commit", "macro_sql": "{% macro after_commit(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.116093, "supported_languages": null}, "macro.dbt.set_sql_header": {"name": "set_sql_header", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.116425, "supported_languages": null}, "macro.dbt.should_full_refresh": {"name": "should_full_refresh", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.should_full_refresh", "macro_sql": "{% macro should_full_refresh() %}\n {% set config_full_refresh = config.get('full_refresh') %}\n {% if config_full_refresh is none %}\n {% set config_full_refresh = flags.FULL_REFRESH %}\n {% endif %}\n {% do return(config_full_refresh) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.116695, "supported_languages": null}, "macro.dbt.should_store_failures": {"name": "should_store_failures", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.should_store_failures", "macro_sql": "{% macro should_store_failures() %}\n {% set config_store_failures = config.get('store_failures') %}\n {% if config_store_failures is none %}\n {% set config_store_failures = flags.STORE_FAILURES %}\n {% endif %}\n {% do return(config_store_failures) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.116967, "supported_languages": null}, "macro.dbt.snapshot_merge_sql": {"name": "snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "unique_id": "macro.dbt.snapshot_merge_sql", "macro_sql": "{% macro snapshot_merge_sql(target, source, insert_cols) -%}\n {{ adapter.dispatch('snapshot_merge_sql', 'dbt')(target, source, insert_cols) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.117374, "supported_languages": null}, "macro.dbt.default__snapshot_merge_sql": {"name": "default__snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "unique_id": "macro.dbt.default__snapshot_merge_sql", "macro_sql": "{% macro default__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.dbt_scd_id = DBT_INTERNAL_DEST.dbt_scd_id\n\n when matched\n and DBT_INTERNAL_DEST.dbt_valid_to is null\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n\n when not matched\n and DBT_INTERNAL_SOURCE.dbt_change_type = 'insert'\n then insert ({{ insert_cols_csv }})\n values ({{ insert_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1176279, "supported_languages": null}, "macro.dbt.strategy_dispatch": {"name": "strategy_dispatch", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.strategy_dispatch", "macro_sql": "{% macro strategy_dispatch(name) -%}\n{% set original_name = name %}\n {% if '.' in name %}\n {% set package_name, name = name.split(\".\", 1) %}\n {% else %}\n {% set package_name = none %}\n {% endif %}\n\n {% if package_name is none %}\n {% set package_context = context %}\n {% elif package_name in context %}\n {% set package_context = context[package_name] %}\n {% else %}\n {% set error_msg %}\n Could not find package '{{package_name}}', called with '{{original_name}}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n\n {%- set search_name = 'snapshot_' ~ name ~ '_strategy' -%}\n\n {% if search_name not in package_context %}\n {% set error_msg %}\n The specified strategy macro '{{name}}' was not found in package '{{ package_name }}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n {{ return(package_context[search_name]) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.121374, "supported_languages": null}, "macro.dbt.snapshot_hash_arguments": {"name": "snapshot_hash_arguments", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n {{ adapter.dispatch('snapshot_hash_arguments', 'dbt')(args) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.12156, "supported_languages": null}, "macro.dbt.default__snapshot_hash_arguments": {"name": "default__snapshot_hash_arguments", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.default__snapshot_hash_arguments", "macro_sql": "{% macro default__snapshot_hash_arguments(args) -%}\n md5({%- for arg in args -%}\n coalesce(cast({{ arg }} as varchar ), '')\n {% if not loop.last %} || '|' || {% endif %}\n {%- endfor -%})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.121776, "supported_languages": null}, "macro.dbt.snapshot_timestamp_strategy": {"name": "snapshot_timestamp_strategy", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_timestamp_strategy", "macro_sql": "{% macro snapshot_timestamp_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set primary_key = config['unique_key'] %}\n {% set updated_at = config['updated_at'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n\n {#/*\n The snapshot relation might not have an {{ updated_at }} value if the\n snapshot strategy is changed from `check` to `timestamp`. We\n should use a dbt-created column for the comparison in the snapshot\n table instead of assuming that the user-supplied {{ updated_at }}\n will be present in the historical data.\n\n See https://github.com/dbt-labs/dbt-core/issues/2350\n */ #}\n {% set row_changed_expr -%}\n ({{ snapshotted_rel }}.dbt_valid_from < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.122467, "supported_languages": null}, "macro.dbt.snapshot_string_as_time": {"name": "snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n {{ adapter.dispatch('snapshot_string_as_time', 'dbt')(timestamp) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1226392, "supported_languages": null}, "macro.dbt.default__snapshot_string_as_time": {"name": "default__snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.default__snapshot_string_as_time", "macro_sql": "{% macro default__snapshot_string_as_time(timestamp) %}\n {% do exceptions.raise_not_implemented(\n 'snapshot_string_as_time macro not implemented for adapter '+adapter.type()\n ) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1228049, "supported_languages": null}, "macro.dbt.snapshot_check_all_get_existing_columns": {"name": "snapshot_check_all_get_existing_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "macro_sql": "{% macro snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) -%}\n {%- if not target_exists -%}\n {#-- no table yet -> return whatever the query does --#}\n {{ return((false, query_columns)) }}\n {%- endif -%}\n\n {#-- handle any schema changes --#}\n {%- set target_relation = adapter.get_relation(database=node.database, schema=node.schema, identifier=node.alias) -%}\n\n {% if check_cols_config == 'all' %}\n {%- set query_columns = get_columns_in_query(node['compiled_code']) -%}\n\n {% elif check_cols_config is iterable and (check_cols_config | length) > 0 %}\n {#-- query for proper casing/quoting, to support comparison below --#}\n {%- set select_check_cols_from_target -%}\n {#-- N.B. The whitespace below is necessary to avoid edge case issue with comments --#}\n {#-- See: https://github.com/dbt-labs/dbt-core/issues/6781 --#}\n select {{ check_cols_config | join(', ') }} from (\n {{ node['compiled_code'] }}\n ) subq\n {%- endset -%}\n {% set query_columns = get_columns_in_query(select_check_cols_from_target) %}\n\n {% else %}\n {% do exceptions.raise_compiler_error(\"Invalid value for 'check_cols': \" ~ check_cols_config) %}\n {% endif %}\n\n {%- set existing_cols = adapter.get_columns_in_relation(target_relation) | map(attribute = 'name') | list -%}\n {%- set ns = namespace() -%} {#-- handle for-loop scoping with a namespace --#}\n {%- set ns.column_added = false -%}\n\n {%- set intersection = [] -%}\n {%- for col in query_columns -%}\n {%- if col in existing_cols -%}\n {%- do intersection.append(adapter.quote(col)) -%}\n {%- else -%}\n {% set ns.column_added = true %}\n {%- endif -%}\n {%- endfor -%}\n {{ return((ns.column_added, intersection)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.124077, "supported_languages": null}, "macro.dbt.snapshot_check_strategy": {"name": "snapshot_check_strategy", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_check_strategy", "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set check_cols_config = config['check_cols'] %}\n {% set primary_key = config['unique_key'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n {% set updated_at = config.get('updated_at', snapshot_get_time()) %}\n\n {% set column_added = false %}\n\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n {{ get_true_sql() }}\n {%- else -%}\n {%- for col in check_cols -%}\n {{ snapshotted_rel }}.{{ col }} != {{ current_rel }}.{{ col }}\n or\n (\n (({{ snapshotted_rel }}.{{ col }} is null) and not ({{ current_rel }}.{{ col }} is null))\n or\n ((not {{ snapshotted_rel }}.{{ col }} is null) and ({{ current_rel }}.{{ col }} is null))\n )\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n {%- endif -%}\n )\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt.snapshot_check_all_get_existing_columns", "macro.dbt.get_true_sql", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.125311, "supported_languages": null}, "macro.dbt.create_columns": {"name": "create_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n {{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1288772, "supported_languages": null}, "macro.dbt.default__create_columns": {"name": "default__create_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__create_columns", "macro_sql": "{% macro default__create_columns(relation, columns) %}\n {% for column in columns %}\n {% call statement() %}\n alter table {{ relation }} add column \"{{ column.name }}\" {{ column.data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.129233, "supported_languages": null}, "macro.dbt.post_snapshot": {"name": "post_snapshot", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n {{ adapter.dispatch('post_snapshot', 'dbt')(staging_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1294012, "supported_languages": null}, "macro.dbt.default__post_snapshot": {"name": "default__post_snapshot", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n {# no-op #}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.129486, "supported_languages": null}, "macro.dbt.get_true_sql": {"name": "get_true_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_true_sql", "macro_sql": "{% macro get_true_sql() %}\n {{ adapter.dispatch('get_true_sql', 'dbt')() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_true_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.129622, "supported_languages": null}, "macro.dbt.default__get_true_sql": {"name": "default__get_true_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__get_true_sql", "macro_sql": "{% macro default__get_true_sql() %}\n {{ return('TRUE') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1297312, "supported_languages": null}, "macro.dbt.snapshot_staging_table": {"name": "snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.snapshot_staging_table", "macro_sql": "{% macro snapshot_staging_table(strategy, source_sql, target_relation) -%}\n {{ adapter.dispatch('snapshot_staging_table', 'dbt')(strategy, source_sql, target_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__snapshot_staging_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.12992, "supported_languages": null}, "macro.dbt.default__snapshot_staging_table": {"name": "default__snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__snapshot_staging_table", "macro_sql": "{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}\n\n with snapshot_query as (\n\n {{ source_sql }}\n\n ),\n\n snapshotted_data as (\n\n select *,\n {{ strategy.unique_key }} as dbt_unique_key\n\n from {{ target_relation }}\n where dbt_valid_to is null\n\n ),\n\n insertions_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to,\n {{ strategy.scd_id }} as dbt_scd_id\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n {{ strategy.updated_at }} as dbt_valid_to\n\n from snapshot_query\n ),\n\n {%- if strategy.invalidate_hard_deletes %}\n\n deletes_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key\n from snapshot_query\n ),\n {% endif %}\n\n insertions as (\n\n select\n 'insert' as dbt_change_type,\n source_data.*\n\n from insertions_source_data as source_data\n left outer join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where snapshotted_data.dbt_unique_key is null\n or (\n snapshotted_data.dbt_unique_key is not null\n and (\n {{ strategy.row_changed }}\n )\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.dbt_scd_id\n\n from updates_source_data as source_data\n join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where (\n {{ strategy.row_changed }}\n )\n )\n\n {%- if strategy.invalidate_hard_deletes -%}\n ,\n\n deletes as (\n\n select\n 'delete' as dbt_change_type,\n source_data.*,\n {{ snapshot_get_time() }} as dbt_valid_from,\n {{ snapshot_get_time() }} as dbt_updated_at,\n {{ snapshot_get_time() }} as dbt_valid_to,\n snapshotted_data.dbt_scd_id\n\n from snapshotted_data\n left join deletes_source_data as source_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where source_data.dbt_unique_key is null\n )\n {%- endif %}\n\n select * from insertions\n union all\n select * from updates\n {%- if strategy.invalidate_hard_deletes %}\n union all\n select * from deletes\n {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1307461, "supported_languages": null}, "macro.dbt.build_snapshot_table": {"name": "build_snapshot_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.build_snapshot_table", "macro_sql": "{% macro build_snapshot_table(strategy, sql) -%}\n {{ adapter.dispatch('build_snapshot_table', 'dbt')(strategy, sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__build_snapshot_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.130928, "supported_languages": null}, "macro.dbt.default__build_snapshot_table": {"name": "default__build_snapshot_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__build_snapshot_table", "macro_sql": "{% macro default__build_snapshot_table(strategy, sql) %}\n\n select *,\n {{ strategy.scd_id }} as dbt_scd_id,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1311638, "supported_languages": null}, "macro.dbt.build_snapshot_staging_table": {"name": "build_snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.build_snapshot_staging_table", "macro_sql": "{% macro build_snapshot_staging_table(strategy, sql, target_relation) %}\n {% set temp_relation = make_temp_relation(target_relation) %}\n\n {% set select = snapshot_staging_table(strategy, sql, target_relation) %}\n\n {% call statement('build_snapshot_staging_relation') %}\n {{ create_table_as(True, temp_relation, select) }}\n {% endcall %}\n\n {% do return(temp_relation) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_temp_relation", "macro.dbt.snapshot_staging_table", "macro.dbt.statement", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1315699, "supported_languages": null}, "macro.dbt.materialization_snapshot_default": {"name": "materialization_snapshot_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot.sql", "original_file_path": "macros/materializations/snapshots/snapshot.sql", "unique_id": "macro.dbt.materialization_snapshot_default", "macro_sql": "{% materialization snapshot, default %}\n {%- set config = model['config'] -%}\n\n {%- set target_table = model.get('alias', model.get('name')) -%}\n\n {%- set strategy_name = config.get('strategy') -%}\n {%- set unique_key = config.get('unique_key') %}\n -- grab current tables grants config for comparision later on\n {%- set grant_config = config.get('grants') -%}\n\n {% set target_relation_exists, target_relation = get_or_create_relation(\n database=model.database,\n schema=model.schema,\n identifier=target_table,\n type='table') -%}\n\n {%- if not target_relation.is_table -%}\n {% do exceptions.relation_wrong_type(target_relation, 'table') %}\n {%- endif -%}\n\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set strategy_macro = strategy_dispatch(strategy_name) %}\n {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", config, target_relation_exists) %}\n\n {% if not target_relation_exists %}\n\n {% set build_sql = build_snapshot_table(strategy, model['compiled_code']) %}\n {% set final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {{ adapter.valid_snapshot_target(target_relation) }}\n\n {% set staging_table = build_snapshot_staging_table(strategy, sql, target_relation) %}\n\n -- this may no-op if the database does not require column expansion\n {% do adapter.expand_target_column_types(from_relation=staging_table,\n to_relation=target_relation) %}\n\n {% set missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% do create_columns(target_relation, missing_columns) %}\n\n {% set source_columns = adapter.get_columns_in_relation(staging_table)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% set quoted_source_columns = [] %}\n {% for column in source_columns %}\n {% do quoted_source_columns.append(adapter.quote(column.name)) %}\n {% endfor %}\n\n {% set final_sql = snapshot_merge_sql(\n target = target_relation,\n source = staging_table,\n insert_cols = quoted_source_columns\n )\n %}\n\n {% endif %}\n\n {% call statement('main') %}\n {{ final_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(target_relation_exists, full_refresh_mode=False) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if not target_relation_exists %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {% if staging_table is defined %}\n {% do post_snapshot(staging_table) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.get_or_create_relation", "macro.dbt.run_hooks", "macro.dbt.strategy_dispatch", "macro.dbt.build_snapshot_table", "macro.dbt.create_table_as", "macro.dbt.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes", "macro.dbt.post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.137138, "supported_languages": ["sql"]}, "macro.dbt.materialization_test_default": {"name": "materialization_test_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "unique_id": "macro.dbt.materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\n\n {% if should_store_failures() %}\n\n {% set identifier = model['alias'] %}\n {% set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n {% set store_failures_as = config.get('store_failures_as') %}\n -- if `--store-failures` is invoked via command line and `store_failures_as` is not set,\n -- config.get('store_failures_as', 'table') returns None, not 'table'\n {% if store_failures_as == none %}{% set store_failures_as = 'table' %}{% endif %}\n {% if store_failures_as not in ['table', 'view'] %}\n {{ exceptions.raise_compiler_error(\n \"'\" ~ store_failures_as ~ \"' is not a valid value for `store_failures_as`. \"\n \"Accepted values are: ['ephemeral', 'table', 'view']\"\n ) }}\n {% endif %}\n\n {% set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database, type=store_failures_as) -%} %}\n\n {% if old_relation %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n\n {% call statement(auto_begin=True) %}\n {{ get_create_sql(target_relation, sql) }}\n {% endcall %}\n\n {% do relations.append(target_relation) %}\n\n {% set main_sql %}\n select *\n from {{ target_relation }}\n {% endset %}\n\n {{ adapter.commit() }}\n\n {% else %}\n\n {% set main_sql = sql %}\n\n {% endif %}\n\n {% set limit = config.get('limit') %}\n {% set fail_calc = config.get('fail_calc') %}\n {% set warn_if = config.get('warn_if') %}\n {% set error_if = config.get('error_if') %}\n\n {% call statement('main', fetch_result=True) -%}\n\n {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit)}}\n\n {%- endcall %}\n\n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.should_store_failures", "macro.dbt.statement", "macro.dbt.get_create_sql", "macro.dbt.get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.139631, "supported_languages": ["sql"]}, "macro.dbt.get_test_sql": {"name": "get_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.get_test_sql", "macro_sql": "{% macro get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n {{ adapter.dispatch('get_test_sql', 'dbt')(main_sql, fail_calc, warn_if, error_if, limit) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.140061, "supported_languages": null}, "macro.dbt.default__get_test_sql": {"name": "default__get_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.default__get_test_sql", "macro_sql": "{% macro default__get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n select\n {{ fail_calc }} as failures,\n {{ fail_calc }} {{ warn_if }} as should_warn,\n {{ fail_calc }} {{ error_if }} as should_error\n from (\n {{ main_sql }}\n {{ \"limit \" ~ limit if limit != none }}\n ) dbt_internal_test\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.140348, "supported_languages": null}, "macro.dbt.get_where_subquery": {"name": "get_where_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "unique_id": "macro.dbt.get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.140686, "supported_languages": null}, "macro.dbt.default__get_where_subquery": {"name": "default__get_where_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "unique_id": "macro.dbt.default__get_where_subquery", "macro_sql": "{% macro default__get_where_subquery(relation) -%}\n {% set where = config.get('where', '') %}\n {% if where %}\n {%- set filtered -%}\n (select * from {{ relation }} where {{ where }}) dbt_subquery\n {%- endset -%}\n {% do return(filtered) %}\n {%- else -%}\n {% do return(relation) %}\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.141022, "supported_languages": null}, "macro.dbt.materialization_materialized_view_default": {"name": "materialization_materialized_view_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialization_materialized_view_default", "macro_sql": "{% materialization materialized_view, default %}\n {% set existing_relation = load_cached_relation(this) %}\n {% set target_relation = this.incorporate(type=this.MaterializedView) %}\n {% set intermediate_relation = make_intermediate_relation(target_relation) %}\n {% set backup_relation_type = target_relation.MaterializedView if existing_relation is none else existing_relation.type %}\n {% set backup_relation = make_backup_relation(target_relation, backup_relation_type) %}\n\n {{ materialized_view_setup(backup_relation, intermediate_relation, pre_hooks) }}\n\n {% set build_sql = materialized_view_get_build_sql(existing_relation, target_relation, backup_relation, intermediate_relation) %}\n\n {% if build_sql == '' %}\n {{ materialized_view_execute_no_op(target_relation) }}\n {% else %}\n {{ materialized_view_execute_build_sql(build_sql, existing_relation, target_relation, post_hooks) }}\n {% endif %}\n\n {{ materialized_view_teardown(backup_relation, intermediate_relation, post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.materialized_view_setup", "macro.dbt.materialized_view_get_build_sql", "macro.dbt.materialized_view_execute_no_op", "macro.dbt.materialized_view_execute_build_sql", "macro.dbt.materialized_view_teardown"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.145341, "supported_languages": ["sql"]}, "macro.dbt.materialized_view_setup": {"name": "materialized_view_setup", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_setup", "macro_sql": "{% macro materialized_view_setup(backup_relation, intermediate_relation, pre_hooks) %}\n\n -- backup_relation and intermediate_relation should not already exist in the database\n -- it's possible these exist because of a previous run that exited unexpectedly\n {% set preexisting_backup_relation = load_cached_relation(backup_relation) %}\n {% set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) %}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.145716, "supported_languages": null}, "macro.dbt.materialized_view_teardown": {"name": "materialized_view_teardown", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_teardown", "macro_sql": "{% macro materialized_view_teardown(backup_relation, intermediate_relation, post_hooks) %}\n\n -- drop the temp relations if they exist to leave the database clean for the next run\n {{ drop_relation_if_exists(backup_relation) }}\n {{ drop_relation_if_exists(intermediate_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.145956, "supported_languages": null}, "macro.dbt.materialized_view_get_build_sql": {"name": "materialized_view_get_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_get_build_sql", "macro_sql": "{% macro materialized_view_get_build_sql(existing_relation, target_relation, backup_relation, intermediate_relation) %}\n\n {% set full_refresh_mode = should_full_refresh() %}\n\n -- determine the scenario we're in: create, full_refresh, alter, refresh data\n {% if existing_relation is none %}\n {% set build_sql = get_create_materialized_view_as_sql(target_relation, sql) %}\n {% elif full_refresh_mode or not existing_relation.is_materialized_view %}\n {% set build_sql = get_replace_sql(existing_relation, target_relation, sql) %}\n {% else %}\n\n -- get config options\n {% set on_configuration_change = config.get('on_configuration_change') %}\n {% set configuration_changes = get_materialized_view_configuration_changes(existing_relation, config) %}\n\n {% if configuration_changes is none %}\n {% set build_sql = refresh_materialized_view(target_relation) %}\n\n {% elif on_configuration_change == 'apply' %}\n {% set build_sql = get_alter_materialized_view_as_sql(target_relation, configuration_changes, sql, existing_relation, backup_relation, intermediate_relation) %}\n {% elif on_configuration_change == 'continue' %}\n {% set build_sql = '' %}\n {{ exceptions.warn(\"Configuration changes were identified and `on_configuration_change` was set to `continue` for `\" ~ target_relation ~ \"`\") }}\n {% elif on_configuration_change == 'fail' %}\n {{ exceptions.raise_fail_fast_error(\"Configuration changes were identified and `on_configuration_change` was set to `fail` for `\" ~ target_relation ~ \"`\") }}\n\n {% else %}\n -- this only happens if the user provides a value other than `apply`, 'skip', 'fail'\n {{ exceptions.raise_compiler_error(\"Unexpected configuration scenario\") }}\n\n {% endif %}\n\n {% endif %}\n\n {% do return(build_sql) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.get_create_materialized_view_as_sql", "macro.dbt.get_replace_sql", "macro.dbt.get_materialized_view_configuration_changes", "macro.dbt.refresh_materialized_view", "macro.dbt.get_alter_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.147163, "supported_languages": null}, "macro.dbt.materialized_view_execute_no_op": {"name": "materialized_view_execute_no_op", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_execute_no_op", "macro_sql": "{% macro materialized_view_execute_no_op(target_relation) %}\n {% do store_raw_result(\n name=\"main\",\n message=\"skip \" ~ target_relation,\n code=\"skip\",\n rows_affected=\"-1\"\n ) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1473868, "supported_languages": null}, "macro.dbt.materialized_view_execute_build_sql": {"name": "materialized_view_execute_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_execute_build_sql", "macro_sql": "{% macro materialized_view_execute_build_sql(build_sql, existing_relation, target_relation, post_hooks) %}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set grant_config = config.get('grants') %}\n\n {% call statement(name=\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.147991, "supported_languages": null}, "macro.dbt.materialization_view_default": {"name": "materialization_view_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view.sql", "original_file_path": "macros/materializations/models/view.sql", "unique_id": "macro.dbt.materialization_view_default", "macro_sql": "{%- materialization view, default -%}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='view') -%}\n {%- set intermediate_relation = make_intermediate_relation(target_relation) -%}\n\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) -%}\n /*\n This relation (probably) doesn't exist yet. If it does exist, it's a leftover from\n a previous run, and we're going to try to drop it immediately. At the end of this\n materialization, we're going to rename the \"existing_relation\" to this identifier,\n and then we're going to drop it. In order to make sure we run the correct one of:\n - drop view ...\n - drop table ...\n\n We need to set the type of this relation to be the type of the existing_relation, if it exists,\n or else \"view\" as a sane default if it does not. Note that if the existing_relation does not\n exist, then there is nothing to move out of the way and subsequentally drop. In that case,\n this relation will be effectively unused.\n */\n {%- set backup_relation_type = 'view' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n -- move the existing view out of the way\n {% if existing_relation is not none %}\n /* Do the equivalent of rename_if_exists. 'existing_relation' could have been dropped\n since the variable was first set. */\n {% set existing_relation = load_cached_relation(existing_relation) %}\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n {% endif %}\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1510558, "supported_languages": ["sql"]}, "macro.dbt.materialization_table_default": {"name": "materialization_table_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table.sql", "original_file_path": "macros/materializations/models/table.sql", "unique_id": "macro.dbt.materialization_table_default", "macro_sql": "{% materialization table, default %}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='table') %}\n {%- set intermediate_relation = make_intermediate_relation(target_relation) -%}\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) -%}\n /*\n See ../view/view.sql for more information about this relation.\n */\n {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_table_as_sql(False, intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n {% if existing_relation is not none %}\n /* Do the equivalent of rename_if_exists. 'existing_relation' could have been dropped\n since the variable was first set. */\n {% set existing_relation = load_cached_relation(existing_relation) %}\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% do create_indexes(target_relation) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n -- finally, drop the existing/backup relation after the commit\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.get_create_table_as_sql", "macro.dbt.create_indexes", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.153692, "supported_languages": ["sql"]}, "macro.dbt.get_quoted_csv": {"name": "get_quoted_csv", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.get_quoted_csv", "macro_sql": "{% macro get_quoted_csv(column_names) %}\n\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote(col)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.155207, "supported_languages": null}, "macro.dbt.diff_columns": {"name": "diff_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.diff_columns", "macro_sql": "{% macro diff_columns(source_columns, target_columns) %}\n\n {% set result = [] %}\n {% set source_names = source_columns | map(attribute = 'column') | list %}\n {% set target_names = target_columns | map(attribute = 'column') | list %}\n\n {# --check whether the name attribute exists in the target - this does not perform a data type check #}\n {% for sc in source_columns %}\n {% if sc.name not in target_names %}\n {{ result.append(sc) }}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.155714, "supported_languages": null}, "macro.dbt.diff_column_data_types": {"name": "diff_column_data_types", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.diff_column_data_types", "macro_sql": "{% macro diff_column_data_types(source_columns, target_columns) %}\n\n {% set result = [] %}\n {% for sc in source_columns %}\n {% set tc = target_columns | selectattr(\"name\", \"equalto\", sc.name) | list | first %}\n {% if tc %}\n {% if sc.data_type != tc.data_type and not sc.can_expand_to(other_column=tc) %}\n {{ result.append( { 'column_name': tc.name, 'new_type': sc.data_type } ) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.15632, "supported_languages": null}, "macro.dbt.get_merge_update_columns": {"name": "get_merge_update_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.get_merge_update_columns", "macro_sql": "{% macro get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) %}\n {{ return(adapter.dispatch('get_merge_update_columns', 'dbt')(merge_update_columns, merge_exclude_columns, dest_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_update_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.156536, "supported_languages": null}, "macro.dbt.default__get_merge_update_columns": {"name": "default__get_merge_update_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.default__get_merge_update_columns", "macro_sql": "{% macro default__get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) %}\n {%- set default_cols = dest_columns | map(attribute=\"quoted\") | list -%}\n\n {%- if merge_update_columns and merge_exclude_columns -%}\n {{ exceptions.raise_compiler_error(\n 'Model cannot specify merge_update_columns and merge_exclude_columns. Please update model to use only one config'\n )}}\n {%- elif merge_update_columns -%}\n {%- set update_columns = merge_update_columns -%}\n {%- elif merge_exclude_columns -%}\n {%- set update_columns = [] -%}\n {%- for column in dest_columns -%}\n {% if column.column | lower not in merge_exclude_columns | map(\"lower\") | list %}\n {%- do update_columns.append(column.quoted) -%}\n {% endif %}\n {%- endfor -%}\n {%- else -%}\n {%- set update_columns = default_cols -%}\n {%- endif -%}\n\n {{ return(update_columns) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.157175, "supported_languages": null}, "macro.dbt.get_merge_sql": {"name": "get_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, incremental_predicates=none) -%}\n -- back compat for old kwarg name\n {% set incremental_predicates = kwargs.get('predicates', incremental_predicates) %}\n {{ adapter.dispatch('get_merge_sql', 'dbt')(target, source, unique_key, dest_columns, incremental_predicates) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.162598, "supported_languages": null}, "macro.dbt.default__get_merge_sql": {"name": "default__get_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, incremental_predicates=none) -%}\n {%- set predicates = [] if incremental_predicates is none else [] + incremental_predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set merge_update_columns = config.get('merge_update_columns') -%}\n {%- set merge_exclude_columns = config.get('merge_exclude_columns') -%}\n {%- set update_columns = get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {% if unique_key %}\n {% if unique_key is sequence and unique_key is not mapping and unique_key is not string %}\n {% for key in unique_key %}\n {% set this_key_match %}\n DBT_INTERNAL_SOURCE.{{ key }} = DBT_INTERNAL_DEST.{{ key }}\n {% endset %}\n {% do predicates.append(this_key_match) %}\n {% endfor %}\n {% else %}\n {% set unique_key_match %}\n DBT_INTERNAL_SOURCE.{{ unique_key }} = DBT_INTERNAL_DEST.{{ unique_key }}\n {% endset %}\n {% do predicates.append(unique_key_match) %}\n {% endif %}\n {% else %}\n {% do predicates.append('FALSE') %}\n {% endif %}\n\n {{ sql_header if sql_header is not none }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on {{\"(\" ~ predicates | join(\") and (\") ~ \")\"}}\n\n {% if unique_key %}\n when matched then update set\n {% for column_name in update_columns -%}\n {{ column_name }} = DBT_INTERNAL_SOURCE.{{ column_name }}\n {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n {% endif %}\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv", "macro.dbt.get_merge_update_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.164122, "supported_languages": null}, "macro.dbt.get_delete_insert_merge_sql": {"name": "get_delete_insert_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) -%}\n {{ adapter.dispatch('get_delete_insert_merge_sql', 'dbt')(target, source, unique_key, dest_columns, incremental_predicates) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.164393, "supported_languages": null}, "macro.dbt.default__get_delete_insert_merge_sql": {"name": "default__get_delete_insert_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) -%}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {% if unique_key %}\n {% if unique_key is sequence and unique_key is not string %}\n delete from {{target }}\n using {{ source }}\n where (\n {% for key in unique_key %}\n {{ source }}.{{ key }} = {{ target }}.{{ key }}\n {{ \"and \" if not loop.last}}\n {% endfor %}\n {% if incremental_predicates %}\n {% for predicate in incremental_predicates %}\n and {{ predicate }}\n {% endfor %}\n {% endif %}\n );\n {% else %}\n delete from {{ target }}\n where (\n {{ unique_key }}) in (\n select ({{ unique_key }})\n from {{ source }}\n )\n {%- if incremental_predicates %}\n {% for predicate in incremental_predicates %}\n and {{ predicate }}\n {% endfor %}\n {%- endif -%};\n\n {% endif %}\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.16533, "supported_languages": null}, "macro.dbt.get_insert_overwrite_merge_sql": {"name": "get_insert_overwrite_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "macro_sql": "{% macro get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header=false) -%}\n {{ adapter.dispatch('get_insert_overwrite_merge_sql', 'dbt')(target, source, dest_columns, predicates, include_sql_header) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.165588, "supported_languages": null}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"name": "default__get_insert_overwrite_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "macro_sql": "{% macro default__get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header) -%}\n {#-- The only time include_sql_header is True: --#}\n {#-- BigQuery + insert_overwrite strategy + \"static\" partitions config --#}\n {#-- We should consider including the sql header at the materialization level instead --#}\n\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none and include_sql_header }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on FALSE\n\n when not matched by source\n {% if predicates %} and {{ predicates | join(' and ') }} {% endif %}\n then delete\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1662002, "supported_languages": null}, "macro.dbt.is_incremental": {"name": "is_incremental", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/is_incremental.sql", "original_file_path": "macros/materializations/models/incremental/is_incremental.sql", "unique_id": "macro.dbt.is_incremental", "macro_sql": "{% macro is_incremental() %}\n {#-- do not run introspective queries in parsing #}\n {% if not execute %}\n {{ return(False) }}\n {% else %}\n {% set relation = adapter.get_relation(this.database, this.schema, this.table) %}\n {{ return(relation is not none\n and relation.type == 'table'\n and model.config.materialized == 'incremental'\n and not should_full_refresh()) }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.166812, "supported_languages": null}, "macro.dbt.get_incremental_append_sql": {"name": "get_incremental_append_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_append_sql", "macro_sql": "{% macro get_incremental_append_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_append_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.167653, "supported_languages": null}, "macro.dbt.default__get_incremental_append_sql": {"name": "default__get_incremental_append_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_append_sql", "macro_sql": "{% macro default__get_incremental_append_sql(arg_dict) %}\n\n {% do return(get_insert_into_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"dest_columns\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_insert_into_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1678872, "supported_languages": null}, "macro.dbt.get_incremental_delete_insert_sql": {"name": "get_incremental_delete_insert_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_delete_insert_sql", "macro_sql": "{% macro get_incremental_delete_insert_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_delete_insert_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_delete_insert_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1680698, "supported_languages": null}, "macro.dbt.default__get_incremental_delete_insert_sql": {"name": "default__get_incremental_delete_insert_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_delete_insert_sql", "macro_sql": "{% macro default__get_incremental_delete_insert_sql(arg_dict) %}\n\n {% do return(get_delete_insert_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"unique_key\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.168353, "supported_languages": null}, "macro.dbt.get_incremental_merge_sql": {"name": "get_incremental_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_merge_sql", "macro_sql": "{% macro get_incremental_merge_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_merge_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.168618, "supported_languages": null}, "macro.dbt.default__get_incremental_merge_sql": {"name": "default__get_incremental_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_merge_sql", "macro_sql": "{% macro default__get_incremental_merge_sql(arg_dict) %}\n\n {% do return(get_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"unique_key\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1688929, "supported_languages": null}, "macro.dbt.get_incremental_insert_overwrite_sql": {"name": "get_incremental_insert_overwrite_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_insert_overwrite_sql", "macro_sql": "{% macro get_incremental_insert_overwrite_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_insert_overwrite_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_insert_overwrite_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1690712, "supported_languages": null}, "macro.dbt.default__get_incremental_insert_overwrite_sql": {"name": "default__get_incremental_insert_overwrite_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_insert_overwrite_sql", "macro_sql": "{% macro default__get_incremental_insert_overwrite_sql(arg_dict) %}\n\n {% do return(get_insert_overwrite_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1694632, "supported_languages": null}, "macro.dbt.get_incremental_default_sql": {"name": "get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_default_sql", "macro_sql": "{% macro get_incremental_default_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_default_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_incremental_default_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.169701, "supported_languages": null}, "macro.dbt.default__get_incremental_default_sql": {"name": "default__get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_default_sql", "macro_sql": "{% macro default__get_incremental_default_sql(arg_dict) %}\n\n {% do return(get_incremental_append_sql(arg_dict)) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.169854, "supported_languages": null}, "macro.dbt.get_insert_into_sql": {"name": "get_insert_into_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_insert_into_sql", "macro_sql": "{% macro get_insert_into_sql(target_relation, temp_relation, dest_columns) %}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n insert into {{ target_relation }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ temp_relation }}\n )\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1701279, "supported_languages": null}, "macro.dbt.materialization_incremental_default": {"name": "materialization_incremental_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/incremental.sql", "original_file_path": "macros/materializations/models/incremental/incremental.sql", "unique_id": "macro.dbt.materialization_incremental_default", "macro_sql": "{% materialization incremental, default -%}\n\n -- relations\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='table') -%}\n {%- set temp_relation = make_temp_relation(target_relation)-%}\n {%- set intermediate_relation = make_intermediate_relation(target_relation)-%}\n {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n\n -- configs\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh() or existing_relation.is_view) -%}\n {%- set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') -%}\n\n -- the temp_ and backup_ relations should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation. This has to happen before\n -- BEGIN, in a separate transaction\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation)-%}\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set to_drop = [] %}\n\n {% if existing_relation is none %}\n {% set build_sql = get_create_table_as_sql(False, target_relation, sql) %}\n {% elif full_refresh_mode %}\n {% set build_sql = get_create_table_as_sql(False, intermediate_relation, sql) %}\n {% set need_swap = true %}\n {% else %}\n {% do run_query(get_create_table_as_sql(True, temp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=temp_relation,\n to_relation=target_relation) %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, temp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n\n {#-- Get the incremental_strategy, the macro to use for the strategy, and build the sql --#}\n {% set incremental_strategy = config.get('incremental_strategy') or 'default' %}\n {% set incremental_predicates = config.get('predicates', none) or config.get('incremental_predicates', none) %}\n {% set strategy_sql_macro_func = adapter.get_incremental_strategy_macro(context, incremental_strategy) %}\n {% set strategy_arg_dict = ({'target_relation': target_relation, 'temp_relation': temp_relation, 'unique_key': unique_key, 'dest_columns': dest_columns, 'incremental_predicates': incremental_predicates }) %}\n {% set build_sql = strategy_sql_macro_func(strategy_arg_dict) %}\n\n {% endif %}\n\n {% call statement(\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% if need_swap %}\n {% do adapter.rename_relation(target_relation, backup_relation) %}\n {% do adapter.rename_relation(intermediate_relation, target_relation) %}\n {% do to_drop.append(backup_relation) %}\n {% endif %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {% do adapter.commit() %}\n\n {% for rel in to_drop %}\n {% do adapter.drop_relation(rel) %}\n {% endfor %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_temp_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.should_full_refresh", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.get_create_table_as_sql", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.175125, "supported_languages": ["sql"]}, "macro.dbt.incremental_validate_on_schema_change": {"name": "incremental_validate_on_schema_change", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.incremental_validate_on_schema_change", "macro_sql": "{% macro incremental_validate_on_schema_change(on_schema_change, default='ignore') %}\n\n {% if on_schema_change not in ['sync_all_columns', 'append_new_columns', 'fail', 'ignore'] %}\n\n {% set log_message = 'Invalid value for on_schema_change (%s) specified. Setting default value of %s.' % (on_schema_change, default) %}\n {% do log(log_message) %}\n\n {{ return(default) }}\n\n {% else %}\n\n {{ return(on_schema_change) }}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.180355, "supported_languages": null}, "macro.dbt.check_for_schema_changes": {"name": "check_for_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.check_for_schema_changes", "macro_sql": "{% macro check_for_schema_changes(source_relation, target_relation) %}\n\n {% set schema_changed = False %}\n\n {%- set source_columns = adapter.get_columns_in_relation(source_relation) -%}\n {%- set target_columns = adapter.get_columns_in_relation(target_relation) -%}\n {%- set source_not_in_target = diff_columns(source_columns, target_columns) -%}\n {%- set target_not_in_source = diff_columns(target_columns, source_columns) -%}\n\n {% set new_target_types = diff_column_data_types(source_columns, target_columns) %}\n\n {% if source_not_in_target != [] %}\n {% set schema_changed = True %}\n {% elif target_not_in_source != [] or new_target_types != [] %}\n {% set schema_changed = True %}\n {% elif new_target_types != [] %}\n {% set schema_changed = True %}\n {% endif %}\n\n {% set changes_dict = {\n 'schema_changed': schema_changed,\n 'source_not_in_target': source_not_in_target,\n 'target_not_in_source': target_not_in_source,\n 'source_columns': source_columns,\n 'target_columns': target_columns,\n 'new_target_types': new_target_types\n } %}\n\n {% set msg %}\n In {{ target_relation }}:\n Schema changed: {{ schema_changed }}\n Source columns not in target: {{ source_not_in_target }}\n Target columns not in source: {{ target_not_in_source }}\n New column types: {{ new_target_types }}\n {% endset %}\n\n {% do log(msg) %}\n\n {{ return(changes_dict) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.diff_columns", "macro.dbt.diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1815739, "supported_languages": null}, "macro.dbt.sync_column_schemas": {"name": "sync_column_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.sync_column_schemas", "macro_sql": "{% macro sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n\n {%- set add_to_target_arr = schema_changes_dict['source_not_in_target'] -%}\n\n {%- if on_schema_change == 'append_new_columns'-%}\n {%- if add_to_target_arr | length > 0 -%}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, none) -%}\n {%- endif -%}\n\n {% elif on_schema_change == 'sync_all_columns' %}\n {%- set remove_from_target_arr = schema_changes_dict['target_not_in_source'] -%}\n {%- set new_target_types = schema_changes_dict['new_target_types'] -%}\n\n {% if add_to_target_arr | length > 0 or remove_from_target_arr | length > 0 %}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, remove_from_target_arr) -%}\n {% endif %}\n\n {% if new_target_types != [] %}\n {% for ntt in new_target_types %}\n {% set column_name = ntt['column_name'] %}\n {% set new_type = ntt['new_type'] %}\n {% do alter_column_type(target_relation, column_name, new_type) %}\n {% endfor %}\n {% endif %}\n\n {% endif %}\n\n {% set schema_change_message %}\n In {{ target_relation }}:\n Schema change approach: {{ on_schema_change }}\n Columns added: {{ add_to_target_arr }}\n Columns removed: {{ remove_from_target_arr }}\n Data types changed: {{ new_target_types }}\n {% endset %}\n\n {% do log(schema_change_message) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1827211, "supported_languages": null}, "macro.dbt.process_schema_changes": {"name": "process_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.process_schema_changes", "macro_sql": "{% macro process_schema_changes(on_schema_change, source_relation, target_relation) %}\n\n {% if on_schema_change == 'ignore' %}\n\n {{ return({}) }}\n\n {% else %}\n\n {% set schema_changes_dict = check_for_schema_changes(source_relation, target_relation) %}\n\n {% if schema_changes_dict['schema_changed'] %}\n\n {% if on_schema_change == 'fail' %}\n\n {% set fail_msg %}\n The source and target schemas on this incremental model are out of sync!\n They can be reconciled in several ways:\n - set the `on_schema_change` config to either append_new_columns or sync_all_columns, depending on your situation.\n - Re-run the incremental model with `full_refresh: True` to update the target schema.\n - update the schema manually and re-run the process.\n\n Additional troubleshooting context:\n Source columns not in target: {{ schema_changes_dict['source_not_in_target'] }}\n Target columns not in source: {{ schema_changes_dict['target_not_in_source'] }}\n New column types: {{ schema_changes_dict['new_target_types'] }}\n {% endset %}\n\n {% do exceptions.raise_compiler_error(fail_msg) %}\n\n {# -- unless we ignore, run the sync operation per the config #}\n {% else %}\n\n {% do sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n\n {% endif %}\n\n {% endif %}\n\n {{ return(schema_changes_dict['source_columns']) }}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.check_for_schema_changes", "macro.dbt.sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.183532, "supported_languages": null}, "macro.dbt.can_clone_table": {"name": "can_clone_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/can_clone_table.sql", "original_file_path": "macros/materializations/models/clone/can_clone_table.sql", "unique_id": "macro.dbt.can_clone_table", "macro_sql": "{% macro can_clone_table() %}\n {{ return(adapter.dispatch('can_clone_table', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__can_clone_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1837912, "supported_languages": null}, "macro.dbt.default__can_clone_table": {"name": "default__can_clone_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/can_clone_table.sql", "original_file_path": "macros/materializations/models/clone/can_clone_table.sql", "unique_id": "macro.dbt.default__can_clone_table", "macro_sql": "{% macro default__can_clone_table() %}\n {{ return(False) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.183903, "supported_languages": null}, "macro.dbt.create_or_replace_clone": {"name": "create_or_replace_clone", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/create_or_replace_clone.sql", "original_file_path": "macros/materializations/models/clone/create_or_replace_clone.sql", "unique_id": "macro.dbt.create_or_replace_clone", "macro_sql": "{% macro create_or_replace_clone(this_relation, defer_relation) %}\n {{ return(adapter.dispatch('create_or_replace_clone', 'dbt')(this_relation, defer_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_or_replace_clone"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1841972, "supported_languages": null}, "macro.dbt.default__create_or_replace_clone": {"name": "default__create_or_replace_clone", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/create_or_replace_clone.sql", "original_file_path": "macros/materializations/models/clone/create_or_replace_clone.sql", "unique_id": "macro.dbt.default__create_or_replace_clone", "macro_sql": "{% macro default__create_or_replace_clone(this_relation, defer_relation) %}\n create or replace table {{ this_relation }} clone {{ defer_relation }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1843572, "supported_languages": null}, "macro.dbt.materialization_clone_default": {"name": "materialization_clone_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/clone.sql", "original_file_path": "macros/materializations/models/clone/clone.sql", "unique_id": "macro.dbt.materialization_clone_default", "macro_sql": "{%- materialization clone, default -%}\n\n {%- set relations = {'relations': []} -%}\n\n {%- if not defer_relation -%}\n -- nothing to do\n {{ log(\"No relation found in state manifest for \" ~ model.unique_id, info=True) }}\n {{ return(relations) }}\n {%- endif -%}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n\n {%- if existing_relation and not flags.FULL_REFRESH -%}\n -- noop!\n {{ log(\"Relation \" ~ existing_relation ~ \" already exists\", info=True) }}\n {{ return(relations) }}\n {%- endif -%}\n\n {%- set other_existing_relation = load_cached_relation(defer_relation) -%}\n\n -- If this is a database that can do zero-copy cloning of tables, and the other relation is a table, then this will be a table\n -- Otherwise, this will be a view\n\n {% set can_clone_table = can_clone_table() %}\n\n {%- if other_existing_relation and other_existing_relation.type == 'table' and can_clone_table -%}\n\n {%- set target_relation = this.incorporate(type='table') -%}\n {% if existing_relation is not none and not existing_relation.is_table %}\n {{ log(\"Dropping relation \" ~ existing_relation ~ \" because it is of type \" ~ existing_relation.type) }}\n {{ drop_relation_if_exists(existing_relation) }}\n {% endif %}\n\n -- as a general rule, data platforms that can clone tables can also do atomic 'create or replace'\n {% call statement('main') %}\n {% if target_relation and defer_relation and target_relation == defer_relation %}\n {{ log(\"Target relation and defer relation are the same, skipping clone for relation: \" ~ target_relation) }}\n {% else %}\n {{ create_or_replace_clone(target_relation, defer_relation) }}\n {% endif %}\n\n {% endcall %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n {%- else -%}\n\n {%- set target_relation = this.incorporate(type='view') -%}\n\n -- reuse the view materialization\n -- TODO: support actual dispatch for materialization macros\n -- Tracking ticket: https://github.com/dbt-labs/dbt-core/issues/7799\n {% set search_name = \"materialization_view_\" ~ adapter.type() %}\n {% if not search_name in context %}\n {% set search_name = \"materialization_view_default\" %}\n {% endif %}\n {% set materialization_macro = context[search_name] %}\n {% set relations = materialization_macro() %}\n {{ return(relations) }}\n\n {%- endif -%}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.can_clone_table", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.create_or_replace_clone", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1878028, "supported_languages": ["sql"]}, "macro.dbt.materialization_seed_default": {"name": "materialization_seed_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "unique_id": "macro.dbt.materialization_seed_default", "macro_sql": "{% materialization seed, default %}\n\n {%- set identifier = model['alias'] -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set grant_config = config.get('grants') -%}\n {%- set agate_table = load_agate_table() -%}\n -- grab current tables grants config for comparison later on\n\n {%- do store_result('agate_table', response='OK', agate_table=agate_table) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% set create_table_sql = \"\" %}\n {% if exists_as_view %}\n {{ exceptions.raise_compiler_error(\"Cannot seed to '{}', it is a view\".format(old_relation)) }}\n {% elif exists_as_table %}\n {% set create_table_sql = reset_csv_table(model, full_refresh_mode, old_relation, agate_table) %}\n {% else %}\n {% set create_table_sql = create_csv_table(model, agate_table) %}\n {% endif %}\n\n {% set code = 'CREATE' if full_refresh_mode else 'INSERT' %}\n {% set rows_affected = (agate_table.rows | length) %}\n {% set sql = load_csv_rows(model, agate_table) %}\n\n {% call noop_statement('main', code ~ ' ' ~ rows_affected, code, rows_affected) %}\n {{ get_csv_sql(create_table_sql, sql) }};\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\n\n {% set should_revoke = should_revoke(old_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if full_refresh_mode or not exists_as_table %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.run_hooks", "macro.dbt.reset_csv_table", "macro.dbt.create_csv_table", "macro.dbt.load_csv_rows", "macro.dbt.noop_statement", "macro.dbt.get_csv_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1910038, "supported_languages": ["sql"]}, "macro.dbt.create_csv_table": {"name": "create_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n {{ adapter.dispatch('create_csv_table', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.195348, "supported_languages": null}, "macro.dbt.default__create_csv_table": {"name": "default__create_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__create_csv_table", "macro_sql": "{% macro default__create_csv_table(model, agate_table) %}\n {%- set column_override = model['config'].get('column_types', {}) -%}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n\n {% set sql %}\n create table {{ this.render() }} (\n {%- for col_name in agate_table.column_names -%}\n {%- set inferred_type = adapter.convert_type(agate_table, loop.index0) -%}\n {%- set type = column_override.get(col_name, inferred_type) -%}\n {%- set column_name = (col_name | string) -%}\n {{ adapter.quote_seed_column(column_name, quote_seed_column) }} {{ type }} {%- if not loop.last -%}, {%- endif -%}\n {%- endfor -%}\n )\n {% endset %}\n\n {% call statement('_') -%}\n {{ sql }}\n {%- endcall %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1961951, "supported_languages": null}, "macro.dbt.reset_csv_table": {"name": "reset_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.reset_csv_table", "macro_sql": "{% macro reset_csv_table(model, full_refresh, old_relation, agate_table) -%}\n {{ adapter.dispatch('reset_csv_table', 'dbt')(model, full_refresh, old_relation, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.196418, "supported_languages": null}, "macro.dbt.default__reset_csv_table": {"name": "default__reset_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__reset_csv_table", "macro_sql": "{% macro default__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {% set sql = \"\" %}\n {% if full_refresh %}\n {{ adapter.drop_relation(old_relation) }}\n {% set sql = create_csv_table(model, agate_table) %}\n {% else %}\n {{ adapter.truncate_relation(old_relation) }}\n {% set sql = \"truncate table \" ~ old_relation %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.196859, "supported_languages": null}, "macro.dbt.get_csv_sql": {"name": "get_csv_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_csv_sql", "macro_sql": "{% macro get_csv_sql(create_or_truncate_sql, insert_sql) %}\n {{ adapter.dispatch('get_csv_sql', 'dbt')(create_or_truncate_sql, insert_sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_csv_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.197042, "supported_languages": null}, "macro.dbt.default__get_csv_sql": {"name": "default__get_csv_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_csv_sql", "macro_sql": "{% macro default__get_csv_sql(create_or_truncate_sql, insert_sql) %}\n {{ create_or_truncate_sql }};\n -- dbt seed --\n {{ insert_sql }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.197166, "supported_languages": null}, "macro.dbt.get_binding_char": {"name": "get_binding_char", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_binding_char", "macro_sql": "{% macro get_binding_char() -%}\n {{ adapter.dispatch('get_binding_char', 'dbt')() }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1972969, "supported_languages": null}, "macro.dbt.default__get_binding_char": {"name": "default__get_binding_char", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_binding_char", "macro_sql": "{% macro default__get_binding_char() %}\n {{ return('%s') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.197402, "supported_languages": null}, "macro.dbt.get_batch_size": {"name": "get_batch_size", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_batch_size", "macro_sql": "{% macro get_batch_size() -%}\n {{ return(adapter.dispatch('get_batch_size', 'dbt')()) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1975522, "supported_languages": null}, "macro.dbt.default__get_batch_size": {"name": "default__get_batch_size", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_batch_size", "macro_sql": "{% macro default__get_batch_size() %}\n {{ return(10000) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.197666, "supported_languages": null}, "macro.dbt.get_seed_column_quoted_csv": {"name": "get_seed_column_quoted_csv", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_seed_column_quoted_csv", "macro_sql": "{% macro get_seed_column_quoted_csv(model, column_names) %}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote_seed_column(col, quote_seed_column)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.198099, "supported_languages": null}, "macro.dbt.load_csv_rows": {"name": "load_csv_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n {{ adapter.dispatch('load_csv_rows', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.198276, "supported_languages": null}, "macro.dbt.default__load_csv_rows": {"name": "default__load_csv_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__load_csv_rows", "macro_sql": "{% macro default__load_csv_rows(model, agate_table) %}\n\n {% set batch_size = get_batch_size() %}\n\n {% set cols_sql = get_seed_column_quoted_csv(model, agate_table.column_names) %}\n {% set bindings = [] %}\n\n {% set statements = [] %}\n\n {% for chunk in agate_table.rows | batch(batch_size) %}\n {% set bindings = [] %}\n\n {% for row in chunk %}\n {% do bindings.extend(row) %}\n {% endfor %}\n\n {% set sql %}\n insert into {{ this.render() }} ({{ cols_sql }}) values\n {% for row in chunk -%}\n ({%- for column in agate_table.column_names -%}\n {{ get_binding_char() }}\n {%- if not loop.last%},{%- endif %}\n {%- endfor -%})\n {%- if not loop.last%},{%- endif %}\n {%- endfor %}\n {% endset %}\n\n {% do adapter.add_query(sql, bindings=bindings, abridge_sql_log=True) %}\n\n {% if loop.index0 == 0 %}\n {% do statements.append(sql) %}\n {% endif %}\n {% endfor %}\n\n {# Return SQL so we can render it out into the compiled files #}\n {{ return(statements[0]) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_batch_size", "macro.dbt.get_seed_column_quoted_csv", "macro.dbt.get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.199444, "supported_languages": null}, "macro.dbt.generate_alias_name": {"name": "generate_alias_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "unique_id": "macro.dbt.generate_alias_name", "macro_sql": "{% macro generate_alias_name(custom_alias_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_alias_name', 'dbt')(custom_alias_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_alias_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.1998458, "supported_languages": null}, "macro.dbt.default__generate_alias_name": {"name": "default__generate_alias_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "unique_id": "macro.dbt.default__generate_alias_name", "macro_sql": "{% macro default__generate_alias_name(custom_alias_name=none, node=none) -%}\n\n {%- if custom_alias_name -%}\n\n {{ custom_alias_name | trim }}\n\n {%- elif node.version -%}\n\n {{ return(node.name ~ \"_v\" ~ (node.version | replace(\".\", \"_\"))) }}\n\n {%- else -%}\n\n {{ node.name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.200188, "supported_languages": null}, "macro.dbt.generate_schema_name": {"name": "generate_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.generate_schema_name", "macro_sql": "{% macro generate_schema_name(custom_schema_name=none, node=none) -%}\n {{ return(adapter.dispatch('generate_schema_name', 'dbt')(custom_schema_name, node)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.200879, "supported_languages": null}, "macro.dbt.default__generate_schema_name": {"name": "default__generate_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.default__generate_schema_name", "macro_sql": "{% macro default__generate_schema_name(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if custom_schema_name is none -%}\n\n {{ default_schema }}\n\n {%- else -%}\n\n {{ default_schema }}_{{ custom_schema_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.201162, "supported_languages": null}, "macro.dbt.generate_schema_name_for_env": {"name": "generate_schema_name_for_env", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.generate_schema_name_for_env", "macro_sql": "{% macro generate_schema_name_for_env(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if target.name == 'prod' and custom_schema_name is not none -%}\n\n {{ custom_schema_name | trim }}\n\n {%- else -%}\n\n {{ default_schema }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.201442, "supported_languages": null}, "macro.dbt.generate_database_name": {"name": "generate_database_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "unique_id": "macro.dbt.generate_database_name", "macro_sql": "{% macro generate_database_name(custom_database_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_database_name', 'dbt')(custom_database_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.201857, "supported_languages": null}, "macro.dbt.default__generate_database_name": {"name": "default__generate_database_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "unique_id": "macro.dbt.default__generate_database_name", "macro_sql": "{% macro default__generate_database_name(custom_database_name=none, node=none) -%}\n {%- set default_database = target.database -%}\n {%- if custom_database_name is none -%}\n\n {{ default_database }}\n\n {%- else -%}\n\n {{ custom_database_name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.202098, "supported_languages": null}, "macro.dbt.get_drop_sql": {"name": "get_drop_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.get_drop_sql", "macro_sql": "{%- macro get_drop_sql(relation) -%}\n {{- log('Applying DROP to: ' ~ relation) -}}\n {{- adapter.dispatch('get_drop_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2027469, "supported_languages": null}, "macro.dbt.default__get_drop_sql": {"name": "default__get_drop_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.default__get_drop_sql", "macro_sql": "{%- macro default__get_drop_sql(relation) -%}\n\n {%- if relation.is_view -%}\n {{ drop_view(relation) }}\n\n {%- elif relation.is_table -%}\n {{ drop_table(relation) }}\n\n {%- elif relation.is_materialized_view -%}\n {{ drop_materialized_view(relation) }}\n\n {%- else -%}\n drop {{ relation.type }} if exists {{ relation }} cascade\n\n {%- endif -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.drop_view", "macro.dbt.drop_table", "macro.dbt.drop_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.203094, "supported_languages": null}, "macro.dbt.drop_relation": {"name": "drop_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n {{ return(adapter.dispatch('drop_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.203265, "supported_languages": null}, "macro.dbt.default__drop_relation": {"name": "default__drop_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.default__drop_relation", "macro_sql": "{% macro default__drop_relation(relation) -%}\n {% call statement('drop_relation', auto_begin=False) -%}\n {{ get_drop_sql(relation) }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.203448, "supported_languages": null}, "macro.dbt.drop_relation_if_exists": {"name": "drop_relation_if_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.drop_relation_if_exists", "macro_sql": "{% macro drop_relation_if_exists(relation) %}\n {% if relation is not none %}\n {{ adapter.drop_relation(relation) }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.20363, "supported_languages": null}, "macro.dbt.get_replace_sql": {"name": "get_replace_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/replace.sql", "original_file_path": "macros/relations/replace.sql", "unique_id": "macro.dbt.get_replace_sql", "macro_sql": "{% macro get_replace_sql(existing_relation, target_relation, sql) %}\n {{- log('Applying REPLACE to: ' ~ existing_relation) -}}\n {{- adapter.dispatch('get_replace_sql', 'dbt')(existing_relation, target_relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_replace_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2045162, "supported_languages": null}, "macro.dbt.default__get_replace_sql": {"name": "default__get_replace_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/replace.sql", "original_file_path": "macros/relations/replace.sql", "unique_id": "macro.dbt.default__get_replace_sql", "macro_sql": "{% macro default__get_replace_sql(existing_relation, target_relation, sql) %}\n\n {# /* use a create or replace statement if possible */ #}\n\n {% set is_replaceable = existing_relation.type == target_relation_type and existing_relation.can_be_replaced %}\n\n {% if is_replaceable and existing_relation.is_view %}\n {{ get_replace_view_sql(target_relation, sql) }}\n\n {% elif is_replaceable and existing_relation.is_table %}\n {{ get_replace_table_sql(target_relation, sql) }}\n\n {% elif is_replaceable and existing_relation.is_materialized_view %}\n {{ get_replace_materialized_view_sql(target_relation, sql) }}\n\n {# /* a create or replace statement is not possible, so try to stage and/or backup to be safe */ #}\n\n {# /* create target_relation as an intermediate relation, then swap it out with the existing one using a backup */ #}\n {%- elif target_relation.can_be_renamed and existing_relation.can_be_renamed -%}\n {{ get_create_intermediate_sql(target_relation, sql) }};\n {{ get_create_backup_sql(existing_relation) }};\n {{ get_rename_intermediate_sql(target_relation) }};\n {{ get_drop_backup_sql(existing_relation) }}\n\n {# /* create target_relation as an intermediate relation, then swap it out with the existing one without using a backup */ #}\n {%- elif target_relation.can_be_renamed -%}\n {{ get_create_intermediate_sql(target_relation, sql) }};\n {{ get_drop_sql(existing_relation) }};\n {{ get_rename_intermediate_sql(target_relation) }}\n\n {# /* create target_relation in place by first backing up the existing relation */ #}\n {%- elif existing_relation.can_be_renamed -%}\n {{ get_create_backup_sql(existing_relation) }};\n {{ get_create_sql(target_relation, sql) }};\n {{ get_drop_backup_sql(existing_relation) }}\n\n {# /* no renaming is allowed, so just drop and create */ #}\n {%- else -%}\n {{ get_drop_sql(existing_relation) }};\n {{ get_create_sql(target_relation, sql) }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_replace_view_sql", "macro.dbt.get_replace_table_sql", "macro.dbt.get_replace_materialized_view_sql", "macro.dbt.get_create_intermediate_sql", "macro.dbt.get_create_backup_sql", "macro.dbt.get_rename_intermediate_sql", "macro.dbt.get_drop_backup_sql", "macro.dbt.get_drop_sql", "macro.dbt.get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2057862, "supported_languages": null}, "macro.dbt.get_create_intermediate_sql": {"name": "get_create_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_intermediate.sql", "original_file_path": "macros/relations/create_intermediate.sql", "unique_id": "macro.dbt.get_create_intermediate_sql", "macro_sql": "{%- macro get_create_intermediate_sql(relation, sql) -%}\n {{- log('Applying CREATE INTERMEDIATE to: ' ~ relation) -}}\n {{- adapter.dispatch('get_create_intermediate_sql', 'dbt')(relation, sql) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_intermediate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.206186, "supported_languages": null}, "macro.dbt.default__get_create_intermediate_sql": {"name": "default__get_create_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_intermediate.sql", "original_file_path": "macros/relations/create_intermediate.sql", "unique_id": "macro.dbt.default__get_create_intermediate_sql", "macro_sql": "{%- macro default__get_create_intermediate_sql(relation, sql) -%}\n\n -- get the standard intermediate name\n {% set intermediate_relation = make_intermediate_relation(relation) %}\n\n -- drop any pre-existing intermediate\n {{ get_drop_sql(intermediate_relation) }};\n\n {{ get_create_sql(intermediate_relation, sql) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_intermediate_relation", "macro.dbt.get_drop_sql", "macro.dbt.get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.206434, "supported_languages": null}, "macro.dbt.get_drop_backup_sql": {"name": "get_drop_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop_backup.sql", "original_file_path": "macros/relations/drop_backup.sql", "unique_id": "macro.dbt.get_drop_backup_sql", "macro_sql": "{%- macro get_drop_backup_sql(relation) -%}\n {{- log('Applying DROP BACKUP to: ' ~ relation) -}}\n {{- adapter.dispatch('get_drop_backup_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_drop_backup_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.206741, "supported_languages": null}, "macro.dbt.default__get_drop_backup_sql": {"name": "default__get_drop_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop_backup.sql", "original_file_path": "macros/relations/drop_backup.sql", "unique_id": "macro.dbt.default__get_drop_backup_sql", "macro_sql": "{%- macro default__get_drop_backup_sql(relation) -%}\n\n -- get the standard backup name\n {% set backup_relation = make_backup_relation(relation, relation.type) %}\n\n {{ get_drop_sql(backup_relation) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_backup_relation", "macro.dbt.get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2069361, "supported_languages": null}, "macro.dbt.get_rename_sql": {"name": "get_rename_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.get_rename_sql", "macro_sql": "{%- macro get_rename_sql(relation, new_name) -%}\n {{- log('Applying RENAME to: ' ~ relation) -}}\n {{- adapter.dispatch('get_rename_sql', 'dbt')(relation, new_name) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2075741, "supported_languages": null}, "macro.dbt.default__get_rename_sql": {"name": "default__get_rename_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.default__get_rename_sql", "macro_sql": "{%- macro default__get_rename_sql(relation, new_name) -%}\n\n {%- if relation.is_view -%}\n {{ get_rename_view_sql(relation, new_name) }}\n\n {%- elif relation.is_table -%}\n {{ get_rename_table_sql(relation, new_name) }}\n\n {%- elif relation.is_materialized_view -%}\n {{ get_rename_materialized_view_sql(relation, new_name) }}\n\n {%- else -%}\n {{- exceptions.raise_compiler_error(\"`get_rename_sql` has not been implemented for: \" ~ relation.type ) -}}\n\n {%- endif -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.get_rename_view_sql", "macro.dbt.get_rename_table_sql", "macro.dbt.get_rename_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.207972, "supported_languages": null}, "macro.dbt.rename_relation": {"name": "rename_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n {{ return(adapter.dispatch('rename_relation', 'dbt')(from_relation, to_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2081668, "supported_languages": null}, "macro.dbt.default__rename_relation": {"name": "default__rename_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.default__rename_relation", "macro_sql": "{% macro default__rename_relation(from_relation, to_relation) -%}\n {% set target_name = adapter.quote_as_configured(to_relation.identifier, 'identifier') %}\n {% call statement('rename_relation') -%}\n alter table {{ from_relation }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2084281, "supported_languages": null}, "macro.dbt.get_create_backup_sql": {"name": "get_create_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_backup.sql", "original_file_path": "macros/relations/create_backup.sql", "unique_id": "macro.dbt.get_create_backup_sql", "macro_sql": "{%- macro get_create_backup_sql(relation) -%}\n {{- log('Applying CREATE BACKUP to: ' ~ relation) -}}\n {{- adapter.dispatch('get_create_backup_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_backup_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.20875, "supported_languages": null}, "macro.dbt.default__get_create_backup_sql": {"name": "default__get_create_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_backup.sql", "original_file_path": "macros/relations/create_backup.sql", "unique_id": "macro.dbt.default__get_create_backup_sql", "macro_sql": "{%- macro default__get_create_backup_sql(relation) -%}\n\n -- get the standard backup name\n {% set backup_relation = make_backup_relation(relation, relation.type) %}\n\n -- drop any pre-existing backup\n {{ get_drop_sql(backup_relation) }};\n\n {{ get_rename_sql(relation, backup_relation.identifier) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_backup_relation", "macro.dbt.get_drop_sql", "macro.dbt.get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.20901, "supported_languages": null}, "macro.dbt.get_create_sql": {"name": "get_create_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create.sql", "original_file_path": "macros/relations/create.sql", "unique_id": "macro.dbt.get_create_sql", "macro_sql": "{%- macro get_create_sql(relation, sql) -%}\n {{- log('Applying CREATE to: ' ~ relation) -}}\n {{- adapter.dispatch('get_create_sql', 'dbt')(relation, sql) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.209453, "supported_languages": null}, "macro.dbt.default__get_create_sql": {"name": "default__get_create_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create.sql", "original_file_path": "macros/relations/create.sql", "unique_id": "macro.dbt.default__get_create_sql", "macro_sql": "{%- macro default__get_create_sql(relation, sql) -%}\n\n {%- if relation.is_view -%}\n {{ get_create_view_as_sql(relation, sql) }}\n\n {%- elif relation.is_table -%}\n {{ get_create_table_as_sql(False, relation, sql) }}\n\n {%- elif relation.is_materialized_view -%}\n {{ get_create_materialized_view_as_sql(relation, sql) }}\n\n {%- else -%}\n {{- exceptions.raise_compiler_error(\"`get_create_sql` has not been implemented for: \" ~ relation.type ) -}}\n\n {%- endif -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.get_create_view_as_sql", "macro.dbt.get_create_table_as_sql", "macro.dbt.get_create_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.209866, "supported_languages": null}, "macro.dbt.get_rename_intermediate_sql": {"name": "get_rename_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename_intermediate.sql", "original_file_path": "macros/relations/rename_intermediate.sql", "unique_id": "macro.dbt.get_rename_intermediate_sql", "macro_sql": "{%- macro get_rename_intermediate_sql(relation) -%}\n {{- log('Applying RENAME INTERMEDIATE to: ' ~ relation) -}}\n {{- adapter.dispatch('get_rename_intermediate_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_rename_intermediate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2101681, "supported_languages": null}, "macro.dbt.default__get_rename_intermediate_sql": {"name": "default__get_rename_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename_intermediate.sql", "original_file_path": "macros/relations/rename_intermediate.sql", "unique_id": "macro.dbt.default__get_rename_intermediate_sql", "macro_sql": "{%- macro default__get_rename_intermediate_sql(relation) -%}\n\n -- get the standard intermediate name\n {% set intermediate_relation = make_intermediate_relation(relation) %}\n\n {{ get_rename_sql(intermediate_relation, relation.identifier) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_intermediate_relation", "macro.dbt.get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2103722, "supported_languages": null}, "macro.dbt.drop_materialized_view": {"name": "drop_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt.drop_materialized_view", "macro_sql": "{% macro drop_materialized_view(relation) -%}\n {{ return(adapter.dispatch('drop_materialized_view', 'dbt')(relation)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.210847, "supported_languages": null}, "macro.dbt.default__drop_materialized_view": {"name": "default__drop_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt.default__drop_materialized_view", "macro_sql": "{% macro default__drop_materialized_view(relation) -%}\n drop materialized view if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.210966, "supported_languages": null}, "macro.dbt.get_replace_materialized_view_sql": {"name": "get_replace_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/replace.sql", "original_file_path": "macros/relations/materialized_view/replace.sql", "unique_id": "macro.dbt.get_replace_materialized_view_sql", "macro_sql": "{% macro get_replace_materialized_view_sql(relation, sql) %}\n {{- adapter.dispatch('get_replace_materialized_view_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_replace_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.211252, "supported_languages": null}, "macro.dbt.default__get_replace_materialized_view_sql": {"name": "default__get_replace_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/replace.sql", "original_file_path": "macros/relations/materialized_view/replace.sql", "unique_id": "macro.dbt.default__get_replace_materialized_view_sql", "macro_sql": "{% macro default__get_replace_materialized_view_sql(relation, sql) %}\n {{ exceptions.raise_compiler_error(\n \"`get_replace_materialized_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.211394, "supported_languages": null}, "macro.dbt.refresh_materialized_view": {"name": "refresh_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt.refresh_materialized_view", "macro_sql": "{% macro refresh_materialized_view(relation) %}\n {{- log('Applying REFRESH to: ' ~ relation) -}}\n {{- adapter.dispatch('refresh_materialized_view', 'dbt')(relation) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__refresh_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.21173, "supported_languages": null}, "macro.dbt.default__refresh_materialized_view": {"name": "default__refresh_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt.default__refresh_materialized_view", "macro_sql": "{% macro default__refresh_materialized_view(relation) %}\n {{ exceptions.raise_compiler_error(\"`refresh_materialized_view` has not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.211976, "supported_languages": null}, "macro.dbt.get_rename_materialized_view_sql": {"name": "get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt.get_rename_materialized_view_sql", "macro_sql": "{% macro get_rename_materialized_view_sql(relation, new_name) %}\n {{- adapter.dispatch('get_rename_materialized_view_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.212291, "supported_languages": null}, "macro.dbt.default__get_rename_materialized_view_sql": {"name": "default__get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt.default__get_rename_materialized_view_sql", "macro_sql": "{% macro default__get_rename_materialized_view_sql(relation, new_name) %}\n {{ exceptions.raise_compiler_error(\n \"`get_rename_materialized_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.212436, "supported_languages": null}, "macro.dbt.get_alter_materialized_view_as_sql": {"name": "get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.get_alter_materialized_view_as_sql", "macro_sql": "{% macro get_alter_materialized_view_as_sql(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n) %}\n {{- log('Applying ALTER to: ' ~ relation) -}}\n {{- adapter.dispatch('get_alter_materialized_view_as_sql', 'dbt')(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n ) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.213087, "supported_languages": null}, "macro.dbt.default__get_alter_materialized_view_as_sql": {"name": "default__get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.default__get_alter_materialized_view_as_sql", "macro_sql": "{% macro default__get_alter_materialized_view_as_sql(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n) %}\n {{ exceptions.raise_compiler_error(\"Materialized views have not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.213279, "supported_languages": null}, "macro.dbt.get_materialized_view_configuration_changes": {"name": "get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.get_materialized_view_configuration_changes", "macro_sql": "{% macro get_materialized_view_configuration_changes(existing_relation, new_config) %}\n /* {#\n It's recommended that configuration changes be formatted as follows:\n {\"\": [{\"action\": \"\", \"context\": ...}]}\n\n For example:\n {\n \"indexes\": [\n {\"action\": \"drop\", \"context\": \"index_abc\"},\n {\"action\": \"create\", \"context\": {\"columns\": [\"column_1\", \"column_2\"], \"type\": \"hash\", \"unique\": True}},\n ],\n }\n\n Either way, `get_materialized_view_configuration_changes` needs to align with `get_alter_materialized_view_as_sql`.\n #} */\n {{- log('Determining configuration changes on: ' ~ existing_relation) -}}\n {%- do return(adapter.dispatch('get_materialized_view_configuration_changes', 'dbt')(existing_relation, new_config)) -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_materialized_view_configuration_changes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.21355, "supported_languages": null}, "macro.dbt.default__get_materialized_view_configuration_changes": {"name": "default__get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.default__get_materialized_view_configuration_changes", "macro_sql": "{% macro default__get_materialized_view_configuration_changes(existing_relation, new_config) %}\n {{ exceptions.raise_compiler_error(\"Materialized views have not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.213684, "supported_languages": null}, "macro.dbt.get_create_materialized_view_as_sql": {"name": "get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt.get_create_materialized_view_as_sql", "macro_sql": "{% macro get_create_materialized_view_as_sql(relation, sql) -%}\n {{- adapter.dispatch('get_create_materialized_view_as_sql', 'dbt')(relation, sql) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_create_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.213943, "supported_languages": null}, "macro.dbt.default__get_create_materialized_view_as_sql": {"name": "default__get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt.default__get_create_materialized_view_as_sql", "macro_sql": "{% macro default__get_create_materialized_view_as_sql(relation, sql) -%}\n {{ exceptions.raise_compiler_error(\n \"`get_create_materialized_view_as_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.214077, "supported_languages": null}, "macro.dbt.get_table_columns_and_constraints": {"name": "get_table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.get_table_columns_and_constraints", "macro_sql": "{%- macro get_table_columns_and_constraints() -%}\n {{ adapter.dispatch('get_table_columns_and_constraints', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_table_columns_and_constraints"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.214984, "supported_languages": null}, "macro.dbt.default__get_table_columns_and_constraints": {"name": "default__get_table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__get_table_columns_and_constraints", "macro_sql": "{% macro default__get_table_columns_and_constraints() -%}\n {{ return(table_columns_and_constraints()) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.table_columns_and_constraints"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.215093, "supported_languages": null}, "macro.dbt.table_columns_and_constraints": {"name": "table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.table_columns_and_constraints", "macro_sql": "{% macro table_columns_and_constraints() %}\n {# loop through user_provided_columns to create DDL with data types and constraints #}\n {%- set raw_column_constraints = adapter.render_raw_columns_constraints(raw_columns=model['columns']) -%}\n {%- set raw_model_constraints = adapter.render_raw_model_constraints(raw_constraints=model['constraints']) -%}\n (\n {% for c in raw_column_constraints -%}\n {{ c }}{{ \",\" if not loop.last or raw_model_constraints }}\n {% endfor %}\n {% for c in raw_model_constraints -%}\n {{ c }}{{ \",\" if not loop.last }}\n {% endfor -%}\n )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2155762, "supported_languages": null}, "macro.dbt.get_assert_columns_equivalent": {"name": "get_assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.get_assert_columns_equivalent", "macro_sql": "\n\n{%- macro get_assert_columns_equivalent(sql) -%}\n {{ adapter.dispatch('get_assert_columns_equivalent', 'dbt')(sql) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2157261, "supported_languages": null}, "macro.dbt.default__get_assert_columns_equivalent": {"name": "default__get_assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__get_assert_columns_equivalent", "macro_sql": "{% macro default__get_assert_columns_equivalent(sql) -%}\n {{ return(assert_columns_equivalent(sql)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2158458, "supported_languages": null}, "macro.dbt.assert_columns_equivalent": {"name": "assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.assert_columns_equivalent", "macro_sql": "{% macro assert_columns_equivalent(sql) %}\n\n {#-- First ensure the user has defined 'columns' in yaml specification --#}\n {%- set user_defined_columns = model['columns'] -%}\n {%- if not user_defined_columns -%}\n {{ exceptions.raise_contract_error([], []) }}\n {%- endif -%}\n\n {#-- Obtain the column schema provided by sql file. #}\n {%- set sql_file_provided_columns = get_column_schema_from_query(sql, config.get('sql_header', none)) -%}\n {#--Obtain the column schema provided by the schema file by generating an 'empty schema' query from the model's columns. #}\n {%- set schema_file_provided_columns = get_column_schema_from_query(get_empty_schema_sql(user_defined_columns)) -%}\n\n {#-- create dictionaries with name and formatted data type and strings for exception #}\n {%- set sql_columns = format_columns(sql_file_provided_columns) -%}\n {%- set yaml_columns = format_columns(schema_file_provided_columns) -%}\n\n {%- if sql_columns|length != yaml_columns|length -%}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n\n {%- for sql_col in sql_columns -%}\n {%- set yaml_col = [] -%}\n {%- for this_col in yaml_columns -%}\n {%- if this_col['name'] == sql_col['name'] -%}\n {%- do yaml_col.append(this_col) -%}\n {%- break -%}\n {%- endif -%}\n {%- endfor -%}\n {%- if not yaml_col -%}\n {#-- Column with name not found in yaml #}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n {%- if sql_col['formatted'] != yaml_col[0]['formatted'] -%}\n {#-- Column data types don't match #}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n {%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_column_schema_from_query", "macro.dbt.get_empty_schema_sql", "macro.dbt.format_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.217101, "supported_languages": null}, "macro.dbt.format_columns": {"name": "format_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.format_columns", "macro_sql": "{% macro format_columns(columns) %}\n {% set formatted_columns = [] %}\n {% for column in columns %}\n {%- set formatted_column = adapter.dispatch('format_column', 'dbt')(column) -%}\n {%- do formatted_columns.append(formatted_column) -%}\n {% endfor %}\n {{ return(formatted_columns) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__format_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2174542, "supported_languages": null}, "macro.dbt.default__format_column": {"name": "default__format_column", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__format_column", "macro_sql": "{% macro default__format_column(column) -%}\n {% set data_type = column.dtype %}\n {% set formatted = column.column.lower() ~ \" \" ~ data_type %}\n {{ return({'name': column.name, 'data_type': data_type, 'formatted': formatted}) }}\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.21777, "supported_languages": null}, "macro.dbt.drop_table": {"name": "drop_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt.drop_table", "macro_sql": "{% macro drop_table(relation) -%}\n {{ return(adapter.dispatch('drop_table', 'dbt')(relation)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.218018, "supported_languages": null}, "macro.dbt.default__drop_table": {"name": "default__drop_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt.default__drop_table", "macro_sql": "{% macro default__drop_table(relation) -%}\n drop table if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.218116, "supported_languages": null}, "macro.dbt.get_replace_table_sql": {"name": "get_replace_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt.get_replace_table_sql", "macro_sql": "{% macro get_replace_table_sql(relation, sql) %}\n {{- adapter.dispatch('get_replace_table_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_replace_table_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.21836, "supported_languages": null}, "macro.dbt.default__get_replace_table_sql": {"name": "default__get_replace_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt.default__get_replace_table_sql", "macro_sql": "{% macro default__get_replace_table_sql(relation, sql) %}\n {{ exceptions.raise_compiler_error(\n \"`get_replace_table_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2184908, "supported_languages": null}, "macro.dbt.get_rename_table_sql": {"name": "get_rename_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt.get_rename_table_sql", "macro_sql": "{% macro get_rename_table_sql(relation, new_name) %}\n {{- adapter.dispatch('get_rename_table_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_table_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.218734, "supported_languages": null}, "macro.dbt.default__get_rename_table_sql": {"name": "default__get_rename_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt.default__get_rename_table_sql", "macro_sql": "{% macro default__get_rename_table_sql(relation, new_name) %}\n {{ exceptions.raise_compiler_error(\n \"`get_rename_table_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2188668, "supported_languages": null}, "macro.dbt.get_create_table_as_sql": {"name": "get_create_table_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.get_create_table_as_sql", "macro_sql": "{% macro get_create_table_as_sql(temporary, relation, sql) -%}\n {{ adapter.dispatch('get_create_table_as_sql', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_create_table_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.219636, "supported_languages": null}, "macro.dbt.default__get_create_table_as_sql": {"name": "default__get_create_table_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_create_table_as_sql", "macro_sql": "{% macro default__get_create_table_as_sql(temporary, relation, sql) -%}\n {{ return(create_table_as(temporary, relation, sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.219806, "supported_languages": null}, "macro.dbt.create_table_as": {"name": "create_table_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.create_table_as", "macro_sql": "{% macro create_table_as(temporary, relation, compiled_code, language='sql') -%}\n {# backward compatibility for create_table_as that does not support language #}\n {% if language == \"sql\" %}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, compiled_code)}}\n {% else %}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, compiled_code, language) }}\n {% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.220191, "supported_languages": null}, "macro.dbt.default__create_table_as": {"name": "default__create_table_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__create_table_as", "macro_sql": "{% macro default__create_table_as(temporary, relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create {% if temporary: -%}temporary{%- endif %} table\n {{ relation.include(database=(not temporary), schema=(not temporary)) }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced and (not temporary) %}\n {{ get_assert_columns_equivalent(sql) }}\n {{ get_table_columns_and_constraints() }}\n {%- set sql = get_select_subquery(sql) %}\n {% endif %}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.221004, "supported_languages": null}, "macro.dbt.default__get_column_names": {"name": "default__get_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_column_names", "macro_sql": "{% macro default__get_column_names() %}\n {#- loop through user_provided_columns to get column names -#}\n {%- set user_provided_columns = model['columns'] -%}\n {%- for i in user_provided_columns %}\n {%- set col = user_provided_columns[i] -%}\n {%- set col_name = adapter.quote(col['name']) if col.get('quote') else col['name'] -%}\n {{ col_name }}{{ \", \" if not loop.last }}\n {%- endfor -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.221496, "supported_languages": null}, "macro.dbt.get_select_subquery": {"name": "get_select_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.get_select_subquery", "macro_sql": "{% macro get_select_subquery(sql) %}\n {{ return(adapter.dispatch('get_select_subquery', 'dbt')(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2216809, "supported_languages": null}, "macro.dbt.default__get_select_subquery": {"name": "default__get_select_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_select_subquery", "macro_sql": "{% macro default__get_select_subquery(sql) %}\n select {{ adapter.dispatch('get_column_names', 'dbt')() }}\n from (\n {{ sql }}\n ) as model_subq\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_column_names"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.221893, "supported_languages": null}, "macro.dbt.drop_view": {"name": "drop_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt.drop_view", "macro_sql": "{% macro drop_view(relation) -%}\n {{ return(adapter.dispatch('drop_view', 'dbt')(relation)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.222184, "supported_languages": null}, "macro.dbt.default__drop_view": {"name": "default__drop_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt.default__drop_view", "macro_sql": "{% macro default__drop_view(relation) -%}\n drop view if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.222293, "supported_languages": null}, "macro.dbt.get_replace_view_sql": {"name": "get_replace_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.get_replace_view_sql", "macro_sql": "{% macro get_replace_view_sql(relation, sql) %}\n {{- adapter.dispatch('get_replace_view_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_replace_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.223247, "supported_languages": null}, "macro.dbt.default__get_replace_view_sql": {"name": "default__get_replace_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.default__get_replace_view_sql", "macro_sql": "{% macro default__get_replace_view_sql(relation, sql) %}\n {{ exceptions.raise_compiler_error(\n \"`get_replace_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.223403, "supported_languages": null}, "macro.dbt.create_or_replace_view": {"name": "create_or_replace_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.create_or_replace_view", "macro_sql": "{% macro create_or_replace_view() %}\n {%- set identifier = model['alias'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database,\n type='view') -%}\n {% set grant_config = config.get('grants') %}\n\n {{ run_hooks(pre_hooks) }}\n\n -- If there's a table with the same name and we weren't told to full refresh,\n -- that's an error. If we were told to full refresh, drop it. This behavior differs\n -- for Snowflake and BigQuery, so multiple dispatch is used.\n {%- if old_relation is not none and old_relation.is_table -%}\n {{ handle_existing_table(should_full_refresh(), old_relation) }}\n {%- endif -%}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(target_relation, sql) }}\n {%- endcall %}\n\n {% set should_revoke = should_revoke(exists_as_view, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.handle_existing_table", "macro.dbt.should_full_refresh", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.224544, "supported_languages": null}, "macro.dbt.handle_existing_table": {"name": "handle_existing_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.handle_existing_table", "macro_sql": "{% macro handle_existing_table(full_refresh, old_relation) %}\n {{ adapter.dispatch('handle_existing_table', 'dbt')(full_refresh, old_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.224729, "supported_languages": null}, "macro.dbt.default__handle_existing_table": {"name": "default__handle_existing_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.default__handle_existing_table", "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n {{ log(\"Dropping relation \" ~ old_relation ~ \" because it is of type \" ~ old_relation.type) }}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.22493, "supported_languages": null}, "macro.dbt.get_rename_view_sql": {"name": "get_rename_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt.get_rename_view_sql", "macro_sql": "{% macro get_rename_view_sql(relation, new_name) %}\n {{- adapter.dispatch('get_rename_view_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.225187, "supported_languages": null}, "macro.dbt.default__get_rename_view_sql": {"name": "default__get_rename_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt.default__get_rename_view_sql", "macro_sql": "{% macro default__get_rename_view_sql(relation, new_name) %}\n {{ exceptions.raise_compiler_error(\n \"`get_rename_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.225322, "supported_languages": null}, "macro.dbt.get_create_view_as_sql": {"name": "get_create_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.get_create_view_as_sql", "macro_sql": "{% macro get_create_view_as_sql(relation, sql) -%}\n {{ adapter.dispatch('get_create_view_as_sql', 'dbt')(relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.225701, "supported_languages": null}, "macro.dbt.default__get_create_view_as_sql": {"name": "default__get_create_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.default__get_create_view_as_sql", "macro_sql": "{% macro default__get_create_view_as_sql(relation, sql) -%}\n {{ return(create_view_as(relation, sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.225857, "supported_languages": null}, "macro.dbt.create_view_as": {"name": "create_view_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n {{ adapter.dispatch('create_view_as', 'dbt')(relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.226027, "supported_languages": null}, "macro.dbt.default__create_view_as": {"name": "default__create_view_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.default__create_view_as", "macro_sql": "{% macro default__create_view_as(relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n create view {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {%- endif %}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.226413, "supported_languages": null}, "macro.dbt.default__test_relationships": {"name": "default__test_relationships", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/relationships.sql", "original_file_path": "macros/generic_test_sql/relationships.sql", "unique_id": "macro.dbt.default__test_relationships", "macro_sql": "{% macro default__test_relationships(model, column_name, to, field) %}\n\nwith child as (\n select {{ column_name }} as from_field\n from {{ model }}\n where {{ column_name }} is not null\n),\n\nparent as (\n select {{ field }} as to_field\n from {{ to }}\n)\n\nselect\n from_field\n\nfrom child\nleft join parent\n on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2267442, "supported_languages": null}, "macro.dbt.default__test_not_null": {"name": "default__test_not_null", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/not_null.sql", "original_file_path": "macros/generic_test_sql/not_null.sql", "unique_id": "macro.dbt.default__test_not_null", "macro_sql": "{% macro default__test_not_null(model, column_name) %}\n\n{% set column_list = '*' if should_store_failures() else column_name %}\n\nselect {{ column_list }}\nfrom {{ model }}\nwhere {{ column_name }} is null\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.227015, "supported_languages": null}, "macro.dbt.default__test_unique": {"name": "default__test_unique", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/unique.sql", "original_file_path": "macros/generic_test_sql/unique.sql", "unique_id": "macro.dbt.default__test_unique", "macro_sql": "{% macro default__test_unique(model, column_name) %}\n\nselect\n {{ column_name }} as unique_field,\n count(*) as n_records\n\nfrom {{ model }}\nwhere {{ column_name }} is not null\ngroup by {{ column_name }}\nhaving count(*) > 1\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.227246, "supported_languages": null}, "macro.dbt.default__test_accepted_values": {"name": "default__test_accepted_values", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/accepted_values.sql", "original_file_path": "macros/generic_test_sql/accepted_values.sql", "unique_id": "macro.dbt.default__test_accepted_values", "macro_sql": "{% macro default__test_accepted_values(model, column_name, values, quote=True) %}\n\nwith all_values as (\n\n select\n {{ column_name }} as value_field,\n count(*) as n_records\n\n from {{ model }}\n group by {{ column_name }}\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n)\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.227763, "supported_languages": null}, "macro.dbt.statement": {"name": "statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.statement", "macro_sql": "\n{%- macro statement(name=None, fetch_result=False, auto_begin=True, language='sql') -%}\n {%- if execute: -%}\n {%- set compiled_code = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime {} for node \"{}\"'.format(language, model['unique_id'])) }}\n {{ write(compiled_code) }}\n {%- endif -%}\n {%- if language == 'sql'-%}\n {%- set res, table = adapter.execute(compiled_code, auto_begin=auto_begin, fetch=fetch_result) -%}\n {%- elif language == 'python' -%}\n {%- set res = submit_python_job(model, compiled_code) -%}\n {#-- TODO: What should table be for python models? --#}\n {%- set table = None -%}\n {%- else -%}\n {% do exceptions.raise_compiler_error(\"statement macro didn't get supported language\") %}\n {%- endif -%}\n\n {%- if name is not none -%}\n {{ store_result(name, response=res, agate_table=table) }}\n {%- endif -%}\n\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.229095, "supported_languages": null}, "macro.dbt.noop_statement": {"name": "noop_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.noop_statement", "macro_sql": "{% macro noop_statement(name=None, message=None, code=None, rows_affected=None, res=None) -%}\n {%- set sql = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime SQL for node \"{}\"'.format(model['unique_id'])) }}\n {{ write(sql) }}\n {%- endif -%}\n\n {%- if name is not none -%}\n {{ store_raw_result(name, message=message, code=code, rows_affected=rows_affected, agate_table=res) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.22963, "supported_languages": null}, "macro.dbt.run_query": {"name": "run_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.run_query", "macro_sql": "{% macro run_query(sql) %}\n {% call statement(\"run_query_statement\", fetch_result=true, auto_begin=false) %}\n {{ sql }}\n {% endcall %}\n\n {% do return(load_result(\"run_query_statement\").table) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.22991, "supported_languages": null}, "macro.dbt.convert_datetime": {"name": "convert_datetime", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.convert_datetime", "macro_sql": "{% macro convert_datetime(date_str, date_fmt) %}\n\n {% set error_msg -%}\n The provided partition date '{{ date_str }}' does not match the expected format '{{ date_fmt }}'\n {%- endset %}\n\n {% set res = try_or_compiler_error(error_msg, modules.datetime.datetime.strptime, date_str.strip(), date_fmt) %}\n {{ return(res) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.23177, "supported_languages": null}, "macro.dbt.dates_in_range": {"name": "dates_in_range", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.dates_in_range", "macro_sql": "{% macro dates_in_range(start_date_str, end_date_str=none, in_fmt=\"%Y%m%d\", out_fmt=\"%Y%m%d\") %}\n {% set end_date_str = start_date_str if end_date_str is none else end_date_str %}\n\n {% set start_date = convert_datetime(start_date_str, in_fmt) %}\n {% set end_date = convert_datetime(end_date_str, in_fmt) %}\n\n {% set day_count = (end_date - start_date).days %}\n {% if day_count < 0 %}\n {% set msg -%}\n Partition start date is after the end date ({{ start_date }}, {{ end_date }})\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg, model) }}\n {% endif %}\n\n {% set date_list = [] %}\n {% for i in range(0, day_count + 1) %}\n {% set the_date = (modules.datetime.timedelta(days=i) + start_date) %}\n {% if not out_fmt %}\n {% set _ = date_list.append(the_date) %}\n {% else %}\n {% set _ = date_list.append(the_date.strftime(out_fmt)) %}\n {% endif %}\n {% endfor %}\n\n {{ return(date_list) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2329988, "supported_languages": null}, "macro.dbt.partition_range": {"name": "partition_range", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.partition_range", "macro_sql": "{% macro partition_range(raw_partition_date, date_fmt='%Y%m%d') %}\n {% set partition_range = (raw_partition_date | string).split(\",\") %}\n\n {% if (partition_range | length) == 1 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = none %}\n {% elif (partition_range | length) == 2 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = partition_range[1] %}\n {% else %}\n {{ exceptions.raise_compiler_error(\"Invalid partition time. Expected format: {Start Date}[,{End Date}]. Got: \" ~ raw_partition_date) }}\n {% endif %}\n\n {{ return(dates_in_range(start_date, end_date, in_fmt=date_fmt)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dates_in_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.233695, "supported_languages": null}, "macro.dbt.py_current_timestring": {"name": "py_current_timestring", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.py_current_timestring", "macro_sql": "{% macro py_current_timestring() %}\n {% set dt = modules.datetime.datetime.now() %}\n {% do return(dt.strftime(\"%Y%m%d%H%M%S%f\")) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.233929, "supported_languages": null}, "macro.dbt.except": {"name": "except", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "unique_id": "macro.dbt.except", "macro_sql": "{% macro except() %}\n {{ return(adapter.dispatch('except', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2341812, "supported_languages": null}, "macro.dbt.default__except": {"name": "default__except", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "unique_id": "macro.dbt.default__except", "macro_sql": "{% macro default__except() %}\n\n except\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.234259, "supported_languages": null}, "macro.dbt.get_intervals_between": {"name": "get_intervals_between", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('get_intervals_between', 'dbt')(start_date, end_date, datepart)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.234965, "supported_languages": null}, "macro.dbt.default__get_intervals_between": {"name": "default__get_intervals_between", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.default__get_intervals_between", "macro_sql": "{% macro default__get_intervals_between(start_date, end_date, datepart) -%}\n {%- call statement('get_intervals_between', fetch_result=True) %}\n\n select {{ dbt.datediff(start_date, end_date, datepart) }}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_intervals_between') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values[0]) }}\n {%- else -%}\n {{ return(1) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2355268, "supported_languages": null}, "macro.dbt.date_spine": {"name": "date_spine", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('date_spine', 'dbt')(datepart, start_date, end_date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.235741, "supported_languages": null}, "macro.dbt.default__date_spine": {"name": "default__date_spine", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n\n {# call as follows:\n\n date_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dbt.dateadd(week, 1, current_date)\"\n ) #}\n\n\n with rawdata as (\n\n {{dbt.generate_series(\n dbt.get_intervals_between(start_date, end_date, datepart)\n )}}\n\n ),\n\n all_periods as (\n\n select (\n {{\n dbt.dateadd(\n datepart,\n \"row_number() over (order by 1) - 1\",\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n\n ),\n\n filtered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n )\n\n select * from filtered\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.generate_series", "macro.dbt.get_intervals_between", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2360902, "supported_languages": null}, "macro.dbt.replace": {"name": "replace", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "unique_id": "macro.dbt.replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n {{ return(adapter.dispatch('replace', 'dbt') (field, old_chars, new_chars)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.236392, "supported_languages": null}, "macro.dbt.default__replace": {"name": "default__replace", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "unique_id": "macro.dbt.default__replace", "macro_sql": "{% macro default__replace(field, old_chars, new_chars) %}\n\n replace(\n {{ field }},\n {{ old_chars }},\n {{ new_chars }}\n )\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2365491, "supported_languages": null}, "macro.dbt.concat": {"name": "concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "unique_id": "macro.dbt.concat", "macro_sql": "{% macro concat(fields) -%}\n {{ return(adapter.dispatch('concat', 'dbt')(fields)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.236777, "supported_languages": null}, "macro.dbt.default__concat": {"name": "default__concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "unique_id": "macro.dbt.default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n {{ fields|join(' || ') }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.236895, "supported_languages": null}, "macro.dbt.get_powers_of_two": {"name": "get_powers_of_two", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('get_powers_of_two', 'dbt')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.237896, "supported_languages": null}, "macro.dbt.default__get_powers_of_two": {"name": "default__get_powers_of_two", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.default__get_powers_of_two", "macro_sql": "{% macro default__get_powers_of_two(upper_bound) %}\n\n {% if upper_bound <= 0 %}\n {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n {% endif %}\n\n {% for _ in range(1, 100) %}\n {% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2383392, "supported_languages": null}, "macro.dbt.generate_series": {"name": "generate_series", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2385259, "supported_languages": null}, "macro.dbt.default__generate_series": {"name": "default__generate_series", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.default__generate_series", "macro_sql": "{% macro default__generate_series(upper_bound) %}\n\n {% set n = dbt.get_powers_of_two(upper_bound) %}\n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n {% for i in range(n) %}\n p{{i}}.generated_number * power(2, {{i}})\n {% if not loop.last %} + {% endif %}\n {% endfor %}\n + 1\n as generated_number\n\n from\n\n {% for i in range(n) %}\n p as p{{i}}\n {% if not loop.last %} cross join {% endif %}\n {% endfor %}\n\n )\n\n select *\n from unioned\n where generated_number <= {{upper_bound}}\n order by generated_number\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.23902, "supported_languages": null}, "macro.dbt.length": {"name": "length", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "unique_id": "macro.dbt.length", "macro_sql": "{% macro length(expression) -%}\n {{ return(adapter.dispatch('length', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__length"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.239295, "supported_languages": null}, "macro.dbt.default__length": {"name": "default__length", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "unique_id": "macro.dbt.default__length", "macro_sql": "{% macro default__length(expression) %}\n\n length(\n {{ expression }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.239403, "supported_languages": null}, "macro.dbt.dateadd": {"name": "dateadd", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt.dateadd", "macro_sql": "{% macro dateadd(datepart, interval, from_date_or_timestamp) %}\n {{ return(adapter.dispatch('dateadd', 'dbt')(datepart, interval, from_date_or_timestamp)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.239717, "supported_languages": null}, "macro.dbt.default__dateadd": {"name": "default__dateadd", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt.default__dateadd", "macro_sql": "{% macro default__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_date_or_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.239871, "supported_languages": null}, "macro.dbt.intersect": {"name": "intersect", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "unique_id": "macro.dbt.intersect", "macro_sql": "{% macro intersect() %}\n {{ return(adapter.dispatch('intersect', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__intersect"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.240077, "supported_languages": null}, "macro.dbt.default__intersect": {"name": "default__intersect", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "unique_id": "macro.dbt.default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n intersect\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2402492, "supported_languages": null}, "macro.dbt.escape_single_quotes": {"name": "escape_single_quotes", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "unique_id": "macro.dbt.escape_single_quotes", "macro_sql": "{% macro escape_single_quotes(expression) %}\n {{ return(adapter.dispatch('escape_single_quotes', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.24049, "supported_languages": null}, "macro.dbt.default__escape_single_quotes": {"name": "default__escape_single_quotes", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "unique_id": "macro.dbt.default__escape_single_quotes", "macro_sql": "{% macro default__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\",\"''\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.240713, "supported_languages": null}, "macro.dbt.right": {"name": "right", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "unique_id": "macro.dbt.right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n {{ return(adapter.dispatch('right', 'dbt') (string_text, length_expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__right"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2410681, "supported_languages": null}, "macro.dbt.default__right": {"name": "default__right", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "unique_id": "macro.dbt.default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n right(\n {{ string_text }},\n {{ length_expression }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.24124, "supported_languages": null}, "macro.dbt.listagg": {"name": "listagg", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt.listagg", "macro_sql": "{% macro listagg(measure, delimiter_text=\"','\", order_by_clause=none, limit_num=none) -%}\n {{ return(adapter.dispatch('listagg', 'dbt') (measure, delimiter_text, order_by_clause, limit_num)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__listagg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2418408, "supported_languages": null}, "macro.dbt.default__listagg": {"name": "default__listagg", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt.default__listagg", "macro_sql": "{% macro default__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n array_to_string(\n array_slice(\n array_agg(\n {{ measure }}\n ){% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n ,0\n ,{{ limit_num }}\n ),\n {{ delimiter_text }}\n )\n {%- else %}\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2422342, "supported_languages": null}, "macro.dbt.datediff": {"name": "datediff", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt.datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n {{ return(adapter.dispatch('datediff', 'dbt')(first_date, second_date, datepart)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.24257, "supported_languages": null}, "macro.dbt.default__datediff": {"name": "default__datediff", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt.default__datediff", "macro_sql": "{% macro default__datediff(first_date, second_date, datepart) -%}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.242733, "supported_languages": null}, "macro.dbt.safe_cast": {"name": "safe_cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "unique_id": "macro.dbt.safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n {{ return(adapter.dispatch('safe_cast', 'dbt') (field, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.243005, "supported_languages": null}, "macro.dbt.default__safe_cast": {"name": "default__safe_cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "unique_id": "macro.dbt.default__safe_cast", "macro_sql": "{% macro default__safe_cast(field, type) %}\n {# most databases don't support this function yet\n so we just need to use cast #}\n cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2431412, "supported_languages": null}, "macro.dbt.hash": {"name": "hash", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "unique_id": "macro.dbt.hash", "macro_sql": "{% macro hash(field) -%}\n {{ return(adapter.dispatch('hash', 'dbt') (field)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2434182, "supported_languages": null}, "macro.dbt.default__hash": {"name": "default__hash", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "unique_id": "macro.dbt.default__hash", "macro_sql": "{% macro default__hash(field) -%}\n md5(cast({{ field }} as {{ api.Column.translate_type('string') }}))\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.243598, "supported_languages": null}, "macro.dbt.cast_bool_to_text": {"name": "cast_bool_to_text", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "unique_id": "macro.dbt.cast_bool_to_text", "macro_sql": "{% macro cast_bool_to_text(field) %}\n {{ adapter.dispatch('cast_bool_to_text', 'dbt') (field) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2438369, "supported_languages": null}, "macro.dbt.default__cast_bool_to_text": {"name": "default__cast_bool_to_text", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "unique_id": "macro.dbt.default__cast_bool_to_text", "macro_sql": "{% macro default__cast_bool_to_text(field) %}\n cast({{ field }} as {{ api.Column.translate_type('string') }})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.24401, "supported_languages": null}, "macro.dbt.any_value": {"name": "any_value", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt.any_value", "macro_sql": "{% macro any_value(expression) -%}\n {{ return(adapter.dispatch('any_value', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__any_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.244249, "supported_languages": null}, "macro.dbt.default__any_value": {"name": "default__any_value", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt.default__any_value", "macro_sql": "{% macro default__any_value(expression) -%}\n\n any_value({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.244354, "supported_languages": null}, "macro.dbt.position": {"name": "position", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "unique_id": "macro.dbt.position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n {{ return(adapter.dispatch('position', 'dbt') (substring_text, string_text)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__position"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.244631, "supported_languages": null}, "macro.dbt.default__position": {"name": "default__position", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "unique_id": "macro.dbt.default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n position(\n {{ substring_text }} in {{ string_text }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.24476, "supported_languages": null}, "macro.dbt.string_literal": {"name": "string_literal", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "unique_id": "macro.dbt.string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n {{ return(adapter.dispatch('string_literal', 'dbt') (value)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.244983, "supported_languages": null}, "macro.dbt.default__string_literal": {"name": "default__string_literal", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "unique_id": "macro.dbt.default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n '{{ value }}'\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2451699, "supported_languages": null}, "macro.dbt.type_string": {"name": "type_string", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n {{ return(adapter.dispatch('type_string', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.246026, "supported_languages": null}, "macro.dbt.default__type_string": {"name": "default__type_string", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_string", "macro_sql": "{% macro default__type_string() %}\n {{ return(api.Column.translate_type(\"string\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.246171, "supported_languages": null}, "macro.dbt.type_timestamp": {"name": "type_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.246328, "supported_languages": null}, "macro.dbt.default__type_timestamp": {"name": "default__type_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n {{ return(api.Column.translate_type(\"timestamp\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.246473, "supported_languages": null}, "macro.dbt.type_float": {"name": "type_float", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n {{ return(adapter.dispatch('type_float', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2466261, "supported_languages": null}, "macro.dbt.default__type_float": {"name": "default__type_float", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_float", "macro_sql": "{% macro default__type_float() %}\n {{ return(api.Column.translate_type(\"float\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.24677, "supported_languages": null}, "macro.dbt.type_numeric": {"name": "type_numeric", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n {{ return(adapter.dispatch('type_numeric', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.246925, "supported_languages": null}, "macro.dbt.default__type_numeric": {"name": "default__type_numeric", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n {{ return(api.Column.numeric_type(\"numeric\", 28, 6)) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.247096, "supported_languages": null}, "macro.dbt.type_bigint": {"name": "type_bigint", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n {{ return(adapter.dispatch('type_bigint', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2472472, "supported_languages": null}, "macro.dbt.default__type_bigint": {"name": "default__type_bigint", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n {{ return(api.Column.translate_type(\"bigint\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.247388, "supported_languages": null}, "macro.dbt.type_int": {"name": "type_int", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n {{ return(adapter.dispatch('type_int', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.247539, "supported_languages": null}, "macro.dbt.default__type_int": {"name": "default__type_int", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_int", "macro_sql": "{%- macro default__type_int() -%}\n {{ return(api.Column.translate_type(\"integer\")) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2476711, "supported_languages": null}, "macro.dbt.type_boolean": {"name": "type_boolean", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_boolean", "macro_sql": "\n\n{%- macro type_boolean() -%}\n {{ return(adapter.dispatch('type_boolean', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.247817, "supported_languages": null}, "macro.dbt.default__type_boolean": {"name": "default__type_boolean", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_boolean", "macro_sql": "{%- macro default__type_boolean() -%}\n {{ return(api.Column.translate_type(\"boolean\")) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.247953, "supported_languages": null}, "macro.dbt.array_concat": {"name": "array_concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "unique_id": "macro.dbt.array_concat", "macro_sql": "{% macro array_concat(array_1, array_2) -%}\n {{ return(adapter.dispatch('array_concat', 'dbt')(array_1, array_2)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2482328, "supported_languages": null}, "macro.dbt.default__array_concat": {"name": "default__array_concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "unique_id": "macro.dbt.default__array_concat", "macro_sql": "{% macro default__array_concat(array_1, array_2) -%}\n array_cat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.248368, "supported_languages": null}, "macro.dbt.bool_or": {"name": "bool_or", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "unique_id": "macro.dbt.bool_or", "macro_sql": "{% macro bool_or(expression) -%}\n {{ return(adapter.dispatch('bool_or', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.248596, "supported_languages": null}, "macro.dbt.default__bool_or": {"name": "default__bool_or", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "unique_id": "macro.dbt.default__bool_or", "macro_sql": "{% macro default__bool_or(expression) -%}\n\n bool_or({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2486908, "supported_languages": null}, "macro.dbt.last_day": {"name": "last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n {{ return(adapter.dispatch('last_day', 'dbt') (date, datepart)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.249281, "supported_languages": null}, "macro.dbt.default_last_day": {"name": "default_last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.default_last_day", "macro_sql": "\n\n{%- macro default_last_day(date, datepart) -%}\n cast(\n {{dbt.dateadd('day', '-1',\n dbt.dateadd(datepart, '1', dbt.date_trunc(datepart, date))\n )}}\n as date)\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.249543, "supported_languages": null}, "macro.dbt.default__last_day": {"name": "default__last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n {{dbt.default_last_day(date, datepart)}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2496839, "supported_languages": null}, "macro.dbt.split_part": {"name": "split_part", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt.split_part", "macro_sql": "{% macro split_part(string_text, delimiter_text, part_number) %}\n {{ return(adapter.dispatch('split_part', 'dbt') (string_text, delimiter_text, part_number)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2503161, "supported_languages": null}, "macro.dbt.default__split_part": {"name": "default__split_part", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt.default__split_part", "macro_sql": "{% macro default__split_part(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n {{ part_number }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.250486, "supported_languages": null}, "macro.dbt._split_part_negative": {"name": "_split_part_negative", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt._split_part_negative", "macro_sql": "{% macro _split_part_negative(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n length({{ string_text }})\n - length(\n replace({{ string_text }}, {{ delimiter_text }}, '')\n ) + 2 + {{ part_number }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2507782, "supported_languages": null}, "macro.dbt.date_trunc": {"name": "date_trunc", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "unique_id": "macro.dbt.date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n {{ return(adapter.dispatch('date_trunc', 'dbt') (datepart, date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2511518, "supported_languages": null}, "macro.dbt.default__date_trunc": {"name": "default__date_trunc", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "unique_id": "macro.dbt.default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) -%}\n date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.251323, "supported_languages": null}, "macro.dbt.array_construct": {"name": "array_construct", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "unique_id": "macro.dbt.array_construct", "macro_sql": "{% macro array_construct(inputs=[], data_type=api.Column.translate_type('integer')) -%}\n {{ return(adapter.dispatch('array_construct', 'dbt')(inputs, data_type)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_construct"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2517, "supported_languages": null}, "macro.dbt.default__array_construct": {"name": "default__array_construct", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "unique_id": "macro.dbt.default__array_construct", "macro_sql": "{% macro default__array_construct(inputs, data_type) -%}\n {% if inputs|length > 0 %}\n array[ {{ inputs|join(' , ') }} ]\n {% else %}\n array[]::{{data_type}}[]\n {% endif %}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2519329, "supported_languages": null}, "macro.dbt.array_append": {"name": "array_append", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "unique_id": "macro.dbt.array_append", "macro_sql": "{% macro array_append(array, new_element) -%}\n {{ return(adapter.dispatch('array_append', 'dbt')(array, new_element)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_append"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.252351, "supported_languages": null}, "macro.dbt.default__array_append": {"name": "default__array_append", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "unique_id": "macro.dbt.default__array_append", "macro_sql": "{% macro default__array_append(array, new_element) -%}\n array_append({{ array }}, {{ new_element }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.252495, "supported_languages": null}, "macro.dbt.create_schema": {"name": "create_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n {{ adapter.dispatch('create_schema', 'dbt')(relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.252862, "supported_languages": null}, "macro.dbt.default__create_schema": {"name": "default__create_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.default__create_schema", "macro_sql": "{% macro default__create_schema(relation) -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier() }}\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.253044, "supported_languages": null}, "macro.dbt.drop_schema": {"name": "drop_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n {{ adapter.dispatch('drop_schema', 'dbt')(relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.253195, "supported_languages": null}, "macro.dbt.default__drop_schema": {"name": "default__drop_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.default__drop_schema", "macro_sql": "{% macro default__drop_schema(relation) -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier() }} cascade\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.253367, "supported_languages": null}, "macro.dbt.current_timestamp": {"name": "current_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp", "macro_sql": "{%- macro current_timestamp() -%}\n {{ adapter.dispatch('current_timestamp', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.253817, "supported_languages": null}, "macro.dbt.default__current_timestamp": {"name": "default__current_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() -%}\n {{ exceptions.raise_not_implemented(\n 'current_timestamp macro not implemented for adapter ' + adapter.type()) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.253958, "supported_languages": null}, "macro.dbt.snapshot_get_time": {"name": "snapshot_get_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.snapshot_get_time", "macro_sql": "\n\n{%- macro snapshot_get_time() -%}\n {{ adapter.dispatch('snapshot_get_time', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.254097, "supported_languages": null}, "macro.dbt.default__snapshot_get_time": {"name": "default__snapshot_get_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() %}\n {{ current_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2542, "supported_languages": null}, "macro.dbt.current_timestamp_backcompat": {"name": "current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp_backcompat", "macro_sql": "{% macro current_timestamp_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2544608, "supported_languages": null}, "macro.dbt.default__current_timestamp_backcompat": {"name": "default__current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp_backcompat", "macro_sql": "{% macro default__current_timestamp_backcompat() %}\n current_timestamp::timestamp\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.25454, "supported_languages": null}, "macro.dbt.current_timestamp_in_utc_backcompat": {"name": "current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp_in_utc_backcompat", "macro_sql": "{% macro current_timestamp_in_utc_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_in_utc_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.254698, "supported_languages": null}, "macro.dbt.default__current_timestamp_in_utc_backcompat": {"name": "default__current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp_in_utc_backcompat", "macro_sql": "{% macro default__current_timestamp_in_utc_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp_backcompat", "macro.dbt_postgres.postgres__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.254855, "supported_languages": null}, "macro.dbt.get_create_index_sql": {"name": "get_create_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_create_index_sql", "macro_sql": "{% macro get_create_index_sql(relation, index_dict) -%}\n {{ return(adapter.dispatch('get_create_index_sql', 'dbt')(relation, index_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.255632, "supported_languages": null}, "macro.dbt.default__get_create_index_sql": {"name": "default__get_create_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_create_index_sql", "macro_sql": "{% macro default__get_create_index_sql(relation, index_dict) -%}\n {% do return(None) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.255766, "supported_languages": null}, "macro.dbt.create_indexes": {"name": "create_indexes", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.create_indexes", "macro_sql": "{% macro create_indexes(relation) -%}\n {{ adapter.dispatch('create_indexes', 'dbt')(relation) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.255915, "supported_languages": null}, "macro.dbt.default__create_indexes": {"name": "default__create_indexes", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__create_indexes", "macro_sql": "{% macro default__create_indexes(relation) -%}\n {%- set _indexes = config.get('indexes', default=[]) -%}\n\n {% for _index_dict in _indexes %}\n {% set create_index_sql = get_create_index_sql(relation, _index_dict) %}\n {% if create_index_sql %}\n {% do run_query(create_index_sql) %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_create_index_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.256288, "supported_languages": null}, "macro.dbt.get_drop_index_sql": {"name": "get_drop_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_drop_index_sql", "macro_sql": "{% macro get_drop_index_sql(relation, index_name) -%}\n {{ adapter.dispatch('get_drop_index_sql', 'dbt')(relation, index_name) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_drop_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.256455, "supported_languages": null}, "macro.dbt.default__get_drop_index_sql": {"name": "default__get_drop_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_drop_index_sql", "macro_sql": "{% macro default__get_drop_index_sql(relation, index_name) -%}\n {{ exceptions.raise_compiler_error(\"`get_drop_index_sql has not been implemented for this adapter.\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.256581, "supported_languages": null}, "macro.dbt.get_show_indexes_sql": {"name": "get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_show_indexes_sql", "macro_sql": "{% macro get_show_indexes_sql(relation) -%}\n {{ adapter.dispatch('get_show_indexes_sql', 'dbt')(relation) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_show_indexes_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2567239, "supported_languages": null}, "macro.dbt.default__get_show_indexes_sql": {"name": "default__get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_show_indexes_sql", "macro_sql": "{% macro default__get_show_indexes_sql(relation) -%}\n {{ exceptions.raise_compiler_error(\"`get_show_indexes_sql has not been implemented for this adapter.\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.25684, "supported_languages": null}, "macro.dbt.make_intermediate_relation": {"name": "make_intermediate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_intermediate_relation", "macro_sql": "{% macro make_intermediate_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_intermediate_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_intermediate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.25856, "supported_languages": null}, "macro.dbt.default__make_intermediate_relation": {"name": "default__make_intermediate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_intermediate_relation", "macro_sql": "{% macro default__make_intermediate_relation(base_relation, suffix) %}\n {{ return(default__make_temp_relation(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.258713, "supported_languages": null}, "macro.dbt.make_temp_relation": {"name": "make_temp_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_temp_relation", "macro_sql": "{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_temp_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2589061, "supported_languages": null}, "macro.dbt.default__make_temp_relation": {"name": "default__make_temp_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_temp_relation", "macro_sql": "{% macro default__make_temp_relation(base_relation, suffix) %}\n {%- set temp_identifier = base_relation.identifier ~ suffix -%}\n {%- set temp_relation = base_relation.incorporate(\n path={\"identifier\": temp_identifier}) -%}\n\n {{ return(temp_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.259179, "supported_languages": null}, "macro.dbt.make_backup_relation": {"name": "make_backup_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_backup_relation", "macro_sql": "{% macro make_backup_relation(base_relation, backup_relation_type, suffix='__dbt_backup') %}\n {{ return(adapter.dispatch('make_backup_relation', 'dbt')(base_relation, backup_relation_type, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_backup_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.259413, "supported_languages": null}, "macro.dbt.default__make_backup_relation": {"name": "default__make_backup_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_backup_relation", "macro_sql": "{% macro default__make_backup_relation(base_relation, backup_relation_type, suffix) %}\n {%- set backup_identifier = base_relation.identifier ~ suffix -%}\n {%- set backup_relation = base_relation.incorporate(\n path={\"identifier\": backup_identifier},\n type=backup_relation_type\n ) -%}\n {{ return(backup_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2597098, "supported_languages": null}, "macro.dbt.truncate_relation": {"name": "truncate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n {{ return(adapter.dispatch('truncate_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__truncate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.259885, "supported_languages": null}, "macro.dbt.default__truncate_relation": {"name": "default__truncate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2601311, "supported_languages": null}, "macro.dbt.get_or_create_relation": {"name": "get_or_create_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.get_or_create_relation", "macro_sql": "{% macro get_or_create_relation(database, schema, identifier, type) -%}\n {{ return(adapter.dispatch('get_or_create_relation', 'dbt')(database, schema, identifier, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_or_create_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.260361, "supported_languages": null}, "macro.dbt.default__get_or_create_relation": {"name": "default__get_or_create_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__get_or_create_relation", "macro_sql": "{% macro default__get_or_create_relation(database, schema, identifier, type) %}\n {%- set target_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n {% if target_relation %}\n {% do return([true, target_relation]) %}\n {% endif %}\n\n {%- set new_relation = api.Relation.create(\n database=database,\n schema=schema,\n identifier=identifier,\n type=type\n ) -%}\n {% do return([false, new_relation]) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.261019, "supported_languages": null}, "macro.dbt.load_cached_relation": {"name": "load_cached_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.load_cached_relation", "macro_sql": "{% macro load_cached_relation(relation) %}\n {% do return(adapter.get_relation(\n database=relation.database,\n schema=relation.schema,\n identifier=relation.identifier\n )) -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.261287, "supported_languages": null}, "macro.dbt.load_relation": {"name": "load_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.load_relation", "macro_sql": "{% macro load_relation(relation) %}\n {{ return(load_cached_relation(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.261434, "supported_languages": null}, "macro.dbt.collect_freshness": {"name": "collect_freshness", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n {{ return(adapter.dispatch('collect_freshness', 'dbt')(source, loaded_at_field, filter))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.261903, "supported_languages": null}, "macro.dbt.default__collect_freshness": {"name": "default__collect_freshness", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n select\n max({{ loaded_at_field }}) as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n from {{ source }}\n {% if filter %}\n where {{ filter }}\n {% endif %}\n {% endcall %}\n {{ return(load_result('collect_freshness')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2623339, "supported_languages": null}, "macro.dbt.validate_sql": {"name": "validate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/validate_sql.sql", "original_file_path": "macros/adapters/validate_sql.sql", "unique_id": "macro.dbt.validate_sql", "macro_sql": "{% macro validate_sql(sql) -%}\n {{ return(adapter.dispatch('validate_sql', 'dbt')(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__validate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2626219, "supported_languages": null}, "macro.dbt.default__validate_sql": {"name": "default__validate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/validate_sql.sql", "original_file_path": "macros/adapters/validate_sql.sql", "unique_id": "macro.dbt.default__validate_sql", "macro_sql": "{% macro default__validate_sql(sql) -%}\n {% call statement('validate_sql') -%}\n explain {{ sql }}\n {% endcall %}\n {{ return(load_result('validate_sql')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2628322, "supported_languages": null}, "macro.dbt.copy_grants": {"name": "copy_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.copy_grants", "macro_sql": "{% macro copy_grants() %}\n {{ return(adapter.dispatch('copy_grants', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.264429, "supported_languages": null}, "macro.dbt.default__copy_grants": {"name": "default__copy_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__copy_grants", "macro_sql": "{% macro default__copy_grants() %}\n {{ return(True) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.264537, "supported_languages": null}, "macro.dbt.support_multiple_grantees_per_dcl_statement": {"name": "support_multiple_grantees_per_dcl_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.support_multiple_grantees_per_dcl_statement", "macro_sql": "{% macro support_multiple_grantees_per_dcl_statement() %}\n {{ return(adapter.dispatch('support_multiple_grantees_per_dcl_statement', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.264688, "supported_languages": null}, "macro.dbt.default__support_multiple_grantees_per_dcl_statement": {"name": "default__support_multiple_grantees_per_dcl_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__support_multiple_grantees_per_dcl_statement", "macro_sql": "\n\n{%- macro default__support_multiple_grantees_per_dcl_statement() -%}\n {{ return(True) }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.264794, "supported_languages": null}, "macro.dbt.should_revoke": {"name": "should_revoke", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.should_revoke", "macro_sql": "{% macro should_revoke(existing_relation, full_refresh_mode=True) %}\n\n {% if not existing_relation %}\n {#-- The table doesn't already exist, so no grants to copy over --#}\n {{ return(False) }}\n {% elif full_refresh_mode %}\n {#-- The object is being REPLACED -- whether grants are copied over depends on the value of user config --#}\n {{ return(copy_grants()) }}\n {% else %}\n {#-- The table is being merged/upserted/inserted -- grants will be carried over --#}\n {{ return(True) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.265117, "supported_languages": null}, "macro.dbt.get_show_grant_sql": {"name": "get_show_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_show_grant_sql", "macro_sql": "{% macro get_show_grant_sql(relation) %}\n {{ return(adapter.dispatch(\"get_show_grant_sql\", \"dbt\")(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_show_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.265296, "supported_languages": null}, "macro.dbt.default__get_show_grant_sql": {"name": "default__get_show_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_show_grant_sql", "macro_sql": "{% macro default__get_show_grant_sql(relation) %}\n show grants on {{ relation }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.265389, "supported_languages": null}, "macro.dbt.get_grant_sql": {"name": "get_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_grant_sql", "macro_sql": "{% macro get_grant_sql(relation, privilege, grantees) %}\n {{ return(adapter.dispatch('get_grant_sql', 'dbt')(relation, privilege, grantees)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.265594, "supported_languages": null}, "macro.dbt.default__get_grant_sql": {"name": "default__get_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_grant_sql", "macro_sql": "\n\n{%- macro default__get_grant_sql(relation, privilege, grantees) -%}\n grant {{ privilege }} on {{ relation }} to {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.265792, "supported_languages": null}, "macro.dbt.get_revoke_sql": {"name": "get_revoke_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_revoke_sql", "macro_sql": "{% macro get_revoke_sql(relation, privilege, grantees) %}\n {{ return(adapter.dispatch('get_revoke_sql', 'dbt')(relation, privilege, grantees)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_revoke_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2659972, "supported_languages": null}, "macro.dbt.default__get_revoke_sql": {"name": "default__get_revoke_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_revoke_sql", "macro_sql": "\n\n{%- macro default__get_revoke_sql(relation, privilege, grantees) -%}\n revoke {{ privilege }} on {{ relation }} from {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.266264, "supported_languages": null}, "macro.dbt.get_dcl_statement_list": {"name": "get_dcl_statement_list", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_dcl_statement_list", "macro_sql": "{% macro get_dcl_statement_list(relation, grant_config, get_dcl_macro) %}\n {{ return(adapter.dispatch('get_dcl_statement_list', 'dbt')(relation, grant_config, get_dcl_macro)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_dcl_statement_list"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.266481, "supported_languages": null}, "macro.dbt.default__get_dcl_statement_list": {"name": "default__get_dcl_statement_list", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_dcl_statement_list", "macro_sql": "\n\n{%- macro default__get_dcl_statement_list(relation, grant_config, get_dcl_macro) -%}\n {#\n -- Unpack grant_config into specific privileges and the set of users who need them granted/revoked.\n -- Depending on whether this database supports multiple grantees per statement, pass in the list of\n -- all grantees per privilege, or (if not) template one statement per privilege-grantee pair.\n -- `get_dcl_macro` will be either `get_grant_sql` or `get_revoke_sql`\n #}\n {%- set dcl_statements = [] -%}\n {%- for privilege, grantees in grant_config.items() %}\n {%- if support_multiple_grantees_per_dcl_statement() and grantees -%}\n {%- set dcl = get_dcl_macro(relation, privilege, grantees) -%}\n {%- do dcl_statements.append(dcl) -%}\n {%- else -%}\n {%- for grantee in grantees -%}\n {% set dcl = get_dcl_macro(relation, privilege, [grantee]) %}\n {%- do dcl_statements.append(dcl) -%}\n {% endfor -%}\n {%- endif -%}\n {%- endfor -%}\n {{ return(dcl_statements) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.267114, "supported_languages": null}, "macro.dbt.call_dcl_statements": {"name": "call_dcl_statements", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.call_dcl_statements", "macro_sql": "{% macro call_dcl_statements(dcl_statement_list) %}\n {{ return(adapter.dispatch(\"call_dcl_statements\", \"dbt\")(dcl_statement_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.267298, "supported_languages": null}, "macro.dbt.default__call_dcl_statements": {"name": "default__call_dcl_statements", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__call_dcl_statements", "macro_sql": "{% macro default__call_dcl_statements(dcl_statement_list) %}\n {#\n -- By default, supply all grant + revoke statements in a single semicolon-separated block,\n -- so that they're all processed together.\n\n -- Some databases do not support this. Those adapters will need to override this macro\n -- to run each statement individually.\n #}\n {% call statement('grants') %}\n {% for dcl_statement in dcl_statement_list %}\n {{ dcl_statement }};\n {% endfor %}\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2675278, "supported_languages": null}, "macro.dbt.apply_grants": {"name": "apply_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.apply_grants", "macro_sql": "{% macro apply_grants(relation, grant_config, should_revoke) %}\n {{ return(adapter.dispatch(\"apply_grants\", \"dbt\")(relation, grant_config, should_revoke)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.267752, "supported_languages": null}, "macro.dbt.default__apply_grants": {"name": "default__apply_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__apply_grants", "macro_sql": "{% macro default__apply_grants(relation, grant_config, should_revoke=True) %}\n {#-- If grant_config is {} or None, this is a no-op --#}\n {% if grant_config %}\n {% if should_revoke %}\n {#-- We think previous grants may have carried over --#}\n {#-- Show current grants and calculate diffs --#}\n {% set current_grants_table = run_query(get_show_grant_sql(relation)) %}\n {% set current_grants_dict = adapter.standardize_grants_dict(current_grants_table) %}\n {% set needs_granting = diff_of_two_dicts(grant_config, current_grants_dict) %}\n {% set needs_revoking = diff_of_two_dicts(current_grants_dict, grant_config) %}\n {% if not (needs_granting or needs_revoking) %}\n {{ log('On ' ~ relation ~': All grants are in place, no revocation or granting needed.')}}\n {% endif %}\n {% else %}\n {#-- We don't think there's any chance of previous grants having carried over. --#}\n {#-- Jump straight to granting what the user has configured. --#}\n {% set needs_revoking = {} %}\n {% set needs_granting = grant_config %}\n {% endif %}\n {% if needs_granting or needs_revoking %}\n {% set revoke_statement_list = get_dcl_statement_list(relation, needs_revoking, get_revoke_sql) %}\n {% set grant_statement_list = get_dcl_statement_list(relation, needs_granting, get_grant_sql) %}\n {% set dcl_statement_list = revoke_statement_list + grant_statement_list %}\n {% if dcl_statement_list %}\n {{ call_dcl_statements(dcl_statement_list) }}\n {% endif %}\n {% endif %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.get_show_grant_sql", "macro.dbt.get_dcl_statement_list", "macro.dbt.call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2688158, "supported_languages": null}, "macro.dbt.get_show_sql": {"name": "get_show_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.get_show_sql", "macro_sql": "{% macro get_show_sql(compiled_code, sql_header, limit) -%}\n {%- if sql_header -%}\n {{ sql_header }}\n {%- endif -%}\n {%- if limit is not none -%}\n {{ get_limit_subquery_sql(compiled_code, limit) }}\n {%- else -%}\n {{ compiled_code }}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_limit_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.269349, "supported_languages": null}, "macro.dbt.get_limit_subquery_sql": {"name": "get_limit_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.get_limit_subquery_sql", "macro_sql": "{% macro get_limit_subquery_sql(sql, limit) %}\n {{ adapter.dispatch('get_limit_subquery_sql', 'dbt')(sql, limit) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_limit_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.269535, "supported_languages": null}, "macro.dbt.default__get_limit_subquery_sql": {"name": "default__get_limit_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.default__get_limit_subquery_sql", "macro_sql": "{% macro default__get_limit_subquery_sql(sql, limit) %}\n select *\n from (\n {{ sql }}\n ) as model_limit_subq\n limit {{ limit }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2696629, "supported_languages": null}, "macro.dbt.alter_column_comment": {"name": "alter_column_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.alter_column_comment", "macro_sql": "{% macro alter_column_comment(relation, column_dict) -%}\n {{ return(adapter.dispatch('alter_column_comment', 'dbt')(relation, column_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.270289, "supported_languages": null}, "macro.dbt.default__alter_column_comment": {"name": "default__alter_column_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__alter_column_comment", "macro_sql": "{% macro default__alter_column_comment(relation, column_dict) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_column_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.270452, "supported_languages": null}, "macro.dbt.alter_relation_comment": {"name": "alter_relation_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.alter_relation_comment", "macro_sql": "{% macro alter_relation_comment(relation, relation_comment) -%}\n {{ return(adapter.dispatch('alter_relation_comment', 'dbt')(relation, relation_comment)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2706409, "supported_languages": null}, "macro.dbt.default__alter_relation_comment": {"name": "default__alter_relation_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__alter_relation_comment", "macro_sql": "{% macro default__alter_relation_comment(relation, relation_comment) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_relation_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2708669, "supported_languages": null}, "macro.dbt.persist_docs": {"name": "persist_docs", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.persist_docs", "macro_sql": "{% macro persist_docs(relation, model, for_relation=true, for_columns=true) -%}\n {{ return(adapter.dispatch('persist_docs', 'dbt')(relation, model, for_relation, for_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.271235, "supported_languages": null}, "macro.dbt.default__persist_docs": {"name": "default__persist_docs", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__persist_docs", "macro_sql": "{% macro default__persist_docs(relation, model, for_relation, for_columns) -%}\n {% if for_relation and config.persist_relation_docs() and model.description %}\n {% do run_query(alter_relation_comment(relation, model.description)) %}\n {% endif %}\n\n {% if for_columns and config.persist_column_docs() and model.columns %}\n {% do run_query(alter_column_comment(relation, model.columns)) %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2716942, "supported_languages": null}, "macro.dbt.get_catalog_relations": {"name": "get_catalog_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog_relations", "macro_sql": "{% macro get_catalog_relations(information_schema, relations) -%}\n {{ return(adapter.dispatch('get_catalog_relations', 'dbt')(information_schema, relations)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.274388, "supported_languages": null}, "macro.dbt.default__get_catalog_relations": {"name": "default__get_catalog_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog_relations", "macro_sql": "{% macro default__get_catalog_relations(information_schema, relations) -%}\n {% set typename = adapter.type() %}\n {% set msg -%}\n get_catalog_relations not implemented for {{ typename }}\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2746398, "supported_languages": null}, "macro.dbt.get_catalog": {"name": "get_catalog", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n {{ return(adapter.dispatch('get_catalog', 'dbt')(information_schema, schemas)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2748349, "supported_languages": null}, "macro.dbt.default__get_catalog": {"name": "default__get_catalog", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog", "macro_sql": "{% macro default__get_catalog(information_schema, schemas) -%}\n\n {% set typename = adapter.type() %}\n {% set msg -%}\n get_catalog not implemented for {{ typename }}\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.275188, "supported_languages": null}, "macro.dbt.information_schema_name": {"name": "information_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n {{ return(adapter.dispatch('information_schema_name', 'dbt')(database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.275362, "supported_languages": null}, "macro.dbt.default__information_schema_name": {"name": "default__information_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__information_schema_name", "macro_sql": "{% macro default__information_schema_name(database) -%}\n {%- if database -%}\n {{ database }}.INFORMATION_SCHEMA\n {%- else -%}\n INFORMATION_SCHEMA\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2755158, "supported_languages": null}, "macro.dbt.list_schemas": {"name": "list_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n {{ return(adapter.dispatch('list_schemas', 'dbt')(database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.27569, "supported_languages": null}, "macro.dbt.default__list_schemas": {"name": "default__list_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_schemas", "macro_sql": "{% macro default__list_schemas(database) -%}\n {% set sql %}\n select distinct schema_name\n from {{ information_schema_name(database) }}.SCHEMATA\n where catalog_name ilike '{{ database }}'\n {% endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.information_schema_name", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2759209, "supported_languages": null}, "macro.dbt.check_schema_exists": {"name": "check_schema_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.check_schema_exists", "macro_sql": "{% macro check_schema_exists(information_schema, schema) -%}\n {{ return(adapter.dispatch('check_schema_exists', 'dbt')(information_schema, schema)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.276114, "supported_languages": null}, "macro.dbt.default__check_schema_exists": {"name": "default__check_schema_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__check_schema_exists", "macro_sql": "{% macro default__check_schema_exists(information_schema, schema) -%}\n {% set sql -%}\n select count(*)\n from {{ information_schema.replace(information_schema_view='SCHEMATA') }}\n where catalog_name='{{ information_schema.database }}'\n and schema_name='{{ schema }}'\n {%- endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2763982, "supported_languages": null}, "macro.dbt.list_relations_without_caching": {"name": "list_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_relations_without_caching", "macro_sql": "{% macro list_relations_without_caching(schema_relation) %}\n {{ return(adapter.dispatch('list_relations_without_caching', 'dbt')(schema_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2765791, "supported_languages": null}, "macro.dbt.default__list_relations_without_caching": {"name": "default__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_relations_without_caching", "macro_sql": "{% macro default__list_relations_without_caching(schema_relation) %}\n {{ exceptions.raise_not_implemented(\n 'list_relations_without_caching macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.276732, "supported_languages": null}, "macro.dbt.get_relations": {"name": "get_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_relations", "macro_sql": "{% macro get_relations() %}\n {{ return(adapter.dispatch('get_relations', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2768881, "supported_languages": null}, "macro.dbt.default__get_relations": {"name": "default__get_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_relations", "macro_sql": "{% macro default__get_relations() %}\n {{ exceptions.raise_not_implemented(\n 'get_relations macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.277039, "supported_languages": null}, "macro.dbt.get_relation_last_modified": {"name": "get_relation_last_modified", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_relation_last_modified", "macro_sql": "{% macro get_relation_last_modified(information_schema, relations) %}\n {{ return(adapter.dispatch('get_relation_last_modified', 'dbt')(information_schema, relations)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_relation_last_modified"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.277235, "supported_languages": null}, "macro.dbt.default__get_relation_last_modified": {"name": "default__get_relation_last_modified", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_relation_last_modified", "macro_sql": "{% macro default__get_relation_last_modified(information_schema, relations) %}\n {{ exceptions.raise_not_implemented(\n 'get_relation_last_modified macro not implemented for adapter ' + adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2774022, "supported_languages": null}, "macro.dbt.get_columns_in_relation": {"name": "get_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n {{ return(adapter.dispatch('get_columns_in_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.279608, "supported_languages": null}, "macro.dbt.default__get_columns_in_relation": {"name": "default__get_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_columns_in_relation", "macro_sql": "{% macro default__get_columns_in_relation(relation) -%}\n {{ exceptions.raise_not_implemented(\n 'get_columns_in_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2797818, "supported_languages": null}, "macro.dbt.sql_convert_columns_in_relation": {"name": "sql_convert_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.sql_convert_columns_in_relation", "macro_sql": "{% macro sql_convert_columns_in_relation(table) -%}\n {% set columns = [] %}\n {% for row in table %}\n {% do columns.append(api.Column(*row)) %}\n {% endfor %}\n {{ return(columns) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.28009, "supported_languages": null}, "macro.dbt.get_empty_subquery_sql": {"name": "get_empty_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_empty_subquery_sql", "macro_sql": "{% macro get_empty_subquery_sql(select_sql, select_sql_header=none) -%}\n {{ return(adapter.dispatch('get_empty_subquery_sql', 'dbt')(select_sql, select_sql_header)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.280297, "supported_languages": null}, "macro.dbt.default__get_empty_subquery_sql": {"name": "default__get_empty_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_empty_subquery_sql", "macro_sql": "{% macro default__get_empty_subquery_sql(select_sql, select_sql_header=none) %}\n {%- if select_sql_header is not none -%}\n {{ select_sql_header }}\n {%- endif -%}\n select * from (\n {{ select_sql }}\n ) as __dbt_sbq\n where false\n limit 0\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.280499, "supported_languages": null}, "macro.dbt.get_empty_schema_sql": {"name": "get_empty_schema_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_empty_schema_sql", "macro_sql": "{% macro get_empty_schema_sql(columns) -%}\n {{ return(adapter.dispatch('get_empty_schema_sql', 'dbt')(columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_empty_schema_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.28067, "supported_languages": null}, "macro.dbt.default__get_empty_schema_sql": {"name": "default__get_empty_schema_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_empty_schema_sql", "macro_sql": "{% macro default__get_empty_schema_sql(columns) %}\n {%- set col_err = [] -%}\n {%- set col_naked_numeric = [] -%}\n select\n {% for i in columns %}\n {%- set col = columns[i] -%}\n {%- if col['data_type'] is not defined -%}\n {%- do col_err.append(col['name']) -%}\n {#-- If this column's type is just 'numeric' then it is missing precision/scale, raise a warning --#}\n {%- elif col['data_type'].strip().lower() in ('numeric', 'decimal', 'number') -%}\n {%- do col_naked_numeric.append(col['name']) -%}\n {%- endif -%}\n {% set col_name = adapter.quote(col['name']) if col.get('quote') else col['name'] %}\n cast(null as {{ col['data_type'] }}) as {{ col_name }}{{ \", \" if not loop.last }}\n {%- endfor -%}\n {%- if (col_err | length) > 0 -%}\n {{ exceptions.column_type_missing(column_names=col_err) }}\n {%- elif (col_naked_numeric | length) > 0 -%}\n {{ exceptions.warn(\"Detected columns with numeric type and unspecified precision/scale, this can lead to unintended rounding: \" ~ col_naked_numeric ~ \"`\") }}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.281881, "supported_languages": null}, "macro.dbt.get_column_schema_from_query": {"name": "get_column_schema_from_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_column_schema_from_query", "macro_sql": "{% macro get_column_schema_from_query(select_sql, select_sql_header=none) -%}\n {% set columns = [] %}\n {# -- Using an 'empty subquery' here to get the same schema as the given select_sql statement, without necessitating a data scan.#}\n {% set sql = get_empty_subquery_sql(select_sql, select_sql_header) %}\n {% set column_schema = adapter.get_column_schema_from_query(sql) %}\n {{ return(column_schema) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.282228, "supported_languages": null}, "macro.dbt.get_columns_in_query": {"name": "get_columns_in_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_columns_in_query", "macro_sql": "{% macro get_columns_in_query(select_sql) -%}\n {{ return(adapter.dispatch('get_columns_in_query', 'dbt')(select_sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.282408, "supported_languages": null}, "macro.dbt.default__get_columns_in_query": {"name": "default__get_columns_in_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_columns_in_query", "macro_sql": "{% macro default__get_columns_in_query(select_sql) %}\n {% call statement('get_columns_in_query', fetch_result=True, auto_begin=False) -%}\n {{ get_empty_subquery_sql(select_sql) }}\n {% endcall %}\n {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.282738, "supported_languages": null}, "macro.dbt.alter_column_type": {"name": "alter_column_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.alter_column_type", "macro_sql": "{% macro alter_column_type(relation, column_name, new_column_type) -%}\n {{ return(adapter.dispatch('alter_column_type', 'dbt')(relation, column_name, new_column_type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2829561, "supported_languages": null}, "macro.dbt.default__alter_column_type": {"name": "default__alter_column_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__alter_column_type", "macro_sql": "{% macro default__alter_column_type(relation, column_name, new_column_type) -%}\n {#\n 1. Create a new column (w/ temp name and correct type)\n 2. Copy data over to it\n 3. Drop the existing column (cascade!)\n 4. Rename the new column to existing column\n #}\n {%- set tmp_column = column_name + \"__dbt_alter\" -%}\n\n {% call statement('alter_column_type') %}\n alter table {{ relation }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2835178, "supported_languages": null}, "macro.dbt.alter_relation_add_remove_columns": {"name": "alter_relation_add_remove_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.alter_relation_add_remove_columns", "macro_sql": "{% macro alter_relation_add_remove_columns(relation, add_columns = none, remove_columns = none) -%}\n {{ return(adapter.dispatch('alter_relation_add_remove_columns', 'dbt')(relation, add_columns, remove_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2837708, "supported_languages": null}, "macro.dbt.default__alter_relation_add_remove_columns": {"name": "default__alter_relation_add_remove_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "macro_sql": "{% macro default__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n\n {% if add_columns is none %}\n {% set add_columns = [] %}\n {% endif %}\n {% if remove_columns is none %}\n {% set remove_columns = [] %}\n {% endif %}\n\n {% set sql -%}\n\n alter {{ relation.type }} {{ relation }}\n\n {% for column in add_columns %}\n add column {{ column.name }} {{ column.data_type }}{{ ',' if not loop.last }}\n {% endfor %}{{ ',' if add_columns and remove_columns }}\n\n {% for column in remove_columns %}\n drop column {{ column.name }}{{ ',' if not loop.last }}\n {% endfor %}\n\n {%- endset -%}\n\n {% do run_query(sql) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.284517, "supported_languages": null}, "macro.dbt.resolve_model_name": {"name": "resolve_model_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.resolve_model_name", "macro_sql": "{% macro resolve_model_name(input_model_name) %}\n {{ return(adapter.dispatch('resolve_model_name', 'dbt')(input_model_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.28604, "supported_languages": null}, "macro.dbt.default__resolve_model_name": {"name": "default__resolve_model_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.default__resolve_model_name", "macro_sql": "\n\n{%- macro default__resolve_model_name(input_model_name) -%}\n {{ input_model_name | string | replace('\"', '\\\"') }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.286187, "supported_languages": null}, "macro.dbt.build_ref_function": {"name": "build_ref_function", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_ref_function", "macro_sql": "{% macro build_ref_function(model) %}\n\n {%- set ref_dict = {} -%}\n {%- for _ref in model.refs -%}\n {% set _ref_args = [_ref.get('package'), _ref['name']] if _ref.get('package') else [_ref['name'],] %}\n {%- set resolved = ref(*_ref_args, v=_ref.get('version')) -%}\n {%- if _ref.get('version') -%}\n {% do _ref_args.extend([\"v\" ~ _ref['version']]) %}\n {%- endif -%}\n {%- do ref_dict.update({_ref_args | join('.'): resolve_model_name(resolved)}) -%}\n {%- endfor -%}\n\ndef ref(*args, **kwargs):\n refs = {{ ref_dict | tojson }}\n key = '.'.join(args)\n version = kwargs.get(\"v\") or kwargs.get(\"version\")\n if version:\n key += f\".v{version}\"\n dbt_load_df_function = kwargs.get(\"dbt_load_df_function\")\n return dbt_load_df_function(refs[key])\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.286935, "supported_languages": null}, "macro.dbt.build_source_function": {"name": "build_source_function", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_source_function", "macro_sql": "{% macro build_source_function(model) %}\n\n {%- set source_dict = {} -%}\n {%- for _source in model.sources -%}\n {%- set resolved = source(*_source) -%}\n {%- do source_dict.update({_source | join('.'): resolve_model_name(resolved)}) -%}\n {%- endfor -%}\n\ndef source(*args, dbt_load_df_function):\n sources = {{ source_dict | tojson }}\n key = '.'.join(args)\n return dbt_load_df_function(sources[key])\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.287313, "supported_languages": null}, "macro.dbt.build_config_dict": {"name": "build_config_dict", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_config_dict", "macro_sql": "{% macro build_config_dict(model) %}\n {%- set config_dict = {} -%}\n {% set config_dbt_used = zip(model.config.config_keys_used, model.config.config_keys_defaults) | list %}\n {%- for key, default in config_dbt_used -%}\n {# weird type testing with enum, would be much easier to write this logic in Python! #}\n {%- if key == \"language\" -%}\n {%- set value = \"python\" -%}\n {%- endif -%}\n {%- set value = model.config.get(key, default) -%}\n {%- do config_dict.update({key: value}) -%}\n {%- endfor -%}\nconfig_dict = {{ config_dict }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.28787, "supported_languages": null}, "macro.dbt.py_script_postfix": {"name": "py_script_postfix", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.py_script_postfix", "macro_sql": "{% macro py_script_postfix(model) %}\n# This part is user provided model code\n# you will need to copy the next section to run the code\n# COMMAND ----------\n# this part is dbt logic for get ref work, do not modify\n\n{{ build_ref_function(model ) }}\n{{ build_source_function(model ) }}\n{{ build_config_dict(model) }}\n\nclass config:\n def __init__(self, *args, **kwargs):\n pass\n\n @staticmethod\n def get(key, default=None):\n return config_dict.get(key, default)\n\nclass this:\n \"\"\"dbt.this() or dbt.this.identifier\"\"\"\n database = \"{{ this.database }}\"\n schema = \"{{ this.schema }}\"\n identifier = \"{{ this.identifier }}\"\n {% set this_relation_name = resolve_model_name(this) %}\n def __repr__(self):\n return '{{ this_relation_name }}'\n\n\nclass dbtObj:\n def __init__(self, load_df_function) -> None:\n self.source = lambda *args: source(*args, dbt_load_df_function=load_df_function)\n self.ref = lambda *args, **kwargs: ref(*args, **kwargs, dbt_load_df_function=load_df_function)\n self.config = config\n self.this = this()\n self.is_incremental = {{ is_incremental() }}\n\n# COMMAND ----------\n{{py_script_comment()}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.build_ref_function", "macro.dbt.build_source_function", "macro.dbt.build_config_dict", "macro.dbt.resolve_model_name", "macro.dbt.is_incremental", "macro.dbt.py_script_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2883232, "supported_languages": null}, "macro.dbt.py_script_comment": {"name": "py_script_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.py_script_comment", "macro_sql": "{%macro py_script_comment()%}\n{%endmacro%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.288397, "supported_languages": null}, "macro.dbt.test_unique": {"name": "test_unique", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_unique", "macro_sql": "{% test unique(model, column_name) %}\n {% set macro = adapter.dispatch('test_unique', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2888792, "supported_languages": null}, "macro.dbt.test_not_null": {"name": "test_not_null", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_not_null", "macro_sql": "{% test not_null(model, column_name) %}\n {% set macro = adapter.dispatch('test_not_null', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2891011, "supported_languages": null}, "macro.dbt.test_accepted_values": {"name": "test_accepted_values", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_accepted_values", "macro_sql": "{% test accepted_values(model, column_name, values, quote=True) %}\n {% set macro = adapter.dispatch('test_accepted_values', 'dbt') %}\n {{ macro(model, column_name, values, quote) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2893739, "supported_languages": null}, "macro.dbt.test_relationships": {"name": "test_relationships", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_relationships", "macro_sql": "{% test relationships(model, column_name, to, field) %}\n {% set macro = adapter.dispatch('test_relationships', 'dbt') %}\n {{ macro(model, column_name, to, field) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_relationships"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2896361, "supported_languages": null}, "macro.dbt_utils.get_url_host": {"name": "get_url_host", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "unique_id": "macro.dbt_utils.get_url_host", "macro_sql": "{% macro get_url_host(field) -%}\n {{ return(adapter.dispatch('get_url_host', 'dbt_utils')(field)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_host"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.289977, "supported_languages": null}, "macro.dbt_utils.default__get_url_host": {"name": "default__get_url_host", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "unique_id": "macro.dbt_utils.default__get_url_host", "macro_sql": "{% macro default__get_url_host(field) -%}\n\n{%- set parsed =\n dbt.split_part(\n dbt.split_part(\n dbt.replace(\n dbt.replace(\n dbt.replace(field, \"'android-app://'\", \"''\"\n ), \"'http://'\", \"''\"\n ), \"'https://'\", \"''\"\n ), \"'/'\", 1\n ), \"'?'\", 1\n )\n\n-%}\n\n\n {{ dbt.safe_cast(\n parsed,\n dbt.type_string()\n )}}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.split_part", "macro.dbt.replace", "macro.dbt.safe_cast", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.29042, "supported_languages": null}, "macro.dbt_utils.get_url_path": {"name": "get_url_path", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "unique_id": "macro.dbt_utils.get_url_path", "macro_sql": "{% macro get_url_path(field) -%}\n {{ return(adapter.dispatch('get_url_path', 'dbt_utils')(field)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_path"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.290911, "supported_languages": null}, "macro.dbt_utils.default__get_url_path": {"name": "default__get_url_path", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "unique_id": "macro.dbt_utils.default__get_url_path", "macro_sql": "{% macro default__get_url_path(field) -%}\n\n {%- set stripped_url =\n dbt.replace(\n dbt.replace(field, \"'http://'\", \"''\"), \"'https://'\", \"''\")\n -%}\n\n {%- set first_slash_pos -%}\n coalesce(\n nullif({{ dbt.position(\"'/'\", stripped_url) }}, 0),\n {{ dbt.position(\"'?'\", stripped_url) }} - 1\n )\n {%- endset -%}\n\n {%- set parsed_path =\n dbt.split_part(\n dbt.right(\n stripped_url,\n dbt.length(stripped_url) ~ \"-\" ~ first_slash_pos\n ),\n \"'?'\", 1\n )\n -%}\n\n {{ dbt.safe_cast(\n parsed_path,\n dbt.type_string()\n )}}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.position", "macro.dbt.split_part", "macro.dbt.right", "macro.dbt.length", "macro.dbt.safe_cast", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.29179, "supported_languages": null}, "macro.dbt_utils.get_url_parameter": {"name": "get_url_parameter", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "unique_id": "macro.dbt_utils.get_url_parameter", "macro_sql": "{% macro get_url_parameter(field, url_parameter) -%}\n {{ return(adapter.dispatch('get_url_parameter', 'dbt_utils')(field, url_parameter)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.292127, "supported_languages": null}, "macro.dbt_utils.default__get_url_parameter": {"name": "default__get_url_parameter", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "unique_id": "macro.dbt_utils.default__get_url_parameter", "macro_sql": "{% macro default__get_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"='\" -%}\n\n{%- set split = dbt.split_part(dbt.split_part(field, formatted_url_parameter, 2), \"'&'\", 1) -%}\n\nnullif({{ split }},'')\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.292439, "supported_languages": null}, "macro.dbt_utils.test_fewer_rows_than": {"name": "test_fewer_rows_than", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "unique_id": "macro.dbt_utils.test_fewer_rows_than", "macro_sql": "{% test fewer_rows_than(model, compare_model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_fewer_rows_than', 'dbt_utils')(model, compare_model, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_fewer_rows_than"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2934668, "supported_languages": null}, "macro.dbt_utils.default__test_fewer_rows_than": {"name": "default__test_fewer_rows_than", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "unique_id": "macro.dbt_utils.default__test_fewer_rows_than", "macro_sql": "{% macro default__test_fewer_rows_than(model, compare_model, group_by_columns) %}\n\n{{ config(fail_calc = 'sum(coalesce(row_count_delta, 0))') }}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set join_gb_cols %}\n {% for c in group_by_columns %}\n and a.{{c}} = b.{{c}}\n {% endfor %}\n {% endset %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n{#-- We must add a fake join key in case additional grouping variables are not provided --#}\n{#-- Redshift does not allow for dynamically created join conditions (e.g. full join on 1 = 1 --#}\n{#-- The same logic is used in equal_rowcount. In case of changes, maintain consistent logic --#}\n{% set group_by_columns = ['id_dbtutils_test_fewer_rows_than'] + group_by_columns %}\n{% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n\n\nwith a as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_fewer_rows_than,\n count(*) as count_our_model \n from {{ model }}\n {{ groupby_gb_cols }}\n\n),\nb as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_fewer_rows_than,\n count(*) as count_comparison_model \n from {{ compare_model }}\n {{ groupby_gb_cols }}\n\n),\ncounts as (\n\n select\n\n {% for c in group_by_columns -%}\n a.{{c}} as {{c}}_a,\n b.{{c}} as {{c}}_b,\n {% endfor %}\n\n count_our_model,\n count_comparison_model\n from a\n full join b on \n a.id_dbtutils_test_fewer_rows_than = b.id_dbtutils_test_fewer_rows_than\n {{ join_gb_cols }}\n\n),\nfinal as (\n\n select *,\n case\n -- fail the test if we have more rows than the reference model and return the row count delta\n when count_our_model > count_comparison_model then (count_our_model - count_comparison_model)\n -- fail the test if they are the same number\n when count_our_model = count_comparison_model then 1\n -- pass the test if the delta is positive (i.e. return the number 0)\n else 0\n end as row_count_delta\n from counts\n\n)\n\nselect * from final\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.294406, "supported_languages": null}, "macro.dbt_utils.test_equal_rowcount": {"name": "test_equal_rowcount", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "unique_id": "macro.dbt_utils.test_equal_rowcount", "macro_sql": "{% test equal_rowcount(model, compare_model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_equal_rowcount', 'dbt_utils')(model, compare_model, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_equal_rowcount"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2952042, "supported_languages": null}, "macro.dbt_utils.default__test_equal_rowcount": {"name": "default__test_equal_rowcount", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "unique_id": "macro.dbt_utils.default__test_equal_rowcount", "macro_sql": "{% macro default__test_equal_rowcount(model, compare_model, group_by_columns) %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = 'sum(coalesce(diff_count, 0))') }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(', ') + ', ' %}\n {% set join_gb_cols %}\n {% for c in group_by_columns %}\n and a.{{c}} = b.{{c}}\n {% endfor %}\n {% endset %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n{#-- We must add a fake join key in case additional grouping variables are not provided --#}\n{#-- Redshift does not allow for dynamically created join conditions (e.g. full join on 1 = 1 --#}\n{#-- The same logic is used in fewer_rows_than. In case of changes, maintain consistent logic --#}\n{% set group_by_columns = ['id_dbtutils_test_equal_rowcount'] + group_by_columns %}\n{% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n\nwith a as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_equal_rowcount,\n count(*) as count_a \n from {{ model }}\n {{groupby_gb_cols}}\n\n\n),\nb as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_equal_rowcount,\n count(*) as count_b \n from {{ compare_model }}\n {{groupby_gb_cols}}\n\n),\nfinal as (\n\n select\n \n {% for c in group_by_columns -%}\n a.{{c}} as {{c}}_a,\n b.{{c}} as {{c}}_b,\n {% endfor %}\n\n count_a,\n count_b,\n abs(count_a - count_b) as diff_count\n\n from a\n full join b\n on\n a.id_dbtutils_test_equal_rowcount = b.id_dbtutils_test_equal_rowcount\n {{join_gb_cols}}\n\n\n)\n\nselect * from final\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.296175, "supported_languages": null}, "macro.dbt_utils.test_relationships_where": {"name": "test_relationships_where", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "unique_id": "macro.dbt_utils.test_relationships_where", "macro_sql": "{% test relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n {{ return(adapter.dispatch('test_relationships_where', 'dbt_utils')(model, column_name, to, field, from_condition, to_condition)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_relationships_where"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.296829, "supported_languages": null}, "macro.dbt_utils.default__test_relationships_where": {"name": "default__test_relationships_where", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "unique_id": "macro.dbt_utils.default__test_relationships_where", "macro_sql": "{% macro default__test_relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n\n{# T-SQL has no boolean data type so we use 1=1 which returns TRUE #}\n{# ref https://stackoverflow.com/a/7170753/3842610 #}\n\nwith left_table as (\n\n select\n {{column_name}} as id\n\n from {{model}}\n\n where {{column_name}} is not null\n and {{from_condition}}\n\n),\n\nright_table as (\n\n select\n {{field}} as id\n\n from {{to}}\n\n where {{field}} is not null\n and {{to_condition}}\n\n),\n\nexceptions as (\n\n select\n left_table.id,\n right_table.id as right_id\n\n from left_table\n\n left join right_table\n on left_table.id = right_table.id\n\n where right_table.id is null\n\n)\n\nselect * from exceptions\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.297157, "supported_languages": null}, "macro.dbt_utils.test_recency": {"name": "test_recency", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "unique_id": "macro.dbt_utils.test_recency", "macro_sql": "{% test recency(model, field, datepart, interval, ignore_time_component=False, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_recency', 'dbt_utils')(model, field, datepart, interval, ignore_time_component, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_recency"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.297845, "supported_languages": null}, "macro.dbt_utils.default__test_recency": {"name": "default__test_recency", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "unique_id": "macro.dbt_utils.default__test_recency", "macro_sql": "{% macro default__test_recency(model, field, datepart, interval, ignore_time_component, group_by_columns) %}\n\n{% set threshold = 'cast(' ~ dbt.dateadd(datepart, interval * -1, dbt.current_timestamp()) ~ ' as ' ~ ('date' if ignore_time_component else dbt.type_timestamp()) ~ ')' %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n\nwith recency as (\n\n select \n\n {{ select_gb_cols }}\n {% if ignore_time_component %}\n cast(max({{ field }}) as date) as most_recent\n {%- else %}\n max({{ field }}) as most_recent\n {%- endif %}\n\n from {{ model }}\n\n {{ groupby_gb_cols }}\n\n)\n\nselect\n\n {{ select_gb_cols }}\n most_recent,\n {{ threshold }} as threshold\n\nfrom recency\nwhere most_recent < {{ threshold }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.current_timestamp", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.298626, "supported_languages": null}, "macro.dbt_utils.test_not_constant": {"name": "test_not_constant", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "unique_id": "macro.dbt_utils.test_not_constant", "macro_sql": "{% test not_constant(model, column_name, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_not_constant', 'dbt_utils')(model, column_name, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_constant"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.299042, "supported_languages": null}, "macro.dbt_utils.default__test_not_constant": {"name": "default__test_not_constant", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "unique_id": "macro.dbt_utils.default__test_not_constant", "macro_sql": "{% macro default__test_not_constant(model, column_name, group_by_columns) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n\nselect\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n {{select_gb_cols}}\n count(distinct {{ column_name }}) as filler_column\n\nfrom {{ model }}\n\n {{groupby_gb_cols}}\n\nhaving count(distinct {{ column_name }}) = 1\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.2994611, "supported_languages": null}, "macro.dbt_utils.test_accepted_range": {"name": "test_accepted_range", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "unique_id": "macro.dbt_utils.test_accepted_range", "macro_sql": "{% test accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n {{ return(adapter.dispatch('test_accepted_range', 'dbt_utils')(model, column_name, min_value, max_value, inclusive)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_accepted_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.300004, "supported_languages": null}, "macro.dbt_utils.default__test_accepted_range": {"name": "default__test_accepted_range", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "unique_id": "macro.dbt_utils.default__test_accepted_range", "macro_sql": "{% macro default__test_accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n\nwith meet_condition as(\n select *\n from {{ model }}\n),\n\nvalidation_errors as (\n select *\n from meet_condition\n where\n -- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds\n 1 = 2\n\n {%- if min_value is not none %}\n -- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} > {{- \"=\" if inclusive }} {{ min_value }}\n {%- endif %}\n\n {%- if max_value is not none %}\n -- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} < {{- \"=\" if inclusive }} {{ max_value }}\n {%- endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.300432, "supported_languages": null}, "macro.dbt_utils.test_not_accepted_values": {"name": "test_not_accepted_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "unique_id": "macro.dbt_utils.test_not_accepted_values", "macro_sql": "{% test not_accepted_values(model, column_name, values, quote=True) %}\n {{ return(adapter.dispatch('test_not_accepted_values', 'dbt_utils')(model, column_name, values, quote)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.300935, "supported_languages": null}, "macro.dbt_utils.default__test_not_accepted_values": {"name": "default__test_not_accepted_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "unique_id": "macro.dbt_utils.default__test_not_accepted_values", "macro_sql": "{% macro default__test_not_accepted_values(model, column_name, values, quote=True) %}\nwith all_values as (\n\n select distinct\n {{ column_name }} as value_field\n\n from {{ model }}\n\n),\n\nvalidation_errors as (\n\n select\n value_field\n\n from all_values\n where value_field in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n )\n\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.301307, "supported_languages": null}, "macro.dbt_utils.test_at_least_one": {"name": "test_at_least_one", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "unique_id": "macro.dbt_utils.test_at_least_one", "macro_sql": "{% test at_least_one(model, column_name, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_at_least_one', 'dbt_utils')(model, column_name, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_at_least_one"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.301952, "supported_languages": null}, "macro.dbt_utils.default__test_at_least_one": {"name": "default__test_at_least_one", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "unique_id": "macro.dbt_utils.default__test_at_least_one", "macro_sql": "{% macro default__test_at_least_one(model, column_name, group_by_columns) %}\n\n{% set pruned_cols = [column_name] %}\n\n{% if group_by_columns|length() > 0 %}\n\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n {% set pruned_cols = group_by_columns %}\n\n {% if column_name not in pruned_cols %}\n {% do pruned_cols.append(column_name) %}\n {% endif %}\n\n{% endif %}\n\n{% set select_pruned_cols = pruned_cols|join(' ,') %}\n\nselect *\nfrom (\n with pruned_rows as (\n select\n {{ select_pruned_cols }}\n from {{ model }}\n where {{ column_name }} is not null\n limit 1\n )\n select\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n {{select_gb_cols}}\n count({{ column_name }}) as filler_column\n\n from pruned_rows\n\n {{groupby_gb_cols}}\n\n having count({{ column_name }}) = 0\n\n) validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.302798, "supported_languages": null}, "macro.dbt_utils.test_unique_combination_of_columns": {"name": "test_unique_combination_of_columns", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "unique_id": "macro.dbt_utils.test_unique_combination_of_columns", "macro_sql": "{% test unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n {{ return(adapter.dispatch('test_unique_combination_of_columns', 'dbt_utils')(model, combination_of_columns, quote_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_combination_of_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.303363, "supported_languages": null}, "macro.dbt_utils.default__test_unique_combination_of_columns": {"name": "default__test_unique_combination_of_columns", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "unique_id": "macro.dbt_utils.default__test_unique_combination_of_columns", "macro_sql": "{% macro default__test_unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n\n{% if not quote_columns %}\n {%- set column_list=combination_of_columns %}\n{% elif quote_columns %}\n {%- set column_list=[] %}\n {% for column in combination_of_columns -%}\n {% set column_list = column_list.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for unique_combination_of_columns test must be one of [True, False] Got: '\" ~ quote ~\"'.'\"\n ) }}\n{% endif %}\n\n{%- set columns_csv=column_list | join(', ') %}\n\n\nwith validation_errors as (\n\n select\n {{ columns_csv }}\n from {{ model }}\n group by {{ columns_csv }}\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.303946, "supported_languages": null}, "macro.dbt_utils.test_cardinality_equality": {"name": "test_cardinality_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "unique_id": "macro.dbt_utils.test_cardinality_equality", "macro_sql": "{% test cardinality_equality(model, column_name, to, field) %}\n {{ return(adapter.dispatch('test_cardinality_equality', 'dbt_utils')(model, column_name, to, field)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_cardinality_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.304592, "supported_languages": null}, "macro.dbt_utils.default__test_cardinality_equality": {"name": "default__test_cardinality_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "unique_id": "macro.dbt_utils.default__test_cardinality_equality", "macro_sql": "{% macro default__test_cardinality_equality(model, column_name, to, field) %}\n\n{# T-SQL does not let you use numbers as aliases for columns #}\n{# Thus, no \"GROUP BY 1\" #}\n\nwith table_a as (\nselect\n {{ column_name }},\n count(*) as num_rows\nfrom {{ model }}\ngroup by {{ column_name }}\n),\n\ntable_b as (\nselect\n {{ field }},\n count(*) as num_rows\nfrom {{ to }}\ngroup by {{ field }}\n),\n\nexcept_a as (\n select *\n from table_a\n {{ dbt.except() }}\n select *\n from table_b\n),\n\nexcept_b as (\n select *\n from table_b\n {{ dbt.except() }}\n select *\n from table_a\n),\n\nunioned as (\n select *\n from except_a\n union all\n select *\n from except_b\n)\n\nselect *\nfrom unioned\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.304992, "supported_languages": null}, "macro.dbt_utils.test_expression_is_true": {"name": "test_expression_is_true", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "unique_id": "macro.dbt_utils.test_expression_is_true", "macro_sql": "{% test expression_is_true(model, expression, column_name=None) %}\n {{ return(adapter.dispatch('test_expression_is_true', 'dbt_utils')(model, expression, column_name)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.305483, "supported_languages": null}, "macro.dbt_utils.default__test_expression_is_true": {"name": "default__test_expression_is_true", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "unique_id": "macro.dbt_utils.default__test_expression_is_true", "macro_sql": "{% macro default__test_expression_is_true(model, expression, column_name) %}\n\n{% set column_list = '*' if should_store_failures() else \"1\" %}\n\nselect\n {{ column_list }}\nfrom {{ model }}\n{% if column_name is none %}\nwhere not({{ expression }})\n{%- else %}\nwhere not({{ column_name }} {{ expression }})\n{%- endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.305835, "supported_languages": null}, "macro.dbt_utils.test_not_null_proportion": {"name": "test_not_null_proportion", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "unique_id": "macro.dbt_utils.test_not_null_proportion", "macro_sql": "{% macro test_not_null_proportion(model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_not_null_proportion', 'dbt_utils')(model, group_by_columns, **kwargs)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_proportion"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.306459, "supported_languages": null}, "macro.dbt_utils.default__test_not_null_proportion": {"name": "default__test_not_null_proportion", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "unique_id": "macro.dbt_utils.default__test_not_null_proportion", "macro_sql": "{% macro default__test_not_null_proportion(model, group_by_columns) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}\n{% set at_least = kwargs.get('at_least', kwargs.get('arg')) %}\n{% set at_most = kwargs.get('at_most', kwargs.get('arg', 1)) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\nwith validation as (\n select\n {{select_gb_cols}}\n sum(case when {{ column_name }} is null then 0 else 1 end) / cast(count(*) as numeric) as not_null_proportion\n from {{ model }}\n {{groupby_gb_cols}}\n),\nvalidation_errors as (\n select\n {{select_gb_cols}}\n not_null_proportion\n from validation\n where not_null_proportion < {{ at_least }} or not_null_proportion > {{ at_most }}\n)\nselect\n *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.307214, "supported_languages": null}, "macro.dbt_utils.test_sequential_values": {"name": "test_sequential_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "unique_id": "macro.dbt_utils.test_sequential_values", "macro_sql": "{% test sequential_values(model, column_name, interval=1, datepart=None, group_by_columns = []) %}\n\n {{ return(adapter.dispatch('test_sequential_values', 'dbt_utils')(model, column_name, interval, datepart, group_by_columns)) }}\n\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_sequential_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.308034, "supported_languages": null}, "macro.dbt_utils.default__test_sequential_values": {"name": "default__test_sequential_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "unique_id": "macro.dbt_utils.default__test_sequential_values", "macro_sql": "{% macro default__test_sequential_values(model, column_name, interval=1, datepart=None, group_by_columns = []) %}\n\n{% set previous_column_name = \"previous_\" ~ dbt_utils.slugify(column_name) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(',') + ', ' %}\n {% set partition_gb_cols = 'partition by ' + group_by_columns|join(',') %}\n{% endif %}\n\nwith windowed as (\n\n select\n {{ select_gb_cols }}\n {{ column_name }},\n lag({{ column_name }}) over (\n {{partition_gb_cols}}\n order by {{ column_name }}\n ) as {{ previous_column_name }}\n from {{ model }}\n),\n\nvalidation_errors as (\n select\n *\n from windowed\n {% if datepart %}\n where not(cast({{ column_name }} as {{ dbt.type_timestamp() }})= cast({{ dbt.dateadd(datepart, interval, previous_column_name) }} as {{ dbt.type_timestamp() }}))\n {% else %}\n where not({{ column_name }} = {{ previous_column_name }} + {{ interval }})\n {% endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.slugify", "macro.dbt.type_timestamp", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3088498, "supported_languages": null}, "macro.dbt_utils.test_equality": {"name": "test_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "unique_id": "macro.dbt_utils.test_equality", "macro_sql": "{% test equality(model, compare_model, compare_columns=None) %}\n {{ return(adapter.dispatch('test_equality', 'dbt_utils')(model, compare_model, compare_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.309553, "supported_languages": null}, "macro.dbt_utils.default__test_equality": {"name": "default__test_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "unique_id": "macro.dbt_utils.default__test_equality", "macro_sql": "{% macro default__test_equality(model, compare_model, compare_columns=None) %}\n\n{% set set_diff %}\n count(*) + coalesce(abs(\n sum(case when which_diff = 'a_minus_b' then 1 else 0 end) -\n sum(case when which_diff = 'b_minus_a' then 1 else 0 end)\n ), 0)\n{% endset %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = set_diff) }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\n-- setup\n{%- do dbt_utils._is_relation(model, 'test_equality') -%}\n\n{#-\nIf the compare_cols arg is provided, we can run this test without querying the\ninformation schema\u00a0\u2014 this allows the model to be an ephemeral model\n-#}\n\n{%- if not compare_columns -%}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set compare_columns = adapter.get_columns_in_relation(model) | map(attribute='quoted') -%}\n{%- endif -%}\n\n{% set compare_cols_csv = compare_columns | join(', ') %}\n\nwith a as (\n\n select * from {{ model }}\n\n),\n\nb as (\n\n select * from {{ compare_model }}\n\n),\n\na_minus_b as (\n\n select {{compare_cols_csv}} from a\n {{ dbt.except() }}\n select {{compare_cols_csv}} from b\n\n),\n\nb_minus_a as (\n\n select {{compare_cols_csv}} from b\n {{ dbt.except() }}\n select {{compare_cols_csv}} from a\n\n),\n\nunioned as (\n\n select 'a_minus_b' as which_diff, a_minus_b.* from a_minus_b\n union all\n select 'b_minus_a' as which_diff, b_minus_a.* from b_minus_a\n\n)\n\nselect * from unioned\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.310396, "supported_languages": null}, "macro.dbt_utils.test_not_empty_string": {"name": "test_not_empty_string", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "unique_id": "macro.dbt_utils.test_not_empty_string", "macro_sql": "{% test not_empty_string(model, column_name, trim_whitespace=true) %}\n\n {{ return(adapter.dispatch('test_not_empty_string', 'dbt_utils')(model, column_name, trim_whitespace)) }}\n\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_empty_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3108852, "supported_languages": null}, "macro.dbt_utils.default__test_not_empty_string": {"name": "default__test_not_empty_string", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "unique_id": "macro.dbt_utils.default__test_not_empty_string", "macro_sql": "{% macro default__test_not_empty_string(model, column_name, trim_whitespace=true) %}\n\n with\n \n all_values as (\n\n select \n\n\n {% if trim_whitespace == true -%}\n\n trim({{ column_name }}) as {{ column_name }}\n\n {%- else -%}\n\n {{ column_name }}\n\n {%- endif %}\n \n from {{ model }}\n\n ),\n\n errors as (\n\n select * from all_values\n where {{ column_name }} = ''\n\n )\n\n select * from errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.311172, "supported_languages": null}, "macro.dbt_utils.test_mutually_exclusive_ranges": {"name": "test_mutually_exclusive_ranges", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "unique_id": "macro.dbt_utils.test_mutually_exclusive_ranges", "macro_sql": "{% test mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n {{ return(adapter.dispatch('test_mutually_exclusive_ranges', 'dbt_utils')(model, lower_bound_column, upper_bound_column, partition_by, gaps, zero_length_range_allowed)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_mutually_exclusive_ranges"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.314399, "supported_languages": null}, "macro.dbt_utils.default__test_mutually_exclusive_ranges": {"name": "default__test_mutually_exclusive_ranges", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "unique_id": "macro.dbt_utils.default__test_mutually_exclusive_ranges", "macro_sql": "{% macro default__test_mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n{% if gaps == 'not_allowed' %}\n {% set allow_gaps_operator='=' %}\n {% set allow_gaps_operator_in_words='equal_to' %}\n{% elif gaps == 'allowed' %}\n {% set allow_gaps_operator='<=' %}\n {% set allow_gaps_operator_in_words='less_than_or_equal_to' %}\n{% elif gaps == 'required' %}\n {% set allow_gaps_operator='<' %}\n {% set allow_gaps_operator_in_words='less_than' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`gaps` argument for mutually_exclusive_ranges test must be one of ['not_allowed', 'allowed', 'required'] Got: '\" ~ gaps ~\"'.'\"\n ) }}\n{% endif %}\n{% if not zero_length_range_allowed %}\n {% set allow_zero_length_operator='<' %}\n {% set allow_zero_length_operator_in_words='less_than' %}\n{% elif zero_length_range_allowed %}\n {% set allow_zero_length_operator='<=' %}\n {% set allow_zero_length_operator_in_words='less_than_or_equal_to' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`zero_length_range_allowed` argument for mutually_exclusive_ranges test must be one of [true, false] Got: '\" ~ zero_length_range_allowed ~\"'.'\"\n ) }}\n{% endif %}\n\n{% set partition_clause=\"partition by \" ~ partition_by if partition_by else '' %}\n\nwith window_functions as (\n\n select\n {% if partition_by %}\n {{ partition_by }} as partition_by_col,\n {% endif %}\n {{ lower_bound_column }} as lower_bound,\n {{ upper_bound_column }} as upper_bound,\n\n lead({{ lower_bound_column }}) over (\n {{ partition_clause }}\n order by {{ lower_bound_column }}, {{ upper_bound_column }}\n ) as next_lower_bound,\n\n row_number() over (\n {{ partition_clause }}\n order by {{ lower_bound_column }} desc, {{ upper_bound_column }} desc\n ) = 1 as is_last_record\n\n from {{ model }}\n\n),\n\ncalc as (\n -- We want to return records where one of our assumptions fails, so we'll use\n -- the `not` function with `and` statements so we can write our assumptions more cleanly\n select\n *,\n\n -- For each record: lower_bound should be < upper_bound.\n -- Coalesce it to return an error on the null case (implicit assumption\n -- these columns are not_null)\n coalesce(\n lower_bound {{ allow_zero_length_operator }} upper_bound,\n false\n ) as lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound,\n\n -- For each record: upper_bound {{ allow_gaps_operator }} the next lower_bound.\n -- Coalesce it to handle null cases for the last record.\n coalesce(\n upper_bound {{ allow_gaps_operator }} next_lower_bound,\n is_last_record,\n false\n ) as upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n\n from window_functions\n\n),\n\nvalidation_errors as (\n\n select\n *\n from calc\n\n where not(\n -- THE FOLLOWING SHOULD BE TRUE --\n lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound\n and upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n )\n)\n\nselect * from validation_errors\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.316277, "supported_languages": null}, "macro.dbt_utils.pretty_log_format": {"name": "pretty_log_format", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "unique_id": "macro.dbt_utils.pretty_log_format", "macro_sql": "{% macro pretty_log_format(message) %}\n {{ return(adapter.dispatch('pretty_log_format', 'dbt_utils')(message)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.316601, "supported_languages": null}, "macro.dbt_utils.default__pretty_log_format": {"name": "default__pretty_log_format", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "unique_id": "macro.dbt_utils.default__pretty_log_format", "macro_sql": "{% macro default__pretty_log_format(message) %}\n {{ return( dbt_utils.pretty_time() ~ ' + ' ~ message) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3167622, "supported_languages": null}, "macro.dbt_utils._is_relation": {"name": "_is_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/_is_relation.sql", "original_file_path": "macros/jinja_helpers/_is_relation.sql", "unique_id": "macro.dbt_utils._is_relation", "macro_sql": "{% macro _is_relation(obj, macro) %}\n {%- if not (obj is mapping and obj.get('metadata', {}).get('type', '').endswith('Relation')) -%}\n {%- do exceptions.raise_compiler_error(\"Macro \" ~ macro ~ \" expected a Relation but received the value: \" ~ obj) -%}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.317185, "supported_languages": null}, "macro.dbt_utils.pretty_time": {"name": "pretty_time", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "unique_id": "macro.dbt_utils.pretty_time", "macro_sql": "{% macro pretty_time(format='%H:%M:%S') %}\n {{ return(adapter.dispatch('pretty_time', 'dbt_utils')(format)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.317455, "supported_languages": null}, "macro.dbt_utils.default__pretty_time": {"name": "default__pretty_time", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "unique_id": "macro.dbt_utils.default__pretty_time", "macro_sql": "{% macro default__pretty_time(format='%H:%M:%S') %}\n {{ return(modules.datetime.datetime.now().strftime(format)) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3176472, "supported_languages": null}, "macro.dbt_utils.log_info": {"name": "log_info", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "unique_id": "macro.dbt_utils.log_info", "macro_sql": "{% macro log_info(message) %}\n {{ return(adapter.dispatch('log_info', 'dbt_utils')(message)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__log_info"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3178859, "supported_languages": null}, "macro.dbt_utils.default__log_info": {"name": "default__log_info", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "unique_id": "macro.dbt_utils.default__log_info", "macro_sql": "{% macro default__log_info(message) %}\n {{ log(dbt_utils.pretty_log_format(message), info=True) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.318058, "supported_languages": null}, "macro.dbt_utils.slugify": {"name": "slugify", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/slugify.sql", "original_file_path": "macros/jinja_helpers/slugify.sql", "unique_id": "macro.dbt_utils.slugify", "macro_sql": "{% macro slugify(string) %}\n\n{#- Lower case the string -#}\n{% set string = string | lower %}\n{#- Replace spaces and dashes with underscores -#}\n{% set string = modules.re.sub('[ -]+', '_', string) %}\n{#- Only take letters, numbers, and underscores -#}\n{% set string = modules.re.sub('[^a-z0-9_]+', '', string) %}\n{#- Prepends \"_\" if string begins with a number -#}\n{% set string = modules.re.sub('^[0-9]', '_' + string[0], string) %}\n\n{{ return(string) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3186471, "supported_languages": null}, "macro.dbt_utils._is_ephemeral": {"name": "_is_ephemeral", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/_is_ephemeral.sql", "original_file_path": "macros/jinja_helpers/_is_ephemeral.sql", "unique_id": "macro.dbt_utils._is_ephemeral", "macro_sql": "{% macro _is_ephemeral(obj, macro) %}\n {%- if obj.is_cte -%}\n {% set ephemeral_prefix = api.Relation.add_ephemeral_prefix('') %}\n {% if obj.name.startswith(ephemeral_prefix) %}\n {% set model_name = obj.name[(ephemeral_prefix|length):] %}\n {% else %}\n {% set model_name = obj.name %}\n {%- endif -%}\n {% set error_message %}\nThe `{{ macro }}` macro cannot be used with ephemeral models, as it relies on the information schema.\n\n`{{ model_name }}` is an ephemeral model. Consider making it a view or table instead.\n {% endset %}\n {%- do exceptions.raise_compiler_error(error_message) -%}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3193998, "supported_languages": null}, "macro.dbt_utils.get_intervals_between": {"name": "get_intervals_between", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('get_intervals_between', 'dbt_utils')(start_date, end_date, datepart)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3200269, "supported_languages": null}, "macro.dbt_utils.default__get_intervals_between": {"name": "default__get_intervals_between", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.default__get_intervals_between", "macro_sql": "{% macro default__get_intervals_between(start_date, end_date, datepart) -%}\n {%- call statement('get_intervals_between', fetch_result=True) %}\n\n select {{ dbt.datediff(start_date, end_date, datepart) }}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_intervals_between') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values[0]) }}\n {%- else -%}\n {{ return(1) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.320555, "supported_languages": null}, "macro.dbt_utils.date_spine": {"name": "date_spine", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('date_spine', 'dbt_utils')(datepart, start_date, end_date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.320767, "supported_languages": null}, "macro.dbt_utils.default__date_spine": {"name": "default__date_spine", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n\n{# call as follows:\n\ndate_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dbt.dateadd(week, 1, current_date)\"\n) #}\n\n\nwith rawdata as (\n\n {{dbt_utils.generate_series(\n dbt_utils.get_intervals_between(start_date, end_date, datepart)\n )}}\n\n),\n\nall_periods as (\n\n select (\n {{\n dbt.dateadd(\n datepart,\n \"row_number() over (order by 1) - 1\",\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n)\n\nselect * from filtered\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.generate_series", "macro.dbt_utils.get_intervals_between", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3211148, "supported_languages": null}, "macro.dbt_utils.safe_subtract": {"name": "safe_subtract", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_subtract.sql", "original_file_path": "macros/sql/safe_subtract.sql", "unique_id": "macro.dbt_utils.safe_subtract", "macro_sql": "{%- macro safe_subtract(field_list) -%}\n {{ return(adapter.dispatch('safe_subtract', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_subtract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3214872, "supported_languages": null}, "macro.dbt_utils.default__safe_subtract": {"name": "default__safe_subtract", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_subtract.sql", "original_file_path": "macros/sql/safe_subtract.sql", "unique_id": "macro.dbt_utils.default__safe_subtract", "macro_sql": "\n\n{%- macro default__safe_subtract(field_list) -%}\n\n{%- if field_list is not iterable or field_list is string or field_list is mapping -%}\n\n{%- set error_message = '\nWarning: the `safe_subtract` macro takes a single list argument instead of \\\nstring arguments. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.raise_compiler_error(error_message) -%}\n\n{%- endif -%}\n\n{% set fields = [] %}\n\n{%- for field in field_list -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' -\\n ') }}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.322028, "supported_languages": null}, "macro.dbt_utils.nullcheck_table": {"name": "nullcheck_table", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "unique_id": "macro.dbt_utils.nullcheck_table", "macro_sql": "{% macro nullcheck_table(relation) %}\n {{ return(adapter.dispatch('nullcheck_table', 'dbt_utils')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.322326, "supported_languages": null}, "macro.dbt_utils.default__nullcheck_table": {"name": "default__nullcheck_table", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "unique_id": "macro.dbt_utils.default__nullcheck_table", "macro_sql": "{% macro default__nullcheck_table(relation) %}\n\n {%- do dbt_utils._is_relation(relation, 'nullcheck_table') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'nullcheck_table') -%}\n {% set cols = adapter.get_columns_in_relation(relation) %}\n\n select {{ dbt_utils.nullcheck(cols) }}\n from {{relation}}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.322643, "supported_languages": null}, "macro.dbt_utils.get_relations_by_pattern": {"name": "get_relations_by_pattern", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "unique_id": "macro.dbt_utils.get_relations_by_pattern", "macro_sql": "{% macro get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_pattern', 'dbt_utils')(schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3232489, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_pattern": {"name": "default__get_relations_by_pattern", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "unique_id": "macro.dbt_utils.default__get_relations_by_pattern", "macro_sql": "{% macro default__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.324123, "supported_languages": null}, "macro.dbt_utils.get_powers_of_two": {"name": "get_powers_of_two", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('get_powers_of_two', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.325085, "supported_languages": null}, "macro.dbt_utils.default__get_powers_of_two": {"name": "default__get_powers_of_two", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.default__get_powers_of_two", "macro_sql": "{% macro default__get_powers_of_two(upper_bound) %}\n\n {% if upper_bound <= 0 %}\n {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n {% endif %}\n\n {% for _ in range(1, 100) %}\n {% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3255198, "supported_languages": null}, "macro.dbt_utils.generate_series": {"name": "generate_series", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.325721, "supported_languages": null}, "macro.dbt_utils.default__generate_series": {"name": "default__generate_series", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.default__generate_series", "macro_sql": "{% macro default__generate_series(upper_bound) %}\n\n {% set n = dbt_utils.get_powers_of_two(upper_bound) %}\n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n {% for i in range(n) %}\n p{{i}}.generated_number * power(2, {{i}})\n {% if not loop.last %} + {% endif %}\n {% endfor %}\n + 1\n as generated_number\n\n from\n\n {% for i in range(n) %}\n p as p{{i}}\n {% if not loop.last %} cross join {% endif %}\n {% endfor %}\n\n )\n\n select *\n from unioned\n where generated_number <= {{upper_bound}}\n order by generated_number\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.326232, "supported_languages": null}, "macro.dbt_utils.get_relations_by_prefix": {"name": "get_relations_by_prefix", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "unique_id": "macro.dbt_utils.get_relations_by_prefix", "macro_sql": "{% macro get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_prefix', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.326887, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_prefix": {"name": "default__get_relations_by_prefix", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "unique_id": "macro.dbt_utils.default__get_relations_by_prefix", "macro_sql": "{% macro default__get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_prefix_sql(schema, prefix, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3278122, "supported_languages": null}, "macro.dbt_utils.get_tables_by_prefix_sql": {"name": "get_tables_by_prefix_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "unique_id": "macro.dbt_utils.get_tables_by_prefix_sql", "macro_sql": "{% macro get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_prefix_sql', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.328226, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_prefix_sql": {"name": "default__get_tables_by_prefix_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "unique_id": "macro.dbt_utils.default__get_tables_by_prefix_sql", "macro_sql": "{% macro default__get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(\n schema_pattern = schema,\n table_pattern = prefix ~ '%',\n exclude = exclude,\n database = database\n ) }}\n \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.328489, "supported_languages": null}, "macro.dbt_utils.star": {"name": "star", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "unique_id": "macro.dbt_utils.star", "macro_sql": "{% macro star(from, relation_alias=False, except=[], prefix='', suffix='', quote_identifiers=True) -%}\r\n {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix, quote_identifiers)) }}\r\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.329598, "supported_languages": null}, "macro.dbt_utils.default__star": {"name": "default__star", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "unique_id": "macro.dbt_utils.default__star", "macro_sql": "{% macro default__star(from, relation_alias=False, except=[], prefix='', suffix='', quote_identifiers=True) -%}\r\n {%- do dbt_utils._is_relation(from, 'star') -%}\r\n {%- do dbt_utils._is_ephemeral(from, 'star') -%}\r\n\r\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\r\n {%- if not execute -%}\r\n {% do return('*') %}\r\n {%- endif -%}\r\n\r\n {% set cols = dbt_utils.get_filtered_columns_in_relation(from, except) %}\r\n\r\n {%- if cols|length <= 0 -%}\r\n {% if flags.WHICH == 'compile' %}\r\n {% set response %}\r\n*\r\n/* No columns were returned. Maybe the relation doesn't exist yet \r\nor all columns were excluded. This star is only output during \r\ndbt compile, and exists to keep SQLFluff happy. */\r\n {% endset %}\r\n {% do return(response) %}\r\n {% else %}\r\n {% do return(\"/* no columns returned from star() macro */\") %}\r\n {% endif %}\r\n {%- else -%}\r\n {%- for col in cols %}\r\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}\r\n {%- if quote_identifiers -%}\r\n {{ adapter.quote(col)|trim }} {%- if prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }} {%- endif -%}\r\n {%- else -%}\r\n {{ col|trim }} {%- if prefix!='' or suffix!='' %} as {{ (prefix ~ col ~ suffix)|trim }} {%- endif -%}\r\n {% endif %}\r\n {%- if not loop.last %},{{ '\\n ' }}{%- endif -%}\r\n {%- endfor -%}\r\n {% endif %}\r\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.331533, "supported_languages": null}, "macro.dbt_utils.unpivot": {"name": "unpivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "unique_id": "macro.dbt_utils.unpivot", "macro_sql": "{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value') -%}\n {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.333246, "supported_languages": null}, "macro.dbt_utils.default__unpivot": {"name": "default__unpivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "unique_id": "macro.dbt_utils.default__unpivot", "macro_sql": "{% macro default__unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value') -%}\n\n {% if not relation %}\n {{ exceptions.raise_compiler_error(\"Error: argument `relation` is required for `unpivot` macro.\") }}\n {% endif %}\n\n {%- set exclude = exclude if exclude is not none else [] %}\n {%- set remove = remove if remove is not none else [] %}\n\n {%- set include_cols = [] %}\n\n {%- set table_columns = {} %}\n\n {%- do table_columns.update({relation: []}) %}\n\n {%- do dbt_utils._is_relation(relation, 'unpivot') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'unpivot') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) %}\n\n {%- for col in cols -%}\n {%- if col.column.lower() not in remove|map('lower') and col.column.lower() not in exclude|map('lower') -%}\n {% do include_cols.append(col) %}\n {%- endif %}\n {%- endfor %}\n\n\n {%- for col in include_cols -%}\n select\n {%- for exclude_col in exclude %}\n {{ exclude_col }},\n {%- endfor %}\n\n cast('{{ col.column }}' as {{ dbt.type_string() }}) as {{ field_name }},\n cast( {% if col.data_type == 'boolean' %}\n {{ dbt.cast_bool_to_text(col.column) }}\n {% else %}\n {{ col.column }}\n {% endif %}\n as {{ cast_to }}) as {{ value_name }}\n\n from {{ relation }}\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n {%- endfor -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.type_string", "macro.dbt.cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3348339, "supported_languages": null}, "macro.dbt_utils.safe_divide": {"name": "safe_divide", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_divide.sql", "original_file_path": "macros/sql/safe_divide.sql", "unique_id": "macro.dbt_utils.safe_divide", "macro_sql": "{% macro safe_divide(numerator, denominator) -%}\n {{ return(adapter.dispatch('safe_divide', 'dbt_utils')(numerator, denominator)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_divide"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.335179, "supported_languages": null}, "macro.dbt_utils.default__safe_divide": {"name": "default__safe_divide", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_divide.sql", "original_file_path": "macros/sql/safe_divide.sql", "unique_id": "macro.dbt_utils.default__safe_divide", "macro_sql": "{% macro default__safe_divide(numerator, denominator) %}\n ( {{ numerator }} ) / nullif( ( {{ denominator }} ), 0)\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.335315, "supported_languages": null}, "macro.dbt_utils.union_relations": {"name": "union_relations", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "unique_id": "macro.dbt_utils.union_relations", "macro_sql": "{%- macro union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n {{ return(adapter.dispatch('union_relations', 'dbt_utils')(relations, column_override, include, exclude, source_column_name, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.338124, "supported_languages": null}, "macro.dbt_utils.default__union_relations": {"name": "default__union_relations", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "unique_id": "macro.dbt_utils.default__union_relations", "macro_sql": "\n\n{%- macro default__union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n {%- set all_excludes = [] -%}\n {%- set all_includes = [] -%}\n\n {%- if exclude -%}\n {%- for exc in exclude -%}\n {%- do all_excludes.append(exc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- if include -%}\n {%- for inc in include -%}\n {%- do all_includes.append(inc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'union_relations') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column | lower in all_excludes -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column | lower not in all_includes -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n {%- set dbt_command = flags.WHICH -%}\n\n\n {% if dbt_command in ['run', 'build'] %}\n {% if (include | length > 0 or exclude | length > 0) and not column_superset.keys() %}\n {%- set relations_string -%}\n {%- for relation in relations -%}\n {{ relation.name }}\n {%- if not loop.last %}, {% endif -%}\n {%- endfor -%}\n {%- endset -%}\n\n {%- set error_message -%}\n There were no columns found to union for relations {{ relations_string }}\n {%- endset -%}\n\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n {%- endif -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n {%- if source_column_name is not none %}\n cast({{ dbt.string_literal(relation) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {%- endif %}\n\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ relation }}\n\n {% if where -%}\n where {{ where }}\n {%- endif %}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.341373, "supported_languages": null}, "macro.dbt_utils.group_by": {"name": "group_by", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "unique_id": "macro.dbt_utils.group_by", "macro_sql": "{%- macro group_by(n) -%}\n {{ return(adapter.dispatch('group_by', 'dbt_utils')(n)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__group_by"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.341697, "supported_languages": null}, "macro.dbt_utils.default__group_by": {"name": "default__group_by", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "unique_id": "macro.dbt_utils.default__group_by", "macro_sql": "\n\n{%- macro default__group_by(n) -%}\n\n group by {% for i in range(1, n + 1) -%}\n {{ i }}{{ ',' if not loop.last }} \n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.341929, "supported_languages": null}, "macro.dbt_utils.deduplicate": {"name": "deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.deduplicate", "macro_sql": "{%- macro deduplicate(relation, partition_by, order_by) -%}\n {{ return(adapter.dispatch('deduplicate', 'dbt_utils')(relation, partition_by, order_by)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.postgres__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.342669, "supported_languages": null}, "macro.dbt_utils.default__deduplicate": {"name": "default__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.default__deduplicate", "macro_sql": "\n\n{%- macro default__deduplicate(relation, partition_by, order_by) -%}\n\n with row_numbered as (\n select\n _inner.*,\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) as rn\n from {{ relation }} as _inner\n )\n\n select\n distinct data.*\n from {{ relation }} as data\n {#\n -- Not all DBs will support natural joins but the ones that do include:\n -- Oracle, MySQL, SQLite, Redshift, Teradata, Materialize, Databricks\n -- Apache Spark, SingleStore, Vertica\n -- Those that do not appear to support natural joins include:\n -- SQLServer, Trino, Presto, Rockset, Athena\n #}\n natural join row_numbered\n where row_numbered.rn = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.342881, "supported_languages": null}, "macro.dbt_utils.redshift__deduplicate": {"name": "redshift__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.redshift__deduplicate", "macro_sql": "{% macro redshift__deduplicate(relation, partition_by, order_by) -%}\n\n {{ return(dbt_utils.default__deduplicate(relation, partition_by, order_by=order_by)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.343083, "supported_languages": null}, "macro.dbt_utils.postgres__deduplicate": {"name": "postgres__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.postgres__deduplicate", "macro_sql": "\n{%- macro postgres__deduplicate(relation, partition_by, order_by) -%}\n\n select\n distinct on ({{ partition_by }}) *\n from {{ relation }}\n order by {{ partition_by }}{{ ',' ~ order_by }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.343269, "supported_languages": null}, "macro.dbt_utils.snowflake__deduplicate": {"name": "snowflake__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.snowflake__deduplicate", "macro_sql": "\n{%- macro snowflake__deduplicate(relation, partition_by, order_by) -%}\n\n select *\n from {{ relation }}\n qualify\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.343433, "supported_languages": null}, "macro.dbt_utils.bigquery__deduplicate": {"name": "bigquery__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.bigquery__deduplicate", "macro_sql": "\n{%- macro bigquery__deduplicate(relation, partition_by, order_by) -%}\n\n select unique.*\n from (\n select\n array_agg (\n original\n order by {{ order_by }}\n limit 1\n )[offset(0)] unique\n from {{ relation }} original\n group by {{ partition_by }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.343594, "supported_languages": null}, "macro.dbt_utils.surrogate_key": {"name": "surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "unique_id": "macro.dbt_utils.surrogate_key", "macro_sql": "{%- macro surrogate_key(field_list) -%}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('surrogate_key', 'dbt_utils')(field_list, *varargs)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.343959, "supported_languages": null}, "macro.dbt_utils.default__surrogate_key": {"name": "default__surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "unique_id": "macro.dbt_utils.default__surrogate_key", "macro_sql": "\n\n{%- macro default__surrogate_key(field_list) -%}\n\n{%- set error_message = '\nWarning: `dbt_utils.surrogate_key` has been replaced by \\\n`dbt_utils.generate_surrogate_key`. The new macro treats null values \\\ndifferently to empty strings. To restore the behaviour of the original \\\nmacro, add a global variable in dbt_project.yml called \\\n`surrogate_key_treat_nulls_as_empty_strings` to your \\\ndbt_project.yml file with a value of True. \\\nThe {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.raise_compiler_error(error_message) -%}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.344185, "supported_languages": null}, "macro.dbt_utils.safe_add": {"name": "safe_add", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "unique_id": "macro.dbt_utils.safe_add", "macro_sql": "{%- macro safe_add(field_list) -%}\n {{ return(adapter.dispatch('safe_add', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.344529, "supported_languages": null}, "macro.dbt_utils.default__safe_add": {"name": "default__safe_add", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "unique_id": "macro.dbt_utils.default__safe_add", "macro_sql": "\n\n{%- macro default__safe_add(field_list) -%}\n\n{%- if field_list is not iterable or field_list is string or field_list is mapping -%}\n\n{%- set error_message = '\nWarning: the `safe_add` macro now takes a single list argument instead of \\\nstring arguments. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.warn(error_message) -%}\n\n{%- endif -%}\n\n{% set fields = [] %}\n\n{%- for field in field_list -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' +\\n ') }}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.345113, "supported_languages": null}, "macro.dbt_utils.nullcheck": {"name": "nullcheck", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "unique_id": "macro.dbt_utils.nullcheck", "macro_sql": "{% macro nullcheck(cols) %}\n {{ return(adapter.dispatch('nullcheck', 'dbt_utils')(cols)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3455591, "supported_languages": null}, "macro.dbt_utils.default__nullcheck": {"name": "default__nullcheck", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "unique_id": "macro.dbt_utils.default__nullcheck", "macro_sql": "{% macro default__nullcheck(cols) %}\n{%- for col in cols %}\n\n {% if col.is_string() -%}\n\n nullif({{col.name}},'') as {{col.name}}\n\n {%- else -%}\n\n {{col.name}}\n\n {%- endif -%}\n\n{%- if not loop.last -%} , {%- endif -%}\n\n{%- endfor -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3458822, "supported_languages": null}, "macro.dbt_utils.get_tables_by_pattern_sql": {"name": "get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.get_tables_by_pattern_sql", "macro_sql": "{% macro get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_pattern_sql', 'dbt_utils')\n (schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.347475, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_pattern_sql": {"name": "default__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.default__get_tables_by_pattern_sql", "macro_sql": "{% macro default__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n select distinct\n table_schema as {{ adapter.quote('table_schema') }},\n table_name as {{ adapter.quote('table_name') }},\n {{ dbt_utils.get_table_types_sql() }}\n from {{ database }}.information_schema.tables\n where table_schema ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.347832, "supported_languages": null}, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": {"name": "bigquery__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.bigquery__get_tables_by_pattern_sql", "macro_sql": "{% macro bigquery__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {% if '%' in schema_pattern %}\n {% set schemata=dbt_utils._bigquery__get_matching_schemata(schema_pattern, database) %}\n {% else %}\n {% set schemata=[schema_pattern] %}\n {% endif %}\n\n {% set sql %}\n {% for schema in schemata %}\n select distinct\n table_schema,\n table_name,\n {{ dbt_utils.get_table_types_sql() }}\n\n from {{ adapter.quote(database) }}.{{ schema }}.INFORMATION_SCHEMA.TABLES\n where lower(table_name) like lower ('{{ table_pattern }}')\n and lower(table_name) not like lower ('{{ exclude }}')\n\n {% if not loop.last %} union all {% endif %}\n\n {% endfor %}\n {% endset %}\n\n {{ return(sql) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._bigquery__get_matching_schemata", "macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.348882, "supported_languages": null}, "macro.dbt_utils._bigquery__get_matching_schemata": {"name": "_bigquery__get_matching_schemata", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils._bigquery__get_matching_schemata", "macro_sql": "{% macro _bigquery__get_matching_schemata(schema_pattern, database) %}\n {% if execute %}\n\n {% set sql %}\n select schema_name from {{ adapter.quote(database) }}.INFORMATION_SCHEMA.SCHEMATA\n where lower(schema_name) like lower('{{ schema_pattern }}')\n {% endset %}\n\n {% set results=run_query(sql) %}\n\n {% set schemata=results.columns['schema_name'].values() %}\n\n {{ return(schemata) }}\n\n {% else %}\n\n {{ return([]) }}\n\n {% endif %}\n\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.349358, "supported_languages": null}, "macro.dbt_utils.get_column_values": {"name": "get_column_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "unique_id": "macro.dbt_utils.get_column_values", "macro_sql": "{% macro get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none, where=none) -%}\n {{ return(adapter.dispatch('get_column_values', 'dbt_utils')(table, column, order_by, max_records, default, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_column_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.350373, "supported_languages": null}, "macro.dbt_utils.default__get_column_values": {"name": "default__get_column_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "unique_id": "macro.dbt_utils.default__get_column_values", "macro_sql": "{% macro default__get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none, where=none) -%}\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {% set default = [] if not default %}\n {{ return(default) }}\n {% endif %}\n\n {%- do dbt_utils._is_ephemeral(table, 'get_column_values') -%}\n\n {# Not all relations are tables. Renaming for internal clarity without breaking functionality for anyone using named arguments #}\n {# TODO: Change the method signature in a future 0.x.0 release #}\n {%- set target_relation = table -%}\n\n {# adapter.load_relation is a convenience wrapper to avoid building a Relation when we already have one #}\n {% set relation_exists = (load_relation(target_relation)) is not none %}\n\n {%- call statement('get_column_values', fetch_result=true) %}\n\n {%- if not relation_exists and default is none -%}\n\n {{ exceptions.raise_compiler_error(\"In get_column_values(): relation \" ~ target_relation ~ \" does not exist and no default value was provided.\") }}\n\n {%- elif not relation_exists and default is not none -%}\n\n {{ log(\"Relation \" ~ target_relation ~ \" does not exist. Returning the default value: \" ~ default) }}\n\n {{ return(default) }}\n\n {%- else -%}\n\n\n select\n {{ column }} as value\n\n from {{ target_relation }}\n\n {% if where is not none %}\n where {{ where }}\n {% endif %}\n\n group by {{ column }}\n order by {{ order_by }}\n\n {% if max_records is not none %}\n limit {{ max_records }}\n {% endif %}\n\n {% endif %}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_column_values') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values) }}\n {%- else -%}\n {{ return(default) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_ephemeral", "macro.dbt.load_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3518279, "supported_languages": null}, "macro.dbt_utils.pivot": {"name": "pivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "unique_id": "macro.dbt_utils.pivot", "macro_sql": "{% macro pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {{ return(adapter.dispatch('pivot', 'dbt_utils')(column, values, alias, agg, cmp, prefix, suffix, then_value, else_value, quote_identifiers, distinct)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.352923, "supported_languages": null}, "macro.dbt_utils.default__pivot": {"name": "default__pivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "unique_id": "macro.dbt_utils.default__pivot", "macro_sql": "{% macro default__pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {% for value in values %}\n {{ agg }}(\n {% if distinct %} distinct {% endif %}\n case\n when {{ column }} {{ cmp }} '{{ dbt.escape_single_quotes(value) }}'\n then {{ then_value }}\n else {{ else_value }}\n end\n )\n {% if alias %}\n {% if quote_identifiers %}\n as {{ adapter.quote(prefix ~ value ~ suffix) }}\n {% else %}\n as {{ dbt_utils.slugify(prefix ~ value ~ suffix) }}\n {% endif %}\n {% endif %}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.escape_single_quotes", "macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.35376, "supported_languages": null}, "macro.dbt_utils.get_filtered_columns_in_relation": {"name": "get_filtered_columns_in_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "unique_id": "macro.dbt_utils.get_filtered_columns_in_relation", "macro_sql": "{% macro get_filtered_columns_in_relation(from, except=[]) -%}\n {{ return(adapter.dispatch('get_filtered_columns_in_relation', 'dbt_utils')(from, except)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.354228, "supported_languages": null}, "macro.dbt_utils.default__get_filtered_columns_in_relation": {"name": "default__get_filtered_columns_in_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "unique_id": "macro.dbt_utils.default__get_filtered_columns_in_relation", "macro_sql": "{% macro default__get_filtered_columns_in_relation(from, except=[]) -%}\n {%- do dbt_utils._is_relation(from, 'get_filtered_columns_in_relation') -%}\n {%- do dbt_utils._is_ephemeral(from, 'get_filtered_columns_in_relation') -%}\n\n {# -- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {{ return('') }}\n {% endif %}\n\n {%- set include_cols = [] %}\n {%- set cols = adapter.get_columns_in_relation(from) -%}\n {%- set except = except | map(\"lower\") | list %}\n {%- for col in cols -%}\n {%- if col.column|lower not in except -%}\n {% do include_cols.append(col.column) %}\n {%- endif %}\n {%- endfor %}\n\n {{ return(include_cols) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.354961, "supported_languages": null}, "macro.dbt_utils.width_bucket": {"name": "width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.width_bucket", "macro_sql": "{% macro width_bucket(expr, min_value, max_value, num_buckets) %}\n {{ return(adapter.dispatch('width_bucket', 'dbt_utils') (expr, min_value, max_value, num_buckets)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__width_bucket"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.355777, "supported_languages": null}, "macro.dbt_utils.default__width_bucket": {"name": "default__width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.default__width_bucket", "macro_sql": "{% macro default__width_bucket(expr, min_value, max_value, num_buckets) -%}\n\n {% set bin_size -%}\n (( {{ max_value }} - {{ min_value }} ) / {{ num_buckets }} )\n {%- endset %}\n (\n -- to break ties when the amount is eaxtly at the bucket egde\n case\n when\n mod(\n {{ dbt.safe_cast(expr, dbt.type_numeric() ) }},\n {{ dbt.safe_cast(bin_size, dbt.type_numeric() ) }}\n ) = 0\n then 1\n else 0\n end\n ) +\n -- Anything over max_value goes the N+1 bucket\n least(\n ceil(\n ({{ expr }} - {{ min_value }})/{{ bin_size }}\n ),\n {{ num_buckets }} + 1\n )\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.safe_cast", "macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.356274, "supported_languages": null}, "macro.dbt_utils.snowflake__width_bucket": {"name": "snowflake__width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.snowflake__width_bucket", "macro_sql": "{% macro snowflake__width_bucket(expr, min_value, max_value, num_buckets) %}\n width_bucket({{ expr }}, {{ min_value }}, {{ max_value }}, {{ num_buckets }} )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.356471, "supported_languages": null}, "macro.dbt_utils.get_query_results_as_dict": {"name": "get_query_results_as_dict", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "unique_id": "macro.dbt_utils.get_query_results_as_dict", "macro_sql": "{% macro get_query_results_as_dict(query) %}\n {{ return(adapter.dispatch('get_query_results_as_dict', 'dbt_utils')(query)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_query_results_as_dict"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.35687, "supported_languages": null}, "macro.dbt_utils.default__get_query_results_as_dict": {"name": "default__get_query_results_as_dict", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "unique_id": "macro.dbt_utils.default__get_query_results_as_dict", "macro_sql": "{% macro default__get_query_results_as_dict(query) %}\n\n{# This macro returns a dictionary of the form {column_name: (tuple_of_results)} #}\n\n {%- call statement('get_query_results', fetch_result=True,auto_begin=false) -%}\n\n {{ query }}\n\n {%- endcall -%}\n\n {% set sql_results={} %}\n\n {%- if execute -%}\n {% set sql_results_table = load_result('get_query_results').table.columns %}\n {% for column_name, column in sql_results_table.items() %}\n {% do sql_results.update({column_name: column.values()}) %}\n {% endfor %}\n {%- endif -%}\n\n {{ return(sql_results) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.357462, "supported_languages": null}, "macro.dbt_utils.generate_surrogate_key": {"name": "generate_surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "unique_id": "macro.dbt_utils.generate_surrogate_key", "macro_sql": "{%- macro generate_surrogate_key(field_list) -%}\n {{ return(adapter.dispatch('generate_surrogate_key', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__generate_surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.357908, "supported_languages": null}, "macro.dbt_utils.default__generate_surrogate_key": {"name": "default__generate_surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "unique_id": "macro.dbt_utils.default__generate_surrogate_key", "macro_sql": "\n\n{%- macro default__generate_surrogate_key(field_list) -%}\n\n{%- if var('surrogate_key_treat_nulls_as_empty_strings', False) -%}\n {%- set default_null_value = \"\" -%}\n{%- else -%}\n {%- set default_null_value = '_dbt_utils_surrogate_key_null_' -%}\n{%- endif -%}\n\n{%- set fields = [] -%}\n\n{%- for field in field_list -%}\n\n {%- do fields.append(\n \"coalesce(cast(\" ~ field ~ \" as \" ~ dbt.type_string() ~ \"), '\" ~ default_null_value ~\"')\"\n ) -%}\n\n {%- if not loop.last %}\n {%- do fields.append(\"'-'\") -%}\n {%- endif -%}\n\n{%- endfor -%}\n\n{{ dbt.hash(dbt.concat(fields)) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.hash", "macro.dbt.concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.358515, "supported_languages": null}, "macro.dbt_utils.get_table_types_sql": {"name": "get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.get_table_types_sql", "macro_sql": "{%- macro get_table_types_sql() -%}\n {{ return(adapter.dispatch('get_table_types_sql', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_utils.postgres__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.359029, "supported_languages": null}, "macro.dbt_utils.default__get_table_types_sql": {"name": "default__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.default__get_table_types_sql", "macro_sql": "{% macro default__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'EXTERNAL TABLE' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3591738, "supported_languages": null}, "macro.dbt_utils.postgres__get_table_types_sql": {"name": "postgres__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.postgres__get_table_types_sql", "macro_sql": "{% macro postgres__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'FOREIGN' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3593118, "supported_languages": null}, "macro.dbt_utils.databricks__get_table_types_sql": {"name": "databricks__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.databricks__get_table_types_sql", "macro_sql": "{% macro databricks__get_table_types_sql() %}\n case table_type\n when 'MANAGED' then 'table'\n when 'BASE TABLE' then 'table'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3594508, "supported_languages": null}, "macro.dbt_utils.get_single_value": {"name": "get_single_value", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_single_value.sql", "original_file_path": "macros/sql/get_single_value.sql", "unique_id": "macro.dbt_utils.get_single_value", "macro_sql": "{% macro get_single_value(query, default=none) %}\n {{ return(adapter.dispatch('get_single_value', 'dbt_utils')(query, default)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_single_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3600798, "supported_languages": null}, "macro.dbt_utils.default__get_single_value": {"name": "default__get_single_value", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_single_value.sql", "original_file_path": "macros/sql/get_single_value.sql", "unique_id": "macro.dbt_utils.default__get_single_value", "macro_sql": "{% macro default__get_single_value(query, default) %}\n\n{# This macro returns the (0, 0) record in a query, i.e. the first row of the first column #}\n\n {%- call statement('get_query_result', fetch_result=True, auto_begin=false) -%}\n\n {{ query }}\n\n {%- endcall -%}\n\n {%- if execute -%}\n\n {% set r = load_result('get_query_result').table.columns[0].values() %}\n {% if r | length == 0 %}\n {% do print('Query `' ~ query ~ '` returned no rows. Using the default value: ' ~ default) %}\n {% set sql_result = default %}\n {% else %}\n {% set sql_result = r[0] %}\n {% endif %}\n \n {%- else -%}\n \n {% set sql_result = default %}\n \n {%- endif -%}\n\n {% do return(sql_result) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.360957, "supported_languages": null}, "macro.dbt_utils.degrees_to_radians": {"name": "degrees_to_radians", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.degrees_to_radians", "macro_sql": "{% macro degrees_to_radians(degrees) -%}\n acos(-1) * {{degrees}} / 180\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3619761, "supported_languages": null}, "macro.dbt_utils.haversine_distance": {"name": "haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.haversine_distance", "macro_sql": "{% macro haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n {{ return(adapter.dispatch('haversine_distance', 'dbt_utils')(lat1,lon1,lat2,lon2,unit)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__haversine_distance"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.362241, "supported_languages": null}, "macro.dbt_utils.default__haversine_distance": {"name": "default__haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.default__haversine_distance", "macro_sql": "{% macro default__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n\n 2 * 3961 * asin(sqrt(power((sin(radians(({{ lat2 }} - {{ lat1 }}) / 2))), 2) +\n cos(radians({{lat1}})) * cos(radians({{lat2}})) *\n power((sin(radians(({{ lon2 }} - {{ lon1 }}) / 2))), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.362785, "supported_languages": null}, "macro.dbt_utils.bigquery__haversine_distance": {"name": "bigquery__haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.bigquery__haversine_distance", "macro_sql": "{% macro bigquery__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{% set radians_lat1 = dbt_utils.degrees_to_radians(lat1) %}\n{% set radians_lat2 = dbt_utils.degrees_to_radians(lat2) %}\n{% set radians_lon1 = dbt_utils.degrees_to_radians(lon1) %}\n{% set radians_lon2 = dbt_utils.degrees_to_radians(lon2) %}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n 2 * 3961 * asin(sqrt(power(sin(({{ radians_lat2 }} - {{ radians_lat1 }}) / 2), 2) +\n cos({{ radians_lat1 }}) * cos({{ radians_lat2 }}) *\n power(sin(({{ radians_lon2 }} - {{ radians_lon1 }}) / 2), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.degrees_to_radians"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.363567, "supported_languages": null}, "macro.spark_utils.get_tables": {"name": "get_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_tables", "macro_sql": "{% macro get_tables(table_regex_pattern='.*') %}\n\n {% set tables = [] %}\n {% for database in spark__list_schemas('not_used') %}\n {% for table in spark__list_relations_without_caching(database[0]) %}\n {% set db_tablename = database[0] ~ \".\" ~ table[1] %}\n {% set is_match = modules.re.match(table_regex_pattern, db_tablename) %}\n {% if is_match %}\n {% call statement('table_detail', fetch_result=True) -%}\n describe extended {{ db_tablename }}\n {% endcall %}\n\n {% set table_type = load_result('table_detail').table|reverse|selectattr(0, 'in', ('type', 'TYPE', 'Type'))|first %}\n {% if table_type[1]|lower != 'view' %}\n {{ tables.append(db_tablename) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n {% endfor %}\n {{ return(tables) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3686888, "supported_languages": null}, "macro.spark_utils.get_delta_tables": {"name": "get_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_delta_tables", "macro_sql": "{% macro get_delta_tables(table_regex_pattern='.*') %}\n\n {% set delta_tables = [] %}\n {% for db_tablename in get_tables(table_regex_pattern) %}\n {% call statement('table_detail', fetch_result=True) -%}\n describe extended {{ db_tablename }}\n {% endcall %}\n\n {% set table_type = load_result('table_detail').table|reverse|selectattr(0, 'in', ('provider', 'PROVIDER', 'Provider'))|first %}\n {% if table_type[1]|lower == 'delta' %}\n {{ delta_tables.append(db_tablename) }}\n {% endif %}\n {% endfor %}\n {{ return(delta_tables) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_tables", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.369405, "supported_languages": null}, "macro.spark_utils.get_statistic_columns": {"name": "get_statistic_columns", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_statistic_columns", "macro_sql": "{% macro get_statistic_columns(table) %}\n\n {% call statement('input_columns', fetch_result=True) %}\n SHOW COLUMNS IN {{ table }}\n {% endcall %}\n {% set input_columns = load_result('input_columns').table %}\n\n {% set output_columns = [] %}\n {% for column in input_columns %}\n {% call statement('column_information', fetch_result=True) %}\n DESCRIBE TABLE {{ table }} `{{ column[0] }}`\n {% endcall %}\n {% if not load_result('column_information').table[1][1].startswith('struct') and not load_result('column_information').table[1][1].startswith('array') %}\n {{ output_columns.append('`' ~ column[0] ~ '`') }}\n {% endif %}\n {% endfor %}\n {{ return(output_columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3702312, "supported_languages": null}, "macro.spark_utils.spark_optimize_delta_tables": {"name": "spark_optimize_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_optimize_delta_tables", "macro_sql": "{% macro spark_optimize_delta_tables(table_regex_pattern='.*') %}\n\n {% for table in get_delta_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Optimizing \" ~ table) }}\n {% do run_query(\"optimize \" ~ table) %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_delta_tables", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3710139, "supported_languages": null}, "macro.spark_utils.spark_vacuum_delta_tables": {"name": "spark_vacuum_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_vacuum_delta_tables", "macro_sql": "{% macro spark_vacuum_delta_tables(table_regex_pattern='.*') %}\n\n {% for table in get_delta_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Vacuuming \" ~ table) }}\n {% do run_query(\"vacuum \" ~ table) %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_delta_tables", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.371753, "supported_languages": null}, "macro.spark_utils.spark_analyze_tables": {"name": "spark_analyze_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_analyze_tables", "macro_sql": "{% macro spark_analyze_tables(table_regex_pattern='.*') %}\n\n {% for table in get_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set columns = get_statistic_columns(table) | join(',') %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Analyzing \" ~ table) }}\n {% if columns != '' %}\n {% do run_query(\"analyze table \" ~ table ~ \" compute statistics for columns \" ~ columns) %}\n {% endif %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_tables", "macro.spark_utils.get_statistic_columns", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3727329, "supported_languages": null}, "macro.spark_utils.spark__concat": {"name": "spark__concat", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/concat.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/concat.sql", "unique_id": "macro.spark_utils.spark__concat", "macro_sql": "{% macro spark__concat(fields) -%}\n concat({{ fields|join(', ') }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.372927, "supported_languages": null}, "macro.spark_utils.spark__type_numeric": {"name": "spark__type_numeric", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "unique_id": "macro.spark_utils.spark__type_numeric", "macro_sql": "{% macro spark__type_numeric() %}\n decimal(28, 6)\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.373028, "supported_languages": null}, "macro.spark_utils.spark__dateadd": {"name": "spark__dateadd", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "unique_id": "macro.spark_utils.spark__dateadd", "macro_sql": "{% macro spark__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {%- set clock_component -%}\n {# make sure the dates + timestamps are real, otherwise raise an error asap #}\n to_unix_timestamp({{ spark_utils.assert_not_null('to_timestamp', from_date_or_timestamp) }})\n - to_unix_timestamp({{ spark_utils.assert_not_null('date', from_date_or_timestamp) }})\n {%- endset -%}\n\n {%- if datepart in ['day', 'week'] -%}\n \n {%- set multiplier = 7 if datepart == 'week' else 1 -%}\n\n to_timestamp(\n to_unix_timestamp(\n date_add(\n {{ spark_utils.assert_not_null('date', from_date_or_timestamp) }},\n cast({{interval}} * {{multiplier}} as int)\n )\n ) + {{clock_component}}\n )\n\n {%- elif datepart in ['month', 'quarter', 'year'] -%}\n \n {%- set multiplier -%} \n {%- if datepart == 'month' -%} 1\n {%- elif datepart == 'quarter' -%} 3\n {%- elif datepart == 'year' -%} 12\n {%- endif -%}\n {%- endset -%}\n\n to_timestamp(\n to_unix_timestamp(\n add_months(\n {{ spark_utils.assert_not_null('date', from_date_or_timestamp) }},\n cast({{interval}} * {{multiplier}} as int)\n )\n ) + {{clock_component}}\n )\n\n {%- elif datepart in ('hour', 'minute', 'second', 'millisecond', 'microsecond') -%}\n \n {%- set multiplier -%} \n {%- if datepart == 'hour' -%} 3600\n {%- elif datepart == 'minute' -%} 60\n {%- elif datepart == 'second' -%} 1\n {%- elif datepart == 'millisecond' -%} (1/1000000)\n {%- elif datepart == 'microsecond' -%} (1/1000000)\n {%- endif -%}\n {%- endset -%}\n\n to_timestamp(\n {{ spark_utils.assert_not_null('to_unix_timestamp', from_date_or_timestamp) }}\n + cast({{interval}} * {{multiplier}} as int)\n )\n\n {%- else -%}\n\n {{ exceptions.raise_compiler_error(\"macro dateadd not implemented for datepart ~ '\" ~ datepart ~ \"' ~ on Spark\") }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.375807, "supported_languages": null}, "macro.spark_utils.spark__datediff": {"name": "spark__datediff", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/datediff.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datediff.sql", "unique_id": "macro.spark_utils.spark__datediff", "macro_sql": "{% macro spark__datediff(first_date, second_date, datepart) %}\n\n {%- if datepart in ['day', 'week', 'month', 'quarter', 'year'] -%}\n \n {# make sure the dates are real, otherwise raise an error asap #}\n {% set first_date = spark_utils.assert_not_null('date', first_date) %}\n {% set second_date = spark_utils.assert_not_null('date', second_date) %}\n \n {%- endif -%}\n \n {%- if datepart == 'day' -%}\n \n datediff({{second_date}}, {{first_date}})\n \n {%- elif datepart == 'week' -%}\n \n case when {{first_date}} < {{second_date}}\n then floor(datediff({{second_date}}, {{first_date}})/7)\n else ceil(datediff({{second_date}}, {{first_date}})/7)\n end\n \n -- did we cross a week boundary (Sunday)?\n + case\n when {{first_date}} < {{second_date}} and dayofweek({{second_date}}) < dayofweek({{first_date}}) then 1\n when {{first_date}} > {{second_date}} and dayofweek({{second_date}}) > dayofweek({{first_date}}) then -1\n else 0 end\n\n {%- elif datepart == 'month' -%}\n\n case when {{first_date}} < {{second_date}}\n then floor(months_between(date({{second_date}}), date({{first_date}})))\n else ceil(months_between(date({{second_date}}), date({{first_date}})))\n end\n \n -- did we cross a month boundary?\n + case\n when {{first_date}} < {{second_date}} and dayofmonth({{second_date}}) < dayofmonth({{first_date}}) then 1\n when {{first_date}} > {{second_date}} and dayofmonth({{second_date}}) > dayofmonth({{first_date}}) then -1\n else 0 end\n \n {%- elif datepart == 'quarter' -%}\n \n case when {{first_date}} < {{second_date}}\n then floor(months_between(date({{second_date}}), date({{first_date}}))/3)\n else ceil(months_between(date({{second_date}}), date({{first_date}}))/3)\n end\n \n -- did we cross a quarter boundary?\n + case\n when {{first_date}} < {{second_date}} and (\n (dayofyear({{second_date}}) - (quarter({{second_date}}) * 365/4))\n < (dayofyear({{first_date}}) - (quarter({{first_date}}) * 365/4))\n ) then 1\n when {{first_date}} > {{second_date}} and (\n (dayofyear({{second_date}}) - (quarter({{second_date}}) * 365/4))\n > (dayofyear({{first_date}}) - (quarter({{first_date}}) * 365/4))\n ) then -1\n else 0 end\n\n {%- elif datepart == 'year' -%}\n \n year({{second_date}}) - year({{first_date}})\n\n {%- elif datepart in ('hour', 'minute', 'second', 'millisecond', 'microsecond') -%}\n \n {%- set divisor -%} \n {%- if datepart == 'hour' -%} 3600\n {%- elif datepart == 'minute' -%} 60\n {%- elif datepart == 'second' -%} 1\n {%- elif datepart == 'millisecond' -%} (1/1000)\n {%- elif datepart == 'microsecond' -%} (1/1000000)\n {%- endif -%}\n {%- endset -%}\n\n case when {{first_date}} < {{second_date}}\n then ceil((\n {# make sure the timestamps are real, otherwise raise an error asap #}\n {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', second_date)) }}\n - {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', first_date)) }}\n ) / {{divisor}})\n else floor((\n {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', second_date)) }}\n - {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', first_date)) }}\n ) / {{divisor}})\n end\n \n {% if datepart == 'millisecond' %}\n + cast(date_format({{second_date}}, 'SSS') as int)\n - cast(date_format({{first_date}}, 'SSS') as int)\n {% endif %}\n \n {% if datepart == 'microsecond' %} \n {% set capture_str = '[0-9]{4}-[0-9]{2}-[0-9]{2}.[0-9]{2}:[0-9]{2}:[0-9]{2}.([0-9]{6})' %}\n -- Spark doesn't really support microseconds, so this is a massive hack!\n -- It will only work if the timestamp-string is of the format\n -- 'yyyy-MM-dd-HH mm.ss.SSSSSS'\n + cast(regexp_extract({{second_date}}, '{{capture_str}}', 1) as int)\n - cast(regexp_extract({{first_date}}, '{{capture_str}}', 1) as int) \n {% endif %}\n\n {%- else -%}\n\n {{ exceptions.raise_compiler_error(\"macro datediff not implemented for datepart ~ '\" ~ datepart ~ \"' ~ on Spark\") }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.382873, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp": {"name": "spark__current_timestamp", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "unique_id": "macro.spark_utils.spark__current_timestamp", "macro_sql": "{% macro spark__current_timestamp() %}\n current_timestamp()\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.383063, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp_in_utc": {"name": "spark__current_timestamp_in_utc", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "unique_id": "macro.spark_utils.spark__current_timestamp_in_utc", "macro_sql": "{% macro spark__current_timestamp_in_utc() %}\n unix_timestamp()\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.38314, "supported_languages": null}, "macro.spark_utils.spark__split_part": {"name": "spark__split_part", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/split_part.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/split_part.sql", "unique_id": "macro.spark_utils.spark__split_part", "macro_sql": "{% macro spark__split_part(string_text, delimiter_text, part_number) %}\n\n {% set delimiter_expr %}\n \n -- escape if starts with a special character\n case when regexp_extract({{ delimiter_text }}, '([^A-Za-z0-9])(.*)', 1) != '_'\n then concat('\\\\', {{ delimiter_text }})\n else {{ delimiter_text }} end\n \n {% endset %}\n\n {% set split_part_expr %}\n \n split(\n {{ string_text }},\n {{ delimiter_expr }}\n )[({{ part_number - 1 }})]\n \n {% endset %}\n \n {{ return(split_part_expr) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.383682, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_pattern": {"name": "spark__get_relations_by_pattern", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_relations_by_pattern", "macro_sql": "{% macro spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n show table extended in {{ schema_pattern }} like '{{ table_pattern }}'\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=None,\n schema=row[0],\n identifier=row[1],\n type=('view' if 'Type: VIEW' in row[3] else 'table')\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.385209, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_prefix": {"name": "spark__get_relations_by_prefix", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_relations_by_prefix", "macro_sql": "{% macro spark__get_relations_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {% set table_pattern = table_pattern ~ '*' %}\n {{ return(spark_utils.spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3855412, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_pattern": {"name": "spark__get_tables_by_pattern", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_tables_by_pattern", "macro_sql": "{% macro spark__get_tables_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(spark_utils.spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.385796, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_prefix": {"name": "spark__get_tables_by_prefix", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_tables_by_prefix", "macro_sql": "{% macro spark__get_tables_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(spark_utils.spark__get_relations_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.386053, "supported_languages": null}, "macro.spark_utils.assert_not_null": {"name": "assert_not_null", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "unique_id": "macro.spark_utils.assert_not_null", "macro_sql": "{% macro assert_not_null(function, arg) -%}\n {{ return(adapter.dispatch('assert_not_null', 'spark_utils')(function, arg)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.spark_utils.default__assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.386364, "supported_languages": null}, "macro.spark_utils.default__assert_not_null": {"name": "default__assert_not_null", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "unique_id": "macro.spark_utils.default__assert_not_null", "macro_sql": "{% macro default__assert_not_null(function, arg) %}\n\n coalesce({{function}}({{arg}}), nvl2({{function}}({{arg}}), assert_true({{function}}({{arg}}) is not null), null))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3865511, "supported_languages": null}, "macro.spark_utils.spark__convert_timezone": {"name": "spark__convert_timezone", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/snowplow/convert_timezone.sql", "original_file_path": "macros/snowplow/convert_timezone.sql", "unique_id": "macro.spark_utils.spark__convert_timezone", "macro_sql": "{% macro spark__convert_timezone(in_tz, out_tz, in_timestamp) %}\n from_utc_timestamp(to_utc_timestamp({{in_timestamp}}, {{in_tz}}), {{out_tz}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3867462, "supported_languages": null}, "macro.fivetran_utils.enabled_vars": {"name": "enabled_vars", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/enabled_vars.sql", "original_file_path": "macros/enabled_vars.sql", "unique_id": "macro.fivetran_utils.enabled_vars", "macro_sql": "{% macro enabled_vars(vars) %}\n\n{% for v in vars %}\n \n {% if var(v, True) == False %}\n {{ return(False) }}\n {% endif %}\n\n{% endfor %}\n\n{{ return(True) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.387118, "supported_languages": null}, "macro.fivetran_utils.percentile": {"name": "percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.percentile", "macro_sql": "{% macro percentile(percentile_field, partition_field, percent) -%}\n\n{{ adapter.dispatch('percentile', 'fivetran_utils') (percentile_field, partition_field, percent) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__percentile"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.388005, "supported_languages": null}, "macro.fivetran_utils.default__percentile": {"name": "default__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.default__percentile", "macro_sql": "{% macro default__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n over ( partition by {{ partition_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3881679, "supported_languages": null}, "macro.fivetran_utils.redshift__percentile": {"name": "redshift__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.redshift__percentile", "macro_sql": "{% macro redshift__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n over ( partition by {{ partition_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.388352, "supported_languages": null}, "macro.fivetran_utils.bigquery__percentile": {"name": "bigquery__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.bigquery__percentile", "macro_sql": "{% macro bigquery__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percentile_field }}, \n {{ percent }}) \n over (partition by {{ partition_field }} \n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.388523, "supported_languages": null}, "macro.fivetran_utils.postgres__percentile": {"name": "postgres__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.postgres__percentile", "macro_sql": "{% macro postgres__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n /* have to group by partition field */\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.38866, "supported_languages": null}, "macro.fivetran_utils.spark__percentile": {"name": "spark__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.spark__percentile", "macro_sql": "{% macro spark__percentile(percentile_field, partition_field, percent) %}\n\n percentile( \n {{ percentile_field }}, \n {{ percent }}) \n over (partition by {{ partition_field }} \n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.388814, "supported_languages": null}, "macro.fivetran_utils.pivot_json_extract": {"name": "pivot_json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/pivot_json_extract.sql", "original_file_path": "macros/pivot_json_extract.sql", "unique_id": "macro.fivetran_utils.pivot_json_extract", "macro_sql": "{% macro pivot_json_extract(string, list_of_properties) %}\n\n{%- for property in list_of_properties -%}\n{%- if property is mapping -%}\nreplace( {{ fivetran_utils.json_extract(string, property.name) }}, '\"', '') as {{ property.alias if property.alias else property.name | replace(' ', '_') | replace('.', '_') | lower }}\n\n{%- else -%}\nreplace( {{ fivetran_utils.json_extract(string, property) }}, '\"', '') as {{ property | replace(' ', '_') | lower }}\n\n{%- endif -%}\n{%- if not loop.last -%},{%- endif %}\n{% endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3897479, "supported_languages": null}, "macro.fivetran_utils.persist_pass_through_columns": {"name": "persist_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/persist_pass_through_columns.sql", "original_file_path": "macros/persist_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.persist_pass_through_columns", "macro_sql": "{% macro persist_pass_through_columns(pass_through_variable, identifier=none, transform='') %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n , {{ transform ~ '(' ~ (identifier ~ '.' if identifier else '') ~ (field.alias if field.alias else field.name) ~ ')' }} as {{ field.alias if field.alias else field.name }}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.390419, "supported_languages": null}, "macro.fivetran_utils.json_parse": {"name": "json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.json_parse", "macro_sql": "{% macro json_parse(string, string_path) -%}\n\n{{ adapter.dispatch('json_parse', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__json_parse"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3916612, "supported_languages": null}, "macro.fivetran_utils.default__json_parse": {"name": "default__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.default__json_parse", "macro_sql": "{% macro default__json_parse(string, string_path) %}\n\n json_extract_path_text({{string}}, {%- for s in string_path -%}'{{ s }}'{%- if not loop.last -%},{%- endif -%}{%- endfor -%} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.391893, "supported_languages": null}, "macro.fivetran_utils.redshift__json_parse": {"name": "redshift__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.redshift__json_parse", "macro_sql": "{% macro redshift__json_parse(string, string_path) %}\n\n json_extract_path_text({{string}}, {%- for s in string_path -%}'{{ s }}'{%- if not loop.last -%},{%- endif -%}{%- endfor -%} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.392132, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_parse": {"name": "bigquery__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.bigquery__json_parse", "macro_sql": "{% macro bigquery__json_parse(string, string_path) %}\n\n \n json_extract_scalar({{string}}, '$.{%- for s in string_path -%}{{ s }}{%- if not loop.last -%}.{%- endif -%}{%- endfor -%} ')\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.392365, "supported_languages": null}, "macro.fivetran_utils.postgres__json_parse": {"name": "postgres__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.postgres__json_parse", "macro_sql": "{% macro postgres__json_parse(string, string_path) %}\n\n {{string}}::json #>> '{ {%- for s in string_path -%}{{ s }}{%- if not loop.last -%},{%- endif -%}{%- endfor -%} }'\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3927171, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_parse": {"name": "snowflake__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.snowflake__json_parse", "macro_sql": "{% macro snowflake__json_parse(string, string_path) %}\n\n parse_json( {{string}} ) {%- for s in string_path -%}{% if s is number %}[{{ s }}]{% else %}['{{ s }}']{% endif %}{%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.393025, "supported_languages": null}, "macro.fivetran_utils.spark__json_parse": {"name": "spark__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.spark__json_parse", "macro_sql": "{% macro spark__json_parse(string, string_path) %}\n\n {{string}} : {%- for s in string_path -%}{% if s is number %}[{{ s }}]{% else %}['{{ s }}']{% endif %}{%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.393284, "supported_languages": null}, "macro.fivetran_utils.sqlserver__json_parse": {"name": "sqlserver__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.sqlserver__json_parse", "macro_sql": "{% macro sqlserver__json_parse(string, string_path) %}\n\n json_value({{string}}, '$.{%- for s in string_path -%}{{ s }}{%- if not loop.last -%}.{%- endif -%}{%- endfor -%} ')\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.393513, "supported_languages": null}, "macro.fivetran_utils.max_bool": {"name": "max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.max_bool", "macro_sql": "{% macro max_bool(boolean_field) -%}\n\n{{ adapter.dispatch('max_bool', 'fivetran_utils') (boolean_field) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__max_bool"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.393852, "supported_languages": null}, "macro.fivetran_utils.default__max_bool": {"name": "default__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.default__max_bool", "macro_sql": "{% macro default__max_bool(boolean_field) %}\n\n bool_or( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.393953, "supported_languages": null}, "macro.fivetran_utils.snowflake__max_bool": {"name": "snowflake__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.snowflake__max_bool", "macro_sql": "{% macro snowflake__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.394046, "supported_languages": null}, "macro.fivetran_utils.bigquery__max_bool": {"name": "bigquery__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.bigquery__max_bool", "macro_sql": "{% macro bigquery__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3941388, "supported_languages": null}, "macro.fivetran_utils.calculated_fields": {"name": "calculated_fields", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/calculated_fields.sql", "original_file_path": "macros/calculated_fields.sql", "unique_id": "macro.fivetran_utils.calculated_fields", "macro_sql": "{% macro calculated_fields(variable) -%}\n\n{% if var(variable, none) %}\n {% for field in var(variable) %}\n , {{ field.transform_sql }} as {{ field.name }} \n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.394496, "supported_languages": null}, "macro.fivetran_utils.drop_schemas_automation": {"name": "drop_schemas_automation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/drop_schemas_automation.sql", "original_file_path": "macros/drop_schemas_automation.sql", "unique_id": "macro.fivetran_utils.drop_schemas_automation", "macro_sql": "{% macro drop_schemas_automation(drop_target_schema=true) %}\n {{ return(adapter.dispatch('drop_schemas_automation', 'fivetran_utils')(drop_target_schema)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__drop_schemas_automation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.395135, "supported_languages": null}, "macro.fivetran_utils.default__drop_schemas_automation": {"name": "default__drop_schemas_automation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/drop_schemas_automation.sql", "original_file_path": "macros/drop_schemas_automation.sql", "unique_id": "macro.fivetran_utils.default__drop_schemas_automation", "macro_sql": "{% macro default__drop_schemas_automation(drop_target_schema=true) %}\n\n{% set fetch_list_sql %}\n {% if target.type not in ('databricks', 'spark') %}\n select schema_name\n from \n {{ wrap_in_quotes(target.database) }}.INFORMATION_SCHEMA.SCHEMATA\n where lower(schema_name) like '{{ target.schema | lower }}{%- if not drop_target_schema -%}_{%- endif -%}%'\n {% else %}\n SHOW SCHEMAS LIKE '{{ target.schema }}{%- if not drop_target_schema -%}_{%- endif -%}*'\n {% endif %}\n{% endset %}\n\n{% set results = run_query(fetch_list_sql) %}\n\n{% if execute %}\n {% set results_list = results.columns[0].values() %}\n{% else %}\n {% set results_list = [] %}\n{% endif %}\n\n{% for schema_to_drop in results_list %}\n {% do adapter.drop_schema(api.Relation.create(database=target.database, schema=schema_to_drop)) %}\n {{ print('Schema ' ~ schema_to_drop ~ ' successfully dropped from the ' ~ target.database ~ ' database.\\n')}}\n{% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.wrap_in_quotes", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3961868, "supported_languages": null}, "macro.fivetran_utils.seed_data_helper": {"name": "seed_data_helper", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/seed_data_helper.sql", "original_file_path": "macros/seed_data_helper.sql", "unique_id": "macro.fivetran_utils.seed_data_helper", "macro_sql": "{% macro seed_data_helper(seed_name, warehouses) %}\n\n{% if target.type in warehouses %}\n {% for w in warehouses %}\n {% if target.type == w %}\n {{ return(ref(seed_name ~ \"_\" ~ w ~ \"\")) }}\n {% endif %}\n {% endfor %}\n{% else %}\n{{ return(ref(seed_name)) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.396748, "supported_languages": null}, "macro.fivetran_utils.fill_pass_through_columns": {"name": "fill_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_pass_through_columns.sql", "original_file_path": "macros/fill_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.fill_pass_through_columns", "macro_sql": "{% macro fill_pass_through_columns(pass_through_variable) %}\n\n{% if var(pass_through_variable) %}\n {% for field in var(pass_through_variable) %}\n {% if field is mapping %}\n {% if field.transform_sql %}\n , {{ field.transform_sql }} as {{ field.alias if field.alias else field.name }}\n {% else %}\n , {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% else %}\n , {{ field }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3974662, "supported_languages": null}, "macro.fivetran_utils.string_agg": {"name": "string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.string_agg", "macro_sql": "{% macro string_agg(field_to_agg, delimiter) -%}\n\n{{ adapter.dispatch('string_agg', 'fivetran_utils') (field_to_agg, delimiter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__string_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.397919, "supported_languages": null}, "macro.fivetran_utils.default__string_agg": {"name": "default__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.default__string_agg", "macro_sql": "{% macro default__string_agg(field_to_agg, delimiter) %}\n string_agg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3980422, "supported_languages": null}, "macro.fivetran_utils.snowflake__string_agg": {"name": "snowflake__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.snowflake__string_agg", "macro_sql": "{% macro snowflake__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.398161, "supported_languages": null}, "macro.fivetran_utils.redshift__string_agg": {"name": "redshift__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.redshift__string_agg", "macro_sql": "{% macro redshift__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.3982852, "supported_languages": null}, "macro.fivetran_utils.spark__string_agg": {"name": "spark__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.spark__string_agg", "macro_sql": "{% macro spark__string_agg(field_to_agg, delimiter) %}\n -- collect set will remove duplicates\n replace(replace(replace(cast( collect_set({{ field_to_agg }}) as string), '[', ''), ']', ''), ', ', {{ delimiter }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.398514, "supported_languages": null}, "macro.fivetran_utils.timestamp_diff": {"name": "timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.timestamp_diff", "macro_sql": "{% macro timestamp_diff(first_date, second_date, datepart) %}\n {{ adapter.dispatch('timestamp_diff', 'fivetran_utils')(first_date, second_date, datepart) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__timestamp_diff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4012659, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_diff": {"name": "default__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.default__timestamp_diff", "macro_sql": "{% macro default__timestamp_diff(first_date, second_date, datepart) %}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.401477, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_diff": {"name": "redshift__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.redshift__timestamp_diff", "macro_sql": "{% macro redshift__timestamp_diff(first_date, second_date, datepart) %}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4016352, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_diff": {"name": "bigquery__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.bigquery__timestamp_diff", "macro_sql": "{% macro bigquery__timestamp_diff(first_date, second_date, datepart) %}\n\n timestamp_diff(\n {{second_date}},\n {{first_date}},\n {{datepart}}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4017868, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_diff": {"name": "postgres__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.postgres__timestamp_diff", "macro_sql": "{% macro postgres__timestamp_diff(first_date, second_date, datepart) %}\n\n {% if datepart == 'year' %}\n (date_part('year', ({{second_date}})::date) - date_part('year', ({{first_date}})::date))\n {% elif datepart == 'quarter' %}\n ({{ dbt.datediff(first_date, second_date, 'year') }} * 4 + date_part('quarter', ({{second_date}})::date) - date_part('quarter', ({{first_date}})::date))\n {% elif datepart == 'month' %}\n ({{ dbt.datediff(first_date, second_date, 'year') }} * 12 + date_part('month', ({{second_date}})::date) - date_part('month', ({{first_date}})::date))\n {% elif datepart == 'day' %}\n (({{second_date}})::date - ({{first_date}})::date)\n {% elif datepart == 'week' %}\n ({{ dbt.datediff(first_date, second_date, 'day') }} / 7 + case\n when date_part('dow', ({{first_date}})::timestamp) <= date_part('dow', ({{second_date}})::timestamp) then\n case when {{first_date}} <= {{second_date}} then 0 else -1 end\n else\n case when {{first_date}} <= {{second_date}} then 1 else 0 end\n end)\n {% elif datepart == 'hour' %}\n ({{ dbt.datediff(first_date, second_date, 'day') }} * 24 + date_part('hour', ({{second_date}})::timestamp) - date_part('hour', ({{first_date}})::timestamp))\n {% elif datepart == 'minute' %}\n ({{ dbt.datediff(first_date, second_date, 'hour') }} * 60 + date_part('minute', ({{second_date}})::timestamp) - date_part('minute', ({{first_date}})::timestamp))\n {% elif datepart == 'second' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60 + floor(date_part('second', ({{second_date}})::timestamp)) - floor(date_part('second', ({{first_date}})::timestamp)))\n {% elif datepart == 'millisecond' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60000 + floor(date_part('millisecond', ({{second_date}})::timestamp)) - floor(date_part('millisecond', ({{first_date}})::timestamp)))\n {% elif datepart == 'microsecond' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60000000 + floor(date_part('microsecond', ({{second_date}})::timestamp)) - floor(date_part('microsecond', ({{first_date}})::timestamp)))\n {% else %}\n {{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in postgres: {!r}\".format(datepart)) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.40346, "supported_languages": null}, "macro.fivetran_utils.try_cast": {"name": "try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.try_cast", "macro_sql": "{% macro try_cast(field, type) %}\n {{ adapter.dispatch('try_cast', 'fivetran_utils') (field, type) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__try_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.40452, "supported_languages": null}, "macro.fivetran_utils.default__try_cast": {"name": "default__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.default__try_cast", "macro_sql": "{% macro default__try_cast(field, type) %}\n {# most databases don't support this function yet\n so we just need to use cast #}\n cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.404675, "supported_languages": null}, "macro.fivetran_utils.redshift__try_cast": {"name": "redshift__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.redshift__try_cast", "macro_sql": "{% macro redshift__try_cast(field, type) %}\n{%- if type == 'numeric' -%}\n\n case\n when trim({{field}}) ~ '^(0|[1-9][0-9]*)$' then trim({{field}})\n else null\n end::{{type}}\n\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"non-numeric datatypes are not currently supported\") }}\n\n{% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.404955, "supported_languages": null}, "macro.fivetran_utils.postgres__try_cast": {"name": "postgres__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.postgres__try_cast", "macro_sql": "{% macro postgres__try_cast(field, type) %}\n{%- if type == 'numeric' -%}\n\n case\n when replace(cast({{field}} as varchar),cast(' ' as varchar),cast('' as varchar)) ~ '^(0|[1-9][0-9]*)$' \n then replace(cast({{field}} as varchar),cast(' ' as varchar),cast('' as varchar))\n else null\n end::{{type}}\n\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"non-numeric datatypes are not currently supported\") }}\n\n{% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4052339, "supported_languages": null}, "macro.fivetran_utils.snowflake__try_cast": {"name": "snowflake__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.snowflake__try_cast", "macro_sql": "{% macro snowflake__try_cast(field, type) %}\n try_cast(cast({{field}} as varchar) as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.405364, "supported_languages": null}, "macro.fivetran_utils.bigquery__try_cast": {"name": "bigquery__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.bigquery__try_cast", "macro_sql": "{% macro bigquery__try_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.405482, "supported_languages": null}, "macro.fivetran_utils.spark__try_cast": {"name": "spark__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.spark__try_cast", "macro_sql": "{% macro spark__try_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.405598, "supported_languages": null}, "macro.fivetran_utils.sqlserver__try_cast": {"name": "sqlserver__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.sqlserver__try_cast", "macro_sql": "{% macro sqlserver__try_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.405714, "supported_languages": null}, "macro.fivetran_utils.source_relation": {"name": "source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "unique_id": "macro.fivetran_utils.source_relation", "macro_sql": "{% macro source_relation(union_schema_variable='union_schemas', union_database_variable='union_databases') -%}\n\n{{ adapter.dispatch('source_relation', 'fivetran_utils') (union_schema_variable, union_database_variable) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__source_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4061928, "supported_languages": null}, "macro.fivetran_utils.default__source_relation": {"name": "default__source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "unique_id": "macro.fivetran_utils.default__source_relation", "macro_sql": "{% macro default__source_relation(union_schema_variable, union_database_variable) %}\n\n{% if var(union_schema_variable, none) %}\n, case\n {% for schema in var(union_schema_variable) %}\n when lower(replace(replace(_dbt_source_relation,'\"',''),'`','')) like '%.{{ schema|lower }}.%' then '{{ schema|lower }}'\n {% endfor %}\n end as source_relation\n{% elif var(union_database_variable, none) %}\n, case\n {% for database in var(union_database_variable) %}\n when lower(replace(replace(_dbt_source_relation,'\"',''),'`','')) like '%{{ database|lower }}.%' then '{{ database|lower }}'\n {% endfor %}\n end as source_relation\n{% else %}\n, cast('' as {{ dbt.type_string() }}) as source_relation\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4067478, "supported_languages": null}, "macro.fivetran_utils.first_value": {"name": "first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.first_value", "macro_sql": "{% macro first_value(first_value_field, partition_field, order_by_field, order=\"asc\") -%}\n\n{{ adapter.dispatch('first_value', 'fivetran_utils') (first_value_field, partition_field, order_by_field, order) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__first_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.407233, "supported_languages": null}, "macro.fivetran_utils.default__first_value": {"name": "default__first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.default__first_value", "macro_sql": "{% macro default__first_value(first_value_field, partition_field, order_by_field, order=\"asc\") %}\n\n first_value( {{ first_value_field }} ignore nulls ) over (partition by {{ partition_field }} order by {{ order_by_field }} {{ order }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.407419, "supported_languages": null}, "macro.fivetran_utils.redshift__first_value": {"name": "redshift__first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.redshift__first_value", "macro_sql": "{% macro redshift__first_value(first_value_field, partition_field, order_by_field, order=\"asc\") %}\n\n first_value( {{ first_value_field }} ignore nulls ) over (partition by {{ partition_field }} order by {{ order_by_field }} {{ order }} , {{ partition_field }} rows unbounded preceding )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4076202, "supported_languages": null}, "macro.fivetran_utils.add_dbt_source_relation": {"name": "add_dbt_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/add_dbt_source_relation.sql", "original_file_path": "macros/add_dbt_source_relation.sql", "unique_id": "macro.fivetran_utils.add_dbt_source_relation", "macro_sql": "{% macro add_dbt_source_relation() %}\n\n{% if var('union_schemas', none) or var('union_databases', none) %}\n, _dbt_source_relation\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.407855, "supported_languages": null}, "macro.fivetran_utils.add_pass_through_columns": {"name": "add_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/add_pass_through_columns.sql", "original_file_path": "macros/add_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.add_pass_through_columns", "macro_sql": "{% macro add_pass_through_columns(base_columns, pass_through_var) %}\n\n {% if pass_through_var %}\n\n {% for column in pass_through_var %}\n\n {% if column is mapping %}\n\n {% if column.alias %}\n\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n \n {% endif %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n\n {% endif %}\n\n {% endfor %}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4091892, "supported_languages": null}, "macro.fivetran_utils.union_relations": {"name": "union_relations", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "unique_id": "macro.fivetran_utils.union_relations", "macro_sql": "{%- macro union_relations(relations, aliases=none, column_override=none, include=[], exclude=[], source_column_name=none) -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n {%- set source_column_name = source_column_name if source_column_name is not none else '_dbt_source_relation' -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column in exclude -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column not in include -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n cast({{ dbt.string_literal(relation) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ aliases[loop.index0] if aliases else relation }}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4132621, "supported_languages": null}, "macro.fivetran_utils.union_tables": {"name": "union_tables", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "unique_id": "macro.fivetran_utils.union_tables", "macro_sql": "{%- macro union_tables(tables, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_table') -%}\n\n {%- do exceptions.warn(\"Warning: the `union_tables` macro is no longer supported and will be deprecated in a future release of dbt-utils. Use the `union_relations` macro instead\") -%}\n\n {{ return(dbt_utils.union_relations(tables, column_override, include, exclude, source_column_name)) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils.union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.413671, "supported_languages": null}, "macro.fivetran_utils.snowflake_seed_data": {"name": "snowflake_seed_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/snowflake_seed_data.sql", "original_file_path": "macros/snowflake_seed_data.sql", "unique_id": "macro.fivetran_utils.snowflake_seed_data", "macro_sql": "{% macro snowflake_seed_data(seed_name) %}\n\n{% if target.type == 'snowflake' %}\n{{ return(ref(seed_name ~ '_snowflake')) }}\n{% else %}\n{{ return(ref(seed_name)) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.414054, "supported_languages": null}, "macro.fivetran_utils.fill_staging_columns": {"name": "fill_staging_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "unique_id": "macro.fivetran_utils.fill_staging_columns", "macro_sql": "{% macro fill_staging_columns(source_columns, staging_columns) -%}\n\n{%- set source_column_names = source_columns|map(attribute='name')|map('lower')|list -%}\n\n{%- for column in staging_columns %}\n {% if column.name|lower in source_column_names -%}\n {{ fivetran_utils.quote_column(column) }} as \n {%- if 'alias' in column %} {{ column.alias }} {% else %} {{ fivetran_utils.quote_column(column) }} {%- endif -%}\n {%- else -%}\n cast(null as {{ column.datatype }})\n {%- if 'alias' in column %} as {{ column.alias }} {% else %} as {{ fivetran_utils.quote_column(column) }} {% endif -%}\n {%- endif -%}\n {%- if not loop.last -%} , {% endif -%}\n{% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.quote_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.415482, "supported_languages": null}, "macro.fivetran_utils.quote_column": {"name": "quote_column", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "unique_id": "macro.fivetran_utils.quote_column", "macro_sql": "{% macro quote_column(column) %}\n {% if 'quote' in column %}\n {% if column.quote %}\n {% if target.type in ('bigquery', 'spark', 'databricks') %}\n `{{ column.name }}`\n {% elif target.type == 'snowflake' %}\n \"{{ column.name | upper }}\"\n {% else %}\n \"{{ column.name }}\"\n {% endif %}\n {% else %}\n {{ column.name }}\n {% endif %}\n {% else %}\n {{ column.name }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.415995, "supported_languages": null}, "macro.fivetran_utils.json_extract": {"name": "json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.json_extract", "macro_sql": "{% macro json_extract(string, string_path) -%}\n\n{{ adapter.dispatch('json_extract', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.416523, "supported_languages": null}, "macro.fivetran_utils.default__json_extract": {"name": "default__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.default__json_extract", "macro_sql": "{% macro default__json_extract(string, string_path) %}\n\n json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} )\n \n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.416668, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_extract": {"name": "snowflake__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.snowflake__json_extract", "macro_sql": "{% macro snowflake__json_extract(string, string_path) %}\n\n json_extract_path_text(try_parse_json( {{string}} ), {{ \"'\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.416807, "supported_languages": null}, "macro.fivetran_utils.redshift__json_extract": {"name": "redshift__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.redshift__json_extract", "macro_sql": "{% macro redshift__json_extract(string, string_path) %}\n\n case when is_valid_json( {{string}} ) then json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} ) else null end\n \n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4169621, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_extract": {"name": "bigquery__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.bigquery__json_extract", "macro_sql": "{% macro bigquery__json_extract(string, string_path) %}\n\n json_extract_scalar({{string}}, {{ \"'$.\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.417103, "supported_languages": null}, "macro.fivetran_utils.postgres__json_extract": {"name": "postgres__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.postgres__json_extract", "macro_sql": "{% macro postgres__json_extract(string, string_path) %}\n\n {{string}}::json->>{{\"'\" ~ string_path ~ \"'\" }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4172428, "supported_languages": null}, "macro.fivetran_utils.collect_freshness": {"name": "collect_freshness", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "unique_id": "macro.fivetran_utils.collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n {{ return(adapter.dispatch('collect_freshness')(source, loaded_at_field, filter))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.418012, "supported_languages": null}, "macro.fivetran_utils.default__collect_freshness": {"name": "default__collect_freshness", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "unique_id": "macro.fivetran_utils.default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n\n {%- set enabled_array = [] -%}\n {% for node in graph.sources.values() %}\n {% if node.identifier == source.identifier %}\n {% if (node.meta['is_enabled'] | default(true)) %}\n {%- do enabled_array.append(1) -%}\n {% endif %}\n {% endif %}\n {% endfor %}\n {% set is_enabled = (enabled_array != []) %}\n\n select\n {% if is_enabled %}\n max({{ loaded_at_field }})\n {% else %} \n {{ current_timestamp() }} {% endif %} as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n\n {% if is_enabled %}\n from {{ source }}\n {% if filter %}\n where {{ filter }}\n {% endif %}\n {% endif %}\n\n {% endcall %}\n\n {% if dbt_version.split('.') | map('int') | list >= [1, 5, 0] %}\n {{ return(load_result('collect_freshness')) }}\n {% else %}\n {{ return(load_result('collect_freshness').table) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4194171, "supported_languages": null}, "macro.fivetran_utils.timestamp_add": {"name": "timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.timestamp_add", "macro_sql": "{% macro timestamp_add(datepart, interval, from_timestamp) -%}\n\n{{ adapter.dispatch('timestamp_add', 'fivetran_utils') (datepart, interval, from_timestamp) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__timestamp_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.420206, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_add": {"name": "default__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.default__timestamp_add", "macro_sql": "{% macro default__timestamp_add(datepart, interval, from_timestamp) %}\n\n timestampadd(\n {{ datepart }},\n {{ interval }},\n {{ from_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.420377, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_add": {"name": "bigquery__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.bigquery__timestamp_add", "macro_sql": "{% macro bigquery__timestamp_add(datepart, interval, from_timestamp) %}\n\n timestamp_add({{ from_timestamp }}, interval {{ interval }} {{ datepart }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4205282, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_add": {"name": "redshift__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.redshift__timestamp_add", "macro_sql": "{% macro redshift__timestamp_add(datepart, interval, from_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4206789, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_add": {"name": "postgres__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.postgres__timestamp_add", "macro_sql": "{% macro postgres__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ from_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4208262, "supported_languages": null}, "macro.fivetran_utils.spark__timestamp_add": {"name": "spark__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.spark__timestamp_add", "macro_sql": "{% macro spark__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ dbt.dateadd(datepart, interval, from_timestamp) }}\n \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.421061, "supported_languages": null}, "macro.fivetran_utils.ceiling": {"name": "ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.ceiling", "macro_sql": "{% macro ceiling(num) -%}\n\n{{ adapter.dispatch('ceiling', 'fivetran_utils') (num) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__ceiling"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4213388, "supported_languages": null}, "macro.fivetran_utils.default__ceiling": {"name": "default__ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.default__ceiling", "macro_sql": "{% macro default__ceiling(num) %}\n ceiling({{ num }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4214468, "supported_languages": null}, "macro.fivetran_utils.snowflake__ceiling": {"name": "snowflake__ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.snowflake__ceiling", "macro_sql": "{% macro snowflake__ceiling(num) %}\n ceil({{ num }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.421543, "supported_languages": null}, "macro.fivetran_utils.remove_prefix_from_columns": {"name": "remove_prefix_from_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/remove_prefix_from_columns.sql", "original_file_path": "macros/remove_prefix_from_columns.sql", "unique_id": "macro.fivetran_utils.remove_prefix_from_columns", "macro_sql": "{% macro remove_prefix_from_columns(columns, prefix='', exclude=[]) %}\n\n {%- for col in columns if col.name not in exclude -%}\n {%- if col.name[:prefix|length]|lower == prefix -%}\n {{ col.name }} as {{ col.name[prefix|length:] }}\n {%- else -%}\n {{ col.name }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {% endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.42216, "supported_languages": null}, "macro.fivetran_utils.fivetran_date_spine": {"name": "fivetran_date_spine", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_spine.sql", "unique_id": "macro.fivetran_utils.fivetran_date_spine", "macro_sql": "{% macro fivetran_date_spine(datepart, start_date, end_date) -%}\n\n{{ return(adapter.dispatch('fivetran_date_spine', 'fivetran_utils') (datepart, start_date, end_date)) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__fivetran_date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.42332, "supported_languages": null}, "macro.fivetran_utils.default__fivetran_date_spine": {"name": "default__fivetran_date_spine", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_spine.sql", "unique_id": "macro.fivetran_utils.default__fivetran_date_spine", "macro_sql": "{% macro default__fivetran_date_spine(datepart, start_date, end_date) %}\n\n {{ dbt_utils.date_spine(datepart, start_date, end_date) }}\n \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.423485, "supported_languages": null}, "macro.fivetran_utils.sqlserver__fivetran_date_spine": {"name": "sqlserver__fivetran_date_spine", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_spine.sql", "unique_id": "macro.fivetran_utils.sqlserver__fivetran_date_spine", "macro_sql": "{% macro sqlserver__fivetran_date_spine(datepart, start_date, end_date) -%}\n\n {% set date_spine_query %}\n with\n\n l0 as (\n\n select c\n from (select 1 union all select 1) as d(c)\n\n ),\n l1 as (\n\n select\n 1 as c\n from l0 as a\n cross join l0 as b\n\n ),\n\n l2 as (\n\n select 1 as c\n from l1 as a\n cross join l1 as b\n ),\n\n l3 as (\n\n select 1 as c\n from l2 as a\n cross join l2 as b\n ),\n\n l4 as (\n\n select 1 as c\n from l3 as a\n cross join l3 as b\n ),\n\n l5 as (\n\n select 1 as c\n from l4 as a\n cross join l4 as b\n ),\n\n nums as (\n\n select row_number() over (order by (select null)) as rownum\n from l5\n ),\n\n rawdata as (\n\n select top ({{dbt.datediff(start_date, end_date, datepart)}}) rownum -1 as n\n from nums\n order by rownum\n ),\n\n all_periods as (\n\n select (\n {{\n dbt.dateadd(\n datepart,\n 'n',\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n ),\n\n filtered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n )\n\n select * from filtered\n order by 1\n\n {% endset %}\n\n {% set results = run_query(date_spine_query) %}\n\n {% if execute %}\n\n {% set results_list = results.columns[0].values() %}\n \n {% else %}\n\n {% set results_list = [] %}\n\n {% endif %}\n\n {%- for date_field in results_list %}\n select cast('{{ date_field }}' as date) as date_{{datepart}} {{ 'union all ' if not loop.last else '' }}\n {% endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff", "macro.dbt.dateadd", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.424237, "supported_languages": null}, "macro.fivetran_utils.union_data": {"name": "union_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "unique_id": "macro.fivetran_utils.union_data", "macro_sql": "{%- macro union_data(table_identifier, database_variable, schema_variable, default_database, default_schema, default_variable, union_schema_variable='union_schemas', union_database_variable='union_databases') -%}\n\n{{ adapter.dispatch('union_data', 'fivetran_utils') (\n table_identifier, \n database_variable, \n schema_variable, \n default_database, \n default_schema, \n default_variable,\n union_schema_variable,\n union_database_variable\n ) }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.fivetran_utils.default__union_data"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4273841, "supported_languages": null}, "macro.fivetran_utils.default__union_data": {"name": "default__union_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "unique_id": "macro.fivetran_utils.default__union_data", "macro_sql": "{%- macro default__union_data(\n table_identifier, \n database_variable, \n schema_variable, \n default_database, \n default_schema, \n default_variable,\n union_schema_variable,\n union_database_variable\n ) -%}\n\n{%- if var(union_schema_variable, none) -%}\n\n {%- set relations = [] -%}\n \n {%- if var(union_schema_variable) is string -%}\n {%- set trimmed = var(union_schema_variable)|trim('[')|trim(']') -%}\n {%- set schemas = trimmed.split(',')|map('trim',\" \")|map('trim','\"')|map('trim',\"'\") -%}\n {%- else -%}\n {%- set schemas = var(union_schema_variable) -%}\n {%- endif -%}\n\n {%- for schema in var(union_schema_variable) -%}\n {%- set relation=adapter.get_relation(\n database=source(schema, table_identifier).database if var('has_defined_sources', false) else var(database_variable, default_database),\n schema=source(schema, table_identifier).schema if var('has_defined_sources', false) else schema,\n identifier=source(schema, table_identifier).identifier if var('has_defined_sources', false) else table_identifier\n ) -%}\n \n {%- set relation_exists=relation is not none -%}\n\n {%- if relation_exists -%}\n {%- do relations.append(relation) -%}\n {%- endif -%}\n\n {%- endfor -%}\n \n {%- if relations != [] -%}\n {{ dbt_utils.union_relations(relations) }}\n {%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n {%- endif -%}\n\n{%- elif var(union_database_variable, none) -%}\n\n {%- set relations = [] -%}\n\n {%- for database in var(union_database_variable) -%}\n {%- set relation=adapter.get_relation(\n database=source(schema, table_identifier).database if var('has_defined_sources', false) else database,\n schema=source(schema, table_identifier).schema if var('has_defined_sources', false) else var(schema_variable, default_schema),\n identifier=source(schema, table_identifier).identifier if var('has_defined_sources', false) else table_identifier\n ) -%}\n\n {%- set relation_exists=relation is not none -%}\n\n {%- if relation_exists -%}\n {%- do relations.append(relation) -%}\n {%- endif -%}\n\n {%- endfor -%}\n\n {%- if relations != [] -%}\n {{ dbt_utils.union_relations(relations) }}\n {%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n {%- endif -%}\n\n{%- else -%}\n {% set exception_schemas = {\"linkedin_company_pages\": \"linkedin_pages\", \"instagram_business_pages\": \"instagram_business\"} %}\n {% set relation = namespace(value=\"\") %}\n {% if default_schema in exception_schemas.keys() %}\n {% for corrected_schema_name in exception_schemas.items() %} \n {% if default_schema in corrected_schema_name %}\n {# In order for this macro to effectively work within upstream integration tests (mainly used by the Fivetran dbt package maintainers), this identifier variable selection is required to use the macro with different identifier names. #}\n {% set identifier_var = corrected_schema_name[1] + \"_\" + table_identifier + \"_identifier\" %}\n {%- set relation.value=adapter.get_relation(\n database=source(corrected_schema_name[1], table_identifier).database,\n schema=source(corrected_schema_name[1], table_identifier).schema,\n identifier=var(identifier_var, table_identifier)\n ) -%}\n {% endif %}\n {% endfor %}\n {% else %}\n {# In order for this macro to effectively work within upstream integration tests (mainly used by the Fivetran dbt package maintainers), this identifier variable selection is required to use the macro with different identifier names. #}\n {% set identifier_var = default_schema + \"_\" + table_identifier + \"_identifier\" %}\n {# Unfortunately the Twitter Organic identifiers were misspelled. As such, we will need to account for this in the model. This will be adjusted in the Twitter Organic package, but to ensure backwards compatibility, this needs to be included. #}\n {% if var(identifier_var, none) is none %} \n {% set identifier_var = default_schema + \"_\" + table_identifier + \"_identifer\" %}\n {% endif %}\n {%- set relation.value=adapter.get_relation(\n database=source(default_schema, table_identifier).database,\n schema=source(default_schema, table_identifier).schema,\n identifier=var(identifier_var, table_identifier)\n ) -%}\n {% endif %}\n{%- set table_exists=relation.value is not none -%}\n\n{%- if table_exists -%}\n select * \n from {{ relation.value }}\n{%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n{%- endif -%}\n{%- endif -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils.union_relations", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.432189, "supported_languages": null}, "macro.fivetran_utils.dummy_coalesce_value": {"name": "dummy_coalesce_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/dummy_coalesce_value.sql", "original_file_path": "macros/dummy_coalesce_value.sql", "unique_id": "macro.fivetran_utils.dummy_coalesce_value", "macro_sql": "{% macro dummy_coalesce_value(column) %}\n\n{% set coalesce_value = {\n 'STRING': \"'DUMMY_STRING'\",\n 'BOOLEAN': 'null',\n 'INT': 999999999,\n 'FLOAT': 999999999.99,\n 'TIMESTAMP': 'cast(\"2099-12-31\" as timestamp)',\n 'DATE': 'cast(\"2099-12-31\" as date)',\n} %}\n\n{% if column.is_float() %}\n{{ return(coalesce_value['FLOAT']) }}\n\n{% elif column.is_numeric() %}\n{{ return(coalesce_value['INT']) }}\n\n{% elif column.is_string() %}\n{{ return(coalesce_value['STRING']) }}\n\n{% elif column.data_type|lower == 'boolean' %}\n{{ return(coalesce_value['BOOLEAN']) }}\n\n{% elif 'timestamp' in column.data_type|lower %}\n{{ return(coalesce_value['TIMESTAMP']) }}\n\n{% elif 'date' in column.data_type|lower %}\n{{ return(coalesce_value['DATE']) }}\n\n{% elif 'int' in column.data_type|lower %}\n{{ return(coalesce_value['INT']) }}\n\n{% endif %}\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4336069, "supported_languages": null}, "macro.fivetran_utils.extract_url_parameter": {"name": "extract_url_parameter", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/extract_url_parameter.sql", "original_file_path": "macros/extract_url_parameter.sql", "unique_id": "macro.fivetran_utils.extract_url_parameter", "macro_sql": "{% macro extract_url_parameter(field, url_parameter) -%}\n\n{{ adapter.dispatch('extract_url_parameter', 'fivetran_utils') (field, url_parameter) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.433959, "supported_languages": null}, "macro.fivetran_utils.default__extract_url_parameter": {"name": "default__extract_url_parameter", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/extract_url_parameter.sql", "original_file_path": "macros/extract_url_parameter.sql", "unique_id": "macro.fivetran_utils.default__extract_url_parameter", "macro_sql": "{% macro default__extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.434113, "supported_languages": null}, "macro.fivetran_utils.spark__extract_url_parameter": {"name": "spark__extract_url_parameter", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/extract_url_parameter.sql", "original_file_path": "macros/extract_url_parameter.sql", "unique_id": "macro.fivetran_utils.spark__extract_url_parameter", "macro_sql": "{% macro spark__extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4343019, "supported_languages": null}, "macro.fivetran_utils.wrap_in_quotes": {"name": "wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.wrap_in_quotes", "macro_sql": "{%- macro wrap_in_quotes(object_to_quote) -%}\n\n{{ return(adapter.dispatch('wrap_in_quotes', 'fivetran_utils')(object_to_quote)) }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.fivetran_utils.postgres__wrap_in_quotes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.43463, "supported_languages": null}, "macro.fivetran_utils.default__wrap_in_quotes": {"name": "default__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.default__wrap_in_quotes", "macro_sql": "{%- macro default__wrap_in_quotes(object_to_quote) -%}\n{# bigquery, spark, databricks #}\n `{{ object_to_quote }}`\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.434737, "supported_languages": null}, "macro.fivetran_utils.snowflake__wrap_in_quotes": {"name": "snowflake__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.snowflake__wrap_in_quotes", "macro_sql": "{%- macro snowflake__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote | upper }}\"\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4349241, "supported_languages": null}, "macro.fivetran_utils.redshift__wrap_in_quotes": {"name": "redshift__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.redshift__wrap_in_quotes", "macro_sql": "{%- macro redshift__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote }}\"\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.435113, "supported_languages": null}, "macro.fivetran_utils.postgres__wrap_in_quotes": {"name": "postgres__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.postgres__wrap_in_quotes", "macro_sql": "{%- macro postgres__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote }}\"\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.435221, "supported_languages": null}, "macro.fivetran_utils.array_agg": {"name": "array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.array_agg", "macro_sql": "{% macro array_agg(field_to_agg) -%}\n\n{{ adapter.dispatch('array_agg', 'fivetran_utils') (field_to_agg) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__array_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.435507, "supported_languages": null}, "macro.fivetran_utils.default__array_agg": {"name": "default__array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.default__array_agg", "macro_sql": "{% macro default__array_agg(field_to_agg) %}\n array_agg({{ field_to_agg }})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.435609, "supported_languages": null}, "macro.fivetran_utils.redshift__array_agg": {"name": "redshift__array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.redshift__array_agg", "macro_sql": "{% macro redshift__array_agg(field_to_agg) %}\n listagg({{ field_to_agg }}, ',')\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.435703, "supported_languages": null}, "macro.fivetran_utils.empty_variable_warning": {"name": "empty_variable_warning", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/empty_variable_warning.sql", "original_file_path": "macros/empty_variable_warning.sql", "unique_id": "macro.fivetran_utils.empty_variable_warning", "macro_sql": "{% macro empty_variable_warning(variable, downstream_model) %}\n\n{% if not var(variable) %}\n{{ log(\n \"\"\"\n Warning: You have passed an empty list to the \"\"\" ~ variable ~ \"\"\".\n As a result, you won't see the history of any columns in the \"\"\" ~ downstream_model ~ \"\"\" model.\n \"\"\",\n info=True\n) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4360828, "supported_languages": null}, "macro.fivetran_utils.enabled_vars_one_true": {"name": "enabled_vars_one_true", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/enabled_vars_one_true.sql", "original_file_path": "macros/enabled_vars_one_true.sql", "unique_id": "macro.fivetran_utils.enabled_vars_one_true", "macro_sql": "{% macro enabled_vars_one_true(vars) %}\n\n{% for v in vars %}\n \n {% if var(v, False) == True %}\n {{ return(True) }}\n {% endif %}\n\n{% endfor %}\n\n{{ return(False) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.436447, "supported_languages": null}, "macro.jira_source.get_issue_link_columns": {"name": "get_issue_link_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_issue_link_columns.sql", "original_file_path": "macros/get_issue_link_columns.sql", "unique_id": "macro.jira_source.get_issue_link_columns", "macro_sql": "{% macro get_issue_link_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"issue_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"related_issue_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"relationship\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.436998, "supported_languages": null}, "macro.jira_source.get_issue_columns": {"name": "get_issue_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_issue_columns.sql", "original_file_path": "macros/get_issue_columns.sql", "unique_id": "macro.jira_source.get_issue_columns", "macro_sql": "{% macro get_issue_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_original_estimate\", \"datatype\": dbt.type_float()},\n {\"name\": \"_remaining_estimate\", \"datatype\": dbt.type_float()},\n {\"name\": \"_time_spent\", \"datatype\": dbt.type_float()},\n {\"name\": \"assignee\", \"datatype\": dbt.type_string()},\n {\"name\": \"created\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"creator\", \"datatype\": dbt.type_string()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"due_date\", \"datatype\": \"date\"},\n {\"name\": \"environment\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"issue_type\", \"datatype\": dbt.type_int()},\n {\"name\": \"key\", \"datatype\": dbt.type_string()},\n\n {\"name\": \"original_estimate\", \"datatype\": dbt.type_float()},\n {\"name\": \"parent_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"priority\", \"datatype\": dbt.type_int()},\n {\"name\": \"project\", \"datatype\": dbt.type_int()},\n {\"name\": \"remaining_estimate\", \"datatype\": dbt.type_float()},\n {\"name\": \"reporter\", \"datatype\": dbt.type_string()},\n {\"name\": \"resolution\", \"datatype\": dbt.type_int()},\n {\"name\": \"resolved\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_int()},\n {\"name\": \"status_category_changed\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"summary\", \"datatype\": dbt.type_string()},\n {\"name\": \"time_spent\", \"datatype\": dbt.type_float()},\n {\"name\": \"updated\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"work_ratio\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.440201, "supported_languages": null}, "macro.jira_source.get_status_columns": {"name": "get_status_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_status_columns.sql", "original_file_path": "macros/get_status_columns.sql", "unique_id": "macro.jira_source.get_status_columns", "macro_sql": "{% macro get_status_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"status_category_id\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.440942, "supported_languages": null}, "macro.jira_source.get_status_category_columns": {"name": "get_status_category_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_status_category_columns.sql", "original_file_path": "macros/get_status_category_columns.sql", "unique_id": "macro.jira_source.get_status_category_columns", "macro_sql": "{% macro get_status_category_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.441519, "supported_languages": null}, "macro.jira_source.get_issue_field_history_columns": {"name": "get_issue_field_history_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_issue_field_history_columns.sql", "original_file_path": "macros/get_issue_field_history_columns.sql", "unique_id": "macro.jira_source.get_issue_field_history_columns", "macro_sql": "{% macro get_issue_field_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"field_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"issue_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{% if target.type == 'redshift' %}\n {{ columns.append( {\"name\": \"time\", \"datatype\": dbt.type_timestamp(), \"quote\": True } ) }}\n{% elif target.type == 'snowflake' %}\n {{ columns.append( {\"name\": \"TIME\", \"datatype\": dbt.type_timestamp(), \"quote\": True } ) }}\n{% else %}\n {{ columns.append( {\"name\": \"time\", \"datatype\": dbt.type_timestamp()} ) }}\n{% endif %}\n\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.442732, "supported_languages": null}, "macro.jira_source.get_comment_columns": {"name": "get_comment_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_comment_columns.sql", "original_file_path": "macros/get_comment_columns.sql", "unique_id": "macro.jira_source.get_comment_columns", "macro_sql": "{% macro get_comment_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"author_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"body\", \"datatype\": dbt.type_string()},\n {\"name\": \"created\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"is_public\", \"datatype\": \"boolean\"},\n {\"name\": \"issue_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"update_author_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.443701, "supported_languages": null}, "macro.jira_source.get_field_columns": {"name": "get_field_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_field_columns.sql", "original_file_path": "macros/get_field_columns.sql", "unique_id": "macro.jira_source.get_field_columns", "macro_sql": "{% macro get_field_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_array\", \"datatype\": \"boolean\"},\n {\"name\": \"is_custom\", \"datatype\": \"boolean\"},\n {\"name\": \"name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4442859, "supported_languages": null}, "macro.jira_source.get_version_columns": {"name": "get_version_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_version_columns.sql", "original_file_path": "macros/get_version_columns.sql", "unique_id": "macro.jira_source.get_version_columns", "macro_sql": "{% macro get_version_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"archived\", \"datatype\": \"boolean\"},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"overdue\", \"datatype\": \"boolean\"},\n {\"name\": \"project_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"release_date\", \"datatype\": \"date\"},\n {\"name\": \"released\", \"datatype\": \"boolean\"},\n {\"name\": \"start_date\", \"datatype\": \"date\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.445277, "supported_languages": null}, "macro.jira_source.get_field_option_columns": {"name": "get_field_option_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_field_option_columns.sql", "original_file_path": "macros/get_field_option_columns.sql", "unique_id": "macro.jira_source.get_field_option_columns", "macro_sql": "{% macro get_field_option_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"parent_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4457998, "supported_languages": null}, "macro.jira_source.get_issue_multiselect_history_columns": {"name": "get_issue_multiselect_history_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_issue_multiselect_history_columns.sql", "original_file_path": "macros/get_issue_multiselect_history_columns.sql", "unique_id": "macro.jira_source.get_issue_multiselect_history_columns", "macro_sql": "{% macro get_issue_multiselect_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"field_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"issue_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{% if target.type == 'redshift' %}\n {{ columns.append( {\"name\": \"time\", \"datatype\": dbt.type_timestamp(), \"quote\": True } ) }}\n{% elif target.type == 'snowflake' %}\n {{ columns.append( {\"name\": \"TIME\", \"datatype\": dbt.type_timestamp(), \"quote\": True } ) }}\n{% else %}\n {{ columns.append( {\"name\": \"time\", \"datatype\": dbt.type_timestamp()} ) }}\n{% endif %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.44707, "supported_languages": null}, "macro.jira_source.get_epic_columns": {"name": "get_epic_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_epic_columns.sql", "original_file_path": "macros/get_epic_columns.sql", "unique_id": "macro.jira_source.get_epic_columns", "macro_sql": "{% macro get_epic_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"done\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"key\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"summary\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.447785, "supported_languages": null}, "macro.jira_source.get_issue_type_columns": {"name": "get_issue_type_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_issue_type_columns.sql", "original_file_path": "macros/get_issue_type_columns.sql", "unique_id": "macro.jira_source.get_issue_type_columns", "macro_sql": "{% macro get_issue_type_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"subtask\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.448389, "supported_languages": null}, "macro.jira_source.get_user_columns": {"name": "get_user_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_user_columns.sql", "original_file_path": "macros/get_user_columns.sql", "unique_id": "macro.jira_source.get_user_columns", "macro_sql": "{% macro get_user_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"email\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"locale\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"time_zone\", \"datatype\": dbt.type_string()},\n {\"name\": \"username\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.449318, "supported_languages": null}, "macro.jira_source.get_project_columns": {"name": "get_project_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_project_columns.sql", "original_file_path": "macros/get_project_columns.sql", "unique_id": "macro.jira_source.get_project_columns", "macro_sql": "{% macro get_project_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"key\", \"datatype\": dbt.type_string()},\n {\"name\": \"lead_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"permission_scheme_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"project_category_id\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.4503958, "supported_languages": null}, "macro.jira_source.get_resolution_columns": {"name": "get_resolution_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_resolution_columns.sql", "original_file_path": "macros/get_resolution_columns.sql", "unique_id": "macro.jira_source.get_resolution_columns", "macro_sql": "{% macro get_resolution_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.45099, "supported_languages": null}, "macro.jira_source.get_component_columns": {"name": "get_component_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_component_columns.sql", "original_file_path": "macros/get_component_columns.sql", "unique_id": "macro.jira_source.get_component_columns", "macro_sql": "{% macro get_component_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"project_id\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.451648, "supported_languages": null}, "macro.jira_source.get_priority_columns": {"name": "get_priority_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_priority_columns.sql", "original_file_path": "macros/get_priority_columns.sql", "unique_id": "macro.jira_source.get_priority_columns", "macro_sql": "{% macro get_priority_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.452312, "supported_languages": null}, "macro.jira_source.get_sprint_columns": {"name": "get_sprint_columns", "resource_type": "macro", "package_name": "jira_source", "path": "macros/get_sprint_columns.sql", "original_file_path": "macros/get_sprint_columns.sql", "unique_id": "macro.jira_source.get_sprint_columns", "macro_sql": "{% macro get_sprint_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"board_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"complete_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"end_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_date\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1711035089.453415, "supported_languages": null}}, "docs": {"doc.dbt.__overview__": {"name": "__overview__", "resource_type": "doc", "package_name": "dbt", "path": "overview.md", "original_file_path": "docs/overview.md", "unique_id": "doc.dbt.__overview__", "block_contents": "### Welcome!\n\nWelcome to the auto-generated documentation for your dbt project!\n\n### Navigation\n\nYou can use the `Project` and `Database` navigation tabs on the left side of the window to explore the models\nin your project.\n\n#### Project Tab\nThe `Project` tab mirrors the directory structure of your dbt project. In this tab, you can see all of the\nmodels defined in your dbt project, as well as models imported from dbt packages.\n\n#### Database Tab\nThe `Database` tab also exposes your models, but in a format that looks more like a database explorer. This view\nshows relations (tables and views) grouped into database schemas. Note that ephemeral models are _not_ shown\nin this interface, as they do not exist in the database.\n\n### Graph Exploration\nYou can click the blue icon on the bottom-right corner of the page to view the lineage graph of your models.\n\nOn model pages, you'll see the immediate parents and children of the model you're exploring. By clicking the `Expand`\nbutton at the top-right of this lineage pane, you'll be able to see all of the models that are used to build,\nor are built from, the model you're exploring.\n\nOnce expanded, you'll be able to use the `--select` and `--exclude` model selection syntax to filter the\nmodels in the graph. For more information on model selection, check out the [dbt docs](https://docs.getdbt.com/docs/model-selection-syntax).\n\nNote that you can also right-click on models to interactively filter and explore the graph.\n\n---\n\n### More information\n\n- [What is dbt](https://docs.getdbt.com/docs/introduction)?\n- Read the [dbt viewpoint](https://docs.getdbt.com/docs/viewpoint)\n- [Installation](https://docs.getdbt.com/docs/installation)\n- Join the [dbt Community](https://www.getdbt.com/community/) for questions and discussion"}}, "exposures": {}, "metrics": {}, "groups": {}, "selectors": {}, "disabled": {}, "parent_map": {"seed.jira_integration_tests.issue_link": [], "seed.jira_integration_tests.issue_type": [], "seed.jira_integration_tests.project_board": [], "seed.jira_integration_tests.resolution": [], "seed.jira_integration_tests.version": [], "seed.jira_integration_tests.status": [], "seed.jira_integration_tests.user_group": [], "seed.jira_integration_tests.component": [], "seed.jira_integration_tests.project": [], "seed.jira_integration_tests.issue_multiselect_history": [], "seed.jira_integration_tests.comment": [], "seed.jira_integration_tests.issue": [], "seed.jira_integration_tests.sprint": [], "seed.jira_integration_tests.field_option": [], "seed.jira_integration_tests.epic": [], "seed.jira_integration_tests.field": [], "seed.jira_integration_tests.user": [], "seed.jira_integration_tests.priority": [], "seed.jira_integration_tests.status_category": [], "seed.jira_integration_tests.issue_field_history": [], "seed.jira_integration_tests.project_category": [], "model.jira.jira__daily_issue_field_history": ["model.jira.int_jira__field_history_scd", "model.jira.int_jira__issue_calendar_spine", "model.jira_source.stg_jira__component", "model.jira_source.stg_jira__field_option", "model.jira_source.stg_jira__issue_type", "model.jira_source.stg_jira__status"], "model.jira.jira__user_enhanced": ["model.jira.int_jira__user_metrics", "model.jira.jira__issue_enhanced", "model.jira_source.stg_jira__user"], "model.jira.jira__issue_enhanced": ["model.jira.int_jira__issue_join", "model.jira.jira__daily_issue_field_history"], "model.jira.jira__project_enhanced": ["model.jira.int_jira__project_metrics", "model.jira.jira__issue_enhanced", "model.jira_source.stg_jira__component", "model.jira_source.stg_jira__project", "model.jira_source.stg_jira__user"], "model.jira.int_jira__issue_type_parents": ["model.jira.int_jira__issue_epic", "model.jira_source.stg_jira__issue", "model.jira_source.stg_jira__issue_type"], "model.jira.int_jira__issue_epic": ["model.jira.int_jira__issue_field_history"], "model.jira.int_jira__user_metrics": ["model.jira.jira__issue_enhanced"], "model.jira.int_jira__issue_join": ["model.jira.int_jira__issue_assign_resolution", "model.jira.int_jira__issue_comments", "model.jira.int_jira__issue_sprint", "model.jira.int_jira__issue_users", "model.jira.int_jira__issue_versions", "model.jira_source.stg_jira__priority", "model.jira_source.stg_jira__project", "model.jira_source.stg_jira__resolution", "model.jira_source.stg_jira__status", "model.jira_source.stg_jira__status_category"], "model.jira.int_jira__issue_assign_resolution": ["model.jira.int_jira__issue_field_history"], "model.jira.int_jira__issue_versions": ["model.jira.int_jira__issue_multiselect_history", "model.jira_source.stg_jira__version"], "model.jira.int_jira__issue_users": ["model.jira.int_jira__issue_type_parents", "model.jira_source.stg_jira__user"], "model.jira.int_jira__issue_sprint": ["model.jira.int_jira__issue_multiselect_history", "model.jira_source.stg_jira__sprint"], "model.jira.int_jira__issue_comments": ["model.jira_source.stg_jira__comment", "model.jira_source.stg_jira__user"], "model.jira.int_jira__project_metrics": ["model.jira.jira__issue_enhanced"], "model.jira.int_jira__issue_multiselect_history": ["model.jira_source.stg_jira__field", "model.jira_source.stg_jira__issue_multiselect_history"], "model.jira.int_jira__pivot_daily_field_history": ["model.jira.int_jira__daily_field_history"], "model.jira.int_jira__issue_calendar_spine": ["model.jira.int_jira__field_history_scd", "model.jira_source.stg_jira__issue"], "model.jira.int_jira__agg_multiselect_history": ["model.jira.int_jira__issue_multiselect_history"], "model.jira.int_jira__field_history_scd": ["model.jira.int_jira__pivot_daily_field_history"], "model.jira.int_jira__combine_field_histories": ["model.jira.int_jira__agg_multiselect_history", "model.jira.int_jira__issue_field_history"], "model.jira.int_jira__issue_field_history": ["model.jira_source.stg_jira__field", "model.jira_source.stg_jira__issue_field_history"], "model.jira.int_jira__daily_field_history": ["model.jira.int_jira__combine_field_histories"], "model.jira_source.stg_jira__comment": ["model.jira_source.stg_jira__comment_tmp"], "model.jira_source.stg_jira__project": ["model.jira_source.stg_jira__project_tmp"], "model.jira_source.stg_jira__issue_field_history": ["model.jira_source.stg_jira__issue_field_history_tmp"], "model.jira_source.stg_jira__version": ["model.jira_source.stg_jira__version_tmp"], "model.jira_source.stg_jira__sprint": ["model.jira_source.stg_jira__sprint_tmp"], "model.jira_source.stg_jira__field_option": ["model.jira_source.stg_jira__field_option_tmp"], "model.jira_source.stg_jira__field": ["model.jira_source.stg_jira__field_tmp"], "model.jira_source.stg_jira__resolution": ["model.jira_source.stg_jira__resolution_tmp"], "model.jira_source.stg_jira__status": ["model.jira_source.stg_jira__status_tmp"], "model.jira_source.stg_jira__issue": ["model.jira_source.stg_jira__issue_tmp"], "model.jira_source.stg_jira__status_category": ["model.jira_source.stg_jira__status_category_tmp"], "model.jira_source.stg_jira__issue_multiselect_history": ["model.jira_source.stg_jira__issue_multiselect_history_tmp"], "model.jira_source.stg_jira__issue_type": ["model.jira_source.stg_jira__issue_type_tmp"], "model.jira_source.stg_jira__issue_link": ["model.jira_source.stg_jira__issue_link_tmp"], "model.jira_source.stg_jira__component": ["model.jira_source.stg_jira__component_tmp"], "model.jira_source.stg_jira__user": ["model.jira_source.stg_jira__user_tmp"], "model.jira_source.stg_jira__priority": ["model.jira_source.stg_jira__priority_tmp"], "model.jira_source.stg_jira__version_tmp": ["source.jira_source.jira.version"], "model.jira_source.stg_jira__status_category_tmp": ["source.jira_source.jira.status_category"], "model.jira_source.stg_jira__field_option_tmp": ["source.jira_source.jira.field_option"], "model.jira_source.stg_jira__issue_multiselect_history_tmp": ["source.jira_source.jira.issue_multiselect_history"], "model.jira_source.stg_jira__issue_type_tmp": ["source.jira_source.jira.issue_type"], "model.jira_source.stg_jira__sprint_tmp": ["source.jira_source.jira.sprint"], "model.jira_source.stg_jira__status_tmp": ["source.jira_source.jira.status"], "model.jira_source.stg_jira__project_tmp": ["source.jira_source.jira.project"], "model.jira_source.stg_jira__comment_tmp": ["source.jira_source.jira.comment"], "model.jira_source.stg_jira__issue_field_history_tmp": ["source.jira_source.jira.issue_field_history"], "model.jira_source.stg_jira__issue_link_tmp": ["source.jira_source.jira.issue_link"], "model.jira_source.stg_jira__field_tmp": ["source.jira_source.jira.field"], "model.jira_source.stg_jira__user_tmp": ["source.jira_source.jira.user"], "model.jira_source.stg_jira__issue_tmp": ["source.jira_source.jira.issue"], "model.jira_source.stg_jira__priority_tmp": ["source.jira_source.jira.priority"], "model.jira_source.stg_jira__component_tmp": ["source.jira_source.jira.component"], "model.jira_source.stg_jira__resolution_tmp": ["source.jira_source.jira.resolution"], "test.jira.unique_jira__daily_issue_field_history_issue_day_id.75c24d3154": ["model.jira.jira__daily_issue_field_history"], "test.jira.not_null_jira__daily_issue_field_history_issue_day_id.d13b058bcd": ["model.jira.jira__daily_issue_field_history"], "test.jira.unique_jira__issue_enhanced_issue_id.fec6e723ee": ["model.jira.jira__issue_enhanced"], "test.jira.not_null_jira__issue_enhanced_issue_id.6b18e0db38": ["model.jira.jira__issue_enhanced"], "test.jira.unique_jira__project_enhanced_project_id.c18e39faef": ["model.jira.jira__project_enhanced"], "test.jira.not_null_jira__project_enhanced_project_id.4f7c58f1d4": ["model.jira.jira__project_enhanced"], "test.jira.unique_jira__user_enhanced_user_id.c9ee73454a": ["model.jira.jira__user_enhanced"], "test.jira.not_null_jira__user_enhanced_user_id.aecc00744a": ["model.jira.jira__user_enhanced"], "test.jira.unique_int_jira__issue_join_issue_id.0bd360ec4b": ["model.jira.int_jira__issue_join"], "test.jira.not_null_int_jira__issue_join_issue_id.53391b21a6": ["model.jira.int_jira__issue_join"], "test.jira.unique_int_jira__project_metrics_project_id.154ccc194e": ["model.jira.int_jira__project_metrics"], "test.jira.not_null_int_jira__project_metrics_project_id.1542338148": ["model.jira.int_jira__project_metrics"], "test.jira.unique_int_jira__user_metrics_user_id.c042bcdd66": ["model.jira.int_jira__user_metrics"], "test.jira.not_null_int_jira__user_metrics_user_id.2143177b14": ["model.jira.int_jira__user_metrics"], "test.jira.unique_int_jira__issue_comments_issue_id.26e3f11046": ["model.jira.int_jira__issue_comments"], "test.jira.not_null_int_jira__issue_comments_issue_id.9f16878e45": ["model.jira.int_jira__issue_comments"], "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_epic_issue_id__epic_issue_id.9ddee9201b": ["model.jira.int_jira__issue_epic"], "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_sprint_issue_id__current_sprint_id.aafda24567": ["model.jira.int_jira__issue_sprint"], "test.jira.unique_int_jira__issue_type_parents_issue_id.c07f8c6af3": ["model.jira.int_jira__issue_type_parents"], "test.jira.not_null_int_jira__issue_type_parents_issue_id.8dd98255b0": ["model.jira.int_jira__issue_type_parents"], "test.jira.unique_int_jira__issue_users_issue_id.e3a5962431": ["model.jira.int_jira__issue_users"], "test.jira.not_null_int_jira__issue_users_issue_id.480b7b6beb": ["model.jira.int_jira__issue_users"], "test.jira.unique_int_jira__agg_multiselect_history_batch_id.14b3dea579": ["model.jira.int_jira__agg_multiselect_history"], "test.jira.not_null_int_jira__agg_multiselect_history_batch_id.7d6d2460a8": ["model.jira.int_jira__agg_multiselect_history"], "test.jira.unique_int_jira__combine_field_histories_combined_history_id.5b6b492428": ["model.jira.int_jira__combine_field_histories"], "test.jira.not_null_int_jira__combine_field_histories_combined_history_id.943e81a794": ["model.jira.int_jira__combine_field_histories"], "test.jira.unique_int_jira__issue_calendar_spine_issue_day_id.c49483d2e5": ["model.jira.int_jira__issue_calendar_spine"], "test.jira.not_null_int_jira__issue_calendar_spine_issue_day_id.a9512b8e8a": ["model.jira.int_jira__issue_calendar_spine"], "test.jira.unique_int_jira__daily_field_history_issue_field_day_id.bfd34ced78": ["model.jira.int_jira__daily_field_history"], "test.jira.not_null_int_jira__daily_field_history_issue_field_day_id.c910c3df84": ["model.jira.int_jira__daily_field_history"], "test.jira.unique_int_jira__pivot_daily_field_history_issue_day_id.46c6f9a842": ["model.jira.int_jira__pivot_daily_field_history"], "test.jira.not_null_int_jira__pivot_daily_field_history_issue_day_id.b697c971fd": ["model.jira.int_jira__pivot_daily_field_history"], "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_field_history_field_id__issue_id__updated_at.34d1b3eaa1": ["model.jira.int_jira__issue_field_history"], "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_multiselect_history__fivetran_id__updated_at.aad394167d": ["model.jira.int_jira__issue_multiselect_history"], "test.jira.unique_int_jira__issue_assign_resolution_issue_id.f41f7c00ab": ["model.jira.int_jira__issue_assign_resolution"], "test.jira.not_null_int_jira__issue_assign_resolution_issue_id.b3af89c733": ["model.jira.int_jira__issue_assign_resolution"], "test.jira.unique_int_jira__field_history_scd_issue_day_id.21b932e949": ["model.jira.int_jira__field_history_scd"], "test.jira.not_null_int_jira__field_history_scd_issue_day_id.327ac0856c": ["model.jira.int_jira__field_history_scd"], "test.jira.unique_int_jira__issue_versions_issue_id.e2a88132de": ["model.jira.int_jira__issue_versions"], "test.jira.not_null_int_jira__issue_versions_issue_id.54c4cd445e": ["model.jira.int_jira__issue_versions"], "test.jira_source.unique_stg_jira__comment_comment_id.004104fac5": ["model.jira_source.stg_jira__comment"], "test.jira_source.not_null_stg_jira__comment_comment_id.5dec28a22a": ["model.jira_source.stg_jira__comment"], "test.jira_source.unique_stg_jira__component_component_id.1773ebe913": ["model.jira_source.stg_jira__component"], "test.jira_source.not_null_stg_jira__component_component_id.2f017ad5ad": ["model.jira_source.stg_jira__component"], "test.jira_source.unique_stg_jira__field_field_id.df7b462fff": ["model.jira_source.stg_jira__field"], "test.jira_source.not_null_stg_jira__field_field_id.34424f1c2b": ["model.jira_source.stg_jira__field"], "test.jira_source.not_null_stg_jira__field_option_field_id.1b1f37b358": ["model.jira_source.stg_jira__field_option"], "test.jira_source.unique_stg_jira__issue_issue_id.7bb0ee7230": ["model.jira_source.stg_jira__issue"], "test.jira_source.not_null_stg_jira__issue_issue_id.13a4fbe132": ["model.jira_source.stg_jira__issue"], "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_field_history_field_id__issue_id__updated_at.c01ecbb82c": ["model.jira_source.stg_jira__issue_field_history"], "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_multiselect_history__fivetran_id__updated_at.4dd2d1c5a8": ["model.jira_source.stg_jira__issue_multiselect_history"], "test.jira_source.unique_stg_jira__issue_type_issue_type_id.a89d34aa41": ["model.jira_source.stg_jira__issue_type"], "test.jira_source.not_null_stg_jira__issue_type_issue_type_id.57419fc343": ["model.jira_source.stg_jira__issue_type"], "test.jira_source.unique_stg_jira__priority_priority_id.79b77ea5d2": ["model.jira_source.stg_jira__priority"], "test.jira_source.not_null_stg_jira__priority_priority_id.ec0c873363": ["model.jira_source.stg_jira__priority"], "test.jira_source.unique_stg_jira__project_project_id.58d321d374": ["model.jira_source.stg_jira__project"], "test.jira_source.not_null_stg_jira__project_project_id.996fe19522": ["model.jira_source.stg_jira__project"], "test.jira_source.unique_stg_jira__resolution_resolution_id.b3acb37c87": ["model.jira_source.stg_jira__resolution"], "test.jira_source.not_null_stg_jira__resolution_resolution_id.1c04bac8a4": ["model.jira_source.stg_jira__resolution"], "test.jira_source.unique_stg_jira__sprint_sprint_id.8a73555fed": ["model.jira_source.stg_jira__sprint"], "test.jira_source.not_null_stg_jira__sprint_sprint_id.899b4b77d7": ["model.jira_source.stg_jira__sprint"], "test.jira_source.unique_stg_jira__status_status_id.0449241b95": ["model.jira_source.stg_jira__status"], "test.jira_source.not_null_stg_jira__status_status_id.b32a8a0d84": ["model.jira_source.stg_jira__status"], "test.jira_source.unique_stg_jira__status_category_status_category_id.99c869330a": ["model.jira_source.stg_jira__status_category"], "test.jira_source.not_null_stg_jira__status_category_status_category_id.7a89cdfcf0": ["model.jira_source.stg_jira__status_category"], "test.jira_source.unique_stg_jira__user_user_id.a397e1a23f": ["model.jira_source.stg_jira__user"], "test.jira_source.not_null_stg_jira__user_user_id.b2153f97d2": ["model.jira_source.stg_jira__user"], "test.jira_source.unique_stg_jira__version_version_id.08231bd017": ["model.jira_source.stg_jira__version"], "test.jira_source.not_null_stg_jira__version_version_id.03877ce324": ["model.jira_source.stg_jira__version"], "source.jira_source.jira.comment": [], "source.jira_source.jira.component": [], "source.jira_source.jira.field": [], "source.jira_source.jira.field_option": [], "source.jira_source.jira.issue": [], "source.jira_source.jira.issue_field_history": [], "source.jira_source.jira.issue_link": [], "source.jira_source.jira.issue_multiselect_history": [], "source.jira_source.jira.issue_type": [], "source.jira_source.jira.priority": [], "source.jira_source.jira.project": [], "source.jira_source.jira.resolution": [], "source.jira_source.jira.sprint": [], "source.jira_source.jira.status": [], "source.jira_source.jira.status_category": [], "source.jira_source.jira.user": [], "source.jira_source.jira.version": []}, "child_map": {"seed.jira_integration_tests.issue_link": [], "seed.jira_integration_tests.issue_type": [], "seed.jira_integration_tests.project_board": [], "seed.jira_integration_tests.resolution": [], "seed.jira_integration_tests.version": [], "seed.jira_integration_tests.status": [], "seed.jira_integration_tests.user_group": [], "seed.jira_integration_tests.component": [], "seed.jira_integration_tests.project": [], "seed.jira_integration_tests.issue_multiselect_history": [], "seed.jira_integration_tests.comment": [], "seed.jira_integration_tests.issue": [], "seed.jira_integration_tests.sprint": [], "seed.jira_integration_tests.field_option": [], "seed.jira_integration_tests.epic": [], "seed.jira_integration_tests.field": [], "seed.jira_integration_tests.user": [], "seed.jira_integration_tests.priority": [], "seed.jira_integration_tests.status_category": [], "seed.jira_integration_tests.issue_field_history": [], "seed.jira_integration_tests.project_category": [], "model.jira.jira__daily_issue_field_history": ["model.jira.jira__issue_enhanced", "test.jira.not_null_jira__daily_issue_field_history_issue_day_id.d13b058bcd", "test.jira.unique_jira__daily_issue_field_history_issue_day_id.75c24d3154"], "model.jira.jira__user_enhanced": ["test.jira.not_null_jira__user_enhanced_user_id.aecc00744a", "test.jira.unique_jira__user_enhanced_user_id.c9ee73454a"], "model.jira.jira__issue_enhanced": ["model.jira.int_jira__project_metrics", "model.jira.int_jira__user_metrics", "model.jira.jira__project_enhanced", "model.jira.jira__user_enhanced", "test.jira.not_null_jira__issue_enhanced_issue_id.6b18e0db38", "test.jira.unique_jira__issue_enhanced_issue_id.fec6e723ee"], "model.jira.jira__project_enhanced": ["test.jira.not_null_jira__project_enhanced_project_id.4f7c58f1d4", "test.jira.unique_jira__project_enhanced_project_id.c18e39faef"], "model.jira.int_jira__issue_type_parents": ["model.jira.int_jira__issue_users", "test.jira.not_null_int_jira__issue_type_parents_issue_id.8dd98255b0", "test.jira.unique_int_jira__issue_type_parents_issue_id.c07f8c6af3"], "model.jira.int_jira__issue_epic": ["model.jira.int_jira__issue_type_parents", "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_epic_issue_id__epic_issue_id.9ddee9201b"], "model.jira.int_jira__user_metrics": ["model.jira.jira__user_enhanced", "test.jira.not_null_int_jira__user_metrics_user_id.2143177b14", "test.jira.unique_int_jira__user_metrics_user_id.c042bcdd66"], "model.jira.int_jira__issue_join": ["model.jira.jira__issue_enhanced", "test.jira.not_null_int_jira__issue_join_issue_id.53391b21a6", "test.jira.unique_int_jira__issue_join_issue_id.0bd360ec4b"], "model.jira.int_jira__issue_assign_resolution": ["model.jira.int_jira__issue_join", "test.jira.not_null_int_jira__issue_assign_resolution_issue_id.b3af89c733", "test.jira.unique_int_jira__issue_assign_resolution_issue_id.f41f7c00ab"], "model.jira.int_jira__issue_versions": ["model.jira.int_jira__issue_join", "test.jira.not_null_int_jira__issue_versions_issue_id.54c4cd445e", "test.jira.unique_int_jira__issue_versions_issue_id.e2a88132de"], "model.jira.int_jira__issue_users": ["model.jira.int_jira__issue_join", "test.jira.not_null_int_jira__issue_users_issue_id.480b7b6beb", "test.jira.unique_int_jira__issue_users_issue_id.e3a5962431"], "model.jira.int_jira__issue_sprint": ["model.jira.int_jira__issue_join", "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_sprint_issue_id__current_sprint_id.aafda24567"], "model.jira.int_jira__issue_comments": ["model.jira.int_jira__issue_join", "test.jira.not_null_int_jira__issue_comments_issue_id.9f16878e45", "test.jira.unique_int_jira__issue_comments_issue_id.26e3f11046"], "model.jira.int_jira__project_metrics": ["model.jira.jira__project_enhanced", "test.jira.not_null_int_jira__project_metrics_project_id.1542338148", "test.jira.unique_int_jira__project_metrics_project_id.154ccc194e"], "model.jira.int_jira__issue_multiselect_history": ["model.jira.int_jira__agg_multiselect_history", "model.jira.int_jira__issue_sprint", "model.jira.int_jira__issue_versions", "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_multiselect_history__fivetran_id__updated_at.aad394167d"], "model.jira.int_jira__pivot_daily_field_history": ["model.jira.int_jira__field_history_scd", "test.jira.not_null_int_jira__pivot_daily_field_history_issue_day_id.b697c971fd", "test.jira.unique_int_jira__pivot_daily_field_history_issue_day_id.46c6f9a842"], "model.jira.int_jira__issue_calendar_spine": ["model.jira.jira__daily_issue_field_history", "test.jira.not_null_int_jira__issue_calendar_spine_issue_day_id.a9512b8e8a", "test.jira.unique_int_jira__issue_calendar_spine_issue_day_id.c49483d2e5"], "model.jira.int_jira__agg_multiselect_history": ["model.jira.int_jira__combine_field_histories", "test.jira.not_null_int_jira__agg_multiselect_history_batch_id.7d6d2460a8", "test.jira.unique_int_jira__agg_multiselect_history_batch_id.14b3dea579"], "model.jira.int_jira__field_history_scd": ["model.jira.int_jira__issue_calendar_spine", "model.jira.jira__daily_issue_field_history", "test.jira.not_null_int_jira__field_history_scd_issue_day_id.327ac0856c", "test.jira.unique_int_jira__field_history_scd_issue_day_id.21b932e949"], "model.jira.int_jira__combine_field_histories": ["model.jira.int_jira__daily_field_history", "test.jira.not_null_int_jira__combine_field_histories_combined_history_id.943e81a794", "test.jira.unique_int_jira__combine_field_histories_combined_history_id.5b6b492428"], "model.jira.int_jira__issue_field_history": ["model.jira.int_jira__combine_field_histories", "model.jira.int_jira__issue_assign_resolution", "model.jira.int_jira__issue_epic", "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_field_history_field_id__issue_id__updated_at.34d1b3eaa1"], "model.jira.int_jira__daily_field_history": ["model.jira.int_jira__pivot_daily_field_history", "test.jira.not_null_int_jira__daily_field_history_issue_field_day_id.c910c3df84", "test.jira.unique_int_jira__daily_field_history_issue_field_day_id.bfd34ced78"], "model.jira_source.stg_jira__comment": ["model.jira.int_jira__issue_comments", "test.jira_source.not_null_stg_jira__comment_comment_id.5dec28a22a", "test.jira_source.unique_stg_jira__comment_comment_id.004104fac5"], "model.jira_source.stg_jira__project": ["model.jira.int_jira__issue_join", "model.jira.jira__project_enhanced", "test.jira_source.not_null_stg_jira__project_project_id.996fe19522", "test.jira_source.unique_stg_jira__project_project_id.58d321d374"], "model.jira_source.stg_jira__issue_field_history": ["model.jira.int_jira__issue_field_history", "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_field_history_field_id__issue_id__updated_at.c01ecbb82c"], "model.jira_source.stg_jira__version": ["model.jira.int_jira__issue_versions", "test.jira_source.not_null_stg_jira__version_version_id.03877ce324", "test.jira_source.unique_stg_jira__version_version_id.08231bd017"], "model.jira_source.stg_jira__sprint": ["model.jira.int_jira__issue_sprint", "test.jira_source.not_null_stg_jira__sprint_sprint_id.899b4b77d7", "test.jira_source.unique_stg_jira__sprint_sprint_id.8a73555fed"], "model.jira_source.stg_jira__field_option": ["model.jira.jira__daily_issue_field_history", "test.jira_source.not_null_stg_jira__field_option_field_id.1b1f37b358"], "model.jira_source.stg_jira__field": ["model.jira.int_jira__issue_field_history", "model.jira.int_jira__issue_multiselect_history", "test.jira_source.not_null_stg_jira__field_field_id.34424f1c2b", "test.jira_source.unique_stg_jira__field_field_id.df7b462fff"], "model.jira_source.stg_jira__resolution": ["model.jira.int_jira__issue_join", "test.jira_source.not_null_stg_jira__resolution_resolution_id.1c04bac8a4", "test.jira_source.unique_stg_jira__resolution_resolution_id.b3acb37c87"], "model.jira_source.stg_jira__status": ["model.jira.int_jira__issue_join", "model.jira.jira__daily_issue_field_history", "test.jira_source.not_null_stg_jira__status_status_id.b32a8a0d84", "test.jira_source.unique_stg_jira__status_status_id.0449241b95"], "model.jira_source.stg_jira__issue": ["model.jira.int_jira__issue_calendar_spine", "model.jira.int_jira__issue_type_parents", "test.jira_source.not_null_stg_jira__issue_issue_id.13a4fbe132", "test.jira_source.unique_stg_jira__issue_issue_id.7bb0ee7230"], "model.jira_source.stg_jira__status_category": ["model.jira.int_jira__issue_join", "test.jira_source.not_null_stg_jira__status_category_status_category_id.7a89cdfcf0", "test.jira_source.unique_stg_jira__status_category_status_category_id.99c869330a"], "model.jira_source.stg_jira__issue_multiselect_history": ["model.jira.int_jira__issue_multiselect_history", "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_multiselect_history__fivetran_id__updated_at.4dd2d1c5a8"], "model.jira_source.stg_jira__issue_type": ["model.jira.int_jira__issue_type_parents", "model.jira.jira__daily_issue_field_history", "test.jira_source.not_null_stg_jira__issue_type_issue_type_id.57419fc343", "test.jira_source.unique_stg_jira__issue_type_issue_type_id.a89d34aa41"], "model.jira_source.stg_jira__issue_link": [], "model.jira_source.stg_jira__component": ["model.jira.jira__daily_issue_field_history", "model.jira.jira__project_enhanced", "test.jira_source.not_null_stg_jira__component_component_id.2f017ad5ad", "test.jira_source.unique_stg_jira__component_component_id.1773ebe913"], "model.jira_source.stg_jira__user": ["model.jira.int_jira__issue_comments", "model.jira.int_jira__issue_users", "model.jira.jira__project_enhanced", "model.jira.jira__user_enhanced", "test.jira_source.not_null_stg_jira__user_user_id.b2153f97d2", "test.jira_source.unique_stg_jira__user_user_id.a397e1a23f"], "model.jira_source.stg_jira__priority": ["model.jira.int_jira__issue_join", "test.jira_source.not_null_stg_jira__priority_priority_id.ec0c873363", "test.jira_source.unique_stg_jira__priority_priority_id.79b77ea5d2"], "model.jira_source.stg_jira__version_tmp": ["model.jira_source.stg_jira__version"], "model.jira_source.stg_jira__status_category_tmp": ["model.jira_source.stg_jira__status_category"], "model.jira_source.stg_jira__field_option_tmp": ["model.jira_source.stg_jira__field_option"], "model.jira_source.stg_jira__issue_multiselect_history_tmp": ["model.jira_source.stg_jira__issue_multiselect_history"], "model.jira_source.stg_jira__issue_type_tmp": ["model.jira_source.stg_jira__issue_type"], "model.jira_source.stg_jira__sprint_tmp": ["model.jira_source.stg_jira__sprint"], "model.jira_source.stg_jira__status_tmp": ["model.jira_source.stg_jira__status"], "model.jira_source.stg_jira__project_tmp": ["model.jira_source.stg_jira__project"], "model.jira_source.stg_jira__comment_tmp": ["model.jira_source.stg_jira__comment"], "model.jira_source.stg_jira__issue_field_history_tmp": ["model.jira_source.stg_jira__issue_field_history"], "model.jira_source.stg_jira__issue_link_tmp": ["model.jira_source.stg_jira__issue_link"], "model.jira_source.stg_jira__field_tmp": ["model.jira_source.stg_jira__field"], "model.jira_source.stg_jira__user_tmp": ["model.jira_source.stg_jira__user"], "model.jira_source.stg_jira__issue_tmp": ["model.jira_source.stg_jira__issue"], "model.jira_source.stg_jira__priority_tmp": ["model.jira_source.stg_jira__priority"], "model.jira_source.stg_jira__component_tmp": ["model.jira_source.stg_jira__component"], "model.jira_source.stg_jira__resolution_tmp": ["model.jira_source.stg_jira__resolution"], "test.jira.unique_jira__daily_issue_field_history_issue_day_id.75c24d3154": [], "test.jira.not_null_jira__daily_issue_field_history_issue_day_id.d13b058bcd": [], "test.jira.unique_jira__issue_enhanced_issue_id.fec6e723ee": [], "test.jira.not_null_jira__issue_enhanced_issue_id.6b18e0db38": [], "test.jira.unique_jira__project_enhanced_project_id.c18e39faef": [], "test.jira.not_null_jira__project_enhanced_project_id.4f7c58f1d4": [], "test.jira.unique_jira__user_enhanced_user_id.c9ee73454a": [], "test.jira.not_null_jira__user_enhanced_user_id.aecc00744a": [], "test.jira.unique_int_jira__issue_join_issue_id.0bd360ec4b": [], "test.jira.not_null_int_jira__issue_join_issue_id.53391b21a6": [], "test.jira.unique_int_jira__project_metrics_project_id.154ccc194e": [], "test.jira.not_null_int_jira__project_metrics_project_id.1542338148": [], "test.jira.unique_int_jira__user_metrics_user_id.c042bcdd66": [], "test.jira.not_null_int_jira__user_metrics_user_id.2143177b14": [], "test.jira.unique_int_jira__issue_comments_issue_id.26e3f11046": [], "test.jira.not_null_int_jira__issue_comments_issue_id.9f16878e45": [], "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_epic_issue_id__epic_issue_id.9ddee9201b": [], "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_sprint_issue_id__current_sprint_id.aafda24567": [], "test.jira.unique_int_jira__issue_type_parents_issue_id.c07f8c6af3": [], "test.jira.not_null_int_jira__issue_type_parents_issue_id.8dd98255b0": [], "test.jira.unique_int_jira__issue_users_issue_id.e3a5962431": [], "test.jira.not_null_int_jira__issue_users_issue_id.480b7b6beb": [], "test.jira.unique_int_jira__agg_multiselect_history_batch_id.14b3dea579": [], "test.jira.not_null_int_jira__agg_multiselect_history_batch_id.7d6d2460a8": [], "test.jira.unique_int_jira__combine_field_histories_combined_history_id.5b6b492428": [], "test.jira.not_null_int_jira__combine_field_histories_combined_history_id.943e81a794": [], "test.jira.unique_int_jira__issue_calendar_spine_issue_day_id.c49483d2e5": [], "test.jira.not_null_int_jira__issue_calendar_spine_issue_day_id.a9512b8e8a": [], "test.jira.unique_int_jira__daily_field_history_issue_field_day_id.bfd34ced78": [], "test.jira.not_null_int_jira__daily_field_history_issue_field_day_id.c910c3df84": [], "test.jira.unique_int_jira__pivot_daily_field_history_issue_day_id.46c6f9a842": [], "test.jira.not_null_int_jira__pivot_daily_field_history_issue_day_id.b697c971fd": [], "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_field_history_field_id__issue_id__updated_at.34d1b3eaa1": [], "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_multiselect_history__fivetran_id__updated_at.aad394167d": [], "test.jira.unique_int_jira__issue_assign_resolution_issue_id.f41f7c00ab": [], "test.jira.not_null_int_jira__issue_assign_resolution_issue_id.b3af89c733": [], "test.jira.unique_int_jira__field_history_scd_issue_day_id.21b932e949": [], "test.jira.not_null_int_jira__field_history_scd_issue_day_id.327ac0856c": [], "test.jira.unique_int_jira__issue_versions_issue_id.e2a88132de": [], "test.jira.not_null_int_jira__issue_versions_issue_id.54c4cd445e": [], "test.jira_source.unique_stg_jira__comment_comment_id.004104fac5": [], "test.jira_source.not_null_stg_jira__comment_comment_id.5dec28a22a": [], "test.jira_source.unique_stg_jira__component_component_id.1773ebe913": [], "test.jira_source.not_null_stg_jira__component_component_id.2f017ad5ad": [], "test.jira_source.unique_stg_jira__field_field_id.df7b462fff": [], "test.jira_source.not_null_stg_jira__field_field_id.34424f1c2b": [], "test.jira_source.not_null_stg_jira__field_option_field_id.1b1f37b358": [], "test.jira_source.unique_stg_jira__issue_issue_id.7bb0ee7230": [], "test.jira_source.not_null_stg_jira__issue_issue_id.13a4fbe132": [], "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_field_history_field_id__issue_id__updated_at.c01ecbb82c": [], "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_multiselect_history__fivetran_id__updated_at.4dd2d1c5a8": [], "test.jira_source.unique_stg_jira__issue_type_issue_type_id.a89d34aa41": [], "test.jira_source.not_null_stg_jira__issue_type_issue_type_id.57419fc343": [], "test.jira_source.unique_stg_jira__priority_priority_id.79b77ea5d2": [], "test.jira_source.not_null_stg_jira__priority_priority_id.ec0c873363": [], "test.jira_source.unique_stg_jira__project_project_id.58d321d374": [], "test.jira_source.not_null_stg_jira__project_project_id.996fe19522": [], "test.jira_source.unique_stg_jira__resolution_resolution_id.b3acb37c87": [], "test.jira_source.not_null_stg_jira__resolution_resolution_id.1c04bac8a4": [], "test.jira_source.unique_stg_jira__sprint_sprint_id.8a73555fed": [], "test.jira_source.not_null_stg_jira__sprint_sprint_id.899b4b77d7": [], "test.jira_source.unique_stg_jira__status_status_id.0449241b95": [], "test.jira_source.not_null_stg_jira__status_status_id.b32a8a0d84": [], "test.jira_source.unique_stg_jira__status_category_status_category_id.99c869330a": [], "test.jira_source.not_null_stg_jira__status_category_status_category_id.7a89cdfcf0": [], "test.jira_source.unique_stg_jira__user_user_id.a397e1a23f": [], "test.jira_source.not_null_stg_jira__user_user_id.b2153f97d2": [], "test.jira_source.unique_stg_jira__version_version_id.08231bd017": [], "test.jira_source.not_null_stg_jira__version_version_id.03877ce324": [], "source.jira_source.jira.comment": ["model.jira_source.stg_jira__comment_tmp"], "source.jira_source.jira.component": ["model.jira_source.stg_jira__component_tmp"], "source.jira_source.jira.field": ["model.jira_source.stg_jira__field_tmp"], "source.jira_source.jira.field_option": ["model.jira_source.stg_jira__field_option_tmp"], "source.jira_source.jira.issue": ["model.jira_source.stg_jira__issue_tmp"], "source.jira_source.jira.issue_field_history": ["model.jira_source.stg_jira__issue_field_history_tmp"], "source.jira_source.jira.issue_link": ["model.jira_source.stg_jira__issue_link_tmp"], "source.jira_source.jira.issue_multiselect_history": ["model.jira_source.stg_jira__issue_multiselect_history_tmp"], "source.jira_source.jira.issue_type": ["model.jira_source.stg_jira__issue_type_tmp"], "source.jira_source.jira.priority": ["model.jira_source.stg_jira__priority_tmp"], "source.jira_source.jira.project": ["model.jira_source.stg_jira__project_tmp"], "source.jira_source.jira.resolution": ["model.jira_source.stg_jira__resolution_tmp"], "source.jira_source.jira.sprint": ["model.jira_source.stg_jira__sprint_tmp"], "source.jira_source.jira.status": ["model.jira_source.stg_jira__status_tmp"], "source.jira_source.jira.status_category": ["model.jira_source.stg_jira__status_category_tmp"], "source.jira_source.jira.user": ["model.jira_source.stg_jira__user_tmp"], "source.jira_source.jira.version": ["model.jira_source.stg_jira__version_tmp"]}, "group_map": {}, "saved_queries": {}, "semantic_models": {}} \ No newline at end of file diff --git a/docs/run_results.json b/docs/run_results.json index c07e759b..05c44931 100644 --- a/docs/run_results.json +++ b/docs/run_results.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/run-results/v4.json", "dbt_version": "1.5.6", "generated_at": "2023-09-19T22:45:34.160169Z", "invocation_id": "3de4d5f4-ee2f-4047-ae14-abe9b1091168", "env": {}}, "results": [{"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.048832Z", "completed_at": "2023-09-19T22:45:20.073251Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.082751Z", "completed_at": "2023-09-19T22:45:20.082760Z"}], "thread_id": "Thread-1", "execution_time": 0.04416394233703613, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__comment_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.055312Z", "completed_at": "2023-09-19T22:45:20.080269Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.083836Z", "completed_at": "2023-09-19T22:45:20.083840Z"}], "thread_id": "Thread-2", "execution_time": 0.04388999938964844, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__component_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.059971Z", "completed_at": "2023-09-19T22:45:20.080659Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.084258Z", "completed_at": "2023-09-19T22:45:20.084261Z"}], "thread_id": "Thread-3", "execution_time": 0.043231964111328125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__field_option_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.063906Z", "completed_at": "2023-09-19T22:45:20.081214Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.085265Z", "completed_at": "2023-09-19T22:45:20.085269Z"}], "thread_id": "Thread-4", "execution_time": 0.04296588897705078, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__field_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.067380Z", "completed_at": "2023-09-19T22:45:20.081501Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.085501Z", "completed_at": "2023-09-19T22:45:20.085504Z"}], "thread_id": "Thread-5", "execution_time": 0.04282689094543457, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_field_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.070416Z", "completed_at": "2023-09-19T22:45:20.081777Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.085736Z", "completed_at": "2023-09-19T22:45:20.085739Z"}], "thread_id": "Thread-6", "execution_time": 0.042272090911865234, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_link_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.073546Z", "completed_at": "2023-09-19T22:45:20.082275Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.086456Z", "completed_at": "2023-09-19T22:45:20.086459Z"}], "thread_id": "Thread-7", "execution_time": 0.04234790802001953, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_multiselect_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.077468Z", "completed_at": "2023-09-19T22:45:20.083018Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.087500Z", "completed_at": "2023-09-19T22:45:20.087503Z"}], "thread_id": "Thread-8", "execution_time": 0.04265093803405762, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.095146Z", "completed_at": "2023-09-19T22:45:20.110654Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.117176Z", "completed_at": "2023-09-19T22:45:20.117181Z"}], "thread_id": "Thread-1", "execution_time": 0.028517961502075195, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_type_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.098409Z", "completed_at": "2023-09-19T22:45:20.115061Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.118047Z", "completed_at": "2023-09-19T22:45:20.118051Z"}], "thread_id": "Thread-2", "execution_time": 0.027963876724243164, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__priority_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.101070Z", "completed_at": "2023-09-19T22:45:20.115410Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.118243Z", "completed_at": "2023-09-19T22:45:20.118246Z"}], "thread_id": "Thread-3", "execution_time": 0.027755022048950195, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__project_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.103380Z", "completed_at": "2023-09-19T22:45:20.115904Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.119206Z", "completed_at": "2023-09-19T22:45:20.119209Z"}], "thread_id": "Thread-4", "execution_time": 0.027898073196411133, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__resolution_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.105493Z", "completed_at": "2023-09-19T22:45:20.116112Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.119408Z", "completed_at": "2023-09-19T22:45:20.119411Z"}], "thread_id": "Thread-5", "execution_time": 0.027983903884887695, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__sprint_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.108541Z", "completed_at": "2023-09-19T22:45:20.116363Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.119601Z", "completed_at": "2023-09-19T22:45:20.119603Z"}], "thread_id": "Thread-6", "execution_time": 0.02809309959411621, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__status_category_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.110880Z", "completed_at": "2023-09-19T22:45:20.116946Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.120604Z", "completed_at": "2023-09-19T22:45:20.120607Z"}], "thread_id": "Thread-7", "execution_time": 0.028460025787353516, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__status_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.112953Z", "completed_at": "2023-09-19T22:45:20.117374Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.121069Z", "completed_at": "2023-09-19T22:45:20.121072Z"}], "thread_id": "Thread-8", "execution_time": 0.026346206665039062, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__user_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.130725Z", "completed_at": "2023-09-19T22:45:20.131676Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.163078Z", "completed_at": "2023-09-19T22:45:20.163085Z"}], "thread_id": "Thread-2", "execution_time": 0.03993797302246094, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.comment"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.131884Z", "completed_at": "2023-09-19T22:45:20.155745Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.163268Z", "completed_at": "2023-09-19T22:45:20.163271Z"}], "thread_id": "Thread-3", "execution_time": 0.04010605812072754, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.component"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.156451Z", "completed_at": "2023-09-19T22:45:20.157469Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.163959Z", "completed_at": "2023-09-19T22:45:20.163962Z"}], "thread_id": "Thread-4", "execution_time": 0.04027295112609863, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.epic"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.157749Z", "completed_at": "2023-09-19T22:45:20.158627Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.164165Z", "completed_at": "2023-09-19T22:45:20.164167Z"}], "thread_id": "Thread-5", "execution_time": 0.04036211967468262, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.field"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.158895Z", "completed_at": "2023-09-19T22:45:20.159729Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.164358Z", "completed_at": "2023-09-19T22:45:20.164361Z"}], "thread_id": "Thread-6", "execution_time": 0.04048800468444824, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.field_option"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.127486Z", "completed_at": "2023-09-19T22:45:20.160288Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.165493Z", "completed_at": "2023-09-19T22:45:20.165496Z"}], "thread_id": "Thread-1", "execution_time": 0.04455399513244629, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__version_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.160477Z", "completed_at": "2023-09-19T22:45:20.161364Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.165700Z", "completed_at": "2023-09-19T22:45:20.165703Z"}], "thread_id": "Thread-7", "execution_time": 0.041156768798828125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.issue"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.161562Z", "completed_at": "2023-09-19T22:45:20.162422Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.165903Z", "completed_at": "2023-09-19T22:45:20.165905Z"}], "thread_id": "Thread-8", "execution_time": 0.03882026672363281, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.issue_field_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.173221Z", "completed_at": "2023-09-19T22:45:20.174960Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.184749Z", "completed_at": "2023-09-19T22:45:20.184754Z"}], "thread_id": "Thread-2", "execution_time": 0.016721010208129883, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.issue_link"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.175177Z", "completed_at": "2023-09-19T22:45:20.176014Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.184945Z", "completed_at": "2023-09-19T22:45:20.184948Z"}], "thread_id": "Thread-3", "execution_time": 0.016833066940307617, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.issue_multiselect_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.176674Z", "completed_at": "2023-09-19T22:45:20.177542Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.185596Z", "completed_at": "2023-09-19T22:45:20.185598Z"}], "thread_id": "Thread-4", "execution_time": 0.016852140426635742, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.issue_type"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.177743Z", "completed_at": "2023-09-19T22:45:20.178595Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.185783Z", "completed_at": "2023-09-19T22:45:20.185785Z"}], "thread_id": "Thread-5", "execution_time": 0.016951799392700195, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.priority"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.178791Z", "completed_at": "2023-09-19T22:45:20.179654Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.185967Z", "completed_at": "2023-09-19T22:45:20.185969Z"}], "thread_id": "Thread-6", "execution_time": 0.017057180404663086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.project"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.180183Z", "completed_at": "2023-09-19T22:45:20.181073Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.186981Z", "completed_at": "2023-09-19T22:45:20.186984Z"}], "thread_id": "Thread-1", "execution_time": 0.017248153686523438, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.project_board"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.181292Z", "completed_at": "2023-09-19T22:45:20.182170Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.187168Z", "completed_at": "2023-09-19T22:45:20.187170Z"}], "thread_id": "Thread-7", "execution_time": 0.01736593246459961, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.project_category"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.182377Z", "completed_at": "2023-09-19T22:45:20.184055Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.187356Z", "completed_at": "2023-09-19T22:45:20.187359Z"}], "thread_id": "Thread-8", "execution_time": 0.017479896545410156, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.resolution"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.194397Z", "completed_at": "2023-09-19T22:45:20.195482Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.222665Z", "completed_at": "2023-09-19T22:45:20.222670Z"}], "thread_id": "Thread-2", "execution_time": 0.03341388702392578, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.sprint"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.195691Z", "completed_at": "2023-09-19T22:45:20.196567Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.222864Z", "completed_at": "2023-09-19T22:45:20.222867Z"}], "thread_id": "Thread-3", "execution_time": 0.03348898887634277, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.status"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.197227Z", "completed_at": "2023-09-19T22:45:20.198094Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.223513Z", "completed_at": "2023-09-19T22:45:20.223515Z"}], "thread_id": "Thread-4", "execution_time": 0.033514976501464844, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.status_category"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.198294Z", "completed_at": "2023-09-19T22:45:20.199119Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.223701Z", "completed_at": "2023-09-19T22:45:20.223704Z"}], "thread_id": "Thread-5", "execution_time": 0.03360700607299805, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.user"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.199331Z", "completed_at": "2023-09-19T22:45:20.200182Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.223881Z", "completed_at": "2023-09-19T22:45:20.223883Z"}], "thread_id": "Thread-6", "execution_time": 0.03372812271118164, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.user_group"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.200689Z", "completed_at": "2023-09-19T22:45:20.202254Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:20.224875Z", "completed_at": "2023-09-19T22:45:20.224878Z"}], "thread_id": "Thread-1", "execution_time": 0.033963918685913086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.version"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.208768Z", "completed_at": "2023-09-19T22:45:23.267317Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:23.269584Z", "completed_at": "2023-09-19T22:45:23.269588Z"}], "thread_id": "Thread-8", "execution_time": 3.3826239109039307, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__component"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.257142Z", "completed_at": "2023-09-19T22:45:23.267578Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:23.269836Z", "completed_at": "2023-09-19T22:45:23.269839Z"}], "thread_id": "Thread-5", "execution_time": 3.350266695022583, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_link"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.233303Z", "completed_at": "2023-09-19T22:45:23.266434Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:23.268039Z", "completed_at": "2023-09-19T22:45:23.268047Z"}], "thread_id": "Thread-2", "execution_time": 3.3740861415863037, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__field_option"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.202464Z", "completed_at": "2023-09-19T22:45:23.266766Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:23.268944Z", "completed_at": "2023-09-19T22:45:23.268947Z"}], "thread_id": "Thread-7", "execution_time": 3.4105441570281982, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__comment"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.250778Z", "completed_at": "2023-09-19T22:45:23.268306Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:23.270303Z", "completed_at": "2023-09-19T22:45:23.270307Z"}], "thread_id": "Thread-4", "execution_time": 3.375364065170288, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_field_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.241698Z", "completed_at": "2023-09-19T22:45:23.311324Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:23.312307Z", "completed_at": "2023-09-19T22:45:23.312310Z"}], "thread_id": "Thread-3", "execution_time": 3.3925838470458984, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__field"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.266237Z", "completed_at": "2023-09-19T22:45:23.310812Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:23.311524Z", "completed_at": "2023-09-19T22:45:23.311530Z"}], "thread_id": "Thread-6", "execution_time": 3.392040967941284, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_multiselect_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:20.278530Z", "completed_at": "2023-09-19T22:45:23.311915Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:23.312895Z", "completed_at": "2023-09-19T22:45:23.312898Z"}], "thread_id": "Thread-1", "execution_time": 3.3926351070404053, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:23.606938Z", "completed_at": "2023-09-19T22:45:27.142253Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.143759Z", "completed_at": "2023-09-19T22:45:27.143778Z"}], "thread_id": "Thread-5", "execution_time": 3.7209579944610596, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__priority"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:23.648415Z", "completed_at": "2023-09-19T22:45:27.142718Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.144132Z", "completed_at": "2023-09-19T22:45:27.144137Z"}], "thread_id": "Thread-4", "execution_time": 3.715414047241211, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__sprint"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.342123Z", "completed_at": "2023-09-19T22:45:27.352193Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.352688Z", "completed_at": "2023-09-19T22:45:27.352694Z"}], "thread_id": "Thread-4", "execution_time": 0.012283086776733398, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__component_component_id.2f017ad5ad"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:23.638575Z", "completed_at": "2023-09-19T22:45:27.174932Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.175631Z", "completed_at": "2023-09-19T22:45:27.175640Z"}], "thread_id": "Thread-7", "execution_time": 3.7374749183654785, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__resolution"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.354272Z", "completed_at": "2023-09-19T22:45:27.362126Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.363373Z", "completed_at": "2023-09-19T22:45:27.363379Z"}], "thread_id": "Thread-4", "execution_time": 0.010306835174560547, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__component_component_id.1773ebe913"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:23.581086Z", "completed_at": "2023-09-19T22:45:27.186973Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.187575Z", "completed_at": "2023-09-19T22:45:27.187582Z"}], "thread_id": "Thread-8", "execution_time": 3.7933549880981445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_type"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.364279Z", "completed_at": "2023-09-19T22:45:27.371993Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.374871Z", "completed_at": "2023-09-19T22:45:27.374875Z"}], "thread_id": "Thread-7", "execution_time": 0.012670040130615234, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__field_option_field_id.1b1f37b358"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.368713Z", "completed_at": "2023-09-19T22:45:27.374658Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.378615Z", "completed_at": "2023-09-19T22:45:27.378619Z"}], "thread_id": "Thread-4", "execution_time": 0.012284994125366211, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__comment_comment_id.5dec28a22a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.375926Z", "completed_at": "2023-09-19T22:45:27.382079Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.389532Z", "completed_at": "2023-09-19T22:45:27.389538Z"}], "thread_id": "Thread-8", "execution_time": 0.018947124481201172, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__comment_comment_id.004104fac5"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.383047Z", "completed_at": "2023-09-19T22:45:27.393650Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.396867Z", "completed_at": "2023-09-19T22:45:27.396871Z"}], "thread_id": "Thread-7", "execution_time": 0.016458988189697266, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_field_history_field_id__issue_id__updated_at.c01ecbb82c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.398420Z", "completed_at": "2023-09-19T22:45:27.405041Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.408160Z", "completed_at": "2023-09-19T22:45:27.408165Z"}], "thread_id": "Thread-8", "execution_time": 0.012072086334228516, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__field_field_id.34424f1c2b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.402503Z", "completed_at": "2023-09-19T22:45:27.409449Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.413676Z", "completed_at": "2023-09-19T22:45:27.413680Z"}], "thread_id": "Thread-4", "execution_time": 0.013045072555541992, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__field_field_id.df7b462fff"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.410172Z", "completed_at": "2023-09-19T22:45:27.414982Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.418623Z", "completed_at": "2023-09-19T22:45:27.418628Z"}], "thread_id": "Thread-8", "execution_time": 0.010084152221679688, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_multiselect_history__fivetran_id__updated_at.4dd2d1c5a8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:23.684409Z", "completed_at": "2023-09-19T22:45:27.236245Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.237189Z", "completed_at": "2023-09-19T22:45:27.237192Z"}], "thread_id": "Thread-3", "execution_time": 3.7868192195892334, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__status_category"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.416064Z", "completed_at": "2023-09-19T22:45:27.423072Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.425131Z", "completed_at": "2023-09-19T22:45:27.425134Z"}], "thread_id": "Thread-7", "execution_time": 0.014062166213989258, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__issue_issue_id.13a4fbe132"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.419482Z", "completed_at": "2023-09-19T22:45:27.423787Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.427942Z", "completed_at": "2023-09-19T22:45:27.427946Z"}], "thread_id": "Thread-4", "execution_time": 0.013420820236206055, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__issue_issue_id.7bb0ee7230"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.425370Z", "completed_at": "2023-09-19T22:45:27.432604Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.433968Z", "completed_at": "2023-09-19T22:45:27.433973Z"}], "thread_id": "Thread-8", "execution_time": 0.016040802001953125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__priority_priority_id.ec0c873363"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.430073Z", "completed_at": "2023-09-19T22:45:27.434163Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.440127Z", "completed_at": "2023-09-19T22:45:27.440131Z"}], "thread_id": "Thread-3", "execution_time": 0.012872934341430664, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__priority_priority_id.79b77ea5d2"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.436848Z", "completed_at": "2023-09-19T22:45:27.440364Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.442161Z", "completed_at": "2023-09-19T22:45:27.442164Z"}], "thread_id": "Thread-4", "execution_time": 0.013157844543457031, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__sprint_sprint_id.8a73555fed"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.434363Z", "completed_at": "2023-09-19T22:45:27.441281Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.445884Z", "completed_at": "2023-09-19T22:45:27.445889Z"}], "thread_id": "Thread-7", "execution_time": 0.014113187789916992, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__sprint_sprint_id.899b4b77d7"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.442360Z", "completed_at": "2023-09-19T22:45:27.450162Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.451752Z", "completed_at": "2023-09-19T22:45:27.451756Z"}], "thread_id": "Thread-8", "execution_time": 0.016649961471557617, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__resolution_resolution_id.1c04bac8a4"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.447429Z", "completed_at": "2023-09-19T22:45:27.451562Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.457562Z", "completed_at": "2023-09-19T22:45:27.457565Z"}], "thread_id": "Thread-3", "execution_time": 0.01283717155456543, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__resolution_resolution_id.b3acb37c87"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.451956Z", "completed_at": "2023-09-19T22:45:27.458013Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.459876Z", "completed_at": "2023-09-19T22:45:27.459880Z"}], "thread_id": "Thread-4", "execution_time": 0.019356250762939453, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__issue_type_issue_type_id.57419fc343"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.454473Z", "completed_at": "2023-09-19T22:45:27.458958Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.469311Z", "completed_at": "2023-09-19T22:45:27.469316Z"}], "thread_id": "Thread-7", "execution_time": 0.019687175750732422, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__issue_type_issue_type_id.a89d34aa41"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.478042Z", "completed_at": "2023-09-19T22:45:27.507635Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.519482Z", "completed_at": "2023-09-19T22:45:27.519488Z"}], "thread_id": "Thread-4", "execution_time": 0.04877066612243652, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_field_history_field_id__issue_id__updated_at.34d1b3eaa1"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.483744Z", "completed_at": "2023-09-19T22:45:27.508370Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.524621Z", "completed_at": "2023-09-19T22:45:27.524625Z"}], "thread_id": "Thread-7", "execution_time": 0.04874992370605469, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.int_jira__agg_multiselect_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.519730Z", "completed_at": "2023-09-19T22:45:27.526417Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.528426Z", "completed_at": "2023-09-19T22:45:27.528430Z"}], "thread_id": "Thread-3", "execution_time": 0.026124954223632812, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_multiselect_history__fivetran_id__updated_at.aad394167d"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.528639Z", "completed_at": "2023-09-19T22:45:27.534890Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.539264Z", "completed_at": "2023-09-19T22:45:27.539269Z"}], "thread_id": "Thread-4", "execution_time": 0.017013072967529297, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__status_category_status_category_id.7a89cdfcf0"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.531573Z", "completed_at": "2023-09-19T22:45:27.538161Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.539482Z", "completed_at": "2023-09-19T22:45:27.539485Z"}], "thread_id": "Thread-7", "execution_time": 0.016744136810302734, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__status_category_status_category_id.99c869330a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.535146Z", "completed_at": "2023-09-19T22:45:27.539689Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.545075Z", "completed_at": "2023-09-19T22:45:27.545078Z"}], "thread_id": "Thread-8", "execution_time": 0.015031099319458008, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__issue_assign_resolution_issue_id.b3af89c733"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.539874Z", "completed_at": "2023-09-19T22:45:27.545624Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.553919Z", "completed_at": "2023-09-19T22:45:27.553924Z"}], "thread_id": "Thread-3", "execution_time": 0.022926807403564453, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__issue_assign_resolution_issue_id.f41f7c00ab"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:23.626543Z", "completed_at": "2023-09-19T22:45:27.224905Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.231150Z", "completed_at": "2023-09-19T22:45:27.231158Z"}], "thread_id": "Thread-2", "execution_time": 3.956868886947632, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__project"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:23.702128Z", "completed_at": "2023-09-19T22:45:27.223815Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.224392Z", "completed_at": "2023-09-19T22:45:27.224398Z"}], "thread_id": "Thread-1", "execution_time": 3.9301271438598633, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__user"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:23.692825Z", "completed_at": "2023-09-19T22:45:27.235971Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.236934Z", "completed_at": "2023-09-19T22:45:27.236939Z"}], "thread_id": "Thread-6", "execution_time": 3.941561698913574, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__status"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.547254Z", "completed_at": "2023-09-19T22:45:27.562157Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.578673Z", "completed_at": "2023-09-19T22:45:27.578677Z"}], "thread_id": "Thread-4", "execution_time": 0.03782510757446289, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.int_jira__issue_type_parents"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.556675Z", "completed_at": "2023-09-19T22:45:27.562357Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.578916Z", "completed_at": "2023-09-19T22:45:27.578920Z"}], "thread_id": "Thread-7", "execution_time": 0.037744998931884766, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_epic_issue_id__epic_issue_id.9ddee9201b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.562567Z", "completed_at": "2023-09-19T22:45:27.579113Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.585403Z", "completed_at": "2023-09-19T22:45:27.585408Z"}], "thread_id": "Thread-8", "execution_time": 0.026420116424560547, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.int_jira__combine_field_histories"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.580336Z", "completed_at": "2023-09-19T22:45:27.585822Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.596078Z", "completed_at": "2023-09-19T22:45:27.596082Z"}], "thread_id": "Thread-3", "execution_time": 0.028918027877807617, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__agg_multiselect_history_batch_id.7d6d2460a8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.587491Z", "completed_at": "2023-09-19T22:45:27.599530Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.607314Z", "completed_at": "2023-09-19T22:45:27.607318Z"}], "thread_id": "Thread-2", "execution_time": 0.027434825897216797, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__agg_multiselect_history_batch_id.14b3dea579"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.590409Z", "completed_at": "2023-09-19T22:45:27.604811Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.607509Z", "completed_at": "2023-09-19T22:45:27.607512Z"}], "thread_id": "Thread-1", "execution_time": 0.027298927307128906, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_sprint_issue_id__current_sprint_id.aafda24567"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.599748Z", "completed_at": "2023-09-19T22:45:27.606895Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.612581Z", "completed_at": "2023-09-19T22:45:27.612584Z"}], "thread_id": "Thread-4", "execution_time": 0.030094146728515625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__project_project_id.996fe19522"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.602260Z", "completed_at": "2023-09-19T22:45:27.607110Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.612798Z", "completed_at": "2023-09-19T22:45:27.612801Z"}], "thread_id": "Thread-7", "execution_time": 0.03022003173828125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__user_user_id.b2153f97d2"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.607720Z", "completed_at": "2023-09-19T22:45:27.613205Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.618843Z", "completed_at": "2023-09-19T22:45:27.618846Z"}], "thread_id": "Thread-8", "execution_time": 0.020956754684448242, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__project_project_id.58d321d374"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.613909Z", "completed_at": "2023-09-19T22:45:27.619217Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.646957Z", "completed_at": "2023-09-19T22:45:27.646962Z"}], "thread_id": "Thread-3", "execution_time": 0.07490181922912598, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__user_user_id.a397e1a23f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.619406Z", "completed_at": "2023-09-19T22:45:27.647405Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.687250Z", "completed_at": "2023-09-19T22:45:27.687256Z"}], "thread_id": "Thread-6", "execution_time": 0.0802149772644043, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__status_status_id.b32a8a0d84"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.623345Z", "completed_at": "2023-09-19T22:45:27.680610Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.687478Z", "completed_at": "2023-09-19T22:45:27.687481Z"}], "thread_id": "Thread-2", "execution_time": 0.07697677612304688, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__status_status_id.0449241b95"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.647631Z", "completed_at": "2023-09-19T22:45:27.687773Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.696126Z", "completed_at": "2023-09-19T22:45:27.696130Z"}], "thread_id": "Thread-4", "execution_time": 0.07746100425720215, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__issue_type_parents_issue_id.8dd98255b0"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.682642Z", "completed_at": "2023-09-19T22:45:27.692961Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.696357Z", "completed_at": "2023-09-19T22:45:27.696359Z"}], "thread_id": "Thread-7", "execution_time": 0.07760190963745117, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__issue_type_parents_issue_id.c07f8c6af3"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.687956Z", "completed_at": "2023-09-19T22:45:27.695695Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.701243Z", "completed_at": "2023-09-19T22:45:27.701247Z"}], "thread_id": "Thread-8", "execution_time": 0.01979804039001465, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.int_jira__daily_field_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.696568Z", "completed_at": "2023-09-19T22:45:27.701466Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.708951Z", "completed_at": "2023-09-19T22:45:27.708955Z"}], "thread_id": "Thread-3", "execution_time": 0.01852273941040039, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__combine_field_histories_combined_history_id.943e81a794"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.702137Z", "completed_at": "2023-09-19T22:45:27.710491Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.719035Z", "completed_at": "2023-09-19T22:45:27.719040Z"}], "thread_id": "Thread-6", "execution_time": 0.032380104064941406, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__combine_field_histories_combined_history_id.5b6b492428"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.705377Z", "completed_at": "2023-09-19T22:45:27.713803Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.728628Z", "completed_at": "2023-09-19T22:45:27.728633Z"}], "thread_id": "Thread-2", "execution_time": 0.03273797035217285, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__issue_comments_issue_id.9f16878e45"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.714571Z", "completed_at": "2023-09-19T22:45:27.727816Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.737647Z", "completed_at": "2023-09-19T22:45:27.737652Z"}], "thread_id": "Thread-4", "execution_time": 0.03019094467163086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__issue_comments_issue_id.26e3f11046"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.721553Z", "completed_at": "2023-09-19T22:45:27.734772Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.739148Z", "completed_at": "2023-09-19T22:45:27.739151Z"}], "thread_id": "Thread-7", "execution_time": 0.027829885482788086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.int_jira__pivot_daily_field_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.728887Z", "completed_at": "2023-09-19T22:45:27.737881Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.739675Z", "completed_at": "2023-09-19T22:45:27.739679Z"}], "thread_id": "Thread-8", "execution_time": 0.02714991569519043, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__daily_field_history_issue_field_day_id.c910c3df84"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.735026Z", "completed_at": "2023-09-19T22:45:27.739380Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.743022Z", "completed_at": "2023-09-19T22:45:27.743026Z"}], "thread_id": "Thread-3", "execution_time": 0.02284693717956543, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__daily_field_history_issue_field_day_id.bfd34ced78"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.754051Z", "completed_at": "2023-09-19T22:45:27.764204Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.767088Z", "completed_at": "2023-09-19T22:45:27.767095Z"}], "thread_id": "Thread-8", "execution_time": 0.023298025131225586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__pivot_daily_field_history_issue_day_id.b697c971fd"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.760941Z", "completed_at": "2023-09-19T22:45:27.765943Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:27.767331Z", "completed_at": "2023-09-19T22:45:27.767334Z"}], "thread_id": "Thread-2", "execution_time": 0.02341604232788086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__pivot_daily_field_history_issue_day_id.46c6f9a842"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.324564Z", "completed_at": "2023-09-19T22:45:28.503718Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:28.505479Z", "completed_at": "2023-09-19T22:45:28.505487Z"}], "thread_id": "Thread-5", "execution_time": 1.3958721160888672, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__version"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:28.725001Z", "completed_at": "2023-09-19T22:45:28.757447Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:28.758085Z", "completed_at": "2023-09-19T22:45:28.758093Z"}], "thread_id": "Thread-7", "execution_time": 0.0367732048034668, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__version_version_id.03877ce324"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:28.732261Z", "completed_at": "2023-09-19T22:45:28.759131Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:28.760617Z", "completed_at": "2023-09-19T22:45:28.760621Z"}], "thread_id": "Thread-4", "execution_time": 0.03820633888244629, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__version_version_id.08231bd017"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:28.763328Z", "completed_at": "2023-09-19T22:45:28.772181Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:28.773069Z", "completed_at": "2023-09-19T22:45:28.773074Z"}], "thread_id": "Thread-2", "execution_time": 0.011584043502807617, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__issue_versions_issue_id.54c4cd445e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:28.767406Z", "completed_at": "2023-09-19T22:45:28.772423Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:28.773300Z", "completed_at": "2023-09-19T22:45:28.773304Z"}], "thread_id": "Thread-4", "execution_time": 0.01169276237487793, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__issue_versions_issue_id.e2a88132de"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:27.746123Z", "completed_at": "2023-09-19T22:45:29.114289Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:29.115012Z", "completed_at": "2023-09-19T22:45:29.115024Z"}], "thread_id": "Thread-6", "execution_time": 1.5627219676971436, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.int_jira__field_history_scd"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:29.323529Z", "completed_at": "2023-09-19T22:45:29.368406Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:29.376630Z", "completed_at": "2023-09-19T22:45:29.376635Z"}], "thread_id": "Thread-7", "execution_time": 0.0702662467956543, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__issue_users_issue_id.480b7b6beb"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:29.311928Z", "completed_at": "2023-09-19T22:45:29.374926Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:29.377023Z", "completed_at": "2023-09-19T22:45:29.377026Z"}], "thread_id": "Thread-8", "execution_time": 0.07318973541259766, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.int_jira__issue_join"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:29.354434Z", "completed_at": "2023-09-19T22:45:29.375171Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:29.377231Z", "completed_at": "2023-09-19T22:45:29.377234Z"}], "thread_id": "Thread-3", "execution_time": 0.0705111026763916, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__issue_users_issue_id.e3a5962431"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:29.371442Z", "completed_at": "2023-09-19T22:45:29.376433Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:29.379549Z", "completed_at": "2023-09-19T22:45:29.379553Z"}], "thread_id": "Thread-1", "execution_time": 0.022434711456298828, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__field_history_scd_issue_day_id.21b932e949"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:29.368635Z", "completed_at": "2023-09-19T22:45:29.376829Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:29.379824Z", "completed_at": "2023-09-19T22:45:29.379827Z"}], "thread_id": "Thread-4", "execution_time": 0.027445077896118164, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__field_history_scd_issue_day_id.327ac0856c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:29.385702Z", "completed_at": "2023-09-19T22:45:29.388445Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:29.389258Z", "completed_at": "2023-09-19T22:45:29.389263Z"}], "thread_id": "Thread-6", "execution_time": 0.008346796035766602, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__issue_join_issue_id.0bd360ec4b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:29.382970Z", "completed_at": "2023-09-19T22:45:29.388669Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:29.389488Z", "completed_at": "2023-09-19T22:45:29.389492Z"}], "thread_id": "Thread-3", "execution_time": 0.009402036666870117, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__issue_join_issue_id.53391b21a6"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:29.359923Z", "completed_at": "2023-09-19T22:45:30.707677Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:30.708375Z", "completed_at": "2023-09-19T22:45:30.708393Z"}], "thread_id": "Thread-2", "execution_time": 1.5099270343780518, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.int_jira__issue_calendar_spine"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:30.873953Z", "completed_at": "2023-09-19T22:45:30.902948Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:30.903963Z", "completed_at": "2023-09-19T22:45:30.903969Z"}], "thread_id": "Thread-8", "execution_time": 0.046476125717163086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__issue_calendar_spine_issue_day_id.a9512b8e8a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:30.898282Z", "completed_at": "2023-09-19T22:45:30.903207Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:30.904262Z", "completed_at": "2023-09-19T22:45:30.904266Z"}], "thread_id": "Thread-5", "execution_time": 0.046225786209106445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__issue_calendar_spine_issue_day_id.c49483d2e5"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:30.861354Z", "completed_at": "2023-09-19T22:45:32.043143Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:32.043700Z", "completed_at": "2023-09-19T22:45:32.043708Z"}], "thread_id": "Thread-7", "execution_time": 1.341599941253662, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.jira__daily_issue_field_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:32.233465Z", "completed_at": "2023-09-19T22:45:32.238947Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:32.240180Z", "completed_at": "2023-09-19T22:45:32.240187Z"}], "thread_id": "Thread-3", "execution_time": 0.036859989166259766, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_jira__daily_issue_field_history_issue_day_id.75c24d3154"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:32.219562Z", "completed_at": "2023-09-19T22:45:32.239285Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:32.240535Z", "completed_at": "2023-09-19T22:45:32.240540Z"}], "thread_id": "Thread-6", "execution_time": 0.03812885284423828, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_jira__daily_issue_field_history_issue_day_id.d13b058bcd"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:32.206052Z", "completed_at": "2023-09-19T22:45:33.885822Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:33.886721Z", "completed_at": "2023-09-19T22:45:33.886739Z"}], "thread_id": "Thread-4", "execution_time": 1.835536003112793, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.jira__issue_enhanced"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:34.081000Z", "completed_at": "2023-09-19T22:45:34.086112Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:34.087700Z", "completed_at": "2023-09-19T22:45:34.087704Z"}], "thread_id": "Thread-7", "execution_time": 0.04091906547546387, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_jira__issue_enhanced_issue_id.fec6e723ee"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:34.077534Z", "completed_at": "2023-09-19T22:45:34.086449Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:34.088915Z", "completed_at": "2023-09-19T22:45:34.088919Z"}], "thread_id": "Thread-5", "execution_time": 0.046545982360839844, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_jira__issue_enhanced_issue_id.6b18e0db38"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:34.092523Z", "completed_at": "2023-09-19T22:45:34.133971Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:34.136494Z", "completed_at": "2023-09-19T22:45:34.136500Z"}], "thread_id": "Thread-3", "execution_time": 0.049671173095703125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.jira__project_enhanced"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:34.110707Z", "completed_at": "2023-09-19T22:45:34.134246Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:34.136698Z", "completed_at": "2023-09-19T22:45:34.136701Z"}], "thread_id": "Thread-6", "execution_time": 0.048902034759521484, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__project_metrics_project_id.1542338148"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:34.117458Z", "completed_at": "2023-09-19T22:45:34.134675Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:34.137048Z", "completed_at": "2023-09-19T22:45:34.137051Z"}], "thread_id": "Thread-2", "execution_time": 0.048178911209106445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.jira__user_enhanced"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:34.113853Z", "completed_at": "2023-09-19T22:45:34.134929Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:34.137236Z", "completed_at": "2023-09-19T22:45:34.137239Z"}], "thread_id": "Thread-4", "execution_time": 0.049118995666503906, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__project_metrics_project_id.154ccc194e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:34.126324Z", "completed_at": "2023-09-19T22:45:34.135148Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:34.137432Z", "completed_at": "2023-09-19T22:45:34.137434Z"}], "thread_id": "Thread-1", "execution_time": 0.04868888854980469, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__user_metrics_user_id.2143177b14"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:34.129188Z", "completed_at": "2023-09-19T22:45:34.135801Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:34.138492Z", "completed_at": "2023-09-19T22:45:34.138495Z"}], "thread_id": "Thread-8", "execution_time": 0.048831939697265625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__user_metrics_user_id.c042bcdd66"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:34.146147Z", "completed_at": "2023-09-19T22:45:34.154129Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:34.154572Z", "completed_at": "2023-09-19T22:45:34.154577Z"}], "thread_id": "Thread-7", "execution_time": 0.013269901275634766, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_jira__project_enhanced_project_id.c18e39faef"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:34.148728Z", "completed_at": "2023-09-19T22:45:34.155372Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:34.155741Z", "completed_at": "2023-09-19T22:45:34.155744Z"}], "thread_id": "Thread-3", "execution_time": 0.0140380859375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_jira__user_enhanced_user_id.aecc00744a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:34.143310Z", "completed_at": "2023-09-19T22:45:34.156350Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:34.157275Z", "completed_at": "2023-09-19T22:45:34.157278Z"}], "thread_id": "Thread-6", "execution_time": 0.016488313674926758, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_jira__project_enhanced_project_id.4f7c58f1d4"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-09-19T22:45:34.151326Z", "completed_at": "2023-09-19T22:45:34.156623Z"}, {"name": "execute", "started_at": "2023-09-19T22:45:34.157498Z", "completed_at": "2023-09-19T22:45:34.157502Z"}], "thread_id": "Thread-1", "execution_time": 0.01593780517578125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_jira__user_enhanced_user_id.c9ee73454a"}], "elapsed_time": 17.020059823989868, "args": {"write_json": true, "which": "generate", "indirect_selection": "eager", "defer": false, "cache_selected_only": false, "project_dir": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "partial_parse": true, "use_colors_file": true, "log_level_file": "debug", "warn_error_options": {"include": [], "exclude": []}, "log_path": "/Users/catherinefritz/Documents/dbt_packages/jira/dbt_jira/integration_tests/logs", "profiles_dir": "/Users/catherinefritz/.dbt", "use_colors": true, "compile": true, "introspect": true, "log_file_max_bytes": 10485760, "log_format_file": "debug", "exclude": [], "quiet": false, "version_check": true, "print": true, "strict_mode": false, "populate_cache": true, "vars": {}, "favor_state": false, "static_parser": true, "select": [], "macro_debugging": false, "printer_width": 80, "log_format": "default", "log_level": "info", "enable_legacy_logger": false, "send_anonymous_usage_stats": true}} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/run-results/v5.json", "dbt_version": "1.7.10", "generated_at": "2024-03-21T15:31:53.984196Z", "invocation_id": "ca58038f-9947-4199-a5f3-eec45b0edb02", "env": {}}, "results": [{"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.461831Z", "completed_at": "2024-03-21T15:31:50.475642Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.477820Z", "completed_at": "2024-03-21T15:31:50.477838Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.020895957946777344, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__comment_tmp", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"comment\"", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.467737Z", "completed_at": "2024-03-21T15:31:50.476089Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.478269Z", "completed_at": "2024-03-21T15:31:50.478277Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.021029233932495117, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__component_tmp", "compiled": true, "compiled_code": "\n\nselect * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"component\"", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__component_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.470279Z", "completed_at": "2024-03-21T15:31:50.477211Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.480574Z", "completed_at": "2024-03-21T15:31:50.480579Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.02284097671508789, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__field_option_tmp", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"field_option\"", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field_option_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.472945Z", "completed_at": "2024-03-21T15:31:50.477486Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.480927Z", "completed_at": "2024-03-21T15:31:50.480935Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.022865772247314453, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__field_tmp", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"field\"", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.486202Z", "completed_at": "2024-03-21T15:31:50.497479Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.499434Z", "completed_at": "2024-03-21T15:31:50.499441Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.017258882522583008, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_field_history_tmp", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"issue_field_history\"", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.488809Z", "completed_at": "2024-03-21T15:31:50.497787Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.499702Z", "completed_at": "2024-03-21T15:31:50.499706Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.017441987991333008, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_link_tmp", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"issue_link\"", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_link_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.494379Z", "completed_at": "2024-03-21T15:31:50.498862Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.501647Z", "completed_at": "2024-03-21T15:31:50.501652Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.017391204833984375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_tmp", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"issue\"", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.491973Z", "completed_at": "2024-03-21T15:31:50.499184Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.501935Z", "completed_at": "2024-03-21T15:31:50.501938Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.018418073654174805, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_multiselect_history_tmp", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"issue_multiselect_history\"", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.507809Z", "completed_at": "2024-03-21T15:31:50.518872Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.520862Z", "completed_at": "2024-03-21T15:31:50.520871Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.01795792579650879, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_type_tmp", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"issue_type\"", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_type_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.510347Z", "completed_at": "2024-03-21T15:31:50.519426Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.521157Z", "completed_at": "2024-03-21T15:31:50.521162Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.018001794815063477, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__priority_tmp", "compiled": true, "compiled_code": "\n\nselect * from \"postgres\".\"jira_integrations_tests_33\".\"priority\"", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__priority_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.514085Z", "completed_at": "2024-03-21T15:31:50.520520Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.523341Z", "completed_at": "2024-03-21T15:31:50.523345Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.01834392547607422, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__project_tmp", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"project\"", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__project_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.516626Z", "completed_at": "2024-03-21T15:31:50.521418Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.524405Z", "completed_at": "2024-03-21T15:31:50.524415Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.019228219985961914, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__resolution_tmp", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"resolution\"", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__resolution_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.528518Z", "completed_at": "2024-03-21T15:31:50.541188Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.543202Z", "completed_at": "2024-03-21T15:31:50.543210Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.019134998321533203, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__sprint_tmp", "compiled": true, "compiled_code": "\n\nselect * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"sprint\"", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__sprint_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.532251Z", "completed_at": "2024-03-21T15:31:50.541547Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.543496Z", "completed_at": "2024-03-21T15:31:50.543500Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.019270896911621094, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__status_category_tmp", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"status_category\"", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status_category_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.536167Z", "completed_at": "2024-03-21T15:31:50.542592Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.545385Z", "completed_at": "2024-03-21T15:31:50.545390Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.019030094146728516, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__status_tmp", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"status\"", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.538784Z", "completed_at": "2024-03-21T15:31:50.542877Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.545707Z", "completed_at": "2024-03-21T15:31:50.545710Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.012845039367675781, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__user_tmp", "compiled": true, "compiled_code": "select * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"user\"", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.554200Z", "completed_at": "2024-03-21T15:31:50.555293Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.560460Z", "completed_at": "2024-03-21T15:31:50.560468Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.013275146484375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.comment", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.556529Z", "completed_at": "2024-03-21T15:31:50.558328Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.562339Z", "completed_at": "2024-03-21T15:31:50.562344Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.013287067413330078, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.component", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.558750Z", "completed_at": "2024-03-21T15:31:50.559776Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.562629Z", "completed_at": "2024-03-21T15:31:50.562633Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.013400077819824219, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.epic", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.551178Z", "completed_at": "2024-03-21T15:31:50.560044Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.562890Z", "completed_at": "2024-03-21T15:31:50.562893Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.016656875610351562, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__version_tmp", "compiled": true, "compiled_code": "\n\nselect * \nfrom \"postgres\".\"jira_integrations_tests_33\".\"version\"", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.568277Z", "completed_at": "2024-03-21T15:31:50.569468Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.574819Z", "completed_at": "2024-03-21T15:31:50.574827Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.010732889175415039, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.field", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.570811Z", "completed_at": "2024-03-21T15:31:50.571885Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.576388Z", "completed_at": "2024-03-21T15:31:50.576400Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.010979890823364258, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.field_option", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.572275Z", "completed_at": "2024-03-21T15:31:50.573243Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.576843Z", "completed_at": "2024-03-21T15:31:50.576847Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.011026859283447266, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.issue", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.573584Z", "completed_at": "2024-03-21T15:31:50.574513Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.577122Z", "completed_at": "2024-03-21T15:31:50.577126Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.011264801025390625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.issue_field_history", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.582302Z", "completed_at": "2024-03-21T15:31:50.584364Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.590173Z", "completed_at": "2024-03-21T15:31:50.590179Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.011958122253417969, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.issue_link", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.585890Z", "completed_at": "2024-03-21T15:31:50.586966Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.591835Z", "completed_at": "2024-03-21T15:31:50.591840Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.012326955795288086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.issue_multiselect_history", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.587401Z", "completed_at": "2024-03-21T15:31:50.588390Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.592128Z", "completed_at": "2024-03-21T15:31:50.592131Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.012502908706665039, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.issue_type", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.588756Z", "completed_at": "2024-03-21T15:31:50.589828Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.592390Z", "completed_at": "2024-03-21T15:31:50.592393Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.012594938278198242, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.priority", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.597439Z", "completed_at": "2024-03-21T15:31:50.598568Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.605170Z", "completed_at": "2024-03-21T15:31:50.605176Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.011534929275512695, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.project", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.599984Z", "completed_at": "2024-03-21T15:31:50.601970Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.606643Z", "completed_at": "2024-03-21T15:31:50.606646Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.011657953262329102, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.project_board", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.602370Z", "completed_at": "2024-03-21T15:31:50.603359Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.606888Z", "completed_at": "2024-03-21T15:31:50.606891Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.01163482666015625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.project_category", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.603734Z", "completed_at": "2024-03-21T15:31:50.604778Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.607146Z", "completed_at": "2024-03-21T15:31:50.607150Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.011702775955200195, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.resolution", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.612039Z", "completed_at": "2024-03-21T15:31:50.613195Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.619472Z", "completed_at": "2024-03-21T15:31:50.619480Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.011581897735595703, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.sprint", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.614408Z", "completed_at": "2024-03-21T15:31:50.615548Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.621007Z", "completed_at": "2024-03-21T15:31:50.621010Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.011365890502929688, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.status", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.615963Z", "completed_at": "2024-03-21T15:31:50.616878Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.621259Z", "completed_at": "2024-03-21T15:31:50.621262Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.011456012725830078, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.status_category", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.617184Z", "completed_at": "2024-03-21T15:31:50.619064Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.621506Z", "completed_at": "2024-03-21T15:31:50.621508Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.011686086654663086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.user", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.626379Z", "completed_at": "2024-03-21T15:31:50.627612Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.640333Z", "completed_at": "2024-03-21T15:31:50.640340Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.01764702796936035, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.user_group", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.628851Z", "completed_at": "2024-03-21T15:31:50.629810Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.641751Z", "completed_at": "2024-03-21T15:31:50.641754Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.01776885986328125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.jira_integration_tests.version", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.645319Z", "completed_at": "2024-03-21T15:31:50.941248Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.942929Z", "completed_at": "2024-03-21T15:31:50.942933Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.3254711627960205, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__field_option", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field_option_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n id\n \n as \n \n id\n \n, \n cast(null as integer) as \n \n parent_id\n \n , \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n name\n \n as \n \n name\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n id as field_id,\n parent_id as parent_field_id,\n name as field_option_name\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field_option\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.630076Z", "completed_at": "2024-03-21T15:31:50.940946Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.942315Z", "completed_at": "2024-03-21T15:31:50.942323Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.34423828125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__comment", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n author_id\n \n as \n \n author_id\n \n, \n \n \n body\n \n as \n \n body\n \n, \n \n \n created\n \n as \n \n created\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_public\n \n as \n \n is_public\n \n, \n \n \n issue_id\n \n as \n \n issue_id\n \n, \n \n \n update_author_id\n \n as \n \n update_author_id\n \n, \n \n \n updated\n \n as \n \n updated\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n author_id as author_user_id,\n body,\n cast(created as timestamp) as created_at,\n id as comment_id,\n issue_id,\n is_public,\n update_author_id as last_update_user_id,\n cast(updated as timestamp) as last_updated_at,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.635499Z", "completed_at": "2024-03-21T15:31:50.941815Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.943594Z", "completed_at": "2024-03-21T15:31:50.943598Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.34642982482910156, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__component", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__component_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n project_id\n \n as \n \n project_id\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n description as component_description,\n id as component_id,\n name as component_name,\n project_id,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__component\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.649760Z", "completed_at": "2024-03-21T15:31:50.989661Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:50.995266Z", "completed_at": "2024-03-21T15:31:50.995275Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.3785827159881592, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__field", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_array\n \n as \n \n is_array\n \n, \n \n \n is_custom\n \n as \n \n is_custom\n \n, \n \n \n name\n \n as \n \n name\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n cast(id as TEXT) as field_id,\n is_array,\n is_custom,\n name as field_name,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.973837Z", "completed_at": "2024-03-21T15:31:51.231730Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:51.232264Z", "completed_at": "2024-03-21T15:31:51.232270Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.30588388442993164, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_link", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_link_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n issue_id\n \n as \n \n issue_id\n \n, \n \n \n related_issue_id\n \n as \n \n related_issue_id\n \n, \n \n \n relationship\n \n as \n \n relationship\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n issue_id,\n related_issue_id,\n relationship,\n _fivetran_synced \n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_link\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.990238Z", "completed_at": "2024-03-21T15:31:51.279167Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:51.281098Z", "completed_at": "2024-03-21T15:31:51.281102Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.33267903327941895, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue", "compiled": true, "compiled_code": "with base as (\n \n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_tmp\"\n where not coalesce(_fivetran_deleted, false)\n),\n\nfields as (\n\n select \n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _original_estimate\n \n as \n \n _original_estimate\n \n, \n \n \n _remaining_estimate\n \n as \n \n _remaining_estimate\n \n, \n \n \n _time_spent\n \n as \n \n _time_spent\n \n, \n \n \n assignee\n \n as \n \n assignee\n \n, \n \n \n created\n \n as \n \n created\n \n, \n \n \n creator\n \n as \n \n creator\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n due_date\n \n as \n \n due_date\n \n, \n \n \n environment\n \n as \n \n environment\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n issue_type\n \n as \n \n issue_type\n \n, \n \n \n key\n \n as \n \n key\n \n, \n \n \n original_estimate\n \n as \n \n original_estimate\n \n, \n \n \n parent_id\n \n as \n \n parent_id\n \n, \n \n \n priority\n \n as \n \n priority\n \n, \n \n \n project\n \n as \n \n project\n \n, \n \n \n remaining_estimate\n \n as \n \n remaining_estimate\n \n, \n \n \n reporter\n \n as \n \n reporter\n \n, \n \n \n resolution\n \n as \n \n resolution\n \n, \n \n \n resolved\n \n as \n \n resolved\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n status_category_changed\n \n as \n \n status_category_changed\n \n, \n \n \n summary\n \n as \n \n summary\n \n, \n \n \n time_spent\n \n as \n \n time_spent\n \n, \n \n \n updated\n \n as \n \n updated\n \n, \n \n \n work_ratio\n \n as \n \n work_ratio\n \n\n\n\n from base\n),\n\nfinal as (\n\n select\n coalesce(original_estimate, _original_estimate) as original_estimate_seconds,\n coalesce(remaining_estimate, _remaining_estimate) as remaining_estimate_seconds,\n coalesce(time_spent, _time_spent) as time_spent_seconds,\n assignee as assignee_user_id,\n cast(created as timestamp) as created_at,\n cast(resolved as timestamp) as resolved_at,\n creator as creator_user_id,\n description as issue_description,\n due_date,\n environment,\n id as issue_id,\n issue_type as issue_type_id,\n key as issue_key,\n parent_id as parent_issue_id,\n priority as priority_id,\n project as project_id,\n reporter as reporter_user_id,\n resolution as resolution_id,\n status as status_id,\n cast(status_category_changed as timestamp) as status_changed_at,\n summary as issue_name,\n cast(updated as timestamp) as updated_at,\n work_ratio,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:50.978057Z", "completed_at": "2024-03-21T15:31:51.278520Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:51.280489Z", "completed_at": "2024-03-21T15:31:51.280496Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.35109901428222656, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_field_history", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n field_id\n \n as \n \n field_id\n \n, \n \n \n issue_id\n \n as \n \n issue_id\n \n, \n \n \n value\n \n as \n \n value\n \n, \n \n \n time\n \n as \n \n time\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n cast(field_id as TEXT) as field_id,\n issue_id,\n cast(time as timestamp)\n as updated_at,\n value as field_value,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:51.024923Z", "completed_at": "2024-03-21T15:31:51.323482Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:51.330148Z", "completed_at": "2024-03-21T15:31:51.330156Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.3381969928741455, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_multiselect_history", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_id\n \n as \n \n _fivetran_id\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n field_id\n \n as \n \n field_id\n \n, \n \n \n issue_id\n \n as \n \n issue_id\n \n, \n \n \n value\n \n as \n \n value\n \n, \n \n \n time\n \n as \n \n time\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n _fivetran_id,\n cast(field_id as TEXT) as field_id,\n issue_id,\n \n cast(time as timestamp)\n as updated_at,\n value as field_value,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:51.281667Z", "completed_at": "2024-03-21T15:31:51.611442Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:51.613594Z", "completed_at": "2024-03-21T15:31:51.613607Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.3618640899658203, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__issue_type", "compiled": true, "compiled_code": "with base as (\n\n select * from \n \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_type_tmp\"\n),\n\nfields as (\n\n select \n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n subtask\n \n as \n \n subtask\n \n\n\n\n from base\n),\n\nfinal as (\n\n select\n description,\n id as issue_type_id,\n name as issue_type_name,\n subtask as is_subtask,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_type\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:51.324934Z", "completed_at": "2024-03-21T15:31:51.638015Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:51.639250Z", "completed_at": "2024-03-21T15:31:51.639261Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.3464479446411133, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__priority", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__priority_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n description as priority_description,\n id as priority_id,\n name as priority_name,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__priority\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:51.330779Z", "completed_at": "2024-03-21T15:31:51.638856Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:51.640832Z", "completed_at": "2024-03-21T15:31:51.640840Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.3455653190612793, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__project", "compiled": true, "compiled_code": "with base as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__project_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n key\n \n as \n \n key\n \n, \n \n \n lead_id\n \n as \n \n lead_id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n permission_scheme_id\n \n as \n \n permission_scheme_id\n \n, \n \n \n project_category_id\n \n as \n \n project_category_id\n \n\n\n\n from base\n\n),\n\nfinal as (\n\n select \n description as project_description,\n id as project_id,\n key as project_key,\n lead_id as project_lead_user_id,\n name as project_name,\n project_category_id,\n permission_scheme_id,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__project\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:51.364055Z", "completed_at": "2024-03-21T15:31:51.688902Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:51.689675Z", "completed_at": "2024-03-21T15:31:51.689683Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.3533482551574707, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__resolution", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__resolution_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n description as resolution_description,\n id as resolution_id,\n name as resolution_name,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__resolution\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:51.644042Z", "completed_at": "2024-03-21T15:31:51.919735Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:51.920819Z", "completed_at": "2024-03-21T15:31:51.920828Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.30823302268981934, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__sprint", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__sprint_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n board_id\n \n as \n \n board_id\n \n, \n \n \n complete_date\n \n as \n \n complete_date\n \n, \n \n \n end_date\n \n as \n \n end_date\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n start_date\n \n as \n \n start_date\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n id as sprint_id,\n name as sprint_name,\n board_id,\n cast(complete_date as timestamp) as completed_at,\n cast(end_date as timestamp) as ended_at,\n cast(start_date as timestamp) as started_at,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__sprint\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:51.673096Z", "completed_at": "2024-03-21T15:31:51.940637Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:51.942302Z", "completed_at": "2024-03-21T15:31:51.942316Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.29885005950927734, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__status_category", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status_category_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n id as status_category_id,\n name as status_category_name\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status_category\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:51.974226Z", "completed_at": "2024-03-21T15:31:51.982316Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:51.982864Z", "completed_at": "2024-03-21T15:31:51.982870Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.010837078094482422, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__field_option_field_id.1b1f37b358", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect field_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field_option\"\nwhere field_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:51.984569Z", "completed_at": "2024-03-21T15:31:51.987988Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:51.988492Z", "completed_at": "2024-03-21T15:31:51.988498Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.00499725341796875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__comment_comment_id.5dec28a22a", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect comment_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment\"\nwhere comment_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:51.990578Z", "completed_at": "2024-03-21T15:31:51.995153Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:51.995709Z", "completed_at": "2024-03-21T15:31:51.995716Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.006543874740600586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__comment_comment_id.004104fac5", "compiled": true, "compiled_code": "\n \n \n\nselect\n comment_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment\"\nwhere comment_id is not null\ngroup by comment_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:51.678058Z", "completed_at": "2024-03-21T15:31:51.969380Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:51.972067Z", "completed_at": "2024-03-21T15:31:51.972075Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.330369234085083, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__status", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n status_category_id\n \n as \n \n status_category_id\n \n\n\n\n from base\n),\n\nfinal as (\n\n select\n description as status_description,\n id as status_id,\n name as status_name,\n status_category_id,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:51.718071Z", "completed_at": "2024-03-21T15:31:51.970439Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:51.973121Z", "completed_at": "2024-03-21T15:31:51.973128Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.28749704360961914, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__user", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n locale\n \n as \n \n locale\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n time_zone\n \n as \n \n time_zone\n \n, \n \n \n username\n \n as \n \n username\n \n\n\n\n from base\n),\n\nfinal as (\n\n select \n email,\n id as user_id,\n locale,\n name as user_display_name,\n time_zone,\n username,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:51.997438Z", "completed_at": "2024-03-21T15:31:52.002667Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.004377Z", "completed_at": "2024-03-21T15:31:52.004384Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.009077072143554688, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__component_component_id.2f017ad5ad", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect component_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__component\"\nwhere component_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.006905Z", "completed_at": "2024-03-21T15:31:52.011853Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.018758Z", "completed_at": "2024-03-21T15:31:52.018769Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.015477895736694336, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__component_component_id.1773ebe913", "compiled": true, "compiled_code": "\n \n \n\nselect\n component_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__component\"\nwhere component_id is not null\ngroup by component_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.012150Z", "completed_at": "2024-03-21T15:31:52.019839Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.021873Z", "completed_at": "2024-03-21T15:31:52.021878Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.012652873992919922, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__field_field_id.34424f1c2b", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect field_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\nwhere field_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.015396Z", "completed_at": "2024-03-21T15:31:52.020615Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.022405Z", "completed_at": "2024-03-21T15:31:52.022408Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.016003131866455078, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__field_field_id.df7b462fff", "compiled": true, "compiled_code": "\n \n \n\nselect\n field_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\nwhere field_id is not null\ngroup by field_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.023396Z", "completed_at": "2024-03-21T15:31:52.029058Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.037241Z", "completed_at": "2024-03-21T15:31:52.037255Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.01687908172607422, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__issue_issue_id.13a4fbe132", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue\"\nwhere issue_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.030181Z", "completed_at": "2024-03-21T15:31:52.039428Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.047889Z", "completed_at": "2024-03-21T15:31:52.047895Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.020869016647338867, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__issue_issue_id.7bb0ee7230", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue\"\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.040565Z", "completed_at": "2024-03-21T15:31:52.049769Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.054583Z", "completed_at": "2024-03-21T15:31:52.054594Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.01678609848022461, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_field_history_field_id__issue_id__updated_at.c01ecbb82c", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n field_id, issue_id, updated_at\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n group by field_id, issue_id, updated_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.056073Z", "completed_at": "2024-03-21T15:31:52.062110Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.067048Z", "completed_at": "2024-03-21T15:31:52.067056Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.020706653594970703, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.dbt_utils_unique_combination_of_columns_stg_jira__issue_multiselect_history__fivetran_id__updated_at.4dd2d1c5a8", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n _fivetran_id, updated_at\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n group by _fivetran_id, updated_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.063558Z", "completed_at": "2024-03-21T15:31:52.072175Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.074213Z", "completed_at": "2024-03-21T15:31:52.074221Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.013889074325561523, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__issue_type_issue_type_id.57419fc343", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_type_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_type\"\nwhere issue_type_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.067390Z", "completed_at": "2024-03-21T15:31:52.073877Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.078750Z", "completed_at": "2024-03-21T15:31:52.078760Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.016983985900878906, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__issue_type_issue_type_id.a89d34aa41", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_type_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_type\"\nwhere issue_type_id is not null\ngroup by issue_type_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.075598Z", "completed_at": "2024-03-21T15:31:52.081191Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.085991Z", "completed_at": "2024-03-21T15:31:52.085997Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.01645517349243164, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__priority_priority_id.ec0c873363", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect priority_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__priority\"\nwhere priority_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.082559Z", "completed_at": "2024-03-21T15:31:52.090270Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.092121Z", "completed_at": "2024-03-21T15:31:52.092127Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.012708187103271484, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__priority_priority_id.79b77ea5d2", "compiled": true, "compiled_code": "\n \n \n\nselect\n priority_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__priority\"\nwhere priority_id is not null\ngroup by priority_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.086364Z", "completed_at": "2024-03-21T15:31:52.091831Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.096566Z", "completed_at": "2024-03-21T15:31:52.096572Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.015864133834838867, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__project_project_id.996fe19522", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect project_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__project\"\nwhere project_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.093458Z", "completed_at": "2024-03-21T15:31:52.098875Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.104381Z", "completed_at": "2024-03-21T15:31:52.104387Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.016601085662841797, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__project_project_id.58d321d374", "compiled": true, "compiled_code": "\n \n \n\nselect\n project_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__project\"\nwhere project_id is not null\ngroup by project_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.100018Z", "completed_at": "2024-03-21T15:31:52.108496Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.110246Z", "completed_at": "2024-03-21T15:31:52.110255Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.013149023056030273, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__resolution_resolution_id.1c04bac8a4", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect resolution_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__resolution\"\nwhere resolution_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.104709Z", "completed_at": "2024-03-21T15:31:52.109868Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.114822Z", "completed_at": "2024-03-21T15:31:52.114834Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.016528844833374023, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__resolution_resolution_id.b3acb37c87", "compiled": true, "compiled_code": "\n \n \n\nselect\n resolution_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__resolution\"\nwhere resolution_id is not null\ngroup by resolution_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.111646Z", "completed_at": "2024-03-21T15:31:52.116970Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.121673Z", "completed_at": "2024-03-21T15:31:52.121680Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.01583695411682129, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__sprint_sprint_id.899b4b77d7", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect sprint_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__sprint\"\nwhere sprint_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.118353Z", "completed_at": "2024-03-21T15:31:52.125667Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.127438Z", "completed_at": "2024-03-21T15:31:52.127444Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.01224827766418457, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__sprint_sprint_id.8a73555fed", "compiled": true, "compiled_code": "\n \n \n\nselect\n sprint_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__sprint\"\nwhere sprint_id is not null\ngroup by sprint_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.122043Z", "completed_at": "2024-03-21T15:31:52.127095Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.132833Z", "completed_at": "2024-03-21T15:31:52.132845Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.016353130340576172, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__status_category_status_category_id.7a89cdfcf0", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect status_category_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status_category\"\nwhere status_category_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.128887Z", "completed_at": "2024-03-21T15:31:52.135040Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.181418Z", "completed_at": "2024-03-21T15:31:52.181428Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.05854487419128418, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__status_category_status_category_id.99c869330a", "compiled": true, "compiled_code": "\n \n \n\nselect\n status_category_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status_category\"\nwhere status_category_id is not null\ngroup by status_category_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.136412Z", "completed_at": "2024-03-21T15:31:52.185653Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.188111Z", "completed_at": "2024-03-21T15:31:52.188119Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.05507707595825195, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__status_status_id.b32a8a0d84", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect status_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status\"\nwhere status_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.181893Z", "completed_at": "2024-03-21T15:31:52.186546Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.188718Z", "completed_at": "2024-03-21T15:31:52.188726Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.05930280685424805, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__status_status_id.0449241b95", "compiled": true, "compiled_code": "\n \n \n\nselect\n status_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status\"\nwhere status_id is not null\ngroup by status_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.198109Z", "completed_at": "2024-03-21T15:31:52.208124Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.216244Z", "completed_at": "2024-03-21T15:31:52.216251Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.021064043045043945, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__user_user_id.b2153f97d2", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect user_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\nwhere user_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.203330Z", "completed_at": "2024-03-21T15:31:52.215210Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.216554Z", "completed_at": "2024-03-21T15:31:52.216558Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.02110910415649414, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__user_user_id.a397e1a23f", "compiled": true, "compiled_code": "\n \n \n\nselect\n user_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\nwhere user_id is not null\ngroup by user_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.232450Z", "completed_at": "2024-03-21T15:31:52.256550Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.258880Z", "completed_at": "2024-03-21T15:31:52.258888Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.03912615776062012, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.int_jira__agg_multiselect_history", "compiled": true, "compiled_code": "\n\n-- issue_multiselect_history splits out an array-type field into multiple rows with unique individual values\n-- to combine with issue_field_history we need to aggregate the multiselect field values.\n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), issue_multiselect_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n \n -- always refresh the most recent day of data\n where cast(updated_at as date) >= \n\n (select max(date_day) from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__agg_multiselect_history\") + ((interval '1 day') * (-1))\n\n\n \n\n),\n\n-- each field value has its own row, but each batch of values for that field has the same timestamp\nbatch_updates as (\n\n select \n *,\n md5(cast(coalesce(cast(field_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(updated_at as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as batch_id\n\n from issue_multiselect_history \n),\n\nconsolidate_batches as (\n\n select \n field_id,\n field_name,\n issue_id,\n updated_at,\n batch_id,\n cast( date_trunc('day', updated_at) as date) as date_day,\n\n -- if the field refers to an object captured in a table elsewhere (ie sprint, users, field_option for custom fields),\n -- the value is actually a foreign key to that table. \n \n string_agg(batch_updates.field_value, ', ')\n\n as field_values \n\n from batch_updates\n\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom consolidate_batches", "relation_name": "\"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__agg_multiselect_history\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.228186Z", "completed_at": "2024-03-21T15:31:52.257383Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.259555Z", "completed_at": "2024-03-21T15:31:52.259561Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.05111885070800781, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_field_history_field_id__issue_id__updated_at.34d1b3eaa1", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), validation_errors as (\n\n select\n field_id, issue_id, updated_at\n from __dbt__cte__int_jira__issue_field_history\n group by field_id, issue_id, updated_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.280201Z", "completed_at": "2024-03-21T15:31:52.289156Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.290653Z", "completed_at": "2024-03-21T15:31:52.290661Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.01795506477355957, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__issue_comments_issue_id.9f16878e45", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__issue_comments as (\n\n\nwith comment as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment\"\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n \n string_agg(comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body, '\\n')\n\n as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments\n) select issue_id\nfrom __dbt__cte__int_jira__issue_comments\nwhere issue_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.275839Z", "completed_at": "2024-03-21T15:31:52.289492Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.291210Z", "completed_at": "2024-03-21T15:31:52.291214Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.019291162490844727, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_multiselect_history__fivetran_id__updated_at.aad394167d", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), validation_errors as (\n\n select\n _fivetran_id, updated_at\n from __dbt__cte__int_jira__issue_multiselect_history\n group by _fivetran_id, updated_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.285298Z", "completed_at": "2024-03-21T15:31:52.290948Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.293203Z", "completed_at": "2024-03-21T15:31:52.293208Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.010107278823852539, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__issue_comments_issue_id.26e3f11046", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__issue_comments as (\n\n\nwith comment as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment\"\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n \n string_agg(comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body, '\\n')\n\n as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments\n) select\n issue_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__issue_comments\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.296572Z", "completed_at": "2024-03-21T15:31:52.311945Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.318745Z", "completed_at": "2024-03-21T15:31:52.318754Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.02595996856689453, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__issue_assign_resolution_issue_id.b3af89c733", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_assign_resolution as (\nwith issue_field_history as (\n \n select *\n from __dbt__cte__int_jira__issue_field_history\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates\n) select issue_id\nfrom __dbt__cte__int_jira__issue_assign_resolution\nwhere issue_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.301893Z", "completed_at": "2024-03-21T15:31:52.312382Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.319132Z", "completed_at": "2024-03-21T15:31:52.319137Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.025907039642333984, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__issue_assign_resolution_issue_id.f41f7c00ab", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_assign_resolution as (\nwith issue_field_history as (\n \n select *\n from __dbt__cte__int_jira__issue_field_history\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates\n) select\n issue_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__issue_assign_resolution\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.306830Z", "completed_at": "2024-03-21T15:31:52.320189Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.322716Z", "completed_at": "2024-03-21T15:31:52.322724Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.022643327713012695, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.int_jira__issue_type_parents", "compiled": true, "compiled_code": "\n-- needs to be a view to use the dbt_utils.star macro in int_jira__issue_users\n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_epic as (\n-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\nwith epic_field_history as (\n\n select *\n from __dbt__cte__int_jira__issue_field_history\n where lower(field_name) like 'epic%link'\n \n),\n\norder_epic_links as (\n\n select\n issue_id,\n cast(field_value as TEXT ) as epic_issue_id,\n\n row_number() over (\n partition by issue_id order by updated_at desc\n ) as row_num\n\n from epic_field_history\n),\n\nlast_epic_link as (\n\n select \n issue_id, \n epic_issue_id \n \n from order_epic_links\n where row_num = 1\n)\n\nselect *\nfrom last_epic_link\n), issue as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue\"\n \n),\n\nissue_type as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_type\"\n), \n-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\n\nissues_w_epics as (\n\n select * \n from __dbt__cte__int_jira__issue_epic\n\n), \n\nissue_enriched_with_epics as (\n\n select\n \n issue.*,\n coalesce(cast(parent_issue_id as TEXT), cast(epic_issue_id as TEXT)) as revised_parent_issue_id\n \n from issue\n \n left join issues_w_epics on issues_w_epics.issue_id = issue.issue_id\n\n), \n\nissue_w_types as (\n\n select \n\n issue_enriched_with_epics.*,\n issue_type.issue_type_name as issue_type\n \n from issue_enriched_with_epics \n \n left join issue_type on issue_type.issue_type_id = issue_enriched_with_epics.issue_type_id\n),\n\nadd_parent_info as (\n\n select\n issue_w_types.*,\n parent.issue_type as parent_issue_type,\n parent.issue_name as parent_issue_name,\n parent.issue_key as parent_issue_key,\n lower(coalesce(parent.issue_type, '')) = 'epic' as is_parent_epic\n\n from\n issue_w_types\n\n -- do a left join so we can grab all issue types from this table in `issue_join`\n left join issue_w_types as parent \n on cast(issue_w_types.revised_parent_issue_id as TEXT) = cast(parent.issue_id as TEXT)\n\n)\n\nselect * \nfrom add_parent_info", "relation_name": "\"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_type_parents\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.329957Z", "completed_at": "2024-03-21T15:31:52.349649Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.351364Z", "completed_at": "2024-03-21T15:31:52.351372Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.029582738876342773, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.int_jira__combine_field_histories", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), issue_field_history as (\n\n select * from __dbt__cte__int_jira__issue_field_history\n\n \n where cast( updated_at as date) >= (select max(valid_starting_on) from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__combine_field_histories\" )\n \n),\n\nissue_multiselect_batch_history as (\n\n select * from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__agg_multiselect_history\"\n\n \n where cast( updated_at as date) >= (select max(valid_starting_on) from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__combine_field_histories\" )\n \n),\n\ncombine_field_history as (\n-- combining all the field histories together\n select \n field_id,\n issue_id,\n updated_at,\n field_value,\n field_name\n\n from issue_field_history\n\n union all\n\n select \n field_id,\n issue_id,\n updated_at,\n field_values as field_value, -- this is an aggregated list but we'll just call it field_value\n field_name\n\n from issue_multiselect_batch_history\n),\n\nget_valid_dates as (\n\n\n select \n field_id,\n issue_id,\n field_value,\n field_name,\n updated_at as valid_starting_at,\n\n -- this value is valid until the next value is updated\n lead(updated_at, 1) over(partition by issue_id, field_id order by updated_at asc) as valid_ending_at, \n\n cast( date_trunc('day', updated_at) as date) as valid_starting_on\n\n from combine_field_history\n\n),\n\nsurrogate_key as (\n\n select \n *,\n md5(cast(coalesce(cast(field_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(valid_starting_at as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as combined_history_id\n\n from get_valid_dates\n\n)\n\nselect * from surrogate_key", "relation_name": "\"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__combine_field_histories\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.324644Z", "completed_at": "2024-03-21T15:31:52.350116Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.352095Z", "completed_at": "2024-03-21T15:31:52.352102Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.03138422966003418, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_epic_issue_id__epic_issue_id.9ddee9201b", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_epic as (\n-- issue-epic relationships are either captured via the issue's parent_issue_id (next-gen projects)\n-- or through the 'Epic Link' field (classic projects)\nwith epic_field_history as (\n\n select *\n from __dbt__cte__int_jira__issue_field_history\n where lower(field_name) like 'epic%link'\n \n),\n\norder_epic_links as (\n\n select\n issue_id,\n cast(field_value as TEXT ) as epic_issue_id,\n\n row_number() over (\n partition by issue_id order by updated_at desc\n ) as row_num\n\n from epic_field_history\n),\n\nlast_epic_link as (\n\n select \n issue_id, \n epic_issue_id \n \n from order_epic_links\n where row_num = 1\n)\n\nselect *\nfrom last_epic_link\n), validation_errors as (\n\n select\n issue_id, epic_issue_id\n from __dbt__cte__int_jira__issue_epic\n group by issue_id, epic_issue_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.345638Z", "completed_at": "2024-03-21T15:31:52.350811Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.353129Z", "completed_at": "2024-03-21T15:31:52.353133Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.009994029998779297, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__agg_multiselect_history_batch_id.7d6d2460a8", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect batch_id\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__agg_multiselect_history\"\nwhere batch_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.358104Z", "completed_at": "2024-03-21T15:31:52.383935Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.385412Z", "completed_at": "2024-03-21T15:31:52.385421Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.030735015869140625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__agg_multiselect_history_batch_id.14b3dea579", "compiled": true, "compiled_code": "\n \n \n\nselect\n batch_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__agg_multiselect_history\"\nwhere batch_id is not null\ngroup by batch_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.361593Z", "completed_at": "2024-03-21T15:31:52.384956Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.386733Z", "completed_at": "2024-03-21T15:31:52.386738Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.031221866607666016, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.dbt_utils_unique_combination_of_columns_int_jira__issue_sprint_issue_id__current_sprint_id.aafda24567", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_sprint as (\n\n\nwith sprint as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__sprint\"\n\n),\n\nfield_history as (\n\n -- sprints don't appear to be capable of multiselect in the UI...\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n),\n\nsprint_field_history as (\n\n select \n field_history.*,\n sprint.*,\n row_number() over (\n partition by field_history.issue_id \n order by field_history.updated_at desc, sprint.started_at desc \n ) as row_num\n from field_history\n join sprint on field_history.field_value = cast(sprint.sprint_id as TEXT)\n where lower(field_history.field_name) = 'sprint'\n),\n\n\nlast_sprint as (\n\n select *\n from sprint_field_history\n \n where row_num = 1\n\n), \n\nsprint_rollovers as (\n\n select \n issue_id,\n count(distinct case when field_value is not null then field_value end) as count_sprint_changes\n \n from sprint_field_history\n group by 1\n\n),\n\nissue_sprint as (\n\n select \n last_sprint.issue_id,\n last_sprint.field_value as current_sprint_id,\n last_sprint.sprint_name as current_sprint_name,\n last_sprint.board_id,\n last_sprint.started_at as sprint_started_at,\n last_sprint.ended_at as sprint_ended_at,\n last_sprint.completed_at as sprint_completed_at,\n coalesce(sprint_rollovers.count_sprint_changes, 0) as count_sprint_changes\n\n from \n last_sprint \n left join sprint_rollovers on sprint_rollovers.issue_id = last_sprint.issue_id\n \n)\n\nselect * from issue_sprint\n), validation_errors as (\n\n select\n issue_id, current_sprint_id\n from __dbt__cte__int_jira__issue_sprint\n group by issue_id, current_sprint_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.390102Z", "completed_at": "2024-03-21T15:31:52.396144Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.396886Z", "completed_at": "2024-03-21T15:31:52.396894Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.009376049041748047, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__issue_type_parents_issue_id.8dd98255b0", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_id\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_type_parents\"\nwhere issue_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.393344Z", "completed_at": "2024-03-21T15:31:52.397164Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.398876Z", "completed_at": "2024-03-21T15:31:52.398882Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.01023721694946289, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__issue_type_parents_issue_id.c07f8c6af3", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_type_parents\"\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.400639Z", "completed_at": "2024-03-21T15:31:52.407897Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.412818Z", "completed_at": "2024-03-21T15:31:52.412832Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.014268159866333008, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.int_jira__daily_field_history", "compiled": true, "compiled_code": "\n\nwith combined_field_histories as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__combine_field_histories\"\n\n \n where valid_starting_on >= (select max(valid_starting_on) from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__daily_field_history\" )\n \n),\n\n\nlimit_to_relevant_fields as (\n\n-- let's remove unncessary rows moving forward and grab field names \n select \n combined_field_histories.*\n\n from combined_field_histories\n\n where lower(field_id) = 'status' \n or lower(field_name) in ('sprint','summary','story points','components')\n \n),\n\norder_daily_values as (\n\n select \n *,\n\n -- want to grab last value for an issue's field for each day\n row_number() over (\n partition by valid_starting_on, issue_id, field_id\n order by valid_starting_at desc\n ) as row_num\n\n from limit_to_relevant_fields\n),\n\n-- only looking at the latest value for each day\nget_latest_daily_value as (\n\n select * \n from order_daily_values\n\n where row_num = 1\n), \n\nfinal as (\n\n select\n field_id,\n issue_id,\n field_name,\n\n -- doing this to figure out what values are actually null and what needs to be backfilled in jira__daily_issue_field_history\n case when field_value is null then 'is_null' else field_value end as field_value,\n valid_starting_at,\n valid_ending_at, \n valid_starting_on,\n\n md5(cast(coalesce(cast(field_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(valid_starting_on as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as issue_field_day_id\n \n from get_latest_daily_value\n)\n\nselect * from final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__daily_field_history\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.408182Z", "completed_at": "2024-03-21T15:31:52.414314Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.415796Z", "completed_at": "2024-03-21T15:31:52.415802Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.012933015823364258, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__combine_field_histories_combined_history_id.943e81a794", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect combined_history_id\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__combine_field_histories\"\nwhere combined_history_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.416097Z", "completed_at": "2024-03-21T15:31:52.420930Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.428871Z", "completed_at": "2024-03-21T15:31:52.428880Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.014831781387329102, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__combine_field_histories_combined_history_id.5b6b492428", "compiled": true, "compiled_code": "\n \n \n\nselect\n combined_history_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__combine_field_histories\"\nwhere combined_history_id is not null\ngroup by combined_history_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.421266Z", "completed_at": "2024-03-21T15:31:52.430345Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.431883Z", "completed_at": "2024-03-21T15:31:52.431894Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.015547990798950195, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.int_jira__pivot_daily_field_history", "compiled": true, "compiled_code": "\n\n-- latest value per issue field (already limited included fields to sprint, status, and var(issue_field_history_columns))\nwith daily_field_history as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__daily_field_history\"\n\n \n where valid_starting_on >= (select max(valid_starting_on) from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__pivot_daily_field_history\" )\n \n),\n\npivot_out as (\n\n -- pivot out default columns (status and sprint) and others specified in the var(issue_field_history_columns)\n -- only days on which a field value was actively changed will have a non-null value. the nulls will need to \n -- be backfilled in the final jira__daily_issue_field_history model\n select \n valid_starting_on, \n issue_id,\n max(case when lower(field_id) = 'status' then field_value end) as status,\n max(case when lower(field_name) = 'sprint' then field_value end) as sprint\n\n ,\n max(case when lower(field_name) = 'summary' then field_value end) as summary\n ,\n max(case when lower(field_name) = 'story points' then field_value end) as story_points\n ,\n max(case when lower(field_name) = 'components' then field_value end) as components\n from daily_field_history\n\n group by 1,2\n),\n\nsurrogate_key as (\n\n select \n *,\n md5(cast(coalesce(cast(valid_starting_on as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as issue_day_id\n\n from pivot_out\n)\n\nselect * from surrogate_key", "relation_name": "\"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__pivot_daily_field_history\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.432299Z", "completed_at": "2024-03-21T15:31:52.440684Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.441360Z", "completed_at": "2024-03-21T15:31:52.441367Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.011106252670288086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__daily_field_history_issue_field_day_id.c910c3df84", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_field_day_id\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__daily_field_history\"\nwhere issue_field_day_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.437539Z", "completed_at": "2024-03-21T15:31:52.442131Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.443368Z", "completed_at": "2024-03-21T15:31:52.443373Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.007591962814331055, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__daily_field_history_issue_field_day_id.bfd34ced78", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_field_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__daily_field_history\"\nwhere issue_field_day_id is not null\ngroup by issue_field_day_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.459519Z", "completed_at": "2024-03-21T15:31:52.463922Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.464558Z", "completed_at": "2024-03-21T15:31:52.464565Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.007195234298706055, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__pivot_daily_field_history_issue_day_id.b697c971fd", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_day_id\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__pivot_daily_field_history\"\nwhere issue_day_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.466596Z", "completed_at": "2024-03-21T15:31:52.470033Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.470559Z", "completed_at": "2024-03-21T15:31:52.470566Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.00523686408996582, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__pivot_daily_field_history_issue_day_id.46c6f9a842", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__pivot_daily_field_history\"\nwhere issue_day_id is not null\ngroup by issue_day_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:51.953318Z", "completed_at": "2024-03-21T15:31:52.459206Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.463269Z", "completed_at": "2024-03-21T15:31:52.463277Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.537895917892456, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira_source.stg_jira__version", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n archived\n \n as \n \n archived\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n overdue\n \n as \n \n overdue\n \n, \n \n \n project_id\n \n as \n \n project_id\n \n, \n \n \n release_date\n \n as \n \n release_date\n \n, \n \n \n released\n \n as \n \n released\n \n, \n \n \n start_date\n \n as \n \n start_date\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \n archived as is_archived,\n description,\n id as version_id,\n name as version_name,\n overdue as is_overdue,\n project_id,\n cast(release_date as timestamp) as release_date,\n released as is_released,\n cast(start_date as timestamp) as start_date\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.492920Z", "completed_at": "2024-03-21T15:31:52.500214Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.501395Z", "completed_at": "2024-03-21T15:31:52.501404Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.010702133178710938, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.not_null_stg_jira__version_version_id.03877ce324", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect version_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version\"\nwhere version_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.496118Z", "completed_at": "2024-03-21T15:31:52.500600Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.501689Z", "completed_at": "2024-03-21T15:31:52.501693Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.010921955108642578, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira_source.unique_stg_jira__version_version_id.08231bd017", "compiled": true, "compiled_code": "\n \n \n\nselect\n version_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version\"\nwhere version_id is not null\ngroup by version_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.522944Z", "completed_at": "2024-03-21T15:31:52.527244Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.528570Z", "completed_at": "2024-03-21T15:31:52.528581Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.011382818222045898, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__issue_versions_issue_id.e2a88132de", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_versions as (\n\n\nwith version as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version\"\n),\n\nversion_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as integer) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n \n string_agg(version.version_name, ', ')\n\n as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final\n) select\n issue_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__issue_versions\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.519118Z", "completed_at": "2024-03-21T15:31:52.527631Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.528964Z", "completed_at": "2024-03-21T15:31:52.528969Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.012577056884765625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__issue_versions_issue_id.54c4cd445e", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_versions as (\n\n\nwith version as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version\"\n),\n\nversion_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as integer) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n \n string_agg(version.version_name, ', ')\n\n as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final\n) select issue_id\nfrom __dbt__cte__int_jira__issue_versions\nwhere issue_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.678828Z", "completed_at": "2024-03-21T15:31:52.712481Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.713502Z", "completed_at": "2024-03-21T15:31:52.713513Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.03866910934448242, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.int_jira__issue_join", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_jira__issue_users as (\n-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n \n\n select\n issue_id,\n coalesce(cast(revised_parent_issue_id as TEXT), cast(parent_issue_id as TEXT)) as parent_issue_id,\n\n \"original_estimate_seconds\",\n \"remaining_estimate_seconds\",\n \"time_spent_seconds\",\n \"assignee_user_id\",\n \"created_at\",\n \"resolved_at\",\n \"creator_user_id\",\n \"issue_description\",\n \"due_date\",\n \"environment\",\n \"issue_type_id\",\n \"issue_key\",\n \"priority_id\",\n \"project_id\",\n \"reporter_user_id\",\n \"resolution_id\",\n \"status_id\",\n \"status_changed_at\",\n \"issue_name\",\n \"updated_at\",\n \"work_ratio\",\n \"_fivetran_synced\",\n \"issue_type\",\n \"parent_issue_type\",\n \"parent_issue_name\",\n \"parent_issue_key\",\n \"is_parent_epic\"\n\n\n \n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_type_parents\"\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join\n), __dbt__cte__int_jira__issue_multiselect_history as (\nwith issue_multiselect_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_multiselect_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n issue_multiselect_history.*,\n lower(fields.field_name) as field_name\n\n from issue_multiselect_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_sprint as (\n\n\nwith sprint as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__sprint\"\n\n),\n\nfield_history as (\n\n -- sprints don't appear to be capable of multiselect in the UI...\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n),\n\nsprint_field_history as (\n\n select \n field_history.*,\n sprint.*,\n row_number() over (\n partition by field_history.issue_id \n order by field_history.updated_at desc, sprint.started_at desc \n ) as row_num\n from field_history\n join sprint on field_history.field_value = cast(sprint.sprint_id as TEXT)\n where lower(field_history.field_name) = 'sprint'\n),\n\n\nlast_sprint as (\n\n select *\n from sprint_field_history\n \n where row_num = 1\n\n), \n\nsprint_rollovers as (\n\n select \n issue_id,\n count(distinct case when field_value is not null then field_value end) as count_sprint_changes\n \n from sprint_field_history\n group by 1\n\n),\n\nissue_sprint as (\n\n select \n last_sprint.issue_id,\n last_sprint.field_value as current_sprint_id,\n last_sprint.sprint_name as current_sprint_name,\n last_sprint.board_id,\n last_sprint.started_at as sprint_started_at,\n last_sprint.ended_at as sprint_ended_at,\n last_sprint.completed_at as sprint_completed_at,\n coalesce(sprint_rollovers.count_sprint_changes, 0) as count_sprint_changes\n\n from \n last_sprint \n left join sprint_rollovers on sprint_rollovers.issue_id = last_sprint.issue_id\n \n)\n\nselect * from issue_sprint\n), __dbt__cte__int_jira__issue_comments as (\n\n\nwith comment as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__comment\"\n\n order by issue_id, created_at asc\n\n),\n\n-- user is a reserved keyword in AWS \njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nagg_comments as (\n\n select \n comment.issue_id,\n \n string_agg(comment.created_at || ' - ' || jira_user.user_display_name || ': ' || comment.body, '\\n')\n\n as conversation,\n count(comment.comment_id) as count_comments\n\n from\n comment \n join jira_user on comment.author_user_id = jira_user.user_id\n\n group by 1\n)\n\nselect * from agg_comments\n), __dbt__cte__int_jira__issue_field_history as (\nwith field_history as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_field_history\"\n \n), \n\nfields as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field\"\n\n), \n\njoined as (\n \n select\n field_history.*,\n lower(fields.field_name) as field_name\n\n from field_history\n join fields using (field_id)\n\n)\n\nselect *\nfrom joined\n), __dbt__cte__int_jira__issue_assign_resolution as (\nwith issue_field_history as (\n \n select *\n from __dbt__cte__int_jira__issue_field_history\n\n), \n\nfiltered as (\n -- we're only looking at assignments and resolutions, which are single-field values\n select *\n from issue_field_history\n\n where (lower(field_id) = 'assignee'\n or lower(field_id) = 'resolutiondate')\n\n and field_value is not null -- remove initial null rows\n),\n\nissue_dates as (\n\n select\n\n issue_id,\n min(case when field_id = 'assignee' then updated_at end) as first_assigned_at,\n max(case when field_id = 'assignee' then updated_at end) as last_assigned_at,\n min(case when field_id = 'resolutiondate' then updated_at end) as first_resolved_at -- in case it's been re-opened\n\n from filtered\n group by 1\n)\n\nselect *\nfrom issue_dates\n), __dbt__cte__int_jira__issue_versions as (\n\n\nwith version as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__version\"\n),\n\nversion_history as (\n\n select *\n from __dbt__cte__int_jira__issue_multiselect_history\n\n where field_id = 'versions'\n or field_id = 'fixVersions'\n),\n\norder_versions as (\n\n select\n *,\n -- using rank so batches stick together\n rank() over (\n partition by field_id, issue_id\n order by updated_at desc\n ) as row_num\n\n from version_history\n),\n\nlatest_versions as (\n\n select \n field_id,\n issue_id,\t\n updated_at,\n cast(field_value as integer) as version_id\n from order_versions\n where row_num = 1\n),\n\nversion_info as (\n\n select \n latest_versions.field_id,\n latest_versions.issue_id,\n \n string_agg(version.version_name, ', ')\n\n as versions\n\n from latest_versions\n join version on latest_versions.version_id = version.version_id\n\n group by 1,2\n),\n\nsplit_versions as (\n\n select \n issue_id,\n case when field_id = 'versions' then versions else null end as affects_versions,\n case when field_id = 'fixVersions' then versions else null end as fixes_versions\n from version_info\n),\n\nfinal as (\n\n select \n issue_id,\n max(affects_versions) as affects_versions,\n max(fixes_versions) as fixes_versions\n from split_versions\n group by 1\n)\n\nselect *\nfrom final\n), issue as (\n\n select *\n from __dbt__cte__int_jira__issue_users\n\n),\n\nproject as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__project\"\n),\n\nstatus as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status\"\n),\n\nstatus_category as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status_category\"\n),\n\nresolution as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__resolution\"\n),\n\n\npriority as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__priority\"\n),\n\n\n\nissue_sprint as (\n\n select *\n from __dbt__cte__int_jira__issue_sprint\n),\n\n\n\nissue_comments as (\n\n select * \n from __dbt__cte__int_jira__issue_comments\n),\n\n\nissue_assignments_and_resolutions as (\n \n select *\n from __dbt__cte__int_jira__issue_assign_resolution\n\n),\n\n\nissue_versions as (\n\n select *\n from __dbt__cte__int_jira__issue_versions\n),\n\n\njoin_issue as (\n\n select\n issue.* \n\n ,project.project_name as project_name\n\n ,status.status_name as current_status\n ,status_category.status_category_name as current_status_category \n ,resolution.resolution_name as resolution_type\n \n ,priority.priority_name as current_priority\n\t\n\n \n ,issue_sprint.current_sprint_id\n ,issue_sprint.current_sprint_name\n ,coalesce(issue_sprint.count_sprint_changes, 0) as count_sprint_changes\n ,issue_sprint.sprint_started_at\n ,issue_sprint.sprint_ended_at\n ,issue_sprint.sprint_completed_at\n ,coalesce(issue_sprint.sprint_started_at <= \n current_timestamp::timestamp\n\n and coalesce(issue_sprint.sprint_completed_at, \n current_timestamp::timestamp\n) >= \n current_timestamp::timestamp\n \n , false) as is_active_sprint -- If sprint doesn't have a start date, default to false. If it does have a start date, but no completed date, this means that the sprint is active. The ended_at timestamp is irrelevant here.\n \n\n ,issue_assignments_and_resolutions.first_assigned_at\n ,issue_assignments_and_resolutions.last_assigned_at\n ,issue_assignments_and_resolutions.first_resolved_at\n\n \n ,issue_versions.fixes_versions\n ,issue_versions.affects_versions\n \n\n \n ,issue_comments.conversation\n ,coalesce(issue_comments.count_comments, 0) as count_comments\n \n \n from issue\n left join project on project.project_id = issue.project_id\n left join status on status.status_id = issue.status_id\n left join status_category on status.status_category_id = status_category.status_category_id\n left join resolution on resolution.resolution_id = issue.resolution_id\n\t\n left join priority on priority.priority_id = issue.priority_id\n\t\n left join issue_assignments_and_resolutions on issue_assignments_and_resolutions.issue_id = issue.issue_id\n\n \n left join issue_versions on issue_versions.issue_id = issue.issue_id\n \n \n \n left join issue_sprint on issue_sprint.issue_id = issue.issue_id\n \n\n \n left join issue_comments on issue_comments.issue_id = issue.issue_id\n \n)\n\nselect * \nfrom join_issue", "relation_name": "\"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_join\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.703030Z", "completed_at": "2024-03-21T15:31:52.713190Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.716224Z", "completed_at": "2024-03-21T15:31:52.716231Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.04056501388549805, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__issue_users_issue_id.480b7b6beb", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__issue_users as (\n-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n \n\n select\n issue_id,\n coalesce(cast(revised_parent_issue_id as TEXT), cast(parent_issue_id as TEXT)) as parent_issue_id,\n\n \"original_estimate_seconds\",\n \"remaining_estimate_seconds\",\n \"time_spent_seconds\",\n \"assignee_user_id\",\n \"created_at\",\n \"resolved_at\",\n \"creator_user_id\",\n \"issue_description\",\n \"due_date\",\n \"environment\",\n \"issue_type_id\",\n \"issue_key\",\n \"priority_id\",\n \"project_id\",\n \"reporter_user_id\",\n \"resolution_id\",\n \"status_id\",\n \"status_changed_at\",\n \"issue_name\",\n \"updated_at\",\n \"work_ratio\",\n \"_fivetran_synced\",\n \"issue_type\",\n \"parent_issue_type\",\n \"parent_issue_name\",\n \"parent_issue_key\",\n \"is_parent_epic\"\n\n\n \n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_type_parents\"\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join\n) select issue_id\nfrom __dbt__cte__int_jira__issue_users\nwhere issue_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.707077Z", "completed_at": "2024-03-21T15:31:52.714058Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.717155Z", "completed_at": "2024-03-21T15:31:52.717159Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.04198098182678223, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__issue_users_issue_id.e3a5962431", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__issue_users as (\n-- just grabs user attributes for issue assignees and reporters \n\nwith issue as (\n\n -- including issue_id in here because snowflake for some reason ignores issue_id,\n -- so we'll just always pull it out and explicitly select it\n \n\n select\n issue_id,\n coalesce(cast(revised_parent_issue_id as TEXT), cast(parent_issue_id as TEXT)) as parent_issue_id,\n\n \"original_estimate_seconds\",\n \"remaining_estimate_seconds\",\n \"time_spent_seconds\",\n \"assignee_user_id\",\n \"created_at\",\n \"resolved_at\",\n \"creator_user_id\",\n \"issue_description\",\n \"due_date\",\n \"environment\",\n \"issue_type_id\",\n \"issue_key\",\n \"priority_id\",\n \"project_id\",\n \"reporter_user_id\",\n \"resolution_id\",\n \"status_id\",\n \"status_changed_at\",\n \"issue_name\",\n \"updated_at\",\n \"work_ratio\",\n \"_fivetran_synced\",\n \"issue_type\",\n \"parent_issue_type\",\n \"parent_issue_name\",\n \"parent_issue_key\",\n \"is_parent_epic\"\n\n\n \n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_type_parents\"\n\n),\n\n-- user is a reserved keyword in AWS\njira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nissue_user_join as (\n\n select\n issue.*,\n assignee.user_display_name as assignee_name,\n assignee.time_zone as assignee_timezone,\n assignee.email as assignee_email,\n reporter.email as reporter_email,\n reporter.user_display_name as reporter_name,\n reporter.time_zone as reporter_timezone\n \n \n from issue\n left join jira_user as assignee on issue.assignee_user_id = assignee.user_id \n left join jira_user as reporter on issue.reporter_user_id = reporter.user_id\n\n)\n\nselect * \nfrom issue_user_join\n) select\n issue_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__issue_users\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.721432Z", "completed_at": "2024-03-21T15:31:52.728650Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.729402Z", "completed_at": "2024-03-21T15:31:52.729410Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.011762142181396484, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__issue_join_issue_id.53391b21a6", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_id\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_join\"\nwhere issue_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.725366Z", "completed_at": "2024-03-21T15:31:52.729667Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.731152Z", "completed_at": "2024-03-21T15:31:52.731159Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.010895729064941406, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__issue_join_issue_id.0bd360ec4b", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_join\"\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.444803Z", "completed_at": "2024-03-21T15:31:52.753273Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.753905Z", "completed_at": "2024-03-21T15:31:52.753914Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.3392329216003418, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.int_jira__field_history_scd", "compiled": true, "compiled_code": "with change_data as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__pivot_daily_field_history\"\n\n), set_values as (\n\n select \n valid_starting_on, \n issue_id,\n issue_day_id,\n status as status_id,\n sum( case when status is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as status_id_field_partition\n\n \n , status\n -- create a batch/partition once a new value is provided\n , sum( case when status is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as status_field_partition\n\n \n , sprint\n -- create a batch/partition once a new value is provided\n , sum( case when sprint is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as sprint_field_partition\n\n \n , summary\n -- create a batch/partition once a new value is provided\n , sum( case when summary is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as summary_field_partition\n\n \n , story_points\n -- create a batch/partition once a new value is provided\n , sum( case when story_points is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as story_points_field_partition\n\n \n , components\n -- create a batch/partition once a new value is provided\n , sum( case when components is null then 0 else 1 end) over ( partition by issue_id \n order by valid_starting_on rows unbounded preceding) as components_field_partition\n\n \n \n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes field values if that field was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid \n select \n valid_starting_on, \n issue_id,\n issue_day_id,\n first_value( status ) over (\n partition by issue_id, status_id_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as status_id\n \n \n\n -- grab the value that started this batch/partition\n , first_value( status ) over (\n partition by issue_id, status_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as status\n\n \n\n -- grab the value that started this batch/partition\n , first_value( sprint ) over (\n partition by issue_id, sprint_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as sprint\n\n \n\n -- grab the value that started this batch/partition\n , first_value( summary ) over (\n partition by issue_id, summary_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as summary\n\n \n\n -- grab the value that started this batch/partition\n , first_value( story_points ) over (\n partition by issue_id, story_points_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as story_points\n\n \n\n -- grab the value that started this batch/partition\n , first_value( components ) over (\n partition by issue_id, components_field_partition \n order by valid_starting_on asc rows between unbounded preceding and current row) as components\n\n \n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "relation_name": "\"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__field_history_scd\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.798234Z", "completed_at": "2024-03-21T15:31:52.801714Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.803016Z", "completed_at": "2024-03-21T15:31:52.803024Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.0189361572265625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__field_history_scd_issue_day_id.21b932e949", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__field_history_scd\"\nwhere issue_day_id is not null\ngroup by issue_day_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.795113Z", "completed_at": "2024-03-21T15:31:52.802118Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:52.803313Z", "completed_at": "2024-03-21T15:31:52.803318Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.01984095573425293, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__field_history_scd_issue_day_id.327ac0856c", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_day_id\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__field_history_scd\"\nwhere issue_day_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:52.785420Z", "completed_at": "2024-03-21T15:31:53.092371Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.092920Z", "completed_at": "2024-03-21T15:31:53.092928Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.3341810703277588, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.int_jira__issue_calendar_spine", "compiled": true, "compiled_code": "\n\nwith spine as (\n\n \n \n \n \n \n\n\n select * \n from (\n \n\n\n\n\n\nwith rawdata as (\n\n \n\n \n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n \n p0.generated_number * power(2, 0)\n + \n \n p1.generated_number * power(2, 1)\n + \n \n p2.generated_number * power(2, 2)\n + \n \n p3.generated_number * power(2, 3)\n + \n \n p4.generated_number * power(2, 4)\n + \n \n p5.generated_number * power(2, 5)\n + \n \n p6.generated_number * power(2, 6)\n + \n \n p7.generated_number * power(2, 7)\n + \n \n p8.generated_number * power(2, 8)\n + \n \n p9.generated_number * power(2, 9)\n + \n \n p10.generated_number * power(2, 10)\n \n \n + 1\n as generated_number\n\n from\n\n \n p as p0\n cross join \n \n p as p1\n cross join \n \n p as p2\n cross join \n \n p as p3\n cross join \n \n p as p4\n cross join \n \n p as p5\n cross join \n \n p as p6\n cross join \n \n p as p7\n cross join \n \n p as p8\n cross join \n \n p as p9\n cross join \n \n p as p10\n \n \n\n )\n\n select *\n from unioned\n where generated_number <= 1457\n order by generated_number\n\n\n\n),\n\nall_periods as (\n\n select (\n \n\n cast('2020-04-01' as date) + ((interval '1 day') * (row_number() over (order by 1) - 1))\n\n\n ) as date_day\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_day <= \n\n \n (current_timestamp at time zone 'utc')::timestamp\n + ((interval '1 week') * (1))\n\n\n\n)\n\nselect * from filtered\n\n \n ) as date_spine\n\n \n -- compare to the earliest possible open_until date so that if a resolved issue is updated after a long period of inactivity, we don't need a full refresh\n -- essentially we need to be able to backfill\n where cast( date_day as date) >= (select min(earliest_open_until_date) from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_calendar_spine\" )\n \n),\n\nissue_history_scd as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__field_history_scd\"\n),\n\nissue_dates as (\n\n select\n issue_history_scd.issue_id,\n cast( date_trunc('day', issue.created_at) as date) as created_on,\n -- resolved_at will become null if an issue is marked as un-resolved. if this sorta thing happens often, you may want to run full-refreshes of the field_history models often\n -- if it's not resolved include everything up to today. if it is, look at the last time it was updated \n cast(date_trunc('day', case when issue.resolved_at is null then \n (current_timestamp at time zone 'utc')::timestamp\n else cast(issue_history_scd.valid_starting_on as timestamp) end) as date) as open_until\n from issue_history_scd\n left join \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue\" as issue\n on issue_history_scd.issue_id = issue.issue_id\n),\n\nissue_spine as (\n\n select \n cast(spine.date_day as date) as date_day,\n issue_dates.issue_id,\n -- will take the table-wide min of this in the incremental block at the top of this model\n min(issue_dates.open_until) as earliest_open_until_date\n\n from spine \n join issue_dates on\n issue_dates.created_on <= spine.date_day\n and \n\n issue_dates.open_until + ((interval '1 month') * (1))\n\n >= spine.date_day\n -- if we cut off issues, we're going to have to do a full refresh to catch issues that have been un-resolved\n\n group by 1,2\n),\n\nsurrogate_key as (\n\n select \n date_day,\n issue_id,\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as issue_day_id,\n earliest_open_until_date\n\n from issue_spine\n\n where date_day <= cast( date_trunc('day', \n (current_timestamp at time zone 'utc')::timestamp\n) as date)\n)\nselect * from surrogate_key", "relation_name": "\"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_calendar_spine\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.139660Z", "completed_at": "2024-03-21T15:31:53.146816Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.147956Z", "completed_at": "2024-03-21T15:31:53.147966Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.029191970825195312, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__issue_calendar_spine_issue_day_id.a9512b8e8a", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_day_id\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_calendar_spine\"\nwhere issue_day_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.143094Z", "completed_at": "2024-03-21T15:31:53.147551Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.149172Z", "completed_at": "2024-03-21T15:31:53.149177Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.027553081512451172, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__issue_calendar_spine_issue_day_id.c49483d2e5", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_calendar_spine\"\nwhere issue_day_id is not null\ngroup by issue_day_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.123666Z", "completed_at": "2024-03-21T15:31:53.465949Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.466472Z", "completed_at": "2024-03-21T15:31:53.466478Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.37749600410461426, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.jira__daily_issue_field_history", "compiled": true, "compiled_code": "\n\n-- grab column names that were pivoted out-- in intermediate/field_history/\nwith pivoted_daily_history as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__field_history_scd\"\n\n \n \n where valid_starting_on >= (select max(date_day) from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__daily_issue_field_history\" )\n\n-- If no issue fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist \n-- those values into the future.\n\n), most_recent_data as ( \n select \n *\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__daily_issue_field_history\"\n where date_day = (select max(date_day) from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__daily_issue_field_history\" )\n\n\n\n), field_option as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__field_option\"\n),\n\nstatuses as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__status\"\n),\n\nissue_types as (\n \n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__issue_type\"\n),\n\n\ncomponents as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__component\"\n),\n\n\n-- in intermediate/field_history/\ncalendar as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_calendar_spine\"\n\n \n where date_day >= (select max(date_day) from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__daily_issue_field_history\" )\n \n),\n\njoined as (\n\n select\n calendar.date_day,\n calendar.issue_id\n\n \n \n \n \n \n \n \n \n \n , coalesce(pivoted_daily_history.status_id, most_recent_data.status_id) as status_id\n\n \n \n \n , coalesce(pivoted_daily_history.status, most_recent_data.status) as status\n\n \n \n \n , coalesce(pivoted_daily_history.sprint, most_recent_data.sprint) as sprint\n\n \n \n \n , coalesce(pivoted_daily_history.summary, most_recent_data.summary) as summary\n\n \n \n \n , coalesce(pivoted_daily_history.story_points, most_recent_data.story_points) as story_points\n\n \n \n \n , coalesce(pivoted_daily_history.components, most_recent_data.components) as components\n\n \n \n\n \n \n from calendar\n left join pivoted_daily_history \n on calendar.issue_id = pivoted_daily_history.issue_id\n and calendar.date_day = pivoted_daily_history.valid_starting_on\n \n \n left join most_recent_data\n on calendar.issue_id = most_recent_data.issue_id\n and calendar.date_day = most_recent_data.date_day\n \n),\n\nset_values as (\n select\n date_day,\n issue_id,\n joined.status_id,\n sum( case when joined.status_id is null then 0 else 1 end) over ( partition by issue_id\n order by date_day rows unbounded preceding) as status_id_field_partition\n\n -- list of exception columns\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n , coalesce(field_option_sprint.field_option_name, joined.sprint) as sprint\n -- create a batch/partition once a new value is provided\n , sum( case when joined.sprint is null then 0 else 1 end) over ( partition by issue_id\n order by date_day rows unbounded preceding) as sprint_field_partition\n\n \n \n \n , coalesce(field_option_summary.field_option_name, joined.summary) as summary\n -- create a batch/partition once a new value is provided\n , sum( case when joined.summary is null then 0 else 1 end) over ( partition by issue_id\n order by date_day rows unbounded preceding) as summary_field_partition\n\n \n \n \n , coalesce(field_option_story_points.field_option_name, joined.story_points) as story_points\n -- create a batch/partition once a new value is provided\n , sum( case when joined.story_points is null then 0 else 1 end) over ( partition by issue_id\n order by date_day rows unbounded preceding) as story_points_field_partition\n\n \n \n \n , coalesce(components.component_name, joined.components) as components\n , sum(case when joined.components is null then 0 else 1 end) over (partition by issue_id order by date_day rows unbounded preceding) as component_field_partition\n\n \n \n\n from joined\n\n \n \n \n \n \n \n \n \n \n \n \n \n left join field_option as field_option_sprint\n on cast(field_option_sprint.field_id as TEXT) = joined.sprint\n\n \n \n \n left join field_option as field_option_summary\n on cast(field_option_summary.field_id as TEXT) = joined.summary\n\n \n \n \n left join field_option as field_option_story_points\n on cast(field_option_story_points.field_id as TEXT) = joined.story_points\n\n \n \n \n left join components \n on cast(components.component_id as TEXT) = joined.components\n \n \n \n),\n\nfill_values as (\n\n select \n date_day,\n issue_id,\n first_value( status_id ) over (\n partition by issue_id, status_id_field_partition \n order by date_day asc rows between unbounded preceding and current row) as status_id\n\n \n \n \n \n \n \n \n \n \n \n \n \n -- grab the value that started this batch/partition\n , first_value( sprint ) over (\n partition by issue_id, sprint_field_partition \n order by date_day asc rows between unbounded preceding and current row) as sprint\n\n \n \n \n -- grab the value that started this batch/partition\n , first_value( summary ) over (\n partition by issue_id, summary_field_partition \n order by date_day asc rows between unbounded preceding and current row) as summary\n\n \n \n \n -- grab the value that started this batch/partition\n , first_value( story_points ) over (\n partition by issue_id, story_points_field_partition \n order by date_day asc rows between unbounded preceding and current row) as story_points\n\n \n \n \n , first_value(components) over (\n partition by issue_id, component_field_partition \n order by date_day asc rows between unbounded preceding and current row) as components\n\n \n \n\n from set_values\n),\n\nfix_null_values as (\n\n select \n date_day,\n issue_id\n\n \n \n \n \n \n \n \n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when status_id = 'is_null' then null else status_id end as status_id\n\n \n \n \n \n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when sprint = 'is_null' then null else sprint end as sprint\n\n \n \n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when summary = 'is_null' then null else summary end as summary\n\n \n \n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when story_points = 'is_null' then null else story_points end as story_points\n\n \n \n \n , case when components = 'is_null' then null else components end as components\n\n \n \n\n from fill_values\n\n),\n\nsurrogate_key as (\n\n select\n fix_null_values.date_day,\n fix_null_values.issue_id,\n statuses.status_name as status\n\n \n \n \n \n \n \n \n \n , fix_null_values.status_id as status_id\n\n \n \n \n \n \n , fix_null_values.sprint as sprint\n\n \n \n \n , fix_null_values.summary as summary\n\n \n \n \n , fix_null_values.story_points as story_points\n\n \n \n \n , fix_null_values.components as components\n\n \n \n\n , md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(issue_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as issue_day_id\n\n from fix_null_values\n\n left join statuses\n on cast(statuses.status_id as TEXT) = fix_null_values.status_id\n)\n\nselect *\nfrom surrogate_key", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira\".\"jira__daily_issue_field_history\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.523498Z", "completed_at": "2024-03-21T15:31:53.529644Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.530918Z", "completed_at": "2024-03-21T15:31:53.530925Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.023799896240234375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_jira__daily_issue_field_history_issue_day_id.d13b058bcd", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_day_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__daily_issue_field_history\"\nwhere issue_day_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.526148Z", "completed_at": "2024-03-21T15:31:53.530084Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.531189Z", "completed_at": "2024-03-21T15:31:53.531193Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.022655010223388672, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_jira__daily_issue_field_history_issue_day_id.75c24d3154", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__daily_issue_field_history\"\nwhere issue_day_id is not null\ngroup by issue_day_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.513316Z", "completed_at": "2024-03-21T15:31:53.828952Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.829491Z", "completed_at": "2024-03-21T15:31:53.829498Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.35710787773132324, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.jira__issue_enhanced", "compiled": true, "compiled_code": "with issue as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_int_jira\".\"int_jira__issue_join\"\n),daily_issue_field_history as (\n \n select\n *,\n row_number() over (partition by issue_id order by date_day desc) = 1 as latest_record\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__daily_issue_field_history\"\n\n),\n\nlatest_issue_field_history as (\n \n select\n *\n from daily_issue_field_history\n where latest_record\n),\n\nfinal as (\n\n select \n \n issue.*,\n\n \n (\n (\n (\n ((coalesce(resolved_at, \n current_timestamp::timestamp\n))::date - (created_at)::date)\n * 24 + date_part('hour', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp) - date_part('hour', (created_at)::timestamp))\n * 60 + date_part('minute', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp) - date_part('minute', (created_at)::timestamp))\n * 60 + floor(date_part('second', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp)) - floor(date_part('second', (created_at)::timestamp)))\n open_duration_seconds,\n\n -- this will be null if no one has been assigned\n \n (\n (\n (\n ((coalesce(resolved_at, \n current_timestamp::timestamp\n))::date - (first_assigned_at)::date)\n * 24 + date_part('hour', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp) - date_part('hour', (first_assigned_at)::timestamp))\n * 60 + date_part('minute', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp) - date_part('minute', (first_assigned_at)::timestamp))\n * 60 + floor(date_part('second', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp)) - floor(date_part('second', (first_assigned_at)::timestamp)))\n any_assignment_duration_seconds,\n\n -- if an issue is not currently assigned this will not be null\n \n (\n (\n (\n ((coalesce(resolved_at, \n current_timestamp::timestamp\n))::date - (last_assigned_at)::date)\n * 24 + date_part('hour', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp) - date_part('hour', (last_assigned_at)::timestamp))\n * 60 + date_part('minute', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp) - date_part('minute', (last_assigned_at)::timestamp))\n * 60 + floor(date_part('second', (coalesce(resolved_at, \n current_timestamp::timestamp\n))::timestamp)) - floor(date_part('second', (last_assigned_at)::timestamp)))\n last_assignment_duration_seconds \n\n , status, sprint, summary, story_points, components\n\n from issue\n \n left join latest_issue_field_history \n on issue.issue_id = latest_issue_field_history.issue_id\n \n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.887892Z", "completed_at": "2024-03-21T15:31:53.895964Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.898886Z", "completed_at": "2024-03-21T15:31:53.898892Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.03207969665527344, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_jira__issue_enhanced_issue_id.6b18e0db38", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect issue_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\"\nwhere issue_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.891128Z", "completed_at": "2024-03-21T15:31:53.896276Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.899215Z", "completed_at": "2024-03-21T15:31:53.899219Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.0318453311920166, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_jira__issue_enhanced_issue_id.fec6e723ee", "compiled": true, "compiled_code": "\n \n \n\nselect\n issue_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\"\nwhere issue_id is not null\ngroup by issue_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.901522Z", "completed_at": "2024-03-21T15:31:53.923245Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.938258Z", "completed_at": "2024-03-21T15:31:53.938271Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.04141497611999512, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.jira__project_enhanced", "compiled": true, "compiled_code": "with __dbt__cte__int_jira__project_metrics as (\nwith issue as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\"\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_seconds,\n\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_assigned_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n group by project_id \n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as numeric(28,6) ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as numeric(28,6) ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics\n), project as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__project\"\n),\n\nproject_metrics as (\n\n select * \n from __dbt__cte__int_jira__project_metrics\n),\n\n-- user is reserved in AWS\njira_user as (\n-- to grab the project lead\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nagg_epics as (\n\n select \n project_id,\n \n string_agg(issue_name, ', ')\n\n as epics\n\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\"\n where lower(issue_type) = 'epic'\n -- should we limit to active epics?\n group by 1\n\n),\n\n\n\nagg_components as (\n -- i'm just aggregating the components here, but perhaps pivoting out components (and epics) \n -- into columns where the values are the number of issues completed and/or open would be more valuable\n select \n project_id,\n \n string_agg(component_name, ', ')\n\n as components\n\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__component\"\n\n group by 1\n),\n\n\n\nproject_join as (\n\n select\n project.*,\n jira_user.user_display_name as project_lead_user_name,\n jira_user.email as project_lead_email,\n agg_epics.epics,\n \n \n agg_components.components,\n \n\n coalesce(project_metrics.count_closed_issues, 0) as count_closed_issues,\n coalesce(project_metrics.count_open_issues, 0) as count_open_issues,\n coalesce(project_metrics.count_open_assigned_issues, 0) as count_open_assigned_issues,\n\n -- days\n project_metrics.avg_close_time_days,\n project_metrics.avg_assigned_close_time_days,\n\n project_metrics.avg_age_currently_open_days,\n project_metrics.avg_age_currently_open_assigned_days,\n\n project_metrics.median_close_time_days, \n project_metrics.median_age_currently_open_days,\n project_metrics.median_assigned_close_time_days,\n project_metrics.median_age_currently_open_assigned_days,\n\n -- seconds\n project_metrics.avg_close_time_seconds,\n project_metrics.avg_assigned_close_time_seconds,\n\n project_metrics.avg_age_currently_open_seconds,\n project_metrics.avg_age_currently_open_assigned_seconds,\n\n project_metrics.median_close_time_seconds, \n project_metrics.median_age_currently_open_seconds,\n project_metrics.median_assigned_close_time_seconds,\n project_metrics.median_age_currently_open_assigned_seconds\n\n from project\n left join project_metrics on project.project_id = project_metrics.project_id\n left join jira_user on project.project_lead_user_id = jira_user.user_id\n left join agg_epics on project.project_id = agg_epics.project_id \n \n \n left join agg_components on project.project_id = agg_components.project_id \n \n\n)\n\nselect * from project_join", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira\".\"jira__project_enhanced\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.918348Z", "completed_at": "2024-03-21T15:31:53.933808Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.940147Z", "completed_at": "2024-03-21T15:31:53.940154Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.042038917541503906, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__project_metrics_project_id.1542338148", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__project_metrics as (\nwith issue as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\"\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_seconds,\n\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_assigned_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n group by project_id \n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as numeric(28,6) ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as numeric(28,6) ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics\n) select project_id\nfrom __dbt__cte__int_jira__project_metrics\nwhere project_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.924377Z", "completed_at": "2024-03-21T15:31:53.939702Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.942796Z", "completed_at": "2024-03-21T15:31:53.942801Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.021986961364746094, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__project_metrics_project_id.154ccc194e", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__project_metrics as (\nwith issue as (\n\n select * \n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\"\n where project_id is not null\n),\n\ncalculate_medians as (\n\n select \n project_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then open_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_seconds,\n\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_assigned_close_time_seconds,\n round( cast(\n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then any_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6) ), 0) as median_age_currently_open_assigned_seconds\n\n from issue\n\n group by project_id \n),\n\n-- grouping because the medians were calculated using window functions (except in postgres)\nmedian_metrics as (\n\n select \n project_id, \n median_close_time_seconds, \n median_age_currently_open_seconds,\n median_assigned_close_time_seconds,\n median_age_currently_open_assigned_seconds\n\n from calculate_medians\n group by 1,2,3,4,5\n),\n\n\n-- get appropriate counts + sums to calculate averages\nproject_issues as (\n select\n project_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n -- using the below to calculate averages\n\n -- assigned issues\n sum(case when resolved_at is null and assignee_user_id is not null then 1 else 0 end) as count_open_assigned_issues,\n sum(case when resolved_at is not null and assignee_user_id is not null then 1 else 0 end) as count_closed_assigned_issues,\n\n -- close time \n sum(case when resolved_at is not null then open_duration_seconds else 0 end) as sum_close_time_seconds,\n sum(case when resolved_at is not null then any_assignment_duration_seconds else 0 end) as sum_assigned_close_time_seconds,\n\n -- age of currently open tasks\n sum(case when resolved_at is null then open_duration_seconds else 0 end) as sum_currently_open_duration_seconds,\n sum(case when resolved_at is null then any_assignment_duration_seconds else 0 end) as sum_currently_open_assigned_duration_seconds\n\n from issue\n\n group by 1\n),\n\ncalculate_avg_metrics as (\n\n select\n project_id,\n count_closed_issues,\n count_open_issues,\n count_open_assigned_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_closed_assigned_issues = 0 then 0 else\n round( cast(sum_assigned_close_time_seconds * 1.0 / count_closed_assigned_issues as numeric(28,6) ), 0) end as avg_assigned_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_currently_open_duration_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds,\n\n case when count_open_assigned_issues = 0 then 0 else\n round( cast(sum_currently_open_assigned_duration_seconds * 1.0 / count_open_assigned_issues as numeric(28,6) ), 0) end as avg_age_currently_open_assigned_seconds\n\n from project_issues\n),\n\n-- join medians and averages + convert to days\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n\n -- there are 86400 seconds in a day\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_assigned_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_assigned_days,\n\n median_metrics.median_close_time_seconds, \n median_metrics.median_age_currently_open_seconds,\n median_metrics.median_assigned_close_time_seconds,\n median_metrics.median_age_currently_open_assigned_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days,\n round( cast(median_metrics.median_assigned_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_assigned_close_time_days,\n round( cast(median_metrics.median_age_currently_open_assigned_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_assigned_days\n \n from calculate_avg_metrics\n left join median_metrics using(project_id)\n)\n\nselect * from join_metrics\n) select\n project_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__project_metrics\nwhere project_id is not null\ngroup by project_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.928606Z", "completed_at": "2024-03-21T15:31:53.940450Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.943380Z", "completed_at": "2024-03-21T15:31:53.943384Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.02245616912841797, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.jira.jira__user_enhanced", "compiled": true, "compiled_code": "with __dbt__cte__int_jira__user_metrics as (\nwith issue as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\" \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_close_time_seconds,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_age_currently_open_seconds\n\n from issue\n\n group by 1 \n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics\n), jira_user as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira_source\".\"stg_jira__user\"\n),\n\nuser_metrics as (\n\n select *\n from __dbt__cte__int_jira__user_metrics\n),\n\nissue as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\" \n),\n\nuser_project as (\n\n select \n assignee_user_id,\n project_name\n\n from issue\n group by 1,2\n\n),\n\nagg_user_projects as (\n\n select \n assignee_user_id,\n \n string_agg(project_name, ', ')\n\n as projects\n\n from user_project\n group by 1\n),\n\nuser_join as (\n\n select\n jira_user.*,\n agg_user_projects.projects, -- projects they've worked on issues for\n coalesce(user_metrics.count_closed_issues, 0) as count_closed_issues,\n coalesce(user_metrics.count_open_issues, 0) as count_open_issues,\n\n -- days\n user_metrics.avg_close_time_days,\n user_metrics.avg_age_currently_open_days,\n \n user_metrics.median_close_time_days,\n user_metrics.median_age_currently_open_days,\n\n -- seconds\n user_metrics.avg_close_time_seconds,\n user_metrics.avg_age_currently_open_seconds,\n \n user_metrics.median_close_time_seconds,\n user_metrics.median_age_currently_open_seconds\n\n from jira_user \n left join user_metrics on jira_user.user_id = user_metrics.user_id\n left join agg_user_projects on jira_user.user_id = agg_user_projects.assignee_user_id\n)\n\nselect * from user_join", "relation_name": "\"postgres\".\"jira_integrations_tests_33_jira\".\"jira__user_enhanced\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.945662Z", "completed_at": "2024-03-21T15:31:53.956706Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.962169Z", "completed_at": "2024-03-21T15:31:53.962177Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.02403998374938965, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_int_jira__user_metrics_user_id.2143177b14", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_jira__user_metrics as (\nwith issue as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\" \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_close_time_seconds,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_age_currently_open_seconds\n\n from issue\n\n group by 1 \n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics\n) select user_id\nfrom __dbt__cte__int_jira__user_metrics\nwhere user_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.950891Z", "completed_at": "2024-03-21T15:31:53.961724Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.966859Z", "completed_at": "2024-03-21T15:31:53.966865Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.023507118225097656, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_int_jira__user_metrics_user_id.c042bcdd66", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_jira__user_metrics as (\nwith issue as (\n\n select *\n from \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__issue_enhanced\" \n where assignee_user_id is not null\n),\n\ncalculate_medians as (\n\n select \n assignee_user_id as user_id,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is not null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_close_time_seconds,\n round( cast( \n\n percentile_cont( \n 0.5 )\n within group ( order by case when resolved_at is null then last_assignment_duration_seconds end )\n /* have to group by partition field */\n\n as numeric(28,6)), 0) as median_age_currently_open_seconds\n\n from issue\n\n group by 1 \n),\n\n-- grouping because the medians were calculated using window functions (except postgres)\nmedian_metrics as (\n\n select \n user_id, \n median_close_time_seconds, \n median_age_currently_open_seconds\n\n from calculate_medians\n group by 1,2,3\n),\n\n\nuser_issues as (\n\n select\n assignee_user_id as user_id,\n sum(case when resolved_at is not null then 1 else 0 end) as count_closed_issues,\n sum(case when resolved_at is null then 1 else 0 end) as count_open_issues,\n\n sum(case when resolved_at is not null then last_assignment_duration_seconds end) as sum_close_time_seconds,\n sum(case when resolved_at is null then last_assignment_duration_seconds end) as sum_current_open_seconds\n\n from issue\n\n group by 1\n\n),\n\ncalculate_avg_metrics as (\n\n select \n user_id,\n count_closed_issues,\n count_open_issues,\n\n case when count_closed_issues = 0 then 0 else\n round( cast(sum_close_time_seconds * 1.0 / count_closed_issues as numeric(28,6) ), 0) end as avg_close_time_seconds,\n\n case when count_open_issues = 0 then 0 else\n round( cast(sum_current_open_seconds * 1.0 / count_open_issues as numeric(28,6) ), 0) end as avg_age_currently_open_seconds\n\n from user_issues\n),\n\njoin_metrics as (\n\n select\n calculate_avg_metrics.*,\n round( cast(calculate_avg_metrics.avg_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as avg_close_time_days,\n round( cast(calculate_avg_metrics.avg_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as avg_age_currently_open_days,\n\n median_metrics.median_close_time_seconds,\n median_metrics.median_age_currently_open_seconds,\n\n round( cast(median_metrics.median_close_time_seconds / 86400.0 as numeric(28,6) ), 0) as median_close_time_days,\n round( cast(median_metrics.median_age_currently_open_seconds / 86400.0 as numeric(28,6) ), 0) as median_age_currently_open_days\n \n from calculate_avg_metrics\n left join median_metrics using(user_id)\n)\n\nselect * from join_metrics\n) select\n user_id as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_jira__user_metrics\nwhere user_id is not null\ngroup by user_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.958410Z", "completed_at": "2024-03-21T15:31:53.967137Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.970018Z", "completed_at": "2024-03-21T15:31:53.970022Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.02123117446899414, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_jira__project_enhanced_project_id.4f7c58f1d4", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect project_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__project_enhanced\"\nwhere project_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.962487Z", "completed_at": "2024-03-21T15:31:53.967747Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.970692Z", "completed_at": "2024-03-21T15:31:53.970698Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.018379688262939453, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_jira__project_enhanced_project_id.c18e39faef", "compiled": true, "compiled_code": "\n \n \n\nselect\n project_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__project_enhanced\"\nwhere project_id is not null\ngroup by project_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.972007Z", "completed_at": "2024-03-21T15:31:53.979437Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.980389Z", "completed_at": "2024-03-21T15:31:53.980395Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.012336015701293945, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.not_null_jira__user_enhanced_user_id.aecc00744a", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect user_id\nfrom \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__user_enhanced\"\nwhere user_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-03-21T15:31:53.976410Z", "completed_at": "2024-03-21T15:31:53.980111Z"}, {"name": "execute", "started_at": "2024-03-21T15:31:53.981591Z", "completed_at": "2024-03-21T15:31:53.981601Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.011308670043945312, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.jira.unique_jira__user_enhanced_user_id.c9ee73454a", "compiled": true, "compiled_code": "\n \n \n\nselect\n user_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"jira_integrations_tests_33_jira\".\"jira__user_enhanced\"\nwhere user_id is not null\ngroup by user_id\nhaving count(*) > 1\n\n\n", "relation_name": null}], "elapsed_time": 4.60219407081604, "args": {"use_colors": true, "indirect_selection": "eager", "exclude": [], "log_format_file": "debug", "populate_cache": true, "log_path": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests/logs", "log_level_file": "debug", "partial_parse_file_diff": true, "print": true, "vars": {}, "cache_selected_only": false, "quiet": false, "defer": false, "invocation_command": "dbt docs generate -t postgres", "partial_parse": true, "enable_legacy_logger": false, "write_json": true, "log_format": "default", "select": [], "favor_state": false, "version_check": true, "profiles_dir": "/Users/joseph.markiewicz/.dbt", "warn_error_options": {"include": [], "exclude": []}, "compile": true, "project_dir": "/Users/joseph.markiewicz/Documents/dbt_packages/jira/dbt_jira/integration_tests", "static_parser": true, "target": "postgres", "which": "generate", "show_resource_report": false, "strict_mode": false, "log_level": "info", "use_colors_file": true, "empty_catalog": false, "introspect": true, "log_file_max_bytes": 10485760, "printer_width": 80, "macro_debugging": false, "static": false, "send_anonymous_usage_stats": true}} \ No newline at end of file diff --git a/integration_tests/ci/sample.profiles.yml b/integration_tests/ci/sample.profiles.yml index 2be3ff1a..7a25db05 100644 --- a/integration_tests/ci/sample.profiles.yml +++ b/integration_tests/ci/sample.profiles.yml @@ -16,13 +16,13 @@ integration_tests: pass: "{{ env_var('CI_REDSHIFT_DBT_PASS') }}" dbname: "{{ env_var('CI_REDSHIFT_DBT_DBNAME') }}" port: 5439 - schema: jira_integrations_tests_3 + schema: jira_integrations_tests_41 threads: 8 bigquery: type: bigquery method: service-account-json project: 'dbt-package-testing' - schema: jira_integrations_tests_3 + schema: jira_integrations_tests_41 threads: 8 keyfile_json: "{{ env_var('GCLOUD_SERVICE_KEY') | as_native }}" snowflake: @@ -33,7 +33,7 @@ integration_tests: role: "{{ env_var('CI_SNOWFLAKE_DBT_ROLE') }}" database: "{{ env_var('CI_SNOWFLAKE_DBT_DATABASE') }}" warehouse: "{{ env_var('CI_SNOWFLAKE_DBT_WAREHOUSE') }}" - schema: jira_integrations_tests_3 + schema: jira_integrations_tests_41 threads: 8 postgres: type: postgres @@ -42,13 +42,13 @@ integration_tests: pass: "{{ env_var('CI_POSTGRES_DBT_PASS') }}" dbname: "{{ env_var('CI_POSTGRES_DBT_DBNAME') }}" port: 5432 - schema: jira_integrations_tests_3 + schema: jira_integrations_tests_41 threads: 8 databricks: catalog: "{{ env_var('CI_DATABRICKS_DBT_CATALOG') }}" host: "{{ env_var('CI_DATABRICKS_DBT_HOST') }}" http_path: "{{ env_var('CI_DATABRICKS_DBT_HTTP_PATH') }}" - schema: jira_integrations_tests_3 + schema: jira_integrations_tests_41 threads: 2 token: "{{ env_var('CI_DATABRICKS_DBT_TOKEN') }}" type: databricks diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 490b0226..558107f0 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,12 +1,11 @@ name: 'jira_integration_tests' -version: '0.15.0' +version: '0.16.0' config-version: 2 profile: 'integration_tests' - vars: jira_source: - jira_schema: jira_integrations_tests_3 + jira_schema: jira_integrations_tests_41 jira_comment_identifier: "comment" jira_component_identifier: "component" jira_epic_identifier: "epic" diff --git a/integration_tests/packages.yml b/integration_tests/packages.yml index 0f560248..c9c4e3cc 100644 --- a/integration_tests/packages.yml +++ b/integration_tests/packages.yml @@ -1,3 +1,2 @@ - packages: - local: ../ \ No newline at end of file diff --git a/integration_tests/seeds/field.csv b/integration_tests/seeds/field.csv index 159959d3..5d58641d 100644 --- a/integration_tests/seeds/field.csv +++ b/integration_tests/seeds/field.csv @@ -3,4 +3,6 @@ timeoriginalestimate,2020-11-23 22:20:39.685,false,false,Original Estimate creator,2020-11-23 22:20:39.711,false,false,Creator issuerestriction,2020-11-23 22:20:39.643,false,false,Restrict to components,2020-11-23 22:20:40.643,false,false,Components -summary,2020-11-23 22:20:41.553,false,false,Summary \ No newline at end of file +summary,2020-11-23 22:20:41.553,false,false,Summary +epiclink,2020-11-23 22:20:41.553,false,false,Epic-Link +epic,2020-11-23 22:20:41.553,false,false,Epic \ No newline at end of file diff --git a/integration_tests/seeds/issue_field_history.csv b/integration_tests/seeds/issue_field_history.csv index c28c2d52..7e93f942 100644 --- a/integration_tests/seeds/issue_field_history.csv +++ b/integration_tests/seeds/issue_field_history.csv @@ -3,4 +3,6 @@ created,10027,2020-11-10 19:19:41.472,2020-11-12 12:20:53.478,2020-11-10T19:19:4 customfield_10104,10027,2020-11-10 19:19:41.472,2020-11-12 12:20:53.472,3.0 summary,10027,2020-11-10 19:19:41.472,2020-11-12 12:20:53.500,"As a developer, I'd like to update story status during the sprint >> Click the Active sprints link at the top right of the screen to go to the Active sprints where the current Sprint's items can be updated" components,10018,2020-11-10 19:19:41.472,2020-11-19 12:20:53.500,10019 -summary,10018,2020-11-10 19:19:41.472,2020-11-19 12:20:53.500,10026 \ No newline at end of file +summary,10018,2020-11-10 19:19:41.472,2020-11-19 12:20:53.500,10026 +epic,10015,2020-11-10 19:19:41.472,2020-11-19 12:20:53.500,1111111 +epiclink,10018,2020-11-10 19:19:41.472,2020-11-12 12:20:53.500,https://ulr-here/epic-key \ No newline at end of file diff --git a/models/intermediate/int_jira__issue_epic.sql b/models/intermediate/int_jira__issue_epic.sql index e65176f3..618c0fc6 100644 --- a/models/intermediate/int_jira__issue_epic.sql +++ b/models/intermediate/int_jira__issue_epic.sql @@ -12,7 +12,7 @@ order_epic_links as ( select issue_id, - cast(field_value as {{ dbt.type_int() }} ) as epic_issue_id, + cast(field_value as {{ dbt.type_string() }} ) as epic_issue_id, row_number() over ( partition by issue_id order by updated_at desc diff --git a/models/intermediate/int_jira__issue_type_parents.sql b/models/intermediate/int_jira__issue_type_parents.sql index 1e85a857..145ce35a 100644 --- a/models/intermediate/int_jira__issue_type_parents.sql +++ b/models/intermediate/int_jira__issue_type_parents.sql @@ -32,7 +32,7 @@ issue_enriched_with_epics as ( select issue.*, - coalesce(parent_issue_id, epic_issue_id) as revised_parent_issue_id + coalesce(cast(parent_issue_id as {{ dbt.type_string() }}), cast(epic_issue_id as {{ dbt.type_string() }})) as revised_parent_issue_id from issue @@ -65,7 +65,8 @@ add_parent_info as ( issue_w_types -- do a left join so we can grab all issue types from this table in `issue_join` - left join issue_w_types as parent on issue_w_types.revised_parent_issue_id = parent.issue_id + left join issue_w_types as parent + on cast(issue_w_types.revised_parent_issue_id as {{ dbt.type_string() }}) = cast(parent.issue_id as {{ dbt.type_string() }}) ) diff --git a/models/intermediate/int_jira__issue_users.sql b/models/intermediate/int_jira__issue_users.sql index 7937f1f9..52dc873d 100644 --- a/models/intermediate/int_jira__issue_users.sql +++ b/models/intermediate/int_jira__issue_users.sql @@ -8,7 +8,7 @@ with issue as ( select issue_id, - coalesce(revised_parent_issue_id, parent_issue_id) as parent_issue_id, + coalesce(cast(revised_parent_issue_id as {{ dbt.type_string() }}), cast(parent_issue_id as {{ dbt.type_string() }})) as parent_issue_id, {{ dbt_utils.star(from=ref('int_jira__issue_type_parents'), except=except_columns) }}