diff --git a/CHANGELOG.md b/CHANGELOG.md index b21d837..178a3db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# dbt_asana_source v0.5.1 +## Under the Hood +- Leveraged the `{{ dbt_utils.type_timestamp() }}` macro within the staging models for all timestamp fields. + - This is needed as certain Redshift warehouses sync these fields as `timestamptz` by default which causes compilation errors in downstream models. This macro safely removes timezone values from the UTC timestamps and ensures success in downstream transformations. + +## Contributors +- @shreveasaurus ([#18](https://github.com/fivetran/dbt_asana_source/pull/18)). + # dbt_asana_source v0.5.0 🎉 dbt v1.0.0 Compatibility 🎉 ## 🚨 Breaking Changes 🚨 diff --git a/dbt_project.yml b/dbt_project.yml index c8fa64e..b60d054 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,7 +1,7 @@ config-version: 2 name: 'asana_source' -version: '0.5.0' +version: '0.5.1' require-dbt-version: [">=1.0.0", "<2.0.0"] diff --git a/docs/catalog.json b/docs/catalog.json index 4064161..21e9b2a 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": "0.19.0", "generated_at": "2021-03-22T21:23:10.285696Z", "invocation_id": "bfc7fb27-b9ab-4502-8f1f-2285a837b343", "env": {}}, "nodes": {"model.asana_source.stg_asana__task_tag": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__task_tag", "comment": null, "owner": null}, "columns": {"tag_id": {"type": "INT64", "comment": null, "index": 1, "name": "tag_id"}, "task_id": {"type": "INT64", "comment": null, "index": 2, "name": "task_id"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 64.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 4.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__task_tag"}, "model.asana_source.stg_asana__project_task": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__project_task", "comment": null, "owner": null}, "columns": {"project_id": {"type": "INT64", "comment": null, "index": 1, "name": "project_id"}, "task_id": {"type": "INT64", "comment": null, "index": 2, "name": "task_id"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 32.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__project_task"}, "model.asana_source.stg_asana__task_section_tmp": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__task_section_tmp", "comment": null, "owner": null}, "columns": {"section_id": {"type": "INT64", "comment": null, "index": 1, "name": "section_id"}, "task_id": {"type": "INT64", "comment": null, "index": 2, "name": "task_id"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 3, "name": "_fivetran_synced"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 48.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__task_section_tmp"}, "model.asana_source.stg_asana__user": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__user", "comment": null, "owner": null}, "columns": {"user_id": {"type": "INT64", "comment": null, "index": 1, "name": "user_id"}, "email": {"type": "STRING", "comment": null, "index": 2, "name": "email"}, "user_name": {"type": "STRING", "comment": null, "index": 3, "name": "user_name"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1520.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 20.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__user"}, "model.asana_source.stg_asana__task_tag_tmp": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__task_tag_tmp", "comment": null, "owner": null}, "columns": {"tag_id": {"type": "INT64", "comment": null, "index": 1, "name": "tag_id"}, "task_id": {"type": "INT64", "comment": null, "index": 2, "name": "task_id"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 3, "name": "_fivetran_synced"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 96.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 4.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__task_tag_tmp"}, "model.asana_source.stg_asana__team": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__team", "comment": null, "owner": null}, "columns": {"team_id": {"type": "INT64", "comment": null, "index": 1, "name": "team_id"}, "team_name": {"type": "STRING", "comment": null, "index": 2, "name": "team_name"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1050.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 25.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__team"}, "model.asana_source.stg_asana__story_tmp": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__story_tmp", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "comment": null, "index": 1, "name": "id"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 2, "name": "_fivetran_synced"}, "created_at": {"type": "DATETIME", "comment": null, "index": 3, "name": "created_at"}, "created_by_id": {"type": "INT64", "comment": null, "index": 4, "name": "created_by_id"}, "hearted": {"type": "INT64", "comment": null, "index": 5, "name": "hearted"}, "num_hearts": {"type": "INT64", "comment": null, "index": 6, "name": "num_hearts"}, "source": {"type": "STRING", "comment": null, "index": 7, "name": "source"}, "target_id": {"type": "INT64", "comment": null, "index": 8, "name": "target_id"}, "text": {"type": "STRING", "comment": null, "index": 9, "name": "text"}, "type": {"type": "STRING", "comment": null, "index": 10, "name": "type"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 285.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 3.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__story_tmp"}, "model.asana_source.stg_asana__project": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__project", "comment": null, "owner": null}, "columns": {"project_id": {"type": "INT64", "comment": null, "index": 1, "name": "project_id"}, "is_archived": {"type": "BOOL", "comment": null, "index": 2, "name": "is_archived"}, "created_at": {"type": "DATETIME", "comment": null, "index": 3, "name": "created_at"}, "current_status": {"type": "STRING", "comment": null, "index": 4, "name": "current_status"}, "due_date": {"type": "DATETIME", "comment": null, "index": 5, "name": "due_date"}, "modified_at": {"type": "DATETIME", "comment": null, "index": 6, "name": "modified_at"}, "project_name": {"type": "STRING", "comment": null, "index": 7, "name": "project_name"}, "owner_user_id": {"type": "INT64", "comment": null, "index": 8, "name": "owner_user_id"}, "is_public": {"type": "INT64", "comment": null, "index": 9, "name": "is_public"}, "team_id": {"type": "INT64", "comment": null, "index": 10, "name": "team_id"}, "workspace_id": {"type": "INT64", "comment": null, "index": 11, "name": "workspace_id"}, "notes": {"type": "STRING", "comment": null, "index": 12, "name": "notes"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1448.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 16.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__project"}, "model.asana_source.stg_asana__story": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__story", "comment": null, "owner": null}, "columns": {"story_id": {"type": "INT64", "comment": null, "index": 1, "name": "story_id"}, "created_at": {"type": "DATETIME", "comment": null, "index": 2, "name": "created_at"}, "created_by_user_id": {"type": "INT64", "comment": null, "index": 3, "name": "created_by_user_id"}, "target_task_id": {"type": "INT64", "comment": null, "index": 4, "name": "target_task_id"}, "story_content": {"type": "STRING", "comment": null, "index": 5, "name": "story_content"}, "event_type": {"type": "STRING", "comment": null, "index": 6, "name": "event_type"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 222.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 3.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__story"}, "model.asana_source.stg_asana__project_task_tmp": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__project_task_tmp", "comment": null, "owner": null}, "columns": {"project_id": {"type": "INT64", "comment": null, "index": 1, "name": "project_id"}, "task_id": {"type": "INT64", "comment": null, "index": 2, "name": "task_id"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 3, "name": "_fivetran_synced"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 48.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__project_task_tmp"}, "model.asana_source.stg_asana__task_follower_tmp": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__task_follower_tmp", "comment": null, "owner": null}, "columns": {"task_id": {"type": "INT64", "comment": null, "index": 1, "name": "task_id"}, "user_id": {"type": "INT64", "comment": null, "index": 2, "name": "user_id"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 3, "name": "_fivetran_synced"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 24.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 1.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__task_follower_tmp"}, "model.asana_source.stg_asana__task_follower": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__task_follower", "comment": null, "owner": null}, "columns": {"task_id": {"type": "INT64", "comment": null, "index": 1, "name": "task_id"}, "user_id": {"type": "INT64", "comment": null, "index": 2, "name": "user_id"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 16.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 1.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__task_follower"}, "model.asana_source.stg_asana__team_tmp": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__team_tmp", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "comment": null, "index": 1, "name": "id"}, "_fivetran_deleted": {"type": "BOOL", "comment": null, "index": 2, "name": "_fivetran_deleted"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 3, "name": "_fivetran_synced"}, "name": {"type": "STRING", "comment": null, "index": 4, "name": "name"}, "organization_id": {"type": "INT64", "comment": null, "index": 5, "name": "organization_id"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1475.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 25.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__team_tmp"}, "model.asana_source.stg_asana__task_section": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__task_section", "comment": null, "owner": null}, "columns": {"section_id": {"type": "INT64", "comment": null, "index": 1, "name": "section_id"}, "task_id": {"type": "INT64", "comment": null, "index": 2, "name": "task_id"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 32.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__task_section"}, "model.asana_source.stg_asana__project_tmp": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__project_tmp", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "comment": null, "index": 1, "name": "id"}, "_fivetran_deleted": {"type": "BOOL", "comment": null, "index": 2, "name": "_fivetran_deleted"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 3, "name": "_fivetran_synced"}, "archived": {"type": "BOOL", "comment": null, "index": 4, "name": "archived"}, "color": {"type": "STRING", "comment": null, "index": 5, "name": "color"}, "created_at": {"type": "DATETIME", "comment": null, "index": 6, "name": "created_at"}, "current_status": {"type": "STRING", "comment": null, "index": 7, "name": "current_status"}, "due_date": {"type": "DATETIME", "comment": null, "index": 8, "name": "due_date"}, "modified_at": {"type": "DATETIME", "comment": null, "index": 9, "name": "modified_at"}, "name": {"type": "STRING", "comment": null, "index": 10, "name": "name"}, "notes": {"type": "STRING", "comment": null, "index": 11, "name": "notes"}, "owner_id": {"type": "INT64", "comment": null, "index": 12, "name": "owner_id"}, "public": {"type": "INT64", "comment": null, "index": 13, "name": "public"}, "team_id": {"type": "INT64", "comment": null, "index": 14, "name": "team_id"}, "workspace_id": {"type": "INT64", "comment": null, "index": 15, "name": "workspace_id"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1710.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 16.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__project_tmp"}, "model.asana_source.stg_asana__tag": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__tag", "comment": null, "owner": null}, "columns": {"tag_id": {"type": "INT64", "comment": null, "index": 1, "name": "tag_id"}, "tag_name": {"type": "STRING", "comment": null, "index": 2, "name": "tag_name"}, "created_at": {"type": "DATETIME", "comment": null, "index": 3, "name": "created_at"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 850.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 17.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__tag"}, "model.asana_source.stg_asana__user_tmp": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__user_tmp", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "comment": null, "index": 1, "name": "id"}, "_fivetran_deleted": {"type": "BOOL", "comment": null, "index": 2, "name": "_fivetran_deleted"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 3, "name": "_fivetran_synced"}, "email": {"type": "STRING", "comment": null, "index": 4, "name": "email"}, "name": {"type": "STRING", "comment": null, "index": 5, "name": "name"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1700.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 20.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__user_tmp"}, "model.asana_source.stg_asana__tag_tmp": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__tag_tmp", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "comment": null, "index": 1, "name": "id"}, "_fivetran_deleted": {"type": "BOOL", "comment": null, "index": 2, "name": "_fivetran_deleted"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 3, "name": "_fivetran_synced"}, "color": {"type": "INT64", "comment": null, "index": 4, "name": "color"}, "created_at": {"type": "DATETIME", "comment": null, "index": 5, "name": "created_at"}, "message": {"type": "INT64", "comment": null, "index": 6, "name": "message"}, "name": {"type": "STRING", "comment": null, "index": 7, "name": "name"}, "notes": {"type": "INT64", "comment": null, "index": 8, "name": "notes"}, "workspace_id": {"type": "INT64", "comment": null, "index": 9, "name": "workspace_id"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1139.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 17.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__tag_tmp"}, "model.asana_source.stg_asana__task": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__task", "comment": null, "owner": null}, "columns": {"task_id": {"type": "INT64", "comment": null, "index": 1, "name": "task_id"}, "assignee_user_id": {"type": "INT64", "comment": null, "index": 2, "name": "assignee_user_id"}, "assignee_status": {"type": "STRING", "comment": null, "index": 3, "name": "assignee_status"}, "is_completed": {"type": "BOOL", "comment": null, "index": 4, "name": "is_completed"}, "completed_at": {"type": "INT64", "comment": null, "index": 5, "name": "completed_at"}, "completed_by_user_id": {"type": "INT64", "comment": null, "index": 6, "name": "completed_by_user_id"}, "created_at": {"type": "DATETIME", "comment": null, "index": 7, "name": "created_at"}, "due_date": {"type": "INT64", "comment": null, "index": 8, "name": "due_date"}, "modified_at": {"type": "DATETIME", "comment": null, "index": 9, "name": "modified_at"}, "task_name": {"type": "STRING", "comment": null, "index": 10, "name": "task_name"}, "parent_task_id": {"type": "INT64", "comment": null, "index": 11, "name": "parent_task_id"}, "start_date": {"type": "INT64", "comment": null, "index": 12, "name": "start_date"}, "task_description": {"type": "INT64", "comment": null, "index": 13, "name": "task_description"}, "workspace_id": {"type": "INT64", "comment": null, "index": 14, "name": "workspace_id"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 82.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 1.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__task"}, "model.asana_source.stg_asana__section_tmp": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__section_tmp", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "comment": null, "index": 1, "name": "id"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 2, "name": "_fivetran_synced"}, "created_at": {"type": "DATETIME", "comment": null, "index": 3, "name": "created_at"}, "name": {"type": "STRING", "comment": null, "index": 4, "name": "name"}, "project_id": {"type": "INT64", "comment": null, "index": 5, "name": "project_id"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 858.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 13.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__section_tmp"}, "model.asana_source.stg_asana__section": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__section", "comment": null, "owner": null}, "columns": {"section_id": {"type": "INT64", "comment": null, "index": 1, "name": "section_id"}, "created_at": {"type": "DATETIME", "comment": null, "index": 2, "name": "created_at"}, "section_name": {"type": "STRING", "comment": null, "index": 3, "name": "section_name"}, "project_id": {"type": "INT64", "comment": null, "index": 4, "name": "project_id"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 754.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 13.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__section"}, "model.asana_source.stg_asana__task_tmp": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__task_tmp", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "comment": null, "index": 1, "name": "id"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 2, "name": "_fivetran_synced"}, "assignee_id": {"type": "INT64", "comment": null, "index": 3, "name": "assignee_id"}, "assignee_status": {"type": "STRING", "comment": null, "index": 4, "name": "assignee_status"}, "completed": {"type": "BOOL", "comment": null, "index": 5, "name": "completed"}, "completed_at": {"type": "INT64", "comment": null, "index": 6, "name": "completed_at"}, "completed_by_id": {"type": "INT64", "comment": null, "index": 7, "name": "completed_by_id"}, "created_at": {"type": "DATETIME", "comment": null, "index": 8, "name": "created_at"}, "due_at": {"type": "INT64", "comment": null, "index": 9, "name": "due_at"}, "due_on": {"type": "INT64", "comment": null, "index": 10, "name": "due_on"}, "hearted": {"type": "BOOL", "comment": null, "index": 11, "name": "hearted"}, "modified_at": {"type": "DATETIME", "comment": null, "index": 12, "name": "modified_at"}, "name": {"type": "STRING", "comment": null, "index": 13, "name": "name"}, "notes": {"type": "INT64", "comment": null, "index": 14, "name": "notes"}, "num_hearts": {"type": "INT64", "comment": null, "index": 15, "name": "num_hearts"}, "parent_id": {"type": "INT64", "comment": null, "index": 16, "name": "parent_id"}, "start_on": {"type": "INT64", "comment": null, "index": 17, "name": "start_on"}, "workspace_id": {"type": "INT64", "comment": null, "index": 18, "name": "workspace_id"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 99.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 1.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "model.asana_source.stg_asana__task_tmp"}, "seed.asana_source_integration_tests.story_data": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "name": "story_data", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "comment": null, "index": 1, "name": "id"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 2, "name": "_fivetran_synced"}, "created_at": {"type": "DATETIME", "comment": null, "index": 3, "name": "created_at"}, "created_by_id": {"type": "INT64", "comment": null, "index": 4, "name": "created_by_id"}, "hearted": {"type": "INT64", "comment": null, "index": 5, "name": "hearted"}, "num_hearts": {"type": "INT64", "comment": null, "index": 6, "name": "num_hearts"}, "source": {"type": "STRING", "comment": null, "index": 7, "name": "source"}, "target_id": {"type": "INT64", "comment": null, "index": 8, "name": "target_id"}, "text": {"type": "STRING", "comment": null, "index": 9, "name": "text"}, "type": {"type": "STRING", "comment": null, "index": 10, "name": "type"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 285.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 3.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "seed.asana_source_integration_tests.story_data"}, "seed.asana_source_integration_tests.task_tag_data": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "name": "task_tag_data", "comment": null, "owner": null}, "columns": {"tag_id": {"type": "INT64", "comment": null, "index": 1, "name": "tag_id"}, "task_id": {"type": "INT64", "comment": null, "index": 2, "name": "task_id"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 3, "name": "_fivetran_synced"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 96.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 4.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "seed.asana_source_integration_tests.task_tag_data"}, "seed.asana_source_integration_tests.tag_data": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "name": "tag_data", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "comment": null, "index": 1, "name": "id"}, "_fivetran_deleted": {"type": "BOOL", "comment": null, "index": 2, "name": "_fivetran_deleted"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 3, "name": "_fivetran_synced"}, "color": {"type": "INT64", "comment": null, "index": 4, "name": "color"}, "created_at": {"type": "DATETIME", "comment": null, "index": 5, "name": "created_at"}, "message": {"type": "INT64", "comment": null, "index": 6, "name": "message"}, "name": {"type": "STRING", "comment": null, "index": 7, "name": "name"}, "notes": {"type": "INT64", "comment": null, "index": 8, "name": "notes"}, "workspace_id": {"type": "INT64", "comment": null, "index": 9, "name": "workspace_id"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1139.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 17.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "seed.asana_source_integration_tests.tag_data"}, "seed.asana_source_integration_tests.section_data": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "name": "section_data", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "comment": null, "index": 1, "name": "id"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 2, "name": "_fivetran_synced"}, "created_at": {"type": "DATETIME", "comment": null, "index": 3, "name": "created_at"}, "name": {"type": "STRING", "comment": null, "index": 4, "name": "name"}, "project_id": {"type": "INT64", "comment": null, "index": 5, "name": "project_id"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 858.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 13.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "seed.asana_source_integration_tests.section_data"}, "seed.asana_source_integration_tests.project_data": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "name": "project_data", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "comment": null, "index": 1, "name": "id"}, "_fivetran_deleted": {"type": "BOOL", "comment": null, "index": 2, "name": "_fivetran_deleted"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 3, "name": "_fivetran_synced"}, "archived": {"type": "BOOL", "comment": null, "index": 4, "name": "archived"}, "color": {"type": "STRING", "comment": null, "index": 5, "name": "color"}, "created_at": {"type": "DATETIME", "comment": null, "index": 6, "name": "created_at"}, "current_status": {"type": "STRING", "comment": null, "index": 7, "name": "current_status"}, "due_date": {"type": "DATETIME", "comment": null, "index": 8, "name": "due_date"}, "modified_at": {"type": "DATETIME", "comment": null, "index": 9, "name": "modified_at"}, "name": {"type": "STRING", "comment": null, "index": 10, "name": "name"}, "notes": {"type": "STRING", "comment": null, "index": 11, "name": "notes"}, "owner_id": {"type": "INT64", "comment": null, "index": 12, "name": "owner_id"}, "public": {"type": "INT64", "comment": null, "index": 13, "name": "public"}, "team_id": {"type": "INT64", "comment": null, "index": 14, "name": "team_id"}, "workspace_id": {"type": "INT64", "comment": null, "index": 15, "name": "workspace_id"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1710.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 16.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "seed.asana_source_integration_tests.project_data"}, "seed.asana_source_integration_tests.task_data": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "name": "task_data", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "comment": null, "index": 1, "name": "id"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 2, "name": "_fivetran_synced"}, "assignee_id": {"type": "INT64", "comment": null, "index": 3, "name": "assignee_id"}, "assignee_status": {"type": "STRING", "comment": null, "index": 4, "name": "assignee_status"}, "completed": {"type": "BOOL", "comment": null, "index": 5, "name": "completed"}, "completed_at": {"type": "INT64", "comment": null, "index": 6, "name": "completed_at"}, "completed_by_id": {"type": "INT64", "comment": null, "index": 7, "name": "completed_by_id"}, "created_at": {"type": "DATETIME", "comment": null, "index": 8, "name": "created_at"}, "due_at": {"type": "INT64", "comment": null, "index": 9, "name": "due_at"}, "due_on": {"type": "INT64", "comment": null, "index": 10, "name": "due_on"}, "hearted": {"type": "BOOL", "comment": null, "index": 11, "name": "hearted"}, "modified_at": {"type": "DATETIME", "comment": null, "index": 12, "name": "modified_at"}, "name": {"type": "STRING", "comment": null, "index": 13, "name": "name"}, "notes": {"type": "INT64", "comment": null, "index": 14, "name": "notes"}, "num_hearts": {"type": "INT64", "comment": null, "index": 15, "name": "num_hearts"}, "parent_id": {"type": "INT64", "comment": null, "index": 16, "name": "parent_id"}, "start_on": {"type": "INT64", "comment": null, "index": 17, "name": "start_on"}, "workspace_id": {"type": "INT64", "comment": null, "index": 18, "name": "workspace_id"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 99.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 1.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "seed.asana_source_integration_tests.task_data"}, "seed.asana_source_integration_tests.user_data": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "name": "user_data", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "comment": null, "index": 1, "name": "id"}, "_fivetran_deleted": {"type": "BOOL", "comment": null, "index": 2, "name": "_fivetran_deleted"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 3, "name": "_fivetran_synced"}, "email": {"type": "STRING", "comment": null, "index": 4, "name": "email"}, "name": {"type": "STRING", "comment": null, "index": 5, "name": "name"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1700.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 20.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "seed.asana_source_integration_tests.user_data"}, "seed.asana_source_integration_tests.project_task_data": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "name": "project_task_data", "comment": null, "owner": null}, "columns": {"project_id": {"type": "INT64", "comment": null, "index": 1, "name": "project_id"}, "task_id": {"type": "INT64", "comment": null, "index": 2, "name": "task_id"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 3, "name": "_fivetran_synced"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 48.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "seed.asana_source_integration_tests.project_task_data"}, "seed.asana_source_integration_tests.task_follower_data": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "name": "task_follower_data", "comment": null, "owner": null}, "columns": {"task_id": {"type": "INT64", "comment": null, "index": 1, "name": "task_id"}, "user_id": {"type": "INT64", "comment": null, "index": 2, "name": "user_id"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 3, "name": "_fivetran_synced"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 24.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 1.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "seed.asana_source_integration_tests.task_follower_data"}, "seed.asana_source_integration_tests.team_data": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "name": "team_data", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "comment": null, "index": 1, "name": "id"}, "_fivetran_deleted": {"type": "BOOL", "comment": null, "index": 2, "name": "_fivetran_deleted"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 3, "name": "_fivetran_synced"}, "name": {"type": "STRING", "comment": null, "index": 4, "name": "name"}, "organization_id": {"type": "INT64", "comment": null, "index": 5, "name": "organization_id"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1475.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 25.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "seed.asana_source_integration_tests.team_data"}, "seed.asana_source_integration_tests.task_section_data": {"metadata": {"type": "table", "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "name": "task_section_data", "comment": null, "owner": null}, "columns": {"section_id": {"type": "INT64", "comment": null, "index": 1, "name": "section_id"}, "task_id": {"type": "INT64", "comment": null, "index": 2, "name": "task_id"}, "_fivetran_synced": {"type": "TIMESTAMP", "comment": null, "index": 3, "name": "_fivetran_synced"}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 48.0, "description": "Approximate size of table as reported by BigQuery", "include": true}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "description": "Approximate count of rows in this table", "include": true}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "description": "Indicates whether there are statistics for this table", "include": false}}, "unique_id": "seed.asana_source_integration_tests.task_section_data"}}, "sources": {}, "errors": null} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.0.0", "generated_at": "2022-07-11T22:12:25.580948Z", "invocation_id": "fe278798-a8f1-428d-abca-bea216b78c92", "env": {}}, "nodes": {"seed.asana_source_integration_tests.project_data": {"metadata": {"type": "table", "schema": "asana_source_integration_tests", "name": "project_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "archived": {"type": "BOOL", "index": 4, "name": "archived", "comment": null}, "color": {"type": "STRING", "index": 5, "name": "color", "comment": null}, "created_at": {"type": "DATETIME", "index": 6, "name": "created_at", "comment": null}, "current_status": {"type": "STRING", "index": 7, "name": "current_status", "comment": null}, "due_date": {"type": "DATETIME", "index": 8, "name": "due_date", "comment": null}, "modified_at": {"type": "DATETIME", "index": 9, "name": "modified_at", "comment": null}, "name": {"type": "STRING", "index": 10, "name": "name", "comment": null}, "notes": {"type": "STRING", "index": 11, "name": "notes", "comment": null}, "owner_id": {"type": "INT64", "index": 12, "name": "owner_id", "comment": null}, "public": {"type": "INT64", "index": 13, "name": "public", "comment": null}, "team_id": {"type": "INT64", "index": 14, "name": "team_id", "comment": null}, "workspace_id": {"type": "INT64", "index": 15, "name": "workspace_id", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1710.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 16.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.asana_source_integration_tests.project_data"}, "seed.asana_source_integration_tests.task_data": {"metadata": {"type": "table", "schema": "asana_source_integration_tests", "name": "task_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "assignee_id": {"type": "INT64", "index": 3, "name": "assignee_id", "comment": null}, "assignee_status": {"type": "STRING", "index": 4, "name": "assignee_status", "comment": null}, "completed": {"type": "BOOL", "index": 5, "name": "completed", "comment": null}, "completed_at": {"type": "INT64", "index": 6, "name": "completed_at", "comment": null}, "completed_by_id": {"type": "INT64", "index": 7, "name": "completed_by_id", "comment": null}, "created_at": {"type": "DATETIME", "index": 8, "name": "created_at", "comment": null}, "due_at": {"type": "INT64", "index": 9, "name": "due_at", "comment": null}, "due_on": {"type": "INT64", "index": 10, "name": "due_on", "comment": null}, "hearted": {"type": "BOOL", "index": 11, "name": "hearted", "comment": null}, "modified_at": {"type": "DATETIME", "index": 12, "name": "modified_at", "comment": null}, "name": {"type": "STRING", "index": 13, "name": "name", "comment": null}, "notes": {"type": "INT64", "index": 14, "name": "notes", "comment": null}, "num_hearts": {"type": "INT64", "index": 15, "name": "num_hearts", "comment": null}, "parent_id": {"type": "INT64", "index": 16, "name": "parent_id", "comment": null}, "start_on": {"type": "INT64", "index": 17, "name": "start_on", "comment": null}, "workspace_id": {"type": "INT64", "index": 18, "name": "workspace_id", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 99.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 1.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.asana_source_integration_tests.task_data"}, "seed.asana_source_integration_tests.task_follower_data": {"metadata": {"type": "table", "schema": "asana_source_integration_tests", "name": "task_follower_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"task_id": {"type": "INT64", "index": 1, "name": "task_id", "comment": null}, "user_id": {"type": "INT64", "index": 2, "name": "user_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 24.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 1.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.asana_source_integration_tests.task_follower_data"}, "seed.asana_source_integration_tests.tag_data": {"metadata": {"type": "table", "schema": "asana_source_integration_tests", "name": "tag_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "color": {"type": "INT64", "index": 4, "name": "color", "comment": null}, "created_at": {"type": "DATETIME", "index": 5, "name": "created_at", "comment": null}, "message": {"type": "INT64", "index": 6, "name": "message", "comment": null}, "name": {"type": "STRING", "index": 7, "name": "name", "comment": null}, "notes": {"type": "INT64", "index": 8, "name": "notes", "comment": null}, "workspace_id": {"type": "INT64", "index": 9, "name": "workspace_id", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1139.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 17.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.asana_source_integration_tests.tag_data"}, "seed.asana_source_integration_tests.user_data": {"metadata": {"type": "table", "schema": "asana_source_integration_tests", "name": "user_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "email": {"type": "STRING", "index": 4, "name": "email", "comment": null}, "name": {"type": "STRING", "index": 5, "name": "name", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1700.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 20.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.asana_source_integration_tests.user_data"}, "seed.asana_source_integration_tests.task_tag_data": {"metadata": {"type": "table", "schema": "asana_source_integration_tests", "name": "task_tag_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"tag_id": {"type": "INT64", "index": 1, "name": "tag_id", "comment": null}, "task_id": {"type": "INT64", "index": 2, "name": "task_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 96.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 4.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.asana_source_integration_tests.task_tag_data"}, "seed.asana_source_integration_tests.task_section_data": {"metadata": {"type": "table", "schema": "asana_source_integration_tests", "name": "task_section_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"section_id": {"type": "INT64", "index": 1, "name": "section_id", "comment": null}, "task_id": {"type": "INT64", "index": 2, "name": "task_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 48.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.asana_source_integration_tests.task_section_data"}, "seed.asana_source_integration_tests.team_data": {"metadata": {"type": "table", "schema": "asana_source_integration_tests", "name": "team_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "name": {"type": "STRING", "index": 4, "name": "name", "comment": null}, "organization_id": {"type": "INT64", "index": 5, "name": "organization_id", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1475.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 25.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.asana_source_integration_tests.team_data"}, "seed.asana_source_integration_tests.story_data": {"metadata": {"type": "table", "schema": "asana_source_integration_tests", "name": "story_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "DATETIME", "index": 3, "name": "created_at", "comment": null}, "created_by_id": {"type": "INT64", "index": 4, "name": "created_by_id", "comment": null}, "hearted": {"type": "INT64", "index": 5, "name": "hearted", "comment": null}, "num_hearts": {"type": "INT64", "index": 6, "name": "num_hearts", "comment": null}, "source": {"type": "STRING", "index": 7, "name": "source", "comment": null}, "target_id": {"type": "INT64", "index": 8, "name": "target_id", "comment": null}, "text": {"type": "STRING", "index": 9, "name": "text", "comment": null}, "type": {"type": "STRING", "index": 10, "name": "type", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 285.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 3.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.asana_source_integration_tests.story_data"}, "seed.asana_source_integration_tests.section_data": {"metadata": {"type": "table", "schema": "asana_source_integration_tests", "name": "section_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "DATETIME", "index": 3, "name": "created_at", "comment": null}, "name": {"type": "STRING", "index": 4, "name": "name", "comment": null}, "project_id": {"type": "INT64", "index": 5, "name": "project_id", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 858.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 13.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.asana_source_integration_tests.section_data"}, "seed.asana_source_integration_tests.project_task_data": {"metadata": {"type": "table", "schema": "asana_source_integration_tests", "name": "project_task_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"project_id": {"type": "INT64", "index": 1, "name": "project_id", "comment": null}, "task_id": {"type": "INT64", "index": 2, "name": "task_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 48.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.asana_source_integration_tests.project_task_data"}, "model.asana_source.stg_asana__project_tmp": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__project_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "archived": {"type": "BOOL", "index": 4, "name": "archived", "comment": null}, "color": {"type": "STRING", "index": 5, "name": "color", "comment": null}, "created_at": {"type": "DATETIME", "index": 6, "name": "created_at", "comment": null}, "current_status": {"type": "STRING", "index": 7, "name": "current_status", "comment": null}, "due_date": {"type": "DATETIME", "index": 8, "name": "due_date", "comment": null}, "modified_at": {"type": "DATETIME", "index": 9, "name": "modified_at", "comment": null}, "name": {"type": "STRING", "index": 10, "name": "name", "comment": null}, "notes": {"type": "STRING", "index": 11, "name": "notes", "comment": null}, "owner_id": {"type": "INT64", "index": 12, "name": "owner_id", "comment": null}, "public": {"type": "INT64", "index": 13, "name": "public", "comment": null}, "team_id": {"type": "INT64", "index": 14, "name": "team_id", "comment": null}, "workspace_id": {"type": "INT64", "index": 15, "name": "workspace_id", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1710.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 16.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__project_tmp"}, "model.asana_source.stg_asana__section_tmp": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__section_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "DATETIME", "index": 3, "name": "created_at", "comment": null}, "name": {"type": "STRING", "index": 4, "name": "name", "comment": null}, "project_id": {"type": "INT64", "index": 5, "name": "project_id", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 858.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 13.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__section_tmp"}, "model.asana_source.stg_asana__project_task_tmp": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__project_task_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"project_id": {"type": "INT64", "index": 1, "name": "project_id", "comment": null}, "task_id": {"type": "INT64", "index": 2, "name": "task_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 48.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__project_task_tmp"}, "model.asana_source.stg_asana__user": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__user", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"user_id": {"type": "INT64", "index": 1, "name": "user_id", "comment": null}, "email": {"type": "STRING", "index": 2, "name": "email", "comment": null}, "user_name": {"type": "STRING", "index": 3, "name": "user_name", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1520.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 20.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__user"}, "model.asana_source.stg_asana__team": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__team", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"team_id": {"type": "INT64", "index": 1, "name": "team_id", "comment": null}, "team_name": {"type": "STRING", "index": 2, "name": "team_name", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1050.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 25.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__team"}, "model.asana_source.stg_asana__user_tmp": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__user_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "email": {"type": "STRING", "index": 4, "name": "email", "comment": null}, "name": {"type": "STRING", "index": 5, "name": "name", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1700.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 20.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__user_tmp"}, "model.asana_source.stg_asana__section": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__section", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"section_id": {"type": "INT64", "index": 1, "name": "section_id", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 2, "name": "created_at", "comment": null}, "section_name": {"type": "STRING", "index": 3, "name": "section_name", "comment": null}, "project_id": {"type": "INT64", "index": 4, "name": "project_id", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 754.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 13.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__section"}, "model.asana_source.stg_asana__task_tag_tmp": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__task_tag_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"tag_id": {"type": "INT64", "index": 1, "name": "tag_id", "comment": null}, "task_id": {"type": "INT64", "index": 2, "name": "task_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 96.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 4.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__task_tag_tmp"}, "model.asana_source.stg_asana__project": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__project", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"project_id": {"type": "INT64", "index": 1, "name": "project_id", "comment": null}, "is_archived": {"type": "BOOL", "index": 2, "name": "is_archived", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 3, "name": "created_at", "comment": null}, "current_status": {"type": "STRING", "index": 4, "name": "current_status", "comment": null}, "due_date": {"type": "TIMESTAMP", "index": 5, "name": "due_date", "comment": null}, "modified_at": {"type": "TIMESTAMP", "index": 6, "name": "modified_at", "comment": null}, "project_name": {"type": "STRING", "index": 7, "name": "project_name", "comment": null}, "owner_user_id": {"type": "INT64", "index": 8, "name": "owner_user_id", "comment": null}, "is_public": {"type": "INT64", "index": 9, "name": "is_public", "comment": null}, "team_id": {"type": "INT64", "index": 10, "name": "team_id", "comment": null}, "workspace_id": {"type": "INT64", "index": 11, "name": "workspace_id", "comment": null}, "notes": {"type": "STRING", "index": 12, "name": "notes", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1448.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 16.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__project"}, "model.asana_source.stg_asana__story": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__story", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"story_id": {"type": "INT64", "index": 1, "name": "story_id", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 2, "name": "created_at", "comment": null}, "created_by_user_id": {"type": "INT64", "index": 3, "name": "created_by_user_id", "comment": null}, "target_task_id": {"type": "INT64", "index": 4, "name": "target_task_id", "comment": null}, "story_content": {"type": "STRING", "index": 5, "name": "story_content", "comment": null}, "event_type": {"type": "STRING", "index": 6, "name": "event_type", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 222.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 3.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__story"}, "model.asana_source.stg_asana__task_tmp": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__task_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "assignee_id": {"type": "INT64", "index": 3, "name": "assignee_id", "comment": null}, "assignee_status": {"type": "STRING", "index": 4, "name": "assignee_status", "comment": null}, "completed": {"type": "BOOL", "index": 5, "name": "completed", "comment": null}, "completed_at": {"type": "INT64", "index": 6, "name": "completed_at", "comment": null}, "completed_by_id": {"type": "INT64", "index": 7, "name": "completed_by_id", "comment": null}, "created_at": {"type": "DATETIME", "index": 8, "name": "created_at", "comment": null}, "due_at": {"type": "INT64", "index": 9, "name": "due_at", "comment": null}, "due_on": {"type": "INT64", "index": 10, "name": "due_on", "comment": null}, "hearted": {"type": "BOOL", "index": 11, "name": "hearted", "comment": null}, "modified_at": {"type": "DATETIME", "index": 12, "name": "modified_at", "comment": null}, "name": {"type": "STRING", "index": 13, "name": "name", "comment": null}, "notes": {"type": "INT64", "index": 14, "name": "notes", "comment": null}, "num_hearts": {"type": "INT64", "index": 15, "name": "num_hearts", "comment": null}, "parent_id": {"type": "INT64", "index": 16, "name": "parent_id", "comment": null}, "start_on": {"type": "INT64", "index": 17, "name": "start_on", "comment": null}, "workspace_id": {"type": "INT64", "index": 18, "name": "workspace_id", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 99.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 1.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__task_tmp"}, "model.asana_source.stg_asana__story_tmp": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__story_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "DATETIME", "index": 3, "name": "created_at", "comment": null}, "created_by_id": {"type": "INT64", "index": 4, "name": "created_by_id", "comment": null}, "hearted": {"type": "INT64", "index": 5, "name": "hearted", "comment": null}, "num_hearts": {"type": "INT64", "index": 6, "name": "num_hearts", "comment": null}, "source": {"type": "STRING", "index": 7, "name": "source", "comment": null}, "target_id": {"type": "INT64", "index": 8, "name": "target_id", "comment": null}, "text": {"type": "STRING", "index": 9, "name": "text", "comment": null}, "type": {"type": "STRING", "index": 10, "name": "type", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 285.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 3.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__story_tmp"}, "model.asana_source.stg_asana__tag": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__tag", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"tag_id": {"type": "INT64", "index": 1, "name": "tag_id", "comment": null}, "tag_name": {"type": "STRING", "index": 2, "name": "tag_name", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 3, "name": "created_at", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 850.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 17.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__tag"}, "model.asana_source.stg_asana__task_section": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__task_section", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"section_id": {"type": "INT64", "index": 1, "name": "section_id", "comment": null}, "task_id": {"type": "INT64", "index": 2, "name": "task_id", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 32.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__task_section"}, "model.asana_source.stg_asana__task_follower_tmp": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__task_follower_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"task_id": {"type": "INT64", "index": 1, "name": "task_id", "comment": null}, "user_id": {"type": "INT64", "index": 2, "name": "user_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 24.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 1.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__task_follower_tmp"}, "model.asana_source.stg_asana__task_follower": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__task_follower", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"task_id": {"type": "INT64", "index": 1, "name": "task_id", "comment": null}, "user_id": {"type": "INT64", "index": 2, "name": "user_id", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 16.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 1.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__task_follower"}, "model.asana_source.stg_asana__team_tmp": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__team_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "name": {"type": "STRING", "index": 4, "name": "name", "comment": null}, "organization_id": {"type": "INT64", "index": 5, "name": "organization_id", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1475.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 25.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__team_tmp"}, "model.asana_source.stg_asana__task_tag": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__task_tag", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"tag_id": {"type": "INT64", "index": 1, "name": "tag_id", "comment": null}, "task_id": {"type": "INT64", "index": 2, "name": "task_id", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 64.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 4.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__task_tag"}, "model.asana_source.stg_asana__tag_tmp": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__tag_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "color": {"type": "INT64", "index": 4, "name": "color", "comment": null}, "created_at": {"type": "DATETIME", "index": 5, "name": "created_at", "comment": null}, "message": {"type": "INT64", "index": 6, "name": "message", "comment": null}, "name": {"type": "STRING", "index": 7, "name": "name", "comment": null}, "notes": {"type": "INT64", "index": 8, "name": "notes", "comment": null}, "workspace_id": {"type": "INT64", "index": 9, "name": "workspace_id", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1139.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 17.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__tag_tmp"}, "model.asana_source.stg_asana__project_task": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__project_task", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"project_id": {"type": "INT64", "index": 1, "name": "project_id", "comment": null}, "task_id": {"type": "INT64", "index": 2, "name": "task_id", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 32.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__project_task"}, "model.asana_source.stg_asana__task_section_tmp": {"metadata": {"type": "table", "schema": "asana_source_integration_tests_stg_asana", "name": "stg_asana__task_section_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"section_id": {"type": "INT64", "index": 1, "name": "section_id", "comment": null}, "task_id": {"type": "INT64", "index": 2, "name": "task_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 48.0, "include": 1.0, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": 1.0, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.asana_source.stg_asana__task_section_tmp"}}, "sources": {}, "errors": null} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 360349a..fa8b08b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -8,7 +8,7 @@ - + @@ -16,17 +16,17 @@ - + - +
icons
- diff --git a/docs/manifest.json b/docs/manifest.json index 98a9c26..be05735 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v1.json", "dbt_version": "0.19.0", "generated_at": "2021-03-22T21:23:04.032347Z", "invocation_id": "bfc7fb27-b9ab-4502-8f1f-2285a837b343", "env": {}, "project_id": "8026034a61eef02391ef24b373ea0dc0", "user_id": "57178664-37b2-4047-9572-68ec8b488cd7", "send_anonymous_usage_stats": true, "adapter_type": "bigquery"}, "nodes": {"seed.asana_source_integration_tests.project_task_data": {"raw_sql": "", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "project_task_data"], "unique_id": "seed.asana_source_integration_tests.project_task_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests", "path": "project_task_data.csv", "original_file_path": "data/project_task_data.csv", "name": "project_task_data", "resource_type": "seed", "alias": "project_task_data", "checksum": {"name": "sha256", "checksum": "b8ae363c3ab40609f8b5b0eee30e198bd124d781198ecda72e5409178aab17cd"}, "config": {"enabled": true, "materialized": "seed", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "project_id": "int64", "task_id": "int64"}, "alias": null, "schema": null, "database": null, "tags": [], "full_refresh": null, "quote_columns": false}, "tags": [], "refs": [], "sources": [], "depends_on": {"macros": [], "nodes": []}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"project_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "task_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`project_task_data`"}, "seed.asana_source_integration_tests.story_data": {"raw_sql": "", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "story_data"], "unique_id": "seed.asana_source_integration_tests.story_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests", "path": "story_data.csv", "original_file_path": "data/story_data.csv", "name": "story_data", "resource_type": "seed", "alias": "story_data", "checksum": {"name": "sha256", "checksum": "207847a91c60ba0de1269fd0aef2a0e1f9d2c3e2b0fbae231ce69fce909dd15a"}, "config": {"enabled": true, "materialized": "seed", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "int64", "created_by_id": "int64", "target_id": "int64"}, "alias": null, "schema": null, "database": null, "tags": [], "full_refresh": null, "quote_columns": false}, "tags": [], "refs": [], "sources": [], "depends_on": {"macros": [], "nodes": []}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "created_by_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "target_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`story_data`"}, "seed.asana_source_integration_tests.task_tag_data": {"raw_sql": "", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "task_tag_data"], "unique_id": "seed.asana_source_integration_tests.task_tag_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests", "path": "task_tag_data.csv", "original_file_path": "data/task_tag_data.csv", "name": "task_tag_data", "resource_type": "seed", "alias": "task_tag_data", "checksum": {"name": "sha256", "checksum": "0209673eda201e499fc6c588fbc799e08b44a60168cabaa4dc3cee39bb250cbd"}, "config": {"enabled": true, "materialized": "seed", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "tag_id": "int64", "task_id": "int64"}, "alias": null, "schema": null, "database": null, "tags": [], "full_refresh": null, "quote_columns": false}, "tags": [], "refs": [], "sources": [], "depends_on": {"macros": [], "nodes": []}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"tag_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "task_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`task_tag_data`"}, "seed.asana_source_integration_tests.task_section_data": {"raw_sql": "", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "task_section_data"], "unique_id": "seed.asana_source_integration_tests.task_section_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests", "path": "task_section_data.csv", "original_file_path": "data/task_section_data.csv", "name": "task_section_data", "resource_type": "seed", "alias": "task_section_data", "checksum": {"name": "sha256", "checksum": "d0aab9b6565fdb541b9ed5122d66cc9fad61287d3374d8af41c25eaf9bcd5805"}, "config": {"enabled": true, "materialized": "seed", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "section_id": "int64", "task_id": "int64"}, "alias": null, "schema": null, "database": null, "tags": [], "full_refresh": null, "quote_columns": false}, "tags": [], "refs": [], "sources": [], "depends_on": {"macros": [], "nodes": []}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"section_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "task_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`task_section_data`"}, "seed.asana_source_integration_tests.task_data": {"raw_sql": "", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "task_data"], "unique_id": "seed.asana_source_integration_tests.task_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests", "path": "task_data.csv", "original_file_path": "data/task_data.csv", "name": "task_data", "resource_type": "seed", "alias": "task_data", "checksum": {"name": "sha256", "checksum": "4eb44503e07b5c712bfdcead83ab4f20827e296d0457abde15155d979c5bae7a"}, "config": {"enabled": true, "materialized": "seed", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "int64", "assignee_id": "int64", "completed_by_id": "int64", "parent_id": "int64", "workspace_id": "int64"}, "alias": null, "schema": null, "database": null, "tags": [], "full_refresh": null, "quote_columns": false}, "tags": [], "refs": [], "sources": [], "depends_on": {"macros": [], "nodes": []}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "assignee_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "completed_by_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "parent_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "workspace_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`task_data`"}, "seed.asana_source_integration_tests.task_follower_data": {"raw_sql": "", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "task_follower_data"], "unique_id": "seed.asana_source_integration_tests.task_follower_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests", "path": "task_follower_data.csv", "original_file_path": "data/task_follower_data.csv", "name": "task_follower_data", "resource_type": "seed", "alias": "task_follower_data", "checksum": {"name": "sha256", "checksum": "6171210df6abad2ffba8ff8d10c1feb73c13c41c8e86b32e59f5aa29a4571678"}, "config": {"enabled": true, "materialized": "seed", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "user_id": "int64", "task_id": "int64"}, "alias": null, "schema": null, "database": null, "tags": [], "full_refresh": null, "quote_columns": false}, "tags": [], "refs": [], "sources": [], "depends_on": {"macros": [], "nodes": []}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"user_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "task_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`task_follower_data`"}, "seed.asana_source_integration_tests.tag_data": {"raw_sql": "", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "tag_data"], "unique_id": "seed.asana_source_integration_tests.tag_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests", "path": "tag_data.csv", "original_file_path": "data/tag_data.csv", "name": "tag_data", "resource_type": "seed", "alias": "tag_data", "checksum": {"name": "sha256", "checksum": "e74c86b7fda7a484687ac7e16fd759233a2066632e6dd27acb481b0afa852548"}, "config": {"enabled": true, "materialized": "seed", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "int64", "workspace_id": "int64"}, "alias": null, "schema": null, "database": null, "tags": [], "full_refresh": null, "quote_columns": false}, "tags": [], "refs": [], "sources": [], "depends_on": {"macros": [], "nodes": []}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "workspace_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`tag_data`"}, "seed.asana_source_integration_tests.project_data": {"raw_sql": "", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "project_data"], "unique_id": "seed.asana_source_integration_tests.project_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests", "path": "project_data.csv", "original_file_path": "data/project_data.csv", "name": "project_data", "resource_type": "seed", "alias": "project_data", "checksum": {"name": "sha256", "checksum": "cf12cd38b9bdb3ec36cac1757ae4a17e7a8dc4182cb65995ec3fc9b7c2668378"}, "config": {"enabled": true, "materialized": "seed", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "int64", "owner_id": "int64", "team_id": "int64", "workspace_id": "int64"}, "alias": null, "schema": null, "database": null, "tags": [], "full_refresh": null, "quote_columns": false}, "tags": [], "refs": [], "sources": [], "depends_on": {"macros": [], "nodes": []}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "owner_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "team_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "workspace_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`project_data`"}, "seed.asana_source_integration_tests.user_data": {"raw_sql": "", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "user_data"], "unique_id": "seed.asana_source_integration_tests.user_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests", "path": "user_data.csv", "original_file_path": "data/user_data.csv", "name": "user_data", "resource_type": "seed", "alias": "user_data", "checksum": {"name": "sha256", "checksum": "237db906018d65bbeeb08bd57c3cd23a91428412a882a0b59994658d564a9ad3"}, "config": {"enabled": true, "materialized": "seed", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "int64"}, "alias": null, "schema": null, "database": null, "tags": [], "full_refresh": null, "quote_columns": false}, "tags": [], "refs": [], "sources": [], "depends_on": {"macros": [], "nodes": []}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`user_data`"}, "seed.asana_source_integration_tests.team_data": {"raw_sql": "", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "team_data"], "unique_id": "seed.asana_source_integration_tests.team_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests", "path": "team_data.csv", "original_file_path": "data/team_data.csv", "name": "team_data", "resource_type": "seed", "alias": "team_data", "checksum": {"name": "sha256", "checksum": "96c14731f1382783fd83b114321e23b5c2813b94f96a6e5422a5aca66157a1cd"}, "config": {"enabled": true, "materialized": "seed", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "int64", "organization_id": "int64"}, "alias": null, "schema": null, "database": null, "tags": [], "full_refresh": null, "quote_columns": false}, "tags": [], "refs": [], "sources": [], "depends_on": {"macros": [], "nodes": []}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "organization_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`team_data`"}, "seed.asana_source_integration_tests.section_data": {"raw_sql": "", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "section_data"], "unique_id": "seed.asana_source_integration_tests.section_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests", "path": "section_data.csv", "original_file_path": "data/section_data.csv", "name": "section_data", "resource_type": "seed", "alias": "section_data", "checksum": {"name": "sha256", "checksum": "ca6f6bf502e9d65fcbe59590756a42979e31af8bf1db841a9292b56512252bde"}, "config": {"enabled": true, "materialized": "seed", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "int64", "project_id": "int64"}, "alias": null, "schema": null, "database": null, "tags": [], "full_refresh": null, "quote_columns": false}, "tags": [], "refs": [], "sources": [], "depends_on": {"macros": [], "nodes": []}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "project_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`section_data`"}, "model.asana_source.stg_asana__user": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__user_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__user_tmp')),\n staging_columns=get_user_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n id as user_id,\n email,\n name as user_name\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * \nfrom final", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__user"], "unique_id": "model.asana_source.stg_asana__user", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "stg_asana__user.sql", "original_file_path": "models/stg_asana__user.sql", "name": "stg_asana__user", "resource_type": "model", "alias": "stg_asana__user", "checksum": {"name": "sha256", "checksum": "4e7279a7f3d7b9754c574de24021781c98bbbc1c0a99e0c7b3495c57a6d33e18"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["stg_asana__user_tmp"], ["stg_asana__user_tmp"]], "sources": [], "depends_on": {"macros": ["macro.asana_source.get_user_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.asana_source.stg_asana__user_tmp", "model.asana_source.stg_asana__user_tmp"]}, "description": "Table of all accounts in the organization", "columns": {"user_id": {"name": "user_id", "description": "System generated unique ID for each user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The user's email", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_name": {"name": "user_name", "description": "The name of the user as it appears in the UI", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "models/stg_asana.yml", "build_path": "target/compiled/asana_source/models/stg_asana__user.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__user_tmp`\n\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 email\n \n as \n \n email\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 \n from base\n),\n\nfinal as (\n \n select \n id as user_id,\n email,\n name as user_name\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__user`"}, "model.asana_source.stg_asana__task": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__task_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__task_tmp')),\n staging_columns=get_task_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n id as task_id,\n assignee_id as assignee_user_id,\n assignee_status,\n completed as is_completed,\n completed_at,\n completed_by_id as completed_by_user_id,\n created_at,\n coalesce(due_on, due_at) as due_date,\n modified_at,\n name as task_name,\n parent_id as parent_task_id,\n start_on as start_date,\n notes as task_description,\n workspace_id\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__task"], "unique_id": "model.asana_source.stg_asana__task", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "stg_asana__task.sql", "original_file_path": "models/stg_asana__task.sql", "name": "stg_asana__task", "resource_type": "model", "alias": "stg_asana__task", "checksum": {"name": "sha256", "checksum": "8901ca68cf2c93ea518cd99bcdba25d1916a79cdd685fb57f0f719aacaa59c07"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["stg_asana__task_tmp"], ["stg_asana__task_tmp"]], "sources": [], "depends_on": {"macros": ["macro.asana_source.get_task_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.asana_source.stg_asana__task_tmp", "model.asana_source.stg_asana__task_tmp"]}, "description": "Table containing all created tasks", "columns": {"task_id": {"name": "task_id", "description": "System generated unique ID of the task", "meta": {}, "data_type": null, "quote": null, "tags": []}, "assignee_user_id": {"name": "assignee_user_id", "description": "Foreign key referencing the USER that is currently assigned the task.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "assignee_status": {"name": "assignee_status", "description": "Scheduling status for the assignee that the task is or will eventually be assigned to. This maps to the sections of \"My Tasks\"", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_completed": {"name": "is_completed", "description": "Boolean that is true if the task is currently marked complete.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "completed_at": {"name": "completed_at", "description": "Timestamp of when the task was marked complete.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "completed_by_user_id": {"name": "completed_by_user_id", "description": "Foreign key referencing the USER who completed the task.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the task was created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "Date the task is due, if provided.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "modified_at": {"name": "modified_at", "description": "Timestamp of when the task was last modified", "meta": {}, "data_type": null, "quote": null, "tags": []}, "task_name": {"name": "task_name", "description": "User-facing name of the task.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_task_id": {"name": "parent_task_id", "description": "Self-referential id of the parent TASK that this is a subtask of.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_date": {"name": "start_date", "description": "The start date of the task, if a date range is given.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "task_description": {"name": "task_description", "description": "Free-form text describing the task, as seen in the UI.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "workspace_id": {"name": "workspace_id", "description": "ID of the organization's Asana workspace. Irrelevant unless working with multiple companies.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "models/stg_asana.yml", "build_path": "target/compiled/asana_source/models/stg_asana__task.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_tmp`\n\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 assignee_id\n \n as \n \n assignee_id\n \n, \n \n \n assignee_status\n \n as \n \n assignee_status\n \n, \n \n \n completed\n \n as \n \n completed\n \n, \n \n \n completed_at\n \n as \n \n completed_at\n \n, \n \n \n completed_by_id\n \n as \n \n completed_by_id\n \n, \n \n \n created_at\n \n as \n \n created_at\n \n, \n \n \n due_at\n \n as \n \n due_at\n \n, \n \n \n due_on\n \n as \n \n due_on\n \n, \n \n \n hearted\n \n as \n \n hearted\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n modified_at\n \n as \n \n modified_at\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n notes\n \n as \n \n notes\n \n, \n \n \n num_hearts\n \n as \n \n num_hearts\n \n, \n \n \n parent_id\n \n as \n \n parent_id\n \n, \n \n \n start_on\n \n as \n \n start_on\n \n, \n \n \n workspace_id\n \n as \n \n workspace_id\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \n id as task_id,\n assignee_id as assignee_user_id,\n assignee_status,\n completed as is_completed,\n completed_at,\n completed_by_id as completed_by_user_id,\n created_at,\n coalesce(due_on, due_at) as due_date,\n modified_at,\n name as task_name,\n parent_id as parent_task_id,\n start_on as start_date,\n notes as task_description,\n workspace_id\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task`"}, "model.asana_source.stg_asana__task_section": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__task_section_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__task_section_tmp')),\n staging_columns=get_task_section_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n section_id,\n task_id\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__task_section"], "unique_id": "model.asana_source.stg_asana__task_section", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "stg_asana__task_section.sql", "original_file_path": "models/stg_asana__task_section.sql", "name": "stg_asana__task_section", "resource_type": "model", "alias": "stg_asana__task_section", "checksum": {"name": "sha256", "checksum": "4ead107e3627f57920f45d190c273a0fe706c9f911998f67769818fcd1bb4797"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["stg_asana__task_section_tmp"], ["stg_asana__task_section_tmp"]], "sources": [], "depends_on": {"macros": ["macro.asana_source.get_task_section_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.asana_source.stg_asana__task_section_tmp", "model.asana_source.stg_asana__task_section_tmp"]}, "description": "Table of tasks and the section that they live under. Section-less tasks within projects appear here, but project-less tasks do not", "columns": {"task_id": {"name": "task_id", "description": "Foreign key referencing the ID of the TASK", "meta": {}, "data_type": null, "quote": null, "tags": []}, "section_id": {"name": "section_id", "description": "Foreign key referencing the ID of the SECTION housing the task", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "models/stg_asana.yml", "build_path": "target/compiled/asana_source/models/stg_asana__task_section.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_section_tmp`\n\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 section_id\n \n as \n \n section_id\n \n, \n \n \n task_id\n \n as \n \n task_id\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \n section_id,\n task_id\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_section`"}, "model.asana_source.stg_asana__section": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__section_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__section_tmp')),\n staging_columns=get_section_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n id as section_id,\n created_at,\n name as section_name,\n project_id\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__section"], "unique_id": "model.asana_source.stg_asana__section", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "stg_asana__section.sql", "original_file_path": "models/stg_asana__section.sql", "name": "stg_asana__section", "resource_type": "model", "alias": "stg_asana__section", "checksum": {"name": "sha256", "checksum": "5f8a6028a603573e3af824f27df530730117cb3e1e054c3f95e2bdd829d4d91b"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["stg_asana__section_tmp"], ["stg_asana__section_tmp"]], "sources": [], "depends_on": {"macros": ["macro.asana_source.get_section_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.asana_source.stg_asana__section_tmp", "model.asana_source.stg_asana__section_tmp"]}, "description": "Table of all sections within projects. If tasks in a project are not in an explicit user-made section, a default section called \"(no section)\" is created here", "columns": {"section_id": {"name": "section_id", "description": "System-generated unique ID of the section", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the section was created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "section_name": {"name": "section_name", "description": "User-facing name of the section.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the id of the PROJECT the section lives in.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "models/stg_asana.yml", "build_path": "target/compiled/asana_source/models/stg_asana__section.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__section_tmp`\n\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 created_at\n \n as \n \n created_at\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 \n from base\n),\n\nfinal as (\n \n select \n id as section_id,\n created_at,\n name as section_name,\n project_id\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__section`"}, "model.asana_source.stg_asana__team": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__team_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__team_tmp')),\n staging_columns=get_team_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n id as team_id,\n name as team_name\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * \nfrom final", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__team"], "unique_id": "model.asana_source.stg_asana__team", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "stg_asana__team.sql", "original_file_path": "models/stg_asana__team.sql", "name": "stg_asana__team", "resource_type": "model", "alias": "stg_asana__team", "checksum": {"name": "sha256", "checksum": "d2a65dca096a0320f59cc16346eb1854a1bc78135e11eb6b010fcc41fc49e4a0"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["stg_asana__team_tmp"], ["stg_asana__team_tmp"]], "sources": [], "depends_on": {"macros": ["macro.asana_source.get_team_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.asana_source.stg_asana__team_tmp", "model.asana_source.stg_asana__team_tmp"]}, "description": "Table of the teams within the organization", "columns": {"team_id": {"name": "team_id", "description": "System generated unique ID for each team", "meta": {}, "data_type": null, "quote": null, "tags": []}, "team_name": {"name": "team_name", "description": "User-facing name of the team", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "models/stg_asana.yml", "build_path": "target/compiled/asana_source/models/stg_asana__team.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__team_tmp`\n\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 id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n organization_id\n \n as \n \n organization_id\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \n id as team_id,\n name as team_name\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__team`"}, "model.asana_source.stg_asana__task_tag": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__task_tag_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__task_tag_tmp')),\n staging_columns=get_task_tag_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n tag_id,\n task_id\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__task_tag"], "unique_id": "model.asana_source.stg_asana__task_tag", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "stg_asana__task_tag.sql", "original_file_path": "models/stg_asana__task_tag.sql", "name": "stg_asana__task_tag", "resource_type": "model", "alias": "stg_asana__task_tag", "checksum": {"name": "sha256", "checksum": "7eba4b0f2dabd68e0a77d515c8406bb57bd6263b9ef551de3f06eded4c085de8"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["stg_asana__task_tag_tmp"], ["stg_asana__task_tag_tmp"]], "sources": [], "depends_on": {"macros": ["macro.asana_source.get_task_tag_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.asana_source.stg_asana__task_tag_tmp", "model.asana_source.stg_asana__task_tag_tmp"]}, "description": "Table of tasks with the tags attached to them. Tasks without tags (and vice versa) do not appear here.", "columns": {"tag_id": {"name": "tag_id", "description": "Foreign key referencing the ID of the TAG attached to the task", "meta": {}, "data_type": null, "quote": null, "tags": []}, "task_id": {"name": "task_id", "description": "Foreign key referencing the ID of the TASK", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "models/stg_asana.yml", "build_path": "target/compiled/asana_source/models/stg_asana__task_tag.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_tag_tmp`\n\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 tag_id\n \n as \n \n tag_id\n \n, \n \n \n task_id\n \n as \n \n task_id\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \n tag_id,\n task_id\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_tag`"}, "model.asana_source.stg_asana__story": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__story_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__story_tmp')),\n staging_columns=get_story_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n id as story_id,\n created_at,\n created_by_id as created_by_user_id,\n target_id as target_task_id,\n text as story_content,\n type as event_type\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__story"], "unique_id": "model.asana_source.stg_asana__story", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "stg_asana__story.sql", "original_file_path": "models/stg_asana__story.sql", "name": "stg_asana__story", "resource_type": "model", "alias": "stg_asana__story", "checksum": {"name": "sha256", "checksum": "7b45ffeac2ef2e6af6d13771836eeb8e17c147a999906fd5e35f462ca49a054d"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["stg_asana__story_tmp"], ["stg_asana__story_tmp"]], "sources": [], "depends_on": {"macros": ["macro.asana_source.get_story_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.asana_source.stg_asana__story_tmp", "model.asana_source.stg_asana__story_tmp"]}, "description": "Table containing all stories -- stories are actions taken on tasks", "columns": {"story_id": {"name": "story_id", "description": "System generated unique ID of the story/action taken on a task.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the story occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_by_user_id": {"name": "created_by_user_id", "description": "Foreign key referencing the USER who took the action (sometimes null)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "target_task_id": {"name": "target_task_id", "description": "Foreign key referencing the TASK that the action was taken on.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "story_content": {"name": "story_content", "description": "Free-form text that is either the content of a comment (event_type=comment) or the description of an action (event_type=system)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_type": {"name": "event_type", "description": "The origin type of the story - a comment or change to the backend (ie altering a task somehow)", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "models/stg_asana.yml", "build_path": "target/compiled/asana_source/models/stg_asana__story.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__story_tmp`\n\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 created_at\n \n as \n \n created_at\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n hearted\n \n as \n \n hearted\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n num_hearts\n \n as \n \n num_hearts\n \n, \n \n \n source\n \n as \n \n source\n \n, \n \n \n target_id\n \n as \n \n target_id\n \n, \n \n \n text\n \n as \n \n text\n \n, \n \n \n type\n \n as \n \n type\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \n id as story_id,\n created_at,\n created_by_id as created_by_user_id,\n target_id as target_task_id,\n text as story_content,\n type as event_type\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__story`"}, "model.asana_source.stg_asana__tag": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__tag_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__tag_tmp')),\n staging_columns=get_tag_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n id as tag_id,\n name as tag_name,\n created_at\n from fields\n where not _fivetran_deleted\n)\n\nselect * \nfrom final", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__tag"], "unique_id": "model.asana_source.stg_asana__tag", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "stg_asana__tag.sql", "original_file_path": "models/stg_asana__tag.sql", "name": "stg_asana__tag", "resource_type": "model", "alias": "stg_asana__tag", "checksum": {"name": "sha256", "checksum": "227d8cf45301f38a44c6b4e2611fe7261c972a98970394007e6cc769c5ea6b6f"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["stg_asana__tag_tmp"], ["stg_asana__tag_tmp"]], "sources": [], "depends_on": {"macros": ["macro.asana_source.get_tag_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.asana_source.stg_asana__tag_tmp", "model.asana_source.stg_asana__tag_tmp"]}, "description": "Table of the custom tags made in the organization", "columns": {"tag_id": {"name": "tag_id", "description": "System generated unique ID of the tag", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tag_name": {"name": "tag_name", "description": "User-facing name of the tag.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the tag was created", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "models/stg_asana.yml", "build_path": "target/compiled/asana_source/models/stg_asana__tag.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__tag_tmp`\n\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 color\n \n as \n \n color\n \n, \n \n \n created_at\n \n as \n \n created_at\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n message\n \n as \n \n message\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n notes\n \n as \n \n notes\n \n, \n \n \n workspace_id\n \n as \n \n workspace_id\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \n id as tag_id,\n name as tag_name,\n created_at\n from fields\n where not _fivetran_deleted\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__tag`"}, "model.asana_source.stg_asana__project_task": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__project_task_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__project_task_tmp')),\n staging_columns=get_project_task_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n project_id,\n task_id\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__project_task"], "unique_id": "model.asana_source.stg_asana__project_task", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "stg_asana__project_task.sql", "original_file_path": "models/stg_asana__project_task.sql", "name": "stg_asana__project_task", "resource_type": "model", "alias": "stg_asana__project_task", "checksum": {"name": "sha256", "checksum": "95153bcb4c7e9ccc7302710d14cf8d8120817eece7378f1f7c26f27b48129469"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["stg_asana__project_task_tmp"], ["stg_asana__project_task_tmp"]], "sources": [], "depends_on": {"macros": ["macro.asana_source.get_project_task_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.asana_source.stg_asana__project_task_tmp", "model.asana_source.stg_asana__project_task_tmp"]}, "description": "Table of tasks and the project(s) they each belong to. If a project doesn't have a task, it won't be in here (and vice versa)", "columns": {"project_id": {"name": "project_id", "description": "Foreign key referencing the ID of the PROJECT", "meta": {}, "data_type": null, "quote": null, "tags": []}, "task_id": {"name": "task_id", "description": "Foreign key referencing the ID of the TASK", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "models/stg_asana.yml", "build_path": "target/compiled/asana_source/models/stg_asana__project_task.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project_task_tmp`\n\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 project_id\n \n as \n \n project_id\n \n, \n \n \n task_id\n \n as \n \n task_id\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \n project_id,\n task_id\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project_task`"}, "model.asana_source.stg_asana__project": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__project_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__project_tmp')),\n staging_columns=get_project_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n id as project_id,\n archived as is_archived,\n created_at,\n current_status, \n due_date,\n modified_at,\n name as project_name,\n owner_id as owner_user_id,\n public as is_public,\n team_id,\n workspace_id,\n notes\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__project"], "unique_id": "model.asana_source.stg_asana__project", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "stg_asana__project.sql", "original_file_path": "models/stg_asana__project.sql", "name": "stg_asana__project", "resource_type": "model", "alias": "stg_asana__project", "checksum": {"name": "sha256", "checksum": "b3cdc9318adcbfc79950ce68ed4172a8bcd49439ec7fa10704a677a3c6970f26"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["stg_asana__project_tmp"], ["stg_asana__project_tmp"]], "sources": [], "depends_on": {"macros": ["macro.asana_source.get_project_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.asana_source.stg_asana__project_tmp", "model.asana_source.stg_asana__project_tmp"]}, "description": "Table containing all projects", "columns": {"project_id": {"name": "project_id", "description": "System-generated unique ID of the project", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_archived": {"name": "is_archived", "description": "Boolean representing if the project has been archived in the UI", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the project was created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "current_status": {"name": "current_status", "description": "The most recent progress status update for the project (free-form string)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "The date the project is due on, if given", "meta": {}, "data_type": null, "quote": null, "tags": []}, "modified_at": {"name": "modified_at", "description": "Timestamp of when the project was last modified (doesn't include comments or tasks)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "project_name": {"name": "project_name", "description": "The user-facing name of the project", "meta": {}, "data_type": null, "quote": null, "tags": []}, "owner_user_id": {"name": "owner_user_id", "description": "Foreign key referencing the USER who owns the project.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_public": {"name": "is_public", "description": "Boolean that is true if the project is public to all users in the organization", "meta": {}, "data_type": null, "quote": null, "tags": []}, "team_id": {"name": "team_id", "description": "Foreign key referencing the TEAM that the project is shared with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "workspace_id": {"name": "workspace_id", "description": "The ID of the organization's entire Asana workspace. Not relevant unless you're looking at multiple orgs", "meta": {}, "data_type": null, "quote": null, "tags": []}, "notes": {"name": "notes", "description": "Free-form textual notes associated with the project.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "models/stg_asana.yml", "build_path": "target/compiled/asana_source/models/stg_asana__project.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project_tmp`\n\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 archived\n \n as \n \n archived\n \n, \n \n \n color\n \n as \n \n color\n \n, \n \n \n created_at\n \n as \n \n created_at\n \n, \n \n \n current_status\n \n as \n \n current_status\n \n, \n \n \n due_date\n \n as \n \n due_date\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n modified_at\n \n as \n \n modified_at\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n notes\n \n as \n \n notes\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n public\n \n as \n \n public\n \n, \n \n \n team_id\n \n as \n \n team_id\n \n, \n \n \n workspace_id\n \n as \n \n workspace_id\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \n id as project_id,\n archived as is_archived,\n created_at,\n current_status, \n due_date,\n modified_at,\n name as project_name,\n owner_id as owner_user_id,\n public as is_public,\n team_id,\n workspace_id,\n notes\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project`"}, "model.asana_source.stg_asana__task_follower": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__task_follower_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__task_follower_tmp')),\n staging_columns=get_task_follower_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n task_id,\n user_id\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__task_follower"], "unique_id": "model.asana_source.stg_asana__task_follower", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "stg_asana__task_follower.sql", "original_file_path": "models/stg_asana__task_follower.sql", "name": "stg_asana__task_follower", "resource_type": "model", "alias": "stg_asana__task_follower", "checksum": {"name": "sha256", "checksum": "8eb6b3969960cac92d44612ecb9f7486545bb7e92bcf1c96064a4f384ffed3e4"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["stg_asana__task_follower_tmp"], ["stg_asana__task_follower_tmp"]], "sources": [], "depends_on": {"macros": ["macro.asana_source.get_task_follower_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.asana_source.stg_asana__task_follower_tmp", "model.asana_source.stg_asana__task_follower_tmp"]}, "description": "Table of tasks with the users that are following them. Tasks without users do not appear here.", "columns": {"task_id": {"name": "task_id", "description": "Foreign key referencing the ID of the TASK being followed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Foreign key referencing the ID of the USER following the task.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "models/stg_asana.yml", "build_path": "target/compiled/asana_source/models/stg_asana__task_follower.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_follower_tmp`\n\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 task_id\n \n as \n \n task_id\n \n, \n \n \n user_id\n \n as \n \n user_id\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \n task_id,\n user_id\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_follower`"}, "model.asana_source.stg_asana__story_tmp": {"raw_sql": "select * \nfrom {{ var('story') }}", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__story_tmp"], "unique_id": "model.asana_source.stg_asana__story_tmp", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "tmp/stg_asana__story_tmp.sql", "original_file_path": "models/tmp/stg_asana__story_tmp.sql", "name": "stg_asana__story_tmp", "resource_type": "model", "alias": "stg_asana__story_tmp", "checksum": {"name": "sha256", "checksum": "699a08f0282626b405f0b4e5216cdbaa879e399314594a61b63ff4a7b042f677"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["story_data"]], "sources": [], "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.story_data"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/tmp/stg_asana__story_tmp.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`story_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__story_tmp`"}, "model.asana_source.stg_asana__team_tmp": {"raw_sql": "select * \nfrom {{ var('team') }}", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__team_tmp"], "unique_id": "model.asana_source.stg_asana__team_tmp", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "tmp/stg_asana__team_tmp.sql", "original_file_path": "models/tmp/stg_asana__team_tmp.sql", "name": "stg_asana__team_tmp", "resource_type": "model", "alias": "stg_asana__team_tmp", "checksum": {"name": "sha256", "checksum": "8c107692c9394962da82e0c2460045e6686d962c1eefe0cff564c618aed7a17d"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["team_data"]], "sources": [], "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.team_data"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/tmp/stg_asana__team_tmp.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`team_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__team_tmp`"}, "model.asana_source.stg_asana__task_tmp": {"raw_sql": "select * \nfrom {{ var('task') }}", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__task_tmp"], "unique_id": "model.asana_source.stg_asana__task_tmp", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "tmp/stg_asana__task_tmp.sql", "original_file_path": "models/tmp/stg_asana__task_tmp.sql", "name": "stg_asana__task_tmp", "resource_type": "model", "alias": "stg_asana__task_tmp", "checksum": {"name": "sha256", "checksum": "ffb26301a2c952951441cf068b916101fb5cbb9841242e3511499262ffabd879"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["task_data"]], "sources": [], "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.task_data"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/tmp/stg_asana__task_tmp.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`task_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_tmp`"}, "model.asana_source.stg_asana__task_follower_tmp": {"raw_sql": "select * \nfrom {{ var('task_follower') }}", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__task_follower_tmp"], "unique_id": "model.asana_source.stg_asana__task_follower_tmp", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "tmp/stg_asana__task_follower_tmp.sql", "original_file_path": "models/tmp/stg_asana__task_follower_tmp.sql", "name": "stg_asana__task_follower_tmp", "resource_type": "model", "alias": "stg_asana__task_follower_tmp", "checksum": {"name": "sha256", "checksum": "d03af085dd9a99b6a0d491b3729504de132fe2a3c8b930f72cb6d6774f714896"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["task_follower_data"]], "sources": [], "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.task_follower_data"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/tmp/stg_asana__task_follower_tmp.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`task_follower_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_follower_tmp`"}, "model.asana_source.stg_asana__tag_tmp": {"raw_sql": "select * \nfrom {{ var('tag') }}", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__tag_tmp"], "unique_id": "model.asana_source.stg_asana__tag_tmp", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "tmp/stg_asana__tag_tmp.sql", "original_file_path": "models/tmp/stg_asana__tag_tmp.sql", "name": "stg_asana__tag_tmp", "resource_type": "model", "alias": "stg_asana__tag_tmp", "checksum": {"name": "sha256", "checksum": "c394a64eb436d4592c23e4c1876d4e001907bdf6de6fa1267f9bd47c83678711"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["tag_data"]], "sources": [], "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.tag_data"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/tmp/stg_asana__tag_tmp.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`tag_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__tag_tmp`"}, "model.asana_source.stg_asana__task_section_tmp": {"raw_sql": "select * \nfrom {{ var('task_section') }}", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__task_section_tmp"], "unique_id": "model.asana_source.stg_asana__task_section_tmp", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "tmp/stg_asana__task_section_tmp.sql", "original_file_path": "models/tmp/stg_asana__task_section_tmp.sql", "name": "stg_asana__task_section_tmp", "resource_type": "model", "alias": "stg_asana__task_section_tmp", "checksum": {"name": "sha256", "checksum": "453db03084996d17e88a0f1ffda90ee349df4f262db7a3523578f5d4c6a4e5e6"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["task_section_data"]], "sources": [], "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.task_section_data"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/tmp/stg_asana__task_section_tmp.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`task_section_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_section_tmp`"}, "model.asana_source.stg_asana__task_tag_tmp": {"raw_sql": "select * \nfrom {{ var('task_tag') }}", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__task_tag_tmp"], "unique_id": "model.asana_source.stg_asana__task_tag_tmp", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "tmp/stg_asana__task_tag_tmp.sql", "original_file_path": "models/tmp/stg_asana__task_tag_tmp.sql", "name": "stg_asana__task_tag_tmp", "resource_type": "model", "alias": "stg_asana__task_tag_tmp", "checksum": {"name": "sha256", "checksum": "00c6fa0be01310e2a827ce46dbadeb2cf3cc24dda4dc22142ed81b7bb0f85a4d"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["task_tag_data"]], "sources": [], "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.task_tag_data"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/tmp/stg_asana__task_tag_tmp.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`task_tag_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_tag_tmp`"}, "model.asana_source.stg_asana__user_tmp": {"raw_sql": "select * \nfrom {{ var('user') }}", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__user_tmp"], "unique_id": "model.asana_source.stg_asana__user_tmp", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "tmp/stg_asana__user_tmp.sql", "original_file_path": "models/tmp/stg_asana__user_tmp.sql", "name": "stg_asana__user_tmp", "resource_type": "model", "alias": "stg_asana__user_tmp", "checksum": {"name": "sha256", "checksum": "6a45d1112d3ae79f22784f5fd5723a27b7894d57aea5795a37921842affc0085"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["user_data"]], "sources": [], "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.user_data"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/tmp/stg_asana__user_tmp.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`user_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__user_tmp`"}, "model.asana_source.stg_asana__section_tmp": {"raw_sql": "select * \nfrom {{ var('section') }}", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__section_tmp"], "unique_id": "model.asana_source.stg_asana__section_tmp", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "tmp/stg_asana__section_tmp.sql", "original_file_path": "models/tmp/stg_asana__section_tmp.sql", "name": "stg_asana__section_tmp", "resource_type": "model", "alias": "stg_asana__section_tmp", "checksum": {"name": "sha256", "checksum": "83155348ae27cce121000df7d3d07cd4f734098dca2747df7dd5affde1c84188"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["section_data"]], "sources": [], "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.section_data"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/tmp/stg_asana__section_tmp.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`section_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__section_tmp`"}, "model.asana_source.stg_asana__project_tmp": {"raw_sql": "select * \nfrom {{ var('project') }}", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__project_tmp"], "unique_id": "model.asana_source.stg_asana__project_tmp", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "tmp/stg_asana__project_tmp.sql", "original_file_path": "models/tmp/stg_asana__project_tmp.sql", "name": "stg_asana__project_tmp", "resource_type": "model", "alias": "stg_asana__project_tmp", "checksum": {"name": "sha256", "checksum": "2c1320ac7d1c876b9aa540a4aa0a07bcacfa92e35d74a60cb09a5948ac6869ad"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["project_data"]], "sources": [], "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.project_data"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/tmp/stg_asana__project_tmp.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`project_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project_tmp`"}, "model.asana_source.stg_asana__project_task_tmp": {"raw_sql": "select * \nfrom {{ var('project_task') }}", "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__project_task_tmp"], "unique_id": "model.asana_source.stg_asana__project_task_tmp", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "tmp/stg_asana__project_task_tmp.sql", "original_file_path": "models/tmp/stg_asana__project_task_tmp.sql", "name": "stg_asana__project_task_tmp", "resource_type": "model", "alias": "stg_asana__project_task_tmp", "checksum": {"name": "sha256", "checksum": "2ad5271ec001d7cb80698feb2fcc08b189f360d756f86feb074bbd904002b10e"}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null}, "tags": [], "refs": [["project_task_data"]], "sources": [], "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.project_task_data"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/tmp/stg_asana__project_task_tmp.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`project_task_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project_task_tmp`"}, "test.asana_source.unique_stg_asana__project_project_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_unique(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "unique", "kwargs": {"column_name": "project_id", "model": "{{ ref('stg_asana__project') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "unique_stg_asana__project_project_id"], "unique_id": "test.asana_source.unique_stg_asana__project_project_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/unique_stg_asana__project_project_id.sql", "original_file_path": "models/stg_asana.yml", "name": "unique_stg_asana__project_project_id", "resource_type": "test", "alias": "unique_stg_asana__project_project_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__project"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_unique"], "nodes": ["model.asana_source.stg_asana__project"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/unique_stg_asana__project_project_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom (\n\n select\n project_id\n\n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project`\n where project_id is not null\n group by project_id\n having count(*) > 1\n\n) validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "project_id"}, "test.asana_source.not_null_stg_asana__project_project_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_not_null(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "not_null", "kwargs": {"column_name": "project_id", "model": "{{ ref('stg_asana__project') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "not_null_stg_asana__project_project_id"], "unique_id": "test.asana_source.not_null_stg_asana__project_project_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/not_null_stg_asana__project_project_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__project_project_id", "resource_type": "test", "alias": "not_null_stg_asana__project_project_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__project"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": ["model.asana_source.stg_asana__project"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/not_null_stg_asana__project_project_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project`\nwhere project_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "project_id"}, "test.asana_source.not_null_stg_asana__project_task_project_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_not_null(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "not_null", "kwargs": {"column_name": "project_id", "model": "{{ ref('stg_asana__project_task') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "not_null_stg_asana__project_task_project_id"], "unique_id": "test.asana_source.not_null_stg_asana__project_task_project_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/not_null_stg_asana__project_task_project_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__project_task_project_id", "resource_type": "test", "alias": "not_null_stg_asana__project_task_project_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__project_task"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": ["model.asana_source.stg_asana__project_task"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/not_null_stg_asana__project_task_project_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project_task`\nwhere project_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "project_id"}, "test.asana_source.not_null_stg_asana__project_task_task_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_not_null(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "not_null", "kwargs": {"column_name": "task_id", "model": "{{ ref('stg_asana__project_task') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "not_null_stg_asana__project_task_task_id"], "unique_id": "test.asana_source.not_null_stg_asana__project_task_task_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/not_null_stg_asana__project_task_task_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__project_task_task_id", "resource_type": "test", "alias": "not_null_stg_asana__project_task_task_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__project_task"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": ["model.asana_source.stg_asana__project_task"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/not_null_stg_asana__project_task_task_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project_task`\nwhere task_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "task_id"}, "test.asana_source.unique_stg_asana__section_section_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_unique(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "unique", "kwargs": {"column_name": "section_id", "model": "{{ ref('stg_asana__section') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "unique_stg_asana__section_section_id"], "unique_id": "test.asana_source.unique_stg_asana__section_section_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/unique_stg_asana__section_section_id.sql", "original_file_path": "models/stg_asana.yml", "name": "unique_stg_asana__section_section_id", "resource_type": "test", "alias": "unique_stg_asana__section_section_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__section"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_unique"], "nodes": ["model.asana_source.stg_asana__section"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/unique_stg_asana__section_section_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom (\n\n select\n section_id\n\n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__section`\n where section_id is not null\n group by section_id\n having count(*) > 1\n\n) validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "section_id"}, "test.asana_source.not_null_stg_asana__section_section_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_not_null(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "not_null", "kwargs": {"column_name": "section_id", "model": "{{ ref('stg_asana__section') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "not_null_stg_asana__section_section_id"], "unique_id": "test.asana_source.not_null_stg_asana__section_section_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/not_null_stg_asana__section_section_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__section_section_id", "resource_type": "test", "alias": "not_null_stg_asana__section_section_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__section"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": ["model.asana_source.stg_asana__section"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/not_null_stg_asana__section_section_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__section`\nwhere section_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "section_id"}, "test.asana_source.unique_stg_asana__story_story_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_unique(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "unique", "kwargs": {"column_name": "story_id", "model": "{{ ref('stg_asana__story') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "unique_stg_asana__story_story_id"], "unique_id": "test.asana_source.unique_stg_asana__story_story_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/unique_stg_asana__story_story_id.sql", "original_file_path": "models/stg_asana.yml", "name": "unique_stg_asana__story_story_id", "resource_type": "test", "alias": "unique_stg_asana__story_story_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__story"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_unique"], "nodes": ["model.asana_source.stg_asana__story"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/unique_stg_asana__story_story_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom (\n\n select\n story_id\n\n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__story`\n where story_id is not null\n group by story_id\n having count(*) > 1\n\n) validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "story_id"}, "test.asana_source.not_null_stg_asana__story_story_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_not_null(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "not_null", "kwargs": {"column_name": "story_id", "model": "{{ ref('stg_asana__story') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "not_null_stg_asana__story_story_id"], "unique_id": "test.asana_source.not_null_stg_asana__story_story_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/not_null_stg_asana__story_story_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__story_story_id", "resource_type": "test", "alias": "not_null_stg_asana__story_story_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__story"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": ["model.asana_source.stg_asana__story"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/not_null_stg_asana__story_story_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__story`\nwhere story_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "story_id"}, "test.asana_source.not_null_stg_asana__story_target_task_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_not_null(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "not_null", "kwargs": {"column_name": "target_task_id", "model": "{{ ref('stg_asana__story') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "not_null_stg_asana__story_target_task_id"], "unique_id": "test.asana_source.not_null_stg_asana__story_target_task_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/not_null_stg_asana__story_target_task_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__story_target_task_id", "resource_type": "test", "alias": "not_null_stg_asana__story_target_task_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__story"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": ["model.asana_source.stg_asana__story"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/not_null_stg_asana__story_target_task_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__story`\nwhere target_task_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "target_task_id"}, "test.asana_source.unique_stg_asana__tag_tag_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_unique(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "unique", "kwargs": {"column_name": "tag_id", "model": "{{ ref('stg_asana__tag') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "unique_stg_asana__tag_tag_id"], "unique_id": "test.asana_source.unique_stg_asana__tag_tag_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/unique_stg_asana__tag_tag_id.sql", "original_file_path": "models/stg_asana.yml", "name": "unique_stg_asana__tag_tag_id", "resource_type": "test", "alias": "unique_stg_asana__tag_tag_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__tag"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_unique"], "nodes": ["model.asana_source.stg_asana__tag"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/unique_stg_asana__tag_tag_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom (\n\n select\n tag_id\n\n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__tag`\n where tag_id is not null\n group by tag_id\n having count(*) > 1\n\n) validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tag_id"}, "test.asana_source.not_null_stg_asana__tag_tag_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_not_null(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "not_null", "kwargs": {"column_name": "tag_id", "model": "{{ ref('stg_asana__tag') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "not_null_stg_asana__tag_tag_id"], "unique_id": "test.asana_source.not_null_stg_asana__tag_tag_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/not_null_stg_asana__tag_tag_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__tag_tag_id", "resource_type": "test", "alias": "not_null_stg_asana__tag_tag_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__tag"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": ["model.asana_source.stg_asana__tag"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/not_null_stg_asana__tag_tag_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__tag`\nwhere tag_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tag_id"}, "test.asana_source.unique_stg_asana__task_task_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_unique(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "unique", "kwargs": {"column_name": "task_id", "model": "{{ ref('stg_asana__task') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "unique_stg_asana__task_task_id"], "unique_id": "test.asana_source.unique_stg_asana__task_task_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/unique_stg_asana__task_task_id.sql", "original_file_path": "models/stg_asana.yml", "name": "unique_stg_asana__task_task_id", "resource_type": "test", "alias": "unique_stg_asana__task_task_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__task"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_unique"], "nodes": ["model.asana_source.stg_asana__task"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/unique_stg_asana__task_task_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom (\n\n select\n task_id\n\n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task`\n where task_id is not null\n group by task_id\n having count(*) > 1\n\n) validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "task_id"}, "test.asana_source.not_null_stg_asana__task_task_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_not_null(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "not_null", "kwargs": {"column_name": "task_id", "model": "{{ ref('stg_asana__task') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "not_null_stg_asana__task_task_id"], "unique_id": "test.asana_source.not_null_stg_asana__task_task_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/not_null_stg_asana__task_task_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__task_task_id", "resource_type": "test", "alias": "not_null_stg_asana__task_task_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__task"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": ["model.asana_source.stg_asana__task"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/not_null_stg_asana__task_task_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task`\nwhere task_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "task_id"}, "test.asana_source.not_null_stg_asana__task_follower_task_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_not_null(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "not_null", "kwargs": {"column_name": "task_id", "model": "{{ ref('stg_asana__task_follower') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "not_null_stg_asana__task_follower_task_id"], "unique_id": "test.asana_source.not_null_stg_asana__task_follower_task_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/not_null_stg_asana__task_follower_task_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__task_follower_task_id", "resource_type": "test", "alias": "not_null_stg_asana__task_follower_task_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__task_follower"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": ["model.asana_source.stg_asana__task_follower"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/not_null_stg_asana__task_follower_task_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_follower`\nwhere task_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "task_id"}, "test.asana_source.not_null_stg_asana__task_follower_user_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_not_null(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ ref('stg_asana__task_follower') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "not_null_stg_asana__task_follower_user_id"], "unique_id": "test.asana_source.not_null_stg_asana__task_follower_user_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/not_null_stg_asana__task_follower_user_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__task_follower_user_id", "resource_type": "test", "alias": "not_null_stg_asana__task_follower_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__task_follower"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": ["model.asana_source.stg_asana__task_follower"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/not_null_stg_asana__task_follower_user_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_follower`\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "user_id"}, "test.asana_source.not_null_stg_asana__task_section_task_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_not_null(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "not_null", "kwargs": {"column_name": "task_id", "model": "{{ ref('stg_asana__task_section') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "not_null_stg_asana__task_section_task_id"], "unique_id": "test.asana_source.not_null_stg_asana__task_section_task_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/not_null_stg_asana__task_section_task_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__task_section_task_id", "resource_type": "test", "alias": "not_null_stg_asana__task_section_task_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__task_section"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": ["model.asana_source.stg_asana__task_section"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/not_null_stg_asana__task_section_task_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_section`\nwhere task_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "task_id"}, "test.asana_source.not_null_stg_asana__task_section_section_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_not_null(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "not_null", "kwargs": {"column_name": "section_id", "model": "{{ ref('stg_asana__task_section') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "not_null_stg_asana__task_section_section_id"], "unique_id": "test.asana_source.not_null_stg_asana__task_section_section_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/not_null_stg_asana__task_section_section_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__task_section_section_id", "resource_type": "test", "alias": "not_null_stg_asana__task_section_section_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__task_section"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": ["model.asana_source.stg_asana__task_section"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/not_null_stg_asana__task_section_section_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_section`\nwhere section_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "section_id"}, "test.asana_source.not_null_stg_asana__task_tag_tag_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_not_null(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "not_null", "kwargs": {"column_name": "tag_id", "model": "{{ ref('stg_asana__task_tag') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "not_null_stg_asana__task_tag_tag_id"], "unique_id": "test.asana_source.not_null_stg_asana__task_tag_tag_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/not_null_stg_asana__task_tag_tag_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__task_tag_tag_id", "resource_type": "test", "alias": "not_null_stg_asana__task_tag_tag_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__task_tag"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": ["model.asana_source.stg_asana__task_tag"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/not_null_stg_asana__task_tag_tag_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_tag`\nwhere tag_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tag_id"}, "test.asana_source.not_null_stg_asana__task_tag_task_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_not_null(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "not_null", "kwargs": {"column_name": "task_id", "model": "{{ ref('stg_asana__task_tag') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "not_null_stg_asana__task_tag_task_id"], "unique_id": "test.asana_source.not_null_stg_asana__task_tag_task_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/not_null_stg_asana__task_tag_task_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__task_tag_task_id", "resource_type": "test", "alias": "not_null_stg_asana__task_tag_task_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__task_tag"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": ["model.asana_source.stg_asana__task_tag"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/not_null_stg_asana__task_tag_task_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_tag`\nwhere task_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "task_id"}, "test.asana_source.unique_stg_asana__team_team_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_unique(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "unique", "kwargs": {"column_name": "team_id", "model": "{{ ref('stg_asana__team') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "unique_stg_asana__team_team_id"], "unique_id": "test.asana_source.unique_stg_asana__team_team_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/unique_stg_asana__team_team_id.sql", "original_file_path": "models/stg_asana.yml", "name": "unique_stg_asana__team_team_id", "resource_type": "test", "alias": "unique_stg_asana__team_team_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__team"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_unique"], "nodes": ["model.asana_source.stg_asana__team"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/unique_stg_asana__team_team_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom (\n\n select\n team_id\n\n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__team`\n where team_id is not null\n group by team_id\n having count(*) > 1\n\n) validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "team_id"}, "test.asana_source.not_null_stg_asana__team_team_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_not_null(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "not_null", "kwargs": {"column_name": "team_id", "model": "{{ ref('stg_asana__team') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "not_null_stg_asana__team_team_id"], "unique_id": "test.asana_source.not_null_stg_asana__team_team_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/not_null_stg_asana__team_team_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__team_team_id", "resource_type": "test", "alias": "not_null_stg_asana__team_team_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__team"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": ["model.asana_source.stg_asana__team"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/not_null_stg_asana__team_team_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__team`\nwhere team_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "team_id"}, "test.asana_source.unique_stg_asana__user_user_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_unique(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "unique", "kwargs": {"column_name": "user_id", "model": "{{ ref('stg_asana__user') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "unique_stg_asana__user_user_id"], "unique_id": "test.asana_source.unique_stg_asana__user_user_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/unique_stg_asana__user_user_id.sql", "original_file_path": "models/stg_asana.yml", "name": "unique_stg_asana__user_user_id", "resource_type": "test", "alias": "unique_stg_asana__user_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__user"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_unique"], "nodes": ["model.asana_source.stg_asana__user"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/unique_stg_asana__user_user_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom (\n\n select\n user_id\n\n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__user`\n where user_id is not null\n group by user_id\n having count(*) > 1\n\n) validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "user_id"}, "test.asana_source.not_null_stg_asana__user_user_id": {"raw_sql": "{{ config(severity='ERROR') }}{{ test_not_null(**_dbt_schema_test_kwargs) }}", "test_metadata": {"namespace": null, "name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ ref('stg_asana__user') }}"}}, "compiled": true, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "schema_test", "not_null_stg_asana__user_user_id"], "unique_id": "test.asana_source.not_null_stg_asana__user_user_id", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "schema_test/not_null_stg_asana__user_user_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__user_user_id", "resource_type": "test", "alias": "not_null_stg_asana__user_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "materialized": "table", "persist_docs": {}, "post-hook": [], "pre-hook": [], "vars": {}, "quoting": {}, "column_types": {}, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "full_refresh": null, "severity": "ERROR"}, "tags": ["schema"], "refs": [["stg_asana__user"]], "sources": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": ["model.asana_source.stg_asana__user"]}, "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "build_path": "target/compiled/asana_source/models/stg_asana.yml/schema_test/not_null_stg_asana__user_user_id.sql", "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table", "severity": "ERROR"}, "compiled_sql": "\n \n \n\n\n\nselect count(*) as validation_errors\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__user`\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "user_id"}}, "sources": {"source.asana_source.asana.user": {"fqn": ["asana_source", "asana", "user"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.user", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "user", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "user", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table of all accounts in the organization", "columns": {"id": {"name": "id", "description": "System generated unique ID for a user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "Email associated with the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Given name for the user as it appears in the UI", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`user`"}, "source.asana_source.asana.task": {"fqn": ["asana_source", "asana", "task"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.task", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "task", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "task", "resource_type": "source", "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 all created tasks", "columns": {"id": {"name": "id", "description": "System generated unique identifier for the task", "meta": {}, "data_type": null, "quote": null, "tags": []}, "assignee_id": {"name": "assignee_id", "description": "Foreign key referencing the USER assigned to this task (note that a task may not have an assignee)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "assignee_status": {"name": "assignee_status", "description": "Scheduling status for the assignee that the task is or will eventually be assigned to. This maps to the sections of \"My Tasks\"", "meta": {}, "data_type": null, "quote": null, "tags": []}, "completed": {"name": "completed", "description": "Boolean that's true if the task is *currently* marked completed. Note that a task can be unmarked complete", "meta": {}, "data_type": null, "quote": null, "tags": []}, "completed_at": {"name": "completed_at", "description": "Timestamp of when the task was completed, if still currently completed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "completed_by_id": {"name": "completed_by_id", "description": "Foreign key that references the USER who completed the task, if currently completed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the task was first made", "meta": {}, "data_type": null, "quote": null, "tags": []}, "due_on": {"name": "due_on", "description": "The date on which the task is due. Note that not tasks may not have a due date", "meta": {}, "data_type": null, "quote": null, "tags": []}, "due_at": {"name": "due_at", "description": "The date and time at which the task is due, only if a specific time is given.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "modified_at": {"name": "modified_at", "description": "The last time the task was updated. Does not include comments nor changes in associations (ie their projects)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The title of the task", "meta": {}, "data_type": null, "quote": null, "tags": []}, "notes": {"name": "notes", "description": "Free-form textual description of the task (as seen in the UI)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The ID of the parent of the task, if it is a subtask. Self-refers to TASK", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_on": {"name": "start_on", "description": "The start date of the task, if given with the due date", "meta": {}, "data_type": null, "quote": null, "tags": []}, "workspace_id": {"name": "workspace_id", "description": "The id of an organization's workspace in asana. Not necessary unless you have access to multiple organization's asanas.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`task`"}, "source.asana_source.asana.project": {"fqn": ["asana_source", "asana", "project"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.project", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "project", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "project", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table containing all projects", "columns": {"id": {"name": "id", "description": "System generated unique ID of the project", "meta": {}, "data_type": null, "quote": null, "tags": []}, "archived": {"name": "archived", "description": "Boolean representing whether the project has been archived (removed from asana UI)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "color": {"name": "color", "description": "Color of the project as seen in the UI", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the story was made/the action was logged", "meta": {}, "data_type": null, "quote": null, "tags": []}, "current_status": {"name": "current_status", "description": "The most recent progress status update for the project. This is sent to all project followers", "meta": {}, "data_type": null, "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "The date the project is due", "meta": {}, "data_type": null, "quote": null, "tags": []}, "modified_at": {"name": "modified_at", "description": "The last time the project was updated. Does not include comments nor changes in associations (ie new tasks)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The given name of the project", "meta": {}, "data_type": null, "quote": null, "tags": []}, "notes": {"name": "notes", "description": "Free-form textual notes associated with the project.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "Foreign key referencing the USER who owns the project.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "public": {"name": "public", "description": "Boolean that is true if the project is public to the whole organization, false if not.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "team_id": {"name": "team_id", "description": "Foreign key referencing the TEAM that the project is shared with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "workspace_id": {"name": "workspace_id", "description": "The id of an organization's workspace in asana. Not necessary unless you have access to multiple asana workspaces.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`project`"}, "source.asana_source.asana.story": {"fqn": ["asana_source", "asana", "story"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.story", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "story", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "story", "resource_type": "source", "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 all stories -- stories are actions taken on tasks", "columns": {"id": {"name": "id", "description": "System generated unique ID of the story/action taken", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the story was made/the action was logged", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Foreign key referencing the USER who created the story/took the action on the task (sometimes null)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "target_id": {"name": "target_id", "description": "Foreign key referencing the TASK that the story is about.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "text": {"name": "text", "description": "Free-form text describing the action that was taken (if type = system), or the content of a comment (if type = comment)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "The origin type of the story - a comment or change to the backend/altering a task", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source": {"name": "source", "description": "Where the story occurred (web, mobile, email, or api)", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`story`"}, "source.asana_source.asana.team": {"fqn": ["asana_source", "asana", "team"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.team", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "team", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "team", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table of the teams within the organization", "columns": {"id": {"name": "id", "description": "System generated unique ID for each team", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Provided name for each team. There can be duplicates", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Equivalent to the workspace_id, as organizations are a kind of workspace. Probably not relevant unless working with multiple orgs.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`team`"}, "source.asana_source.asana.tag": {"fqn": ["asana_source", "asana", "tag"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.tag", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "tag", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "tag", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table of the custom tags made in the organization", "columns": {"id": {"name": "id", "description": "System generated ID for each tag", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The name of the tag as it appears in the UI. There can be duplicates.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the tag was created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "color": {"name": "color", "description": "Chosen color of the tag as it appears in the UI", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`tag`"}, "source.asana_source.asana.section": {"fqn": ["asana_source", "asana", "section"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.section", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "section", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "section", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table of all sections within projects. If tasks in a project are not in an explicit user-made section, a default section called \"(no section)\" is created here", "columns": {"id": {"name": "id", "description": "System generated unique ID for each section", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the section was created by a user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The given name of the section as it appears in the UI. Is stored as \"(no section)\" when this is the default bucket for tasks with a section in a project", "meta": {}, "data_type": null, "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the PROJECT that the section lives in", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`section`"}, "source.asana_source.asana.project_task": {"fqn": ["asana_source", "asana", "project_task"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.project_task", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "project_task", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "project_task", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table of tasks and the project(s) they each belong to. If a project doesn't have a task, it won't be in here (and vice versa)", "columns": {"project_id": {"name": "project_id", "description": "Foreign key referencing a PROJECT the task belongs to", "meta": {}, "data_type": null, "quote": null, "tags": []}, "task_id": {"name": "task_id", "description": "Foreign key referencing the TASK in the project", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`project_task`"}, "source.asana_source.asana.task_follower": {"fqn": ["asana_source", "asana", "task_follower"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.task_follower", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "task_follower", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "task_follower", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table of tasks with the users that are following them. Tasks without users do not appear here.", "columns": {"task_id": {"name": "task_id", "description": "Foreign key referencing the TASK being followed", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Foreign key referencing the USER that is following the task", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`task_follower`"}, "source.asana_source.asana.task_tag": {"fqn": ["asana_source", "asana", "task_tag"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.task_tag", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "task_tag", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "task_tag", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table of tasks with the tags attached to them. Tasks without tags (and vice versa) do not appear here.", "columns": {"task_id": {"name": "task_id", "description": "Foreign key referencing the TASK that is tagged", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tag_id": {"name": "tag_id", "description": "Foreign key referencing the TAG that is applied to the task", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`task_tag`"}, "source.asana_source.asana.task_section": {"fqn": ["asana_source", "asana", "task_section"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.task_section", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "task_section", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "task_section", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table of tasks and the section that they live under. Section-less tasks within projects appear here, but project-less tasks do not", "columns": {"section_id": {"name": "section_id", "description": "Foreign key referencing the SECTION that the task lives under.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "task_id": {"name": "task_id", "description": "Foreign key referencing the TASK that lives in a section.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`task_section`"}}, "macros": {"macro.dbt_bigquery.date_sharded_table": {"unique_id": "macro.dbt_bigquery.date_sharded_table", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/etc.sql", "original_file_path": "macros/etc.sql", "name": "date_sharded_table", "macro_sql": "{% macro date_sharded_table(base_name) %}\n {{ return(base_name ~ \"[DBT__PARTITION_DATE]\") }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.grant_access_to": {"unique_id": "macro.dbt_bigquery.grant_access_to", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/etc.sql", "original_file_path": "macros/etc.sql", "name": "grant_access_to", "macro_sql": "{% macro grant_access_to(entity, entity_type, role, grant_target_dict) -%}\n {% do adapter.grant_access_to(entity, entity_type, role, grant_target_dict) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.get_partitions_metadata": {"unique_id": "macro.dbt_bigquery.get_partitions_metadata", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/etc.sql", "original_file_path": "macros/etc.sql", "name": "get_partitions_metadata", "macro_sql": "\n\n{%- macro get_partitions_metadata(table) -%}\n {%- if execute -%}\n {%- set res = adapter.get_partitions_metadata(table) -%}\n {{- return(res) -}}\n {%- endif -%}\n {{- return(None) -}}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__get_catalog": {"unique_id": "macro.dbt_bigquery.bigquery__get_catalog", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "name": "bigquery__get_catalog", "macro_sql": "{% macro bigquery__get_catalog(information_schema, schemas) -%}\n\n {%- if (schemas | length) == 0 -%}\n {# Hopefully nothing cares about the columns we return when there are no rows #}\n {%- set query = \"select 1 as id limit 0\" -%}\n {%- else -%}\n\n {%- set query -%}\n with tables as (\n select\n project_id as table_database,\n dataset_id as table_schema,\n table_id as original_table_name,\n\n concat(project_id, '.', dataset_id, '.', table_id) as relation_id,\n\n row_count,\n size_bytes as size_bytes,\n case\n when type = 1 then 'table'\n when type = 2 then 'view'\n else 'external'\n end as table_type,\n\n REGEXP_CONTAINS(table_id, '^.+[0-9]{8}$') and coalesce(type, 0) = 1 as is_date_shard,\n REGEXP_EXTRACT(table_id, '^(.+)[0-9]{8}$') as shard_base_name,\n REGEXP_EXTRACT(table_id, '^.+([0-9]{8})$') as shard_name\n\n from {{ information_schema.replace(information_schema_view='__TABLES__') }}\n where (\n {%- for schema in schemas -%}\n upper(dataset_id) = upper('{{ schema }}'){%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n ),\n\n extracted as (\n\n select *,\n case\n when is_date_shard then shard_base_name\n else original_table_name\n end as table_name\n\n from tables\n\n ),\n\n unsharded_tables as (\n\n select\n table_database,\n table_schema,\n table_name,\n coalesce(table_type, 'external') as table_type,\n is_date_shard,\n\n struct(\n min(shard_name) as shard_min,\n max(shard_name) as shard_max,\n count(*) as shard_count\n ) as table_shards,\n\n sum(size_bytes) as size_bytes,\n sum(row_count) as row_count,\n\n max(relation_id) as relation_id\n\n from extracted\n group by 1,2,3,4,5\n\n ),\n\n info_schema_columns as (\n\n select\n concat(table_catalog, '.', table_schema, '.', table_name) as relation_id,\n table_catalog as table_database,\n table_schema,\n table_name,\n\n -- use the \"real\" column name from the paths query below\n column_name as base_column_name,\n ordinal_position as column_index,\n\n is_partitioning_column,\n clustering_ordinal_position\n\n from {{ information_schema.replace(information_schema_view='COLUMNS') }}\n where ordinal_position is not null\n\n ),\n\n info_schema_column_paths as (\n\n select\n concat(table_catalog, '.', table_schema, '.', table_name) as relation_id,\n field_path as column_name,\n data_type as column_type,\n column_name as base_column_name,\n description as column_comment\n\n from {{ information_schema.replace(information_schema_view='COLUMN_FIELD_PATHS') }}\n\n ),\n\n columns as (\n\n select * except (base_column_name)\n from info_schema_columns\n join info_schema_column_paths using (relation_id, base_column_name)\n\n ),\n\n column_stats as (\n\n select\n table_database,\n table_schema,\n table_name,\n max(relation_id) as relation_id,\n max(case when is_partitioning_column = 'YES' then 1 else 0 end) = 1 as is_partitioned,\n max(case when is_partitioning_column = 'YES' then column_name else null end) as partition_column,\n max(case when clustering_ordinal_position is not null then 1 else 0 end) = 1 as is_clustered,\n array_to_string(\n array_agg(\n case\n when clustering_ordinal_position is not null then column_name\n else null\n end ignore nulls\n order by clustering_ordinal_position\n ), ', '\n ) as clustering_columns\n\n from columns\n group by 1,2,3\n\n )\n\n select\n unsharded_tables.table_database,\n unsharded_tables.table_schema,\n case\n when is_date_shard then concat(unsharded_tables.table_name, '*')\n else unsharded_tables.table_name\n end as table_name,\n unsharded_tables.table_type,\n\n -- coalesce name and type for External tables - these columns are not\n -- present in the COLUMN_FIELD_PATHS resultset\n coalesce(columns.column_name, '') as column_name,\n -- invent a row number to account for nested fields -- BQ does\n -- not treat these nested properties as independent fields\n row_number() over (\n partition by relation_id\n order by columns.column_index, columns.column_name\n ) as column_index,\n coalesce(columns.column_type, '') as column_type,\n columns.column_comment,\n\n 'Shard count' as `stats__date_shards__label`,\n table_shards.shard_count as `stats__date_shards__value`,\n 'The number of date shards in this table' as `stats__date_shards__description`,\n is_date_shard as `stats__date_shards__include`,\n\n 'Shard (min)' as `stats__date_shard_min__label`,\n table_shards.shard_min as `stats__date_shard_min__value`,\n 'The first date shard in this table' as `stats__date_shard_min__description`,\n is_date_shard as `stats__date_shard_min__include`,\n\n 'Shard (max)' as `stats__date_shard_max__label`,\n table_shards.shard_max as `stats__date_shard_max__value`,\n 'The last date shard in this table' as `stats__date_shard_max__description`,\n is_date_shard as `stats__date_shard_max__include`,\n\n '# Rows' as `stats__num_rows__label`,\n row_count as `stats__num_rows__value`,\n 'Approximate count of rows in this table' as `stats__num_rows__description`,\n (unsharded_tables.table_type = 'table') as `stats__num_rows__include`,\n\n 'Approximate Size' as `stats__num_bytes__label`,\n size_bytes as `stats__num_bytes__value`,\n 'Approximate size of table as reported by BigQuery' as `stats__num_bytes__description`,\n (unsharded_tables.table_type = 'table') as `stats__num_bytes__include`,\n\n 'Partitioned By' as `stats__partitioning_type__label`,\n partition_column as `stats__partitioning_type__value`,\n 'The partitioning column for this table' as `stats__partitioning_type__description`,\n is_partitioned as `stats__partitioning_type__include`,\n\n 'Clustered By' as `stats__clustering_fields__label`,\n clustering_columns as `stats__clustering_fields__value`,\n 'The clustering columns for this table' as `stats__clustering_fields__description`,\n is_clustered as `stats__clustering_fields__include`\n\n -- join using relation_id (an actual relation, not a shard prefix) to make\n -- sure that column metadata is picked up through the join. This will only\n -- return the column information for the \"max\" table in a date-sharded table set\n from unsharded_tables\n left join columns using (relation_id)\n left join column_stats using (relation_id)\n {%- endset -%}\n\n {%- endif -%}\n\n {{ return(run_query(query)) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.partition_by": {"unique_id": "macro.dbt_bigquery.partition_by", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "partition_by", "macro_sql": "{% macro partition_by(partition_config) -%}\n {%- if partition_config is none -%}\n {% do return('') %}\n {%- elif partition_config.data_type | lower in ('date','timestamp','datetime') -%}\n partition by {{ partition_config.render() }}\n {%- elif partition_config.data_type | lower in ('int64') -%}\n {%- set range = partition_config.range -%}\n partition by range_bucket(\n {{ partition_config.field }},\n generate_array({{ range.start}}, {{ range.end }}, {{ range.interval }})\n )\n {%- endif -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.cluster_by": {"unique_id": "macro.dbt_bigquery.cluster_by", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "cluster_by", "macro_sql": "{% macro cluster_by(raw_cluster_by) %}\n {%- if raw_cluster_by is not none -%}\n cluster by {% if raw_cluster_by is string -%}\n {% set raw_cluster_by = [raw_cluster_by] %}\n {%- endif -%}\n {%- for cluster in raw_cluster_by -%}\n {{ cluster }}\n {%- if not loop.last -%}, {% endif -%}\n {%- endfor -%}\n\n {% endif %}\n\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery_table_options": {"unique_id": "macro.dbt_bigquery.bigquery_table_options", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery_table_options", "macro_sql": "{% macro bigquery_table_options(config, node, temporary) %}\n {% set opts = adapter.get_table_options(config, node, temporary) %}\n\n {% set options -%}\n OPTIONS({% for opt_key, opt_val in opts.items() %}\n {{ opt_key }}={{ opt_val }}{{ \",\" if not loop.last }}\n {% endfor %})\n {%- endset %}\n {%- do return(options) -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__create_table_as": {"unique_id": "macro.dbt_bigquery.bigquery__create_table_as", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__create_table_as", "macro_sql": "{% macro bigquery__create_table_as(temporary, relation, sql) -%}\n {%- set raw_partition_by = config.get('partition_by', none) -%}\n {%- set raw_cluster_by = config.get('cluster_by', none) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {%- set partition_config = adapter.parse_partition_by(raw_partition_by) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create or replace table {{ relation }}\n {{ partition_by(partition_config) }}\n {{ cluster_by(raw_cluster_by) }}\n {{ bigquery_table_options(config, model, temporary) }}\n as (\n {{ sql }}\n );\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__create_view_as": {"unique_id": "macro.dbt_bigquery.bigquery__create_view_as", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__create_view_as", "macro_sql": "{% macro bigquery__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\n create or replace view {{ relation }}\n {{ bigquery_table_options(config, model, temporary=false) }}\n as {{ sql }};\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__create_schema": {"unique_id": "macro.dbt_bigquery.bigquery__create_schema", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__create_schema", "macro_sql": "{% macro bigquery__create_schema(relation) -%}\n {{ adapter.create_schema(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__drop_schema": {"unique_id": "macro.dbt_bigquery.bigquery__drop_schema", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__drop_schema", "macro_sql": "{% macro bigquery__drop_schema(relation) -%}\n {{ adapter.drop_schema(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__drop_relation": {"unique_id": "macro.dbt_bigquery.bigquery__drop_relation", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__drop_relation", "macro_sql": "{% macro bigquery__drop_relation(relation) -%}\n {% call statement('drop_relation') -%}\n drop {{ relation.type }} if exists {{ relation }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__get_columns_in_relation": {"unique_id": "macro.dbt_bigquery.bigquery__get_columns_in_relation", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__get_columns_in_relation", "macro_sql": "{% macro bigquery__get_columns_in_relation(relation) -%}\n {{ return(adapter.get_columns_in_relation(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__list_relations_without_caching": {"unique_id": "macro.dbt_bigquery.bigquery__list_relations_without_caching", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__list_relations_without_caching", "macro_sql": "{% macro bigquery__list_relations_without_caching(schema_relation) -%}\n {{ return(adapter.list_relations_without_caching(schema_relation)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__current_timestamp": {"unique_id": "macro.dbt_bigquery.bigquery__current_timestamp", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__current_timestamp", "macro_sql": "{% macro bigquery__current_timestamp() -%}\n CURRENT_TIMESTAMP()\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__snapshot_string_as_time": {"unique_id": "macro.dbt_bigquery.bigquery__snapshot_string_as_time", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__snapshot_string_as_time", "macro_sql": "{% macro bigquery__snapshot_string_as_time(timestamp) -%}\n {%- set result = 'TIMESTAMP(\"' ~ timestamp ~ '\")' -%}\n {{ return(result) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__list_schemas": {"unique_id": "macro.dbt_bigquery.bigquery__list_schemas", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__list_schemas", "macro_sql": "{% macro bigquery__list_schemas(database) -%}\n {{ return(adapter.list_schemas(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__check_schema_exists": {"unique_id": "macro.dbt_bigquery.bigquery__check_schema_exists", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__check_schema_exists", "macro_sql": "{% macro bigquery__check_schema_exists(information_schema, schema) %}\n {{ return(adapter.check_schema_exists(information_schema.database, schema)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__persist_docs": {"unique_id": "macro.dbt_bigquery.bigquery__persist_docs", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__persist_docs", "macro_sql": "{% macro bigquery__persist_docs(relation, model, for_relation, for_columns) -%}\n {% if for_columns and config.persist_column_docs() and model.columns %}\n {% do alter_column_comment(relation, model.columns) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__alter_column_comment": {"unique_id": "macro.dbt_bigquery.bigquery__alter_column_comment", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__alter_column_comment", "macro_sql": "{% macro bigquery__alter_column_comment(relation, column_dict) -%}\n {% do adapter.update_columns(relation, column_dict) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__rename_relation": {"unique_id": "macro.dbt_bigquery.bigquery__rename_relation", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__rename_relation", "macro_sql": "{% macro bigquery__rename_relation(from_relation, to_relation) -%}\n {% do adapter.rename_relation(from_relation, to_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__alter_column_type": {"unique_id": "macro.dbt_bigquery.bigquery__alter_column_type", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__alter_column_type", "macro_sql": "{% macro bigquery__alter_column_type(relation, column_name, new_column_type) -%}\n {#\n Changing a column's data type using a query requires you to scan the entire table.\n The query charges can be significant if the table is very large.\n\n https://cloud.google.com/bigquery/docs/manually-changing-schemas#changing_a_columns_data_type\n #}\n {% set relation_columns = get_columns_in_relation(relation) %}\n\n {% set sql %}\n select\n {%- for col in relation_columns -%}\n {% if col.column == column_name %}\n CAST({{ col.quoted }} AS {{ new_column_type }}) AS {{ col.quoted }}\n {%- else %}\n {{ col.quoted }}\n {%- endif %}\n {%- if not loop.last %},{% endif -%}\n {%- endfor %}\n from {{ relation }}\n {% endset %}\n\n {% call statement('alter_column_type') %}\n {{ create_table_as(False, relation, sql)}}\n {%- endcall %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__create_csv_table": {"unique_id": "macro.dbt_bigquery.bigquery__create_csv_table", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "bigquery__create_csv_table", "macro_sql": "{% macro bigquery__create_csv_table(model, agate_table) %}\n -- no-op\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__reset_csv_table": {"unique_id": "macro.dbt_bigquery.bigquery__reset_csv_table", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "bigquery__reset_csv_table", "macro_sql": "{% macro bigquery__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__load_csv_rows": {"unique_id": "macro.dbt_bigquery.bigquery__load_csv_rows", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "bigquery__load_csv_rows", "macro_sql": "{% macro bigquery__load_csv_rows(model, agate_table) %}\n\n {%- set column_override = model['config'].get('column_types', {}) -%}\n {{ adapter.load_dataframe(model['database'], model['schema'], model['alias'],\n \t\t\t\t\t\t\tagate_table, column_override) }}\n {% if config.persist_relation_docs() and 'description' in model %}\n\n \t{{ adapter.update_table_description(model['database'], model['schema'], model['alias'], model['description']) }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__handle_existing_table": {"unique_id": "macro.dbt_bigquery.bigquery__handle_existing_table", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/materializations/view.sql", "original_file_path": "macros/materializations/view.sql", "name": "bigquery__handle_existing_table", "macro_sql": "{% macro bigquery__handle_existing_table(full_refresh, old_relation) %}\n {%- if full_refresh -%}\n {{ adapter.drop_relation(old_relation) }}\n {%- else -%}\n {{ exceptions.relation_wrong_type(old_relation, 'view') }}\n {%- endif -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.materialization_view_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_view_bigquery", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/materializations/view.sql", "original_file_path": "macros/materializations/view.sql", "name": "materialization_view_bigquery", "macro_sql": "{% materialization view, adapter='bigquery' -%}\n {% set to_return = create_or_replace_view(run_outside_transaction_hooks=False) %}\n\n {% set target_relation = this.incorporate(type='view') %}\n {% do persist_docs(target_relation, model) %}\n\n {% if config.get('grant_access_to') %}\n {% for grant_target_dict in config.get('grant_access_to') %}\n {% do adapter.grant_access_to(this, 'view', None, grant_target_dict) %}\n {% endfor %}\n {% endif %}\n\n {% do return(to_return) %}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.make_date_partitioned_table": {"unique_id": "macro.dbt_bigquery.make_date_partitioned_table", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/materializations/table.sql", "original_file_path": "macros/materializations/table.sql", "name": "make_date_partitioned_table", "macro_sql": "{% macro make_date_partitioned_table(model, relation, dates, should_create, verbose=False) %}\n\n {% if should_create %}\n {{ adapter.make_date_partitioned_table(relation) }}\n {% endif %}\n\n {% for date in dates %}\n {% set date = (date | string) %}\n {% if verbose %}\n {% set table_start_time = modules.datetime.datetime.now().strftime(\"%H:%M:%S\") %}\n {{ log(table_start_time ~ ' | -> Running for day ' ~ date, info=True) }}\n {% endif %}\n\n {% set fixed_sql = model['compiled_sql'] | replace('[DBT__PARTITION_DATE]', date) %}\n {% set _ = adapter.execute_model(model, 'table', fixed_sql, decorator=date) %}\n {% endfor %}\n\n {% set num_days = dates | length %}\n {% if num_days == 1 %}\n {% set result_str = 'CREATED 1 PARTITION' %}\n {% else %}\n {% set result_str = 'CREATED ' ~ num_days ~ ' PARTITIONS' %}\n {% endif %}\n\n {{ store_result('main', response=result_str) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.materialization_table_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_table_bigquery", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/materializations/table.sql", "original_file_path": "macros/materializations/table.sql", "name": "materialization_table_bigquery", "macro_sql": "{% materialization table, adapter='bigquery' -%}\n\n {%- set identifier = model['alias'] -%}\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set exists_not_as_table = (old_relation is not none and not old_relation.is_table) -%}\n {%- set target_relation = api.Relation.create(database=database, schema=schema, identifier=identifier, type='table') -%}\n {%- set verbose = config.get('verbose', False) -%}\n\n {# partitions: iterate over each partition, running a separate query in a for-loop #}\n {%- set partitions = config.get('partitions') -%}\n\n {% if partitions %}\n {% if partitions is number or partitions is string %}\n {% set partitions = [(partitions | string)] %}\n {% endif %}\n\n {% if partitions is not iterable %}\n {{ exceptions.raise_compiler_error(\"Provided `partitions` configuration is not a list. Got: \" ~ partitions, model) }}\n {% endif %}\n {% endif %}\n\n {{ run_hooks(pre_hooks) }}\n\n {#\n Since dbt uses WRITE_TRUNCATE mode for tables, we only need to drop this thing\n if it is not a table. If it _is_ already a table, then we can overwrite it without downtime\n #}\n {%- if exists_not_as_table -%}\n {{ adapter.drop_relation(old_relation) }}\n {%- endif -%}\n\n -- build model\n {% if partitions %}\n {# Create the dp-table if 1. it does not exist or 2. it existed, but we just dropped it #}\n {%- set should_create = (old_relation is none or exists_not_as_table) -%}\n {{ make_date_partitioned_table(model, target_relation, partitions, should_create, verbose) }}\n {% else %}\n {%- set raw_partition_by = config.get('partition_by', none) -%}\n {%- set partition_by = adapter.parse_partition_by(raw_partition_by) -%}\n {%- set cluster_by = config.get('cluster_by', none) -%}\n {% if not adapter.is_replaceable(old_relation, partition_by, cluster_by) %}\n {% do log(\"Hard refreshing \" ~ old_relation ~ \" because it is not replaceable\") %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n {% call statement('main') -%}\n {{ create_table_as(False, target_relation, sql) }}\n {% endcall -%}\n {% endif %}\n\n {{ run_hooks(post_hooks) }}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.materialization_copy_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_copy_bigquery", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/materializations/copy.sql", "original_file_path": "macros/materializations/copy.sql", "name": "materialization_copy_bigquery", "macro_sql": "{% materialization copy, adapter='bigquery' -%}\n\n {# Setup #}\n {{ run_hooks(pre_hooks) }}\n\n {# there should be exactly one ref or exactly one source #}\n {% set destination = this.incorporate(type='table') %}\n\n {% set dependency_type = none %}\n {% if (model.refs | length) == 1 and (model.sources | length) == 0 %}\n {% set dependency_type = 'ref' %}\n {% elif (model.refs | length) == 0 and (model.sources | length) == 1 %}\n {% set dependency_type = 'source' %}\n {% else %}\n {% set msg %}\n Expected exactly one ref or exactly one source, instead got {{ model.refs | length }} models and {{ model.sources | length }} sources.\n {% endset %}\n {% do exceptions.raise_compiler_error(msg) %}\n {% endif %}\n\n {% if dependency_type == 'ref' %}\n {% set src = ref(*model.refs[0]) %}\n {% else %}\n {% set src = source(*model.sources[0]) %}\n {% endif %}\n\n {%- set result_str = adapter.copy_table(\n src,\n destination,\n config.get('copy_materialization', 'table')) -%}\n\n {{ store_result('main', response=result_str) }}\n\n {# Clean up #}\n {{ run_hooks(post_hooks) }}\n {{ adapter.commit() }}\n\n {{ return({'relations': [destination]}) }}\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.dbt_bigquery_validate_get_incremental_strategy": {"unique_id": "macro.dbt_bigquery.dbt_bigquery_validate_get_incremental_strategy", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "dbt_bigquery_validate_get_incremental_strategy", "macro_sql": "{% macro dbt_bigquery_validate_get_incremental_strategy(config) %}\n {#-- Find and validate the incremental strategy #}\n {%- set strategy = config.get(\"incremental_strategy\", default=\"merge\") -%}\n\n {% set invalid_strategy_msg -%}\n Invalid incremental strategy provided: {{ strategy }}\n Expected one of: 'merge', 'insert_overwrite'\n {%- endset %}\n {% if strategy not in ['merge', 'insert_overwrite'] %}\n {% do exceptions.raise_compiler_error(invalid_strategy_msg) %}\n {% endif %}\n\n {% do return(strategy) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bq_insert_overwrite": {"unique_id": "macro.dbt_bigquery.bq_insert_overwrite", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "bq_insert_overwrite", "macro_sql": "{% macro bq_insert_overwrite(tmp_relation, target_relation, sql, unique_key, partition_by, partitions, dest_columns) %}\n {%- set partition_type =\n 'date' if partition_by.data_type in ('timestamp, datetime')\n else partition_by.data_type -%}\n\n {% if partitions is not none and partitions != [] %} {# static #}\n\n {% set predicate -%}\n {{ partition_by.render(alias='DBT_INTERNAL_DEST') }} in (\n {{ partitions | join (', ') }}\n )\n {%- endset %}\n\n {%- set source_sql -%}\n (\n {{sql}}\n )\n {%- endset -%}\n\n {{ get_insert_overwrite_merge_sql(target_relation, source_sql, dest_columns, [predicate], include_sql_header=true) }}\n\n {% else %} {# dynamic #}\n\n {% set predicate -%}\n {{ partition_by.render(alias='DBT_INTERNAL_DEST') }} in unnest(dbt_partitions_for_replacement)\n {%- endset %}\n\n {%- set source_sql -%}\n (\n select * from {{ tmp_relation }}\n )\n {%- endset -%}\n\n -- generated script to merge partitions into {{ target_relation }}\n declare dbt_partitions_for_replacement array<{{ partition_type }}>;\n declare _dbt_max_partition {{ partition_by.data_type }};\n\n set _dbt_max_partition = (\n select max({{ partition_by.field }}) from {{ this }}\n );\n\n -- 1. create a temp table\n {{ create_table_as(True, tmp_relation, sql) }}\n\n -- 2. define partitions to update\n set (dbt_partitions_for_replacement) = (\n select as struct\n array_agg(distinct {{ partition_by.render() }})\n from {{ tmp_relation }}\n );\n\n {#\n TODO: include_sql_header is a hack; consider a better approach that includes\n the sql_header at the materialization-level instead\n #}\n -- 3. run the merge statement\n {{ get_insert_overwrite_merge_sql(target_relation, source_sql, dest_columns, [predicate], include_sql_header=false) }};\n\n -- 4. clean up the temp table\n drop table if exists {{ tmp_relation }}\n\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.materialization_incremental_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_incremental_bigquery", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "materialization_incremental_bigquery", "macro_sql": "{% materialization incremental, adapter='bigquery' -%}\n\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {%- set target_relation = this %}\n {%- set existing_relation = load_relation(this) %}\n {%- set tmp_relation = make_temp_relation(this) %}\n\n {#-- Validate early so we don't run SQL if the strategy is invalid --#}\n {% set strategy = dbt_bigquery_validate_get_incremental_strategy(config) -%}\n\n {%- set raw_partition_by = config.get('partition_by', none) -%}\n {%- set partition_by = adapter.parse_partition_by(raw_partition_by) -%}\n {%- set partitions = config.get('partitions', none) -%}\n {%- set cluster_by = config.get('cluster_by', none) -%}\n\n {{ run_hooks(pre_hooks) }}\n\n {% if existing_relation is none %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n {% elif existing_relation.is_view %}\n {#-- There's no way to atomically replace a view with a table on BQ --#}\n {{ adapter.drop_relation(existing_relation) }}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n {% elif full_refresh_mode %}\n {#-- If the partition/cluster config has changed, then we must drop and recreate --#}\n {% if not adapter.is_replaceable(existing_relation, partition_by, cluster_by) %}\n {% do log(\"Hard refreshing \" ~ existing_relation ~ \" because it is not replaceable\") %}\n {{ adapter.drop_relation(existing_relation) }}\n {% endif %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n {% else %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n\n {#-- if partitioned, use BQ scripting to get the range of partition values to be updated --#}\n {% if strategy == 'insert_overwrite' %}\n\n {% set missing_partition_msg -%}\n The 'insert_overwrite' strategy requires the `partition_by` config.\n {%- endset %}\n {% if partition_by is none %}\n {% do exceptions.raise_compiler_error(missing_partition_msg) %}\n {% endif %}\n\n {% set build_sql = bq_insert_overwrite(\n tmp_relation,\n target_relation,\n sql,\n unique_key,\n partition_by,\n partitions,\n dest_columns) %}\n\n {% else %}\n {#-- wrap sql in parens to make it a subquery --#}\n {%- set source_sql -%}\n (\n {{sql}}\n )\n {%- endset -%}\n\n {% set build_sql = get_merge_sql(target_relation, source_sql, unique_key, dest_columns) %}\n\n {% endif %}\n\n {% endif %}\n\n {%- call statement('main') -%}\n {{ build_sql }}\n {% endcall %}\n\n {{ run_hooks(post_hooks) }}\n\n {% set target_relation = this.incorporate(type='table') %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__snapshot_hash_arguments": {"unique_id": "macro.dbt_bigquery.bigquery__snapshot_hash_arguments", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "bigquery__snapshot_hash_arguments", "macro_sql": "{% macro bigquery__snapshot_hash_arguments(args) -%}\n to_hex(md5(concat({%- for arg in args -%}\n coalesce(cast({{ arg }} as string), ''){% if not loop.last %}, '|',{% endif -%}\n {%- endfor -%}\n )))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__create_columns": {"unique_id": "macro.dbt_bigquery.bigquery__create_columns", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "bigquery__create_columns", "macro_sql": "{% macro bigquery__create_columns(relation, columns) %}\n {{ adapter.alter_table_add_columns(relation, columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_bigquery.bigquery__post_snapshot": {"unique_id": "macro.dbt_bigquery.bigquery__post_snapshot", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/bigquery", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "bigquery__post_snapshot", "macro_sql": "{% macro bigquery__post_snapshot(staging_relation) %}\n -- Clean up the snapshot temp table\n {% do drop_relation(staging_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.statement": {"unique_id": "macro.dbt.statement", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/core.sql", "original_file_path": "macros/core.sql", "name": "statement", "macro_sql": "{% macro statement(name=None, fetch_result=False, auto_begin=True) -%}\n {%- if execute: -%}\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 {%- set res, table = adapter.execute(sql, auto_begin=auto_begin, fetch=fetch_result) -%}\n {%- if name is not none -%}\n {{ store_result(name, response=res, agate_table=table) }}\n {%- endif -%}\n\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.noop_statement": {"unique_id": "macro.dbt.noop_statement", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/core.sql", "original_file_path": "macros/core.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.run_hooks": {"unique_id": "macro.dbt.run_hooks", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/helpers.sql", "original_file_path": "macros/materializations/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.column_list": {"unique_id": "macro.dbt.column_list", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/helpers.sql", "original_file_path": "macros/materializations/helpers.sql", "name": "column_list", "macro_sql": "{% macro column_list(columns) %}\n {%- for col in columns %}\n {{ col.name }} {% if not loop.last %},{% endif %}\n {% endfor -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.column_list_for_create_table": {"unique_id": "macro.dbt.column_list_for_create_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/helpers.sql", "original_file_path": "macros/materializations/helpers.sql", "name": "column_list_for_create_table", "macro_sql": "{% macro column_list_for_create_table(columns) %}\n {%- for col in columns %}\n {{ col.name }} {{ col.data_type }} {%- if not loop.last %},{% endif %}\n {% endfor -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.make_hook_config": {"unique_id": "macro.dbt.make_hook_config", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/helpers.sql", "original_file_path": "macros/materializations/helpers.sql", "name": "make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.before_begin": {"unique_id": "macro.dbt.before_begin", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/helpers.sql", "original_file_path": "macros/materializations/helpers.sql", "name": "before_begin", "macro_sql": "{% macro before_begin(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.in_transaction": {"unique_id": "macro.dbt.in_transaction", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/helpers.sql", "original_file_path": "macros/materializations/helpers.sql", "name": "in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.after_commit": {"unique_id": "macro.dbt.after_commit", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/helpers.sql", "original_file_path": "macros/materializations/helpers.sql", "name": "after_commit", "macro_sql": "{% macro after_commit(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.drop_relation_if_exists": {"unique_id": "macro.dbt.drop_relation_if_exists", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/helpers.sql", "original_file_path": "macros/materializations/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.load_relation": {"unique_id": "macro.dbt.load_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/helpers.sql", "original_file_path": "macros/materializations/helpers.sql", "name": "load_relation", "macro_sql": "{% macro load_relation(relation) %}\n {% do return(adapter.get_relation(\n database=relation.database,\n schema=relation.schema,\n identifier=relation.identifier\n )) -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.should_full_refresh": {"unique_id": "macro.dbt.should_full_refresh", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/helpers.sql", "original_file_path": "macros/materializations/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.snapshot_merge_sql": {"unique_id": "macro.dbt.snapshot_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshot/snapshot_merge.sql", "name": "snapshot_merge_sql", "macro_sql": "{% macro snapshot_merge_sql(target, source, insert_cols) -%}\n {{ adapter.dispatch('snapshot_merge_sql')(target, source, insert_cols) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__snapshot_merge_sql": {"unique_id": "macro.dbt.default__snapshot_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshot/snapshot_merge.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.strategy_dispatch": {"unique_id": "macro.dbt.strategy_dispatch", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/strategies.sql", "original_file_path": "macros/materializations/snapshot/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.snapshot_hash_arguments": {"unique_id": "macro.dbt.snapshot_hash_arguments", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/strategies.sql", "original_file_path": "macros/materializations/snapshot/strategies.sql", "name": "snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n {{ adapter.dispatch('snapshot_hash_arguments')(args) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__snapshot_hash_arguments": {"unique_id": "macro.dbt.default__snapshot_hash_arguments", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/strategies.sql", "original_file_path": "macros/materializations/snapshot/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.snapshot_get_time": {"unique_id": "macro.dbt.snapshot_get_time", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/strategies.sql", "original_file_path": "macros/materializations/snapshot/strategies.sql", "name": "snapshot_get_time", "macro_sql": "{% macro snapshot_get_time() -%}\n {{ adapter.dispatch('snapshot_get_time')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__snapshot_get_time": {"unique_id": "macro.dbt.default__snapshot_get_time", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/strategies.sql", "original_file_path": "macros/materializations/snapshot/strategies.sql", "name": "default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() -%}\n {{ current_timestamp() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.snapshot_timestamp_strategy": {"unique_id": "macro.dbt.snapshot_timestamp_strategy", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/strategies.sql", "original_file_path": "macros/materializations/snapshot/strategies.sql", "name": "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/fishtown-analytics/dbt/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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.snapshot_string_as_time": {"unique_id": "macro.dbt.snapshot_string_as_time", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/strategies.sql", "original_file_path": "macros/materializations/snapshot/strategies.sql", "name": "snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n {{ adapter.dispatch('snapshot_string_as_time')(timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__snapshot_string_as_time": {"unique_id": "macro.dbt.default__snapshot_string_as_time", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/strategies.sql", "original_file_path": "macros/materializations/snapshot/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.snapshot_check_all_get_existing_columns": {"unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/strategies.sql", "original_file_path": "macros/materializations/snapshot/strategies.sql", "name": "snapshot_check_all_get_existing_columns", "macro_sql": "{% macro snapshot_check_all_get_existing_columns(node, target_exists) -%}\n {%- set query_columns = get_columns_in_query(node['compiled_sql']) -%}\n {%- if not target_exists -%}\n {# no table yet -> return whatever the query does #}\n {{ return([false, query_columns]) }}\n {%- endif -%}\n {# handle any schema changes #}\n {%- set target_table = node.get('alias', node.get('name')) -%}\n {%- set target_relation = adapter.get_relation(database=node.database, schema=node.schema, identifier=target_table) -%}\n {%- set existing_cols = get_columns_in_query('select * from ' ~ target_relation) -%}\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(col) -%}\n {%- else -%}\n {% set ns.column_added = true %}\n {%- endif -%}\n {%- endfor -%}\n {{ return([ns.column_added, intersection]) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.snapshot_check_strategy": {"unique_id": "macro.dbt.snapshot_check_strategy", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/strategies.sql", "original_file_path": "macros/materializations/snapshot/strategies.sql", "name": "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 \n {% set select_current_time -%}\n select {{ snapshot_get_time() }} as snapshot_start\n {%- endset %}\n\n {#-- don't access the column by name, to avoid dealing with casing issues on snowflake #}\n {%- set now = run_query(select_current_time)[0][0] -%}\n {% if now is none or now is undefined -%}\n {%- do exceptions.raise_compiler_error('Could not get a snapshot start time from the database') -%}\n {%- endif %}\n {% set updated_at = snapshot_string_as_time(now) %}\n\n {% set column_added = false %}\n\n {% if check_cols_config == 'all' %}\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists) %}\n {% elif check_cols_config is iterable and (check_cols_config | length) > 0 %}\n {% set check_cols = check_cols_config %}\n {% else %}\n {% do exceptions.raise_compiler_error(\"Invalid value for 'check_cols': \" ~ check_cols_config) %}\n {% endif %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n TRUE\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.create_columns": {"unique_id": "macro.dbt.create_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/snapshot.sql", "original_file_path": "macros/materializations/snapshot/snapshot.sql", "name": "create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n {{ adapter.dispatch('create_columns')(relation, columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__create_columns": {"unique_id": "macro.dbt.default__create_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/snapshot.sql", "original_file_path": "macros/materializations/snapshot/snapshot.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.post_snapshot": {"unique_id": "macro.dbt.post_snapshot", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/snapshot.sql", "original_file_path": "macros/materializations/snapshot/snapshot.sql", "name": "post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n {{ adapter.dispatch('post_snapshot')(staging_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__post_snapshot": {"unique_id": "macro.dbt.default__post_snapshot", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/snapshot.sql", "original_file_path": "macros/materializations/snapshot/snapshot.sql", "name": "default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n {# no-op #}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.snapshot_staging_table": {"unique_id": "macro.dbt.snapshot_staging_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/snapshot.sql", "original_file_path": "macros/materializations/snapshot/snapshot.sql", "name": "snapshot_staging_table", "macro_sql": "{% macro 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.build_snapshot_table": {"unique_id": "macro.dbt.build_snapshot_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/snapshot.sql", "original_file_path": "macros/materializations/snapshot/snapshot.sql", "name": "build_snapshot_table", "macro_sql": "{% macro 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.get_or_create_relation": {"unique_id": "macro.dbt.get_or_create_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/snapshot.sql", "original_file_path": "macros/materializations/snapshot/snapshot.sql", "name": "get_or_create_relation", "macro_sql": "{% macro 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.build_snapshot_staging_table": {"unique_id": "macro.dbt.build_snapshot_staging_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/snapshot.sql", "original_file_path": "macros/materializations/snapshot/snapshot.sql", "name": "build_snapshot_staging_table", "macro_sql": "{% macro build_snapshot_staging_table(strategy, sql, target_relation) %}\n {% set tmp_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, tmp_relation, select) }}\n {% endcall %}\n\n {% do return(tmp_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.materialization_snapshot_default": {"unique_id": "macro.dbt.materialization_snapshot_default", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshot/snapshot.sql", "original_file_path": "macros/materializations/snapshot/snapshot.sql", "name": "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\n {% if not adapter.check_schema_exists(model.database, model.schema) %}\n {% do create_schema(model.database, model.schema) %}\n {% endif %}\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_sql']) %}\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 {% do persist_docs(target_relation, model) %}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.create_csv_table": {"unique_id": "macro.dbt.create_csv_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/seed/seed.sql", "original_file_path": "macros/materializations/seed/seed.sql", "name": "create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n {{ adapter.dispatch('create_csv_table')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.reset_csv_table": {"unique_id": "macro.dbt.reset_csv_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/seed/seed.sql", "original_file_path": "macros/materializations/seed/seed.sql", "name": "reset_csv_table", "macro_sql": "{% macro reset_csv_table(model, full_refresh, old_relation, agate_table) -%}\n {{ adapter.dispatch('reset_csv_table')(model, full_refresh, old_relation, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.load_csv_rows": {"unique_id": "macro.dbt.load_csv_rows", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/seed/seed.sql", "original_file_path": "macros/materializations/seed/seed.sql", "name": "load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n {{ adapter.dispatch('load_csv_rows')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__create_csv_table": {"unique_id": "macro.dbt.default__create_csv_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/seed/seed.sql", "original_file_path": "macros/materializations/seed/seed.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__reset_csv_table": {"unique_id": "macro.dbt.default__reset_csv_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/seed/seed.sql", "original_file_path": "macros/materializations/seed/seed.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.get_seed_column_quoted_csv": {"unique_id": "macro.dbt.get_seed_column_quoted_csv", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/seed/seed.sql", "original_file_path": "macros/materializations/seed/seed.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.basic_load_csv_rows": {"unique_id": "macro.dbt.basic_load_csv_rows", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/seed/seed.sql", "original_file_path": "macros/materializations/seed/seed.sql", "name": "basic_load_csv_rows", "macro_sql": "{% macro basic_load_csv_rows(model, batch_size, agate_table) %}\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 %s\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__load_csv_rows": {"unique_id": "macro.dbt.default__load_csv_rows", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/seed/seed.sql", "original_file_path": "macros/materializations/seed/seed.sql", "name": "default__load_csv_rows", "macro_sql": "{% macro default__load_csv_rows(model, agate_table) %}\n {{ return(basic_load_csv_rows(model, 10000, agate_table) )}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.materialization_seed_default": {"unique_id": "macro.dbt.materialization_seed_default", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/seed/seed.sql", "original_file_path": "macros/materializations/seed/seed.sql", "name": "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 agate_table = load_agate_table() -%}\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 {{ create_table_sql }};\n -- dbt seed --\n {{ sql }}\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\n {% do persist_docs(target_relation, model) %}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.incremental_upsert": {"unique_id": "macro.dbt.incremental_upsert", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/incremental/helpers.sql", "original_file_path": "macros/materializations/incremental/helpers.sql", "name": "incremental_upsert", "macro_sql": "{% macro incremental_upsert(tmp_relation, target_relation, unique_key=none, statement_name=\"main\") %}\n {%- set dest_columns = adapter.get_columns_in_relation(target_relation) -%}\n {%- set dest_cols_csv = dest_columns | map(attribute='quoted') | join(', ') -%}\n\n {%- if unique_key is not none -%}\n delete\n from {{ target_relation }}\n where ({{ unique_key }}) in (\n select ({{ unique_key }})\n from {{ tmp_relation }}\n );\n {%- endif %}\n\n insert into {{ target_relation }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ tmp_relation }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.materialization_incremental_default": {"unique_id": "macro.dbt.materialization_incremental_default", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/incremental/incremental.sql", "original_file_path": "macros/materializations/incremental/incremental.sql", "name": "materialization_incremental_default", "macro_sql": "{% materialization incremental, default -%}\n\n {% set unique_key = config.get('unique_key') %}\n\n {% set target_relation = this.incorporate(type='table') %}\n {% set existing_relation = load_relation(this) %}\n {% set tmp_relation = make_temp_relation(this) %}\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 {% if existing_relation is none %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n {% elif existing_relation.is_view or should_full_refresh() %}\n {#-- Make sure the backup doesn't exist so we don't encounter issues with the rename below #}\n {% set backup_identifier = existing_relation.identifier ~ \"__dbt_backup\" %}\n {% set backup_relation = existing_relation.incorporate(path={\"identifier\": backup_identifier}) %}\n {% do adapter.drop_relation(backup_relation) %}\n\n {% do adapter.rename_relation(target_relation, backup_relation) %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n {% do to_drop.append(backup_relation) %}\n {% else %}\n {% set tmp_relation = make_temp_relation(target_relation) %}\n {% do run_query(create_table_as(True, tmp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=tmp_relation,\n to_relation=target_relation) %}\n {% set build_sql = incremental_upsert(tmp_relation, target_relation, unique_key=unique_key) %}\n {% endif %}\n\n {% call statement(\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% do persist_docs(target_relation, model) %}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.get_merge_sql": {"unique_id": "macro.dbt.get_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/common/merge.sql", "original_file_path": "macros/materializations/common/merge.sql", "name": "get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, predicates=none) -%}\n {{ adapter.dispatch('get_merge_sql')(target, source, unique_key, dest_columns, predicates) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.get_delete_insert_merge_sql": {"unique_id": "macro.dbt.get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/common/merge.sql", "original_file_path": "macros/materializations/common/merge.sql", "name": "get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n {{ adapter.dispatch('get_delete_insert_merge_sql')(target, source, unique_key, dest_columns) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/common/merge.sql", "original_file_path": "macros/materializations/common/merge.sql", "name": "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')(target, source, dest_columns, predicates, include_sql_header) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__get_merge_sql": {"unique_id": "macro.dbt.default__get_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/common/merge.sql", "original_file_path": "macros/materializations/common/merge.sql", "name": "default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, predicates) -%}\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 {% if unique_key %}\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 {% 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 in dest_columns -%}\n {{ adapter.quote(column.name) }} = DBT_INTERNAL_SOURCE.{{ adapter.quote(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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.get_quoted_csv": {"unique_id": "macro.dbt.get_quoted_csv", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/common/merge.sql", "original_file_path": "macros/materializations/common/merge.sql", "name": "get_quoted_csv", "macro_sql": "{% macro get_quoted_csv(column_names) %}\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{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.common_get_delete_insert_merge_sql": {"unique_id": "macro.dbt.common_get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/common/merge.sql", "original_file_path": "macros/materializations/common/merge.sql", "name": "common_get_delete_insert_merge_sql", "macro_sql": "{% macro common_get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {% if unique_key is not none %}\n delete from {{ target }}\n where ({{ unique_key }}) in (\n select ({{ unique_key }})\n from {{ source }}\n );\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n );\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__get_delete_insert_merge_sql": {"unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/common/merge.sql", "original_file_path": "macros/materializations/common/merge.sql", "name": "default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n {{ common_get_delete_insert_merge_sql(target, source, unique_key, dest_columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/common/merge.sql", "original_file_path": "macros/materializations/common/merge.sql", "name": "default__get_insert_overwrite_merge_sql", "macro_sql": "{% macro default__get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header) -%}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.materialization_table_default": {"unique_id": "macro.dbt.materialization_table_default", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/table/table.sql", "original_file_path": "macros/materializations/table/table.sql", "name": "materialization_table_default", "macro_sql": "{% materialization table, default %}\n {%- set identifier = model['alias'] -%}\n {%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}\n {%- set backup_identifier = model['name'] + '__dbt_backup' -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier,\n schema=schema,\n database=database,\n type='table') -%}\n {%- set intermediate_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema,\n database=database,\n type='table') -%}\n\n /*\n See ../view/view.sql for more information about this relation.\n */\n {%- set backup_relation_type = 'table' if old_relation is none else old_relation.type -%}\n {%- set backup_relation = api.Relation.create(identifier=backup_identifier,\n schema=schema,\n database=database,\n type=backup_relation_type) -%}\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\n -- drop the temp relations if they exists for some reason\n {{ adapter.drop_relation(intermediate_relation) }}\n {{ adapter.drop_relation(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 {{ create_table_as(False, intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n {% if old_relation is not none %}\n {{ adapter.rename_relation(target_relation, backup_relation) }}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.materialization_view_default": {"unique_id": "macro.dbt.materialization_view_default", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/view/view.sql", "original_file_path": "macros/materializations/view/view.sql", "name": "materialization_view_default", "macro_sql": "{%- materialization view, default -%}\n\n {%- set identifier = model['alias'] -%}\n {%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}\n {%- set backup_identifier = model['name'] + '__dbt_backup' -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier, schema=schema, database=database,\n type='view') -%}\n {%- set intermediate_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema, database=database, type='view') -%}\n\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 \"old_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 old_relation, if it exists,\n or else \"view\" as a sane default if it does not. Note that if the old_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 old_relation is none else old_relation.type -%}\n {%- set backup_relation = api.Relation.create(identifier=backup_identifier,\n schema=schema, database=database,\n type=backup_relation_type) -%}\n\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- drop the temp relations if they exists for some reason\n {{ adapter.drop_relation(intermediate_relation) }}\n {{ adapter.drop_relation(backup_relation) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ create_view_as(intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n -- move the existing view out of the way\n {% if old_relation is not none %}\n {{ adapter.rename_relation(target_relation, backup_relation) }}\n {% endif %}\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.handle_existing_table": {"unique_id": "macro.dbt.handle_existing_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/view/create_or_replace_view.sql", "original_file_path": "macros/materializations/view/create_or_replace_view.sql", "name": "handle_existing_table", "macro_sql": "{% macro handle_existing_table(full_refresh, old_relation) %}\n {{ adapter.dispatch(\"handle_existing_table\", packages=['dbt'])(full_refresh, old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__handle_existing_table": {"unique_id": "macro.dbt.default__handle_existing_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/view/create_or_replace_view.sql", "original_file_path": "macros/materializations/view/create_or_replace_view.sql", "name": "default__handle_existing_table", "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.create_or_replace_view": {"unique_id": "macro.dbt.create_or_replace_view", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/materializations/view/create_or_replace_view.sql", "original_file_path": "macros/materializations/view/create_or_replace_view.sql", "name": "create_or_replace_view", "macro_sql": "{% macro create_or_replace_view(run_outside_transaction_hooks=True) %}\n {%- set identifier = model['alias'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\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\n {% if run_outside_transaction_hooks %}\n -- no transactions on BigQuery\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n {% endif %}\n\n -- `BEGIN` happens here on Snowflake\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\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 {{ create_view_as(target_relation, sql) }}\n {%- endcall %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {% if run_outside_transaction_hooks %}\n -- No transactions on BigQuery\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n {% endif %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.generate_alias_name": {"unique_id": "macro.dbt.generate_alias_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/etc/get_custom_alias.sql", "original_file_path": "macros/etc/get_custom_alias.sql", "name": "generate_alias_name", "macro_sql": "{% macro generate_alias_name(custom_alias_name=none, node=none) -%}\n\n {%- if custom_alias_name is none -%}\n\n {{ node.name }}\n\n {%- else -%}\n\n {{ custom_alias_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.run_query": {"unique_id": "macro.dbt.run_query", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/etc/query.sql", "original_file_path": "macros/etc/query.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.is_incremental": {"unique_id": "macro.dbt.is_incremental", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/etc/is_incremental.sql", "original_file_path": "macros/etc/is_incremental.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.convert_datetime": {"unique_id": "macro.dbt.convert_datetime", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.dates_in_range": {"unique_id": "macro.dbt.dates_in_range", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.partition_range": {"unique_id": "macro.dbt.partition_range", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.py_current_timestring": {"unique_id": "macro.dbt.py_current_timestring", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.generate_schema_name": {"unique_id": "macro.dbt.generate_schema_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/etc/get_custom_schema.sql", "original_file_path": "macros/etc/get_custom_schema.sql", "name": "generate_schema_name", "macro_sql": "{% macro 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.generate_schema_name_for_env": {"unique_id": "macro.dbt.generate_schema_name_for_env", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/etc/get_custom_schema.sql", "original_file_path": "macros/etc/get_custom_schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.generate_database_name": {"unique_id": "macro.dbt.generate_database_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/etc/get_custom_database.sql", "original_file_path": "macros/etc/get_custom_database.sql", "name": "generate_database_name", "macro_sql": "{% macro generate_database_name(custom_database_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_database_name')(custom_database_name, node)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__generate_database_name": {"unique_id": "macro.dbt.default__generate_database_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/etc/get_custom_database.sql", "original_file_path": "macros/etc/get_custom_database.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.get_columns_in_query": {"unique_id": "macro.dbt.get_columns_in_query", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "get_columns_in_query", "macro_sql": "{% macro get_columns_in_query(select_sql) -%}\n {{ return(adapter.dispatch('get_columns_in_query')(select_sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__get_columns_in_query": {"unique_id": "macro.dbt.default__get_columns_in_query", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 select * from (\n {{ select_sql }}\n ) as __dbt_sbq\n where false\n limit 0\n {% endcall %}\n\n {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.create_schema": {"unique_id": "macro.dbt.create_schema", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n {{ adapter.dispatch('create_schema')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__create_schema": {"unique_id": "macro.dbt.default__create_schema", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.drop_schema": {"unique_id": "macro.dbt.drop_schema", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n {{ adapter.dispatch('drop_schema')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__drop_schema": {"unique_id": "macro.dbt.default__drop_schema", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.create_table_as": {"unique_id": "macro.dbt.create_table_as", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "create_table_as", "macro_sql": "{% macro create_table_as(temporary, relation, sql) -%}\n {{ adapter.dispatch('create_table_as')(temporary, relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__create_table_as": {"unique_id": "macro.dbt.default__create_table_as", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 as (\n {{ sql }}\n );\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.create_view_as": {"unique_id": "macro.dbt.create_view_as", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n {{ adapter.dispatch('create_view_as')(relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__create_view_as": {"unique_id": "macro.dbt.default__create_view_as", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 }} as (\n {{ sql }}\n );\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.get_catalog": {"unique_id": "macro.dbt.get_catalog", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n {{ return(adapter.dispatch('get_catalog')(information_schema, schemas)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__get_catalog": {"unique_id": "macro.dbt.default__get_catalog", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.get_columns_in_relation": {"unique_id": "macro.dbt.get_columns_in_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n {{ return(adapter.dispatch('get_columns_in_relation')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.sql_convert_columns_in_relation": {"unique_id": "macro.dbt.sql_convert_columns_in_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__get_columns_in_relation": {"unique_id": "macro.dbt.default__get_columns_in_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.alter_column_type": {"unique_id": "macro.dbt.alter_column_type", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "alter_column_type", "macro_sql": "{% macro alter_column_type(relation, column_name, new_column_type) -%}\n {{ return(adapter.dispatch('alter_column_type')(relation, column_name, new_column_type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.alter_column_comment": {"unique_id": "macro.dbt.alter_column_comment", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "alter_column_comment", "macro_sql": "{% macro alter_column_comment(relation, column_dict) -%}\n {{ return(adapter.dispatch('alter_column_comment')(relation, column_dict)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__alter_column_comment": {"unique_id": "macro.dbt.default__alter_column_comment", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.alter_relation_comment": {"unique_id": "macro.dbt.alter_relation_comment", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "alter_relation_comment", "macro_sql": "{% macro alter_relation_comment(relation, relation_comment) -%}\n {{ return(adapter.dispatch('alter_relation_comment')(relation, relation_comment)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__alter_relation_comment": {"unique_id": "macro.dbt.default__alter_relation_comment", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.persist_docs": {"unique_id": "macro.dbt.persist_docs", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "persist_docs", "macro_sql": "{% macro persist_docs(relation, model, for_relation=true, for_columns=true) -%}\n {{ return(adapter.dispatch('persist_docs')(relation, model, for_relation, for_columns)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__persist_docs": {"unique_id": "macro.dbt.default__persist_docs", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__alter_column_type": {"unique_id": "macro.dbt.default__alter_column_type", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.drop_relation": {"unique_id": "macro.dbt.drop_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n {{ return(adapter.dispatch('drop_relation')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__drop_relation": {"unique_id": "macro.dbt.default__drop_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.truncate_relation": {"unique_id": "macro.dbt.truncate_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n {{ return(adapter.dispatch('truncate_relation')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__truncate_relation": {"unique_id": "macro.dbt.default__truncate_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.rename_relation": {"unique_id": "macro.dbt.rename_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n {{ return(adapter.dispatch('rename_relation')(from_relation, to_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__rename_relation": {"unique_id": "macro.dbt.default__rename_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.information_schema_name": {"unique_id": "macro.dbt.information_schema_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n {{ return(adapter.dispatch('information_schema_name')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__information_schema_name": {"unique_id": "macro.dbt.default__information_schema_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.list_schemas": {"unique_id": "macro.dbt.list_schemas", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n {{ return(adapter.dispatch('list_schemas')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__list_schemas": {"unique_id": "macro.dbt.default__list_schemas", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.check_schema_exists": {"unique_id": "macro.dbt.check_schema_exists", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "check_schema_exists", "macro_sql": "{% macro check_schema_exists(information_schema, schema) -%}\n {{ return(adapter.dispatch('check_schema_exists')(information_schema, schema)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__check_schema_exists": {"unique_id": "macro.dbt.default__check_schema_exists", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.list_relations_without_caching": {"unique_id": "macro.dbt.list_relations_without_caching", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "list_relations_without_caching", "macro_sql": "{% macro list_relations_without_caching(schema_relation) %}\n {{ return(adapter.dispatch('list_relations_without_caching')(schema_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__list_relations_without_caching": {"unique_id": "macro.dbt.default__list_relations_without_caching", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.current_timestamp": {"unique_id": "macro.dbt.current_timestamp", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "current_timestamp", "macro_sql": "{% macro current_timestamp() -%}\n {{ adapter.dispatch('current_timestamp')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__current_timestamp": {"unique_id": "macro.dbt.default__current_timestamp", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.collect_freshness": {"unique_id": "macro.dbt.collect_freshness", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__collect_freshness": {"unique_id": "macro.dbt.default__collect_freshness", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "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').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.make_temp_relation": {"unique_id": "macro.dbt.make_temp_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "make_temp_relation", "macro_sql": "{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_temp_relation')(base_relation, suffix))}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__make_temp_relation": {"unique_id": "macro.dbt.default__make_temp_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "default__make_temp_relation", "macro_sql": "{% macro default__make_temp_relation(base_relation, suffix) %}\n {% set tmp_identifier = base_relation.identifier ~ suffix %}\n {% set tmp_relation = base_relation.incorporate(\n path={\"identifier\": tmp_identifier}) -%}\n\n {% do return(tmp_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.set_sql_header": {"unique_id": "macro.dbt.set_sql_header", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/adapters/common.sql", "original_file_path": "macros/adapters/common.sql", "name": "set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__test_relationships": {"unique_id": "macro.dbt.default__test_relationships", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/schema_tests/relationships.sql", "original_file_path": "macros/schema_tests/relationships.sql", "name": "default__test_relationships", "macro_sql": "{% macro default__test_relationships(model, to, field) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('from')) %}\n\n\nselect count(*) as validation_errors\nfrom (\n select {{ column_name }} as id from {{ model }}\n) as child\nleft join (\n select {{ field }} as id from {{ to }}\n) as parent on parent.id = child.id\nwhere child.id is not null\n and parent.id is null\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.test_relationships": {"unique_id": "macro.dbt.test_relationships", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/schema_tests/relationships.sql", "original_file_path": "macros/schema_tests/relationships.sql", "name": "test_relationships", "macro_sql": "{% macro test_relationships(model, to, field) %}\n {% set macro = adapter.dispatch('test_relationships') %}\n {{ macro(model, to, field, **kwargs) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__test_not_null": {"unique_id": "macro.dbt.default__test_not_null", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/schema_tests/not_null.sql", "original_file_path": "macros/schema_tests/not_null.sql", "name": "default__test_not_null", "macro_sql": "{% macro default__test_not_null(model) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}\n\nselect count(*) as validation_errors\nfrom {{ model }}\nwhere {{ column_name }} is null\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.test_not_null": {"unique_id": "macro.dbt.test_not_null", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/schema_tests/not_null.sql", "original_file_path": "macros/schema_tests/not_null.sql", "name": "test_not_null", "macro_sql": "{% macro test_not_null(model) %}\n {% set macro = adapter.dispatch('test_not_null') %}\n {{ macro(model, **kwargs) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__test_unique": {"unique_id": "macro.dbt.default__test_unique", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/schema_tests/unique.sql", "original_file_path": "macros/schema_tests/unique.sql", "name": "default__test_unique", "macro_sql": "{% macro default__test_unique(model) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}\n\nselect count(*) as validation_errors\nfrom (\n\n select\n {{ column_name }}\n\n from {{ model }}\n where {{ column_name }} is not null\n group by {{ column_name }}\n having count(*) > 1\n\n) validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.test_unique": {"unique_id": "macro.dbt.test_unique", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/schema_tests/unique.sql", "original_file_path": "macros/schema_tests/unique.sql", "name": "test_unique", "macro_sql": "{% macro test_unique(model) %}\n {% set macro = adapter.dispatch('test_unique') %}\n {{ macro(model, **kwargs) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.default__test_accepted_values": {"unique_id": "macro.dbt.default__test_accepted_values", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/schema_tests/accepted_values.sql", "original_file_path": "macros/schema_tests/accepted_values.sql", "name": "default__test_accepted_values", "macro_sql": "{% macro default__test_accepted_values(model, values) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('field')) %}\n{% set quote_values = kwargs.get('quote', True) %}\n\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 not in (\n {% for value in values -%}\n {% if quote_values -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n )\n)\n\nselect count(*) as validation_errors\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt.test_accepted_values": {"unique_id": "macro.dbt.test_accepted_values", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "macros/schema_tests/accepted_values.sql", "original_file_path": "macros/schema_tests/accepted_values.sql", "name": "test_accepted_values", "macro_sql": "{% macro test_accepted_values(model, values) %}\n {% set macro = adapter.dispatch('test_accepted_values') %}\n {{ macro(model, values, **kwargs) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.except": {"unique_id": "macro.dbt_utils.except", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "except", "macro_sql": "{% macro except() %}\n {{ return(adapter.dispatch('except', packages = dbt_utils._get_utils_namespaces())()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__except": {"unique_id": "macro.dbt_utils.default__except", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "default__except", "macro_sql": "{% macro default__except() %}\n\n except\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.bigquery__except": {"unique_id": "macro.dbt_utils.bigquery__except", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "bigquery__except", "macro_sql": "{% macro bigquery__except() %}\n\n except distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.replace": {"unique_id": "macro.dbt_utils.replace", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/replace.sql", "original_file_path": "macros/cross_db_utils/replace.sql", "name": "replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n {{ return(adapter.dispatch('replace', packages = dbt_utils._get_utils_namespaces()) (field, old_chars, new_chars)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__replace": {"unique_id": "macro.dbt_utils.default__replace", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/replace.sql", "original_file_path": "macros/cross_db_utils/replace.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.concat": {"unique_id": "macro.dbt_utils.concat", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/concat.sql", "original_file_path": "macros/cross_db_utils/concat.sql", "name": "concat", "macro_sql": "{% macro concat(fields) -%}\n {{ return(adapter.dispatch('concat', packages = dbt_utils._get_utils_namespaces())(fields)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__concat": {"unique_id": "macro.dbt_utils.default__concat", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/concat.sql", "original_file_path": "macros/cross_db_utils/concat.sql", "name": "default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n concat({{ fields|join(', ') }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.alternative_concat": {"unique_id": "macro.dbt_utils.alternative_concat", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/concat.sql", "original_file_path": "macros/cross_db_utils/concat.sql", "name": "alternative_concat", "macro_sql": "{% macro alternative_concat(fields) %}\n {{ fields|join(' || ') }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.redshift__concat": {"unique_id": "macro.dbt_utils.redshift__concat", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/concat.sql", "original_file_path": "macros/cross_db_utils/concat.sql", "name": "redshift__concat", "macro_sql": "{% macro redshift__concat(fields) %}\n {{ dbt_utils.alternative_concat(fields) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.snowflake__concat": {"unique_id": "macro.dbt_utils.snowflake__concat", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/concat.sql", "original_file_path": "macros/cross_db_utils/concat.sql", "name": "snowflake__concat", "macro_sql": "{% macro snowflake__concat(fields) %}\n {{ dbt_utils.alternative_concat(fields) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.type_string": {"unique_id": "macro.dbt_utils.type_string", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n {{ return(adapter.dispatch('type_string', packages = dbt_utils._get_utils_namespaces())()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__type_string": {"unique_id": "macro.dbt_utils.default__type_string", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_string", "macro_sql": "{% macro default__type_string() %}\n string\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.redshift__type_string": {"unique_id": "macro.dbt_utils.redshift__type_string", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "redshift__type_string", "macro_sql": "\n\n{%- macro redshift__type_string() -%}\n varchar\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.postgres__type_string": {"unique_id": "macro.dbt_utils.postgres__type_string", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "postgres__type_string", "macro_sql": "{% macro postgres__type_string() %}\n varchar\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.snowflake__type_string": {"unique_id": "macro.dbt_utils.snowflake__type_string", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "snowflake__type_string", "macro_sql": "{% macro snowflake__type_string() %}\n varchar\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.type_timestamp": {"unique_id": "macro.dbt_utils.type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', packages = dbt_utils._get_utils_namespaces())()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__type_timestamp": {"unique_id": "macro.dbt_utils.default__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n timestamp\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.snowflake__type_timestamp": {"unique_id": "macro.dbt_utils.snowflake__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "snowflake__type_timestamp", "macro_sql": "{% macro snowflake__type_timestamp() %}\n timestamp_ntz\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.type_float": {"unique_id": "macro.dbt_utils.type_float", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n {{ return(adapter.dispatch('type_float', packages = dbt_utils._get_utils_namespaces())()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__type_float": {"unique_id": "macro.dbt_utils.default__type_float", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_float", "macro_sql": "{% macro default__type_float() %}\n float\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.bigquery__type_float": {"unique_id": "macro.dbt_utils.bigquery__type_float", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_float", "macro_sql": "{% macro bigquery__type_float() %}\n float64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.type_numeric": {"unique_id": "macro.dbt_utils.type_numeric", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n {{ return(adapter.dispatch('type_numeric', packages = dbt_utils._get_utils_namespaces())()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__type_numeric": {"unique_id": "macro.dbt_utils.default__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n numeric(28, 6)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.bigquery__type_numeric": {"unique_id": "macro.dbt_utils.bigquery__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_numeric", "macro_sql": "{% macro bigquery__type_numeric() %}\n numeric\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.type_bigint": {"unique_id": "macro.dbt_utils.type_bigint", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n {{ return(adapter.dispatch('type_bigint', packages = dbt_utils._get_utils_namespaces())()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__type_bigint": {"unique_id": "macro.dbt_utils.default__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n bigint\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.bigquery__type_bigint": {"unique_id": "macro.dbt_utils.bigquery__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_bigint", "macro_sql": "{% macro bigquery__type_bigint() %}\n int64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.type_int": {"unique_id": "macro.dbt_utils.type_int", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n {{ return(adapter.dispatch('type_int', packages = dbt_utils._get_utils_namespaces())()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__type_int": {"unique_id": "macro.dbt_utils.default__type_int", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_int", "macro_sql": "{% macro default__type_int() %}\n int\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.bigquery__type_int": {"unique_id": "macro.dbt_utils.bigquery__type_int", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_int", "macro_sql": "{% macro bigquery__type_int() %}\n int64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils._is_relation": {"unique_id": "macro.dbt_utils._is_relation", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/_is_relation.sql", "original_file_path": "macros/cross_db_utils/_is_relation.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.length": {"unique_id": "macro.dbt_utils.length", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "length", "macro_sql": "{% macro length(expression) -%}\n {{ return(adapter.dispatch('length', packages = dbt_utils._get_utils_namespaces()) (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__length": {"unique_id": "macro.dbt_utils.default__length", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "default__length", "macro_sql": "{% macro default__length(expression) %}\n \n length(\n {{ expression }}\n )\n \n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.redshift__length": {"unique_id": "macro.dbt_utils.redshift__length", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "redshift__length", "macro_sql": "{% macro redshift__length(expression) %}\n\n len(\n {{ expression }}\n )\n \n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.dateadd": {"unique_id": "macro.dbt_utils.dateadd", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "dateadd", "macro_sql": "{% macro dateadd(datepart, interval, from_date_or_timestamp) %}\n {{ return(adapter.dispatch('dateadd', packages = dbt_utils._get_utils_namespaces())(datepart, interval, from_date_or_timestamp)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__dateadd": {"unique_id": "macro.dbt_utils.default__dateadd", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.bigquery__dateadd": {"unique_id": "macro.dbt_utils.bigquery__dateadd", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "bigquery__dateadd", "macro_sql": "{% macro bigquery__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n datetime_add(\n cast( {{ from_date_or_timestamp }} as datetime),\n interval {{ interval }} {{ datepart }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.postgres__dateadd": {"unique_id": "macro.dbt_utils.postgres__dateadd", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.intersect": {"unique_id": "macro.dbt_utils.intersect", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "intersect", "macro_sql": "{% macro intersect() %}\n {{ return(adapter.dispatch('intersect', packages = dbt_utils._get_utils_namespaces())()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__intersect": {"unique_id": "macro.dbt_utils.default__intersect", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n intersect\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.bigquery__intersect": {"unique_id": "macro.dbt_utils.bigquery__intersect", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "bigquery__intersect", "macro_sql": "{% macro bigquery__intersect() %}\n\n intersect distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.right": {"unique_id": "macro.dbt_utils.right", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n {{ return(adapter.dispatch('right', packages = dbt_utils._get_utils_namespaces()) (string_text, length_expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__right": {"unique_id": "macro.dbt_utils.default__right", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n right(\n {{ string_text }},\n {{ length_expression }}\n )\n \n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.bigquery__right": {"unique_id": "macro.dbt_utils.bigquery__right", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "bigquery__right", "macro_sql": "{% macro bigquery__right(string_text, length_expression) %}\n\n case when {{ length_expression }} = 0 \n then ''\n else \n substr(\n {{ string_text }},\n -1 * ({{ length_expression }})\n )\n end\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.snowflake__right": {"unique_id": "macro.dbt_utils.snowflake__right", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "snowflake__right", "macro_sql": "{% macro snowflake__right(string_text, length_expression) %}\n\n case when {{ length_expression }} = 0 \n then ''\n else \n right(\n {{ string_text }},\n {{ length_expression }}\n )\n end\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.datediff": {"unique_id": "macro.dbt_utils.datediff", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n {{ return(adapter.dispatch('datediff', packages = dbt_utils._get_utils_namespaces())(first_date, second_date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__datediff": {"unique_id": "macro.dbt_utils.default__datediff", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.bigquery__datediff": {"unique_id": "macro.dbt_utils.bigquery__datediff", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "bigquery__datediff", "macro_sql": "{% macro bigquery__datediff(first_date, second_date, datepart) %}\n\n datetime_diff(\n cast({{second_date}} as datetime),\n cast({{first_date}} as datetime),\n {{datepart}}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.postgres__datediff": {"unique_id": "macro.dbt_utils.postgres__datediff", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "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 ({{ dbt_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.safe_cast": {"unique_id": "macro.dbt_utils.safe_cast", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n {{ return(adapter.dispatch('safe_cast', packages = dbt_utils._get_utils_namespaces()) (field, type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__safe_cast": {"unique_id": "macro.dbt_utils.default__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.snowflake__safe_cast": {"unique_id": "macro.dbt_utils.snowflake__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "snowflake__safe_cast", "macro_sql": "{% macro snowflake__safe_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.bigquery__safe_cast": {"unique_id": "macro.dbt_utils.bigquery__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "bigquery__safe_cast", "macro_sql": "{% macro bigquery__safe_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.hash": {"unique_id": "macro.dbt_utils.hash", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "hash", "macro_sql": "{% macro hash(field) -%}\n {{ return(adapter.dispatch('hash', packages = dbt_utils._get_utils_namespaces()) (field)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__hash": {"unique_id": "macro.dbt_utils.default__hash", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "default__hash", "macro_sql": "{% macro default__hash(field) -%}\n md5(cast({{field}} as {{dbt_utils.type_string()}}))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.bigquery__hash": {"unique_id": "macro.dbt_utils.bigquery__hash", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "bigquery__hash", "macro_sql": "{% macro bigquery__hash(field) -%}\n to_hex({{dbt_utils.default__hash(field)}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.identifier": {"unique_id": "macro.dbt_utils.identifier", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "identifier", "macro_sql": "{% macro identifier(value) %}\t\n {%- set error_message = '\n Warning: the `identifier` macro is no longer supported and will be deprecated in a future release of dbt-utils. \\\n Use `adapter.quote` instead. The {}.{} model triggered this warning. \\\n '.format(model.package_name, model.name) -%}\n {%- do exceptions.warn(error_message) -%}\n {{ return(adapter.dispatch('identifier', packages = dbt_utils._get_utils_namespaces()) (value)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__identifier": {"unique_id": "macro.dbt_utils.default__identifier", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "default__identifier", "macro_sql": "{% macro default__identifier(value) -%}\t\n \"{{ value }}\"\t\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.bigquery__identifier": {"unique_id": "macro.dbt_utils.bigquery__identifier", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "bigquery__identifier", "macro_sql": "{% macro bigquery__identifier(value) -%}\t\n `{{ value }}`\t\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.position": {"unique_id": "macro.dbt_utils.position", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n {{ return(adapter.dispatch('position', packages = dbt_utils._get_utils_namespaces()) (substring_text, string_text)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__position": {"unique_id": "macro.dbt_utils.default__position", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n position(\n {{ substring_text }} in {{ string_text }}\n )\n \n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.bigquery__position": {"unique_id": "macro.dbt_utils.bigquery__position", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "bigquery__position", "macro_sql": "{% macro bigquery__position(substring_text, string_text) %}\n\n strpos(\n {{ string_text }},\n {{ substring_text }}\n \n )\n \n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.string_literal": {"unique_id": "macro.dbt_utils.string_literal", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/literal.sql", "original_file_path": "macros/cross_db_utils/literal.sql", "name": "string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n {{ return(adapter.dispatch('string_literal', packages = dbt_utils._get_utils_namespaces()) (value)) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__string_literal": {"unique_id": "macro.dbt_utils.default__string_literal", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/literal.sql", "original_file_path": "macros/cross_db_utils/literal.sql", "name": "default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n '{{ value }}'\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.current_timestamp": {"unique_id": "macro.dbt_utils.current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "current_timestamp", "macro_sql": "{% macro current_timestamp() -%}\n {{ return(adapter.dispatch('current_timestamp', packages = dbt_utils._get_utils_namespaces())()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__current_timestamp": {"unique_id": "macro.dbt_utils.default__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() %}\n current_timestamp::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.redshift__current_timestamp": {"unique_id": "macro.dbt_utils.redshift__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "redshift__current_timestamp", "macro_sql": "{% macro redshift__current_timestamp() %}\n getdate()\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.bigquery__current_timestamp": {"unique_id": "macro.dbt_utils.bigquery__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "bigquery__current_timestamp", "macro_sql": "{% macro bigquery__current_timestamp() %}\n current_timestamp\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "current_timestamp_in_utc", "macro_sql": "{% macro current_timestamp_in_utc() -%}\n {{ return(adapter.dispatch('current_timestamp_in_utc', packages = dbt_utils._get_utils_namespaces())()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.default__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "default__current_timestamp_in_utc", "macro_sql": "{% macro default__current_timestamp_in_utc() %}\n {{dbt_utils.current_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.snowflake__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.snowflake__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "snowflake__current_timestamp_in_utc", "macro_sql": "{% macro snowflake__current_timestamp_in_utc() %}\n convert_timezone('UTC', {{dbt_utils.current_timestamp()}})::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.postgres__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.postgres__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "postgres__current_timestamp_in_utc", "macro_sql": "{% macro postgres__current_timestamp_in_utc() %}\n (current_timestamp at time zone 'utc')::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.width_bucket": {"unique_id": "macro.dbt_utils.width_bucket", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "width_bucket", "macro_sql": "{% macro width_bucket(expr, min_value, max_value, num_buckets) %}\n {{ return(adapter.dispatch('width_bucket', packages = dbt_utils._get_utils_namespaces()) (expr, min_value, max_value, num_buckets)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__width_bucket": {"unique_id": "macro.dbt_utils.default__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "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_utils.safe_cast(expr, dbt_utils.type_numeric() ) }},\n {{ dbt_utils.safe_cast(bin_size, dbt_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.redshift__width_bucket": {"unique_id": "macro.dbt_utils.redshift__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "redshift__width_bucket", "macro_sql": "{% macro redshift__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 exactly at the bucket edge\n case\n when\n {{ dbt_utils.safe_cast(expr, dbt_utils.type_numeric() ) }} %\n {{ dbt_utils.safe_cast(bin_size, dbt_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.snowflake__width_bucket": {"unique_id": "macro.dbt_utils.snowflake__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils._get_utils_namespaces": {"unique_id": "macro.dbt_utils._get_utils_namespaces", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/_get_utils_namespaces.sql", "original_file_path": "macros/cross_db_utils/_get_utils_namespaces.sql", "name": "_get_utils_namespaces", "macro_sql": "{% macro _get_utils_namespaces() %}\n {% set override_namespaces = var('dbt_utils_dispatch_list', []) %}\n {% do return(override_namespaces + ['dbt_utils']) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.last_day": {"unique_id": "macro.dbt_utils.last_day", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n {{ return(adapter.dispatch('last_day', packages = dbt_utils._get_utils_namespaces()) (date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default_last_day": {"unique_id": "macro.dbt_utils.default_last_day", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "default_last_day", "macro_sql": "\n\n\n{%- macro default_last_day(date, datepart) -%}\n cast(\n {{dbt_utils.dateadd('day', '-1',\n dbt_utils.dateadd(datepart, '1', dbt_utils.date_trunc(datepart, date))\n )}}\n as date)\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__last_day": {"unique_id": "macro.dbt_utils.default__last_day", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n {{dbt_utils.default_last_day(date, datepart)}}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.postgres__last_day": {"unique_id": "macro.dbt_utils.postgres__last_day", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "postgres__last_day", "macro_sql": "{% macro postgres__last_day(date, datepart) -%}\n\n {%- if datepart == 'quarter' -%}\n {{ exceptions.raise_compiler_error(\n \"dbt_utils.last_day is not supported for datepart 'quarter' on this adapter\") }}\n {%- else -%}\n {{dbt_utils.default_last_day(date, datepart)}}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.split_part": {"unique_id": "macro.dbt_utils.split_part", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "split_part", "macro_sql": "{% macro split_part(string_text, delimiter_text, part_number) %}\n {{ return(adapter.dispatch('split_part', packages = dbt_utils._get_utils_namespaces()) (string_text, delimiter_text, part_number)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__split_part": {"unique_id": "macro.dbt_utils.default__split_part", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.bigquery__split_part": {"unique_id": "macro.dbt_utils.bigquery__split_part", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "bigquery__split_part", "macro_sql": "{% macro bigquery__split_part(string_text, delimiter_text, part_number) %}\n\n split(\n {{ string_text }},\n {{ delimiter_text }}\n )[safe_offset({{ part_number - 1 }})]\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.date_trunc": {"unique_id": "macro.dbt_utils.date_trunc", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n {{ return(adapter.dispatch('date_trunc', packages = dbt_utils._get_utils_namespaces()) (datepart, date)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__date_trunc": {"unique_id": "macro.dbt_utils.default__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) %}\n date_trunc('{{datepart}}', {{date}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.bigquery__date_trunc": {"unique_id": "macro.dbt_utils.bigquery__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "bigquery__date_trunc", "macro_sql": "{% macro bigquery__date_trunc(datepart, date) %}\n timestamp_trunc(\n cast({{date}} as timestamp),\n {{datepart}}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils._is_ephemeral": {"unique_id": "macro.dbt_utils._is_ephemeral", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/cross_db_utils/_is_ephemeral.sql", "original_file_path": "macros/cross_db_utils/_is_ephemeral.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.get_period_boundaries": {"unique_id": "macro.dbt_utils.get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "get_period_boundaries", "macro_sql": "{% macro get_period_boundaries(target_schema, target_table, timestamp_field, start_date, stop_date, period) -%}\n {{ return(adapter.dispatch('get_period_boundaries', packages = dbt_utils._get_utils_namespaces())(target_schema, target_table, timestamp_field, start_date, stop_date, period)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__get_period_boundaries": {"unique_id": "macro.dbt_utils.default__get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "default__get_period_boundaries", "macro_sql": "{% macro default__get_period_boundaries(target_schema, target_table, timestamp_field, start_date, stop_date, period) -%}\n\n {% call statement('period_boundaries', fetch_result=True) -%}\n with data as (\n select\n coalesce(max(\"{{timestamp_field}}\"), '{{start_date}}')::timestamp as start_timestamp,\n coalesce(\n {{dbt_utils.dateadd('millisecond',\n -1,\n \"nullif('\" ~ stop_date ~ \"','')::timestamp\")}},\n {{dbt_utils.current_timestamp()}}\n ) as stop_timestamp\n from \"{{target_schema}}\".\"{{target_table}}\"\n )\n\n select\n start_timestamp,\n stop_timestamp,\n {{dbt_utils.datediff('start_timestamp',\n 'stop_timestamp',\n period)}} + 1 as num_periods\n from data\n {%- endcall %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.get_period_sql": {"unique_id": "macro.dbt_utils.get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "get_period_sql", "macro_sql": "{% macro get_period_sql(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset) -%}\n {{ return(adapter.dispatch('get_period_sql', packages = dbt_utils._get_utils_namespaces())(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__get_period_sql": {"unique_id": "macro.dbt_utils.default__get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "default__get_period_sql", "macro_sql": "{% macro default__get_period_sql(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset) -%}\n\n {%- set period_filter -%}\n (\"{{timestamp_field}}\" > '{{start_timestamp}}'::timestamp + interval '{{offset}} {{period}}' and\n \"{{timestamp_field}}\" <= '{{start_timestamp}}'::timestamp + interval '{{offset}} {{period}}' + interval '1 {{period}}' and\n \"{{timestamp_field}}\" < '{{stop_timestamp}}'::timestamp)\n {%- endset -%}\n\n {%- set filtered_sql = sql | replace(\"__PERIOD_FILTER__\", period_filter) -%}\n\n select\n {{target_cols_csv}}\n from (\n {{filtered_sql}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.materialization_insert_by_period_default": {"unique_id": "macro.dbt_utils.materialization_insert_by_period_default", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "materialization_insert_by_period_default", "macro_sql": "{% materialization insert_by_period, default -%}\n {%- set timestamp_field = config.require('timestamp_field') -%}\n {%- set start_date = config.require('start_date') -%}\n {%- set stop_date = config.get('stop_date') or '' -%}}\n {%- set period = config.get('period') or 'week' -%}\n\n {%- if sql.find('__PERIOD_FILTER__') == -1 -%}\n {%- set error_message -%}\n Model '{{ model.unique_id }}' does not include the required string '__PERIOD_FILTER__' in its sql\n {%- endset -%}\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n\n {%- set identifier = model['name'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier, schema=schema, type='table') -%}\n\n {%- set non_destructive_mode = (flags.NON_DESTRUCTIVE == True) -%}\n {%- set full_refresh_mode = (flags.FULL_REFRESH == True) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_not_as_table = (old_relation is not none and not old_relation.is_table) -%}\n\n {%- set should_truncate = (non_destructive_mode and full_refresh_mode and exists_as_table) -%}\n {%- set should_drop = (not should_truncate and (full_refresh_mode or exists_not_as_table)) -%}\n {%- set force_create = (flags.FULL_REFRESH and not flags.NON_DESTRUCTIVE) -%}\n\n -- setup\n {% if old_relation is none -%}\n -- noop\n {%- elif should_truncate -%}\n {{adapter.truncate_relation(old_relation)}}\n {%- elif should_drop -%}\n {{adapter.drop_relation(old_relation)}}\n {%- set old_relation = none -%}\n {%- endif %}\n\n {{run_hooks(pre_hooks, inside_transaction=False)}}\n\n -- `begin` happens here, so `commit` after it to finish the transaction\n {{run_hooks(pre_hooks, inside_transaction=True)}}\n {% call statement() -%}\n begin; -- make extra sure we've closed out the transaction\n commit;\n {%- endcall %}\n\n -- build model\n {% if force_create or old_relation is none -%}\n {# Create an empty target table -#}\n {% call statement('main') -%}\n {%- set empty_sql = sql | replace(\"__PERIOD_FILTER__\", 'false') -%}\n {{create_table_as(False, target_relation, empty_sql)}};\n {%- endcall %}\n {%- endif %}\n\n {% set _ = dbt_utils.get_period_boundaries(schema,\n identifier,\n timestamp_field,\n start_date,\n stop_date,\n period) %}\n {%- set start_timestamp = load_result('period_boundaries')['data'][0][0] | string -%}\n {%- set stop_timestamp = load_result('period_boundaries')['data'][0][1] | string -%}\n {%- set num_periods = load_result('period_boundaries')['data'][0][2] | int -%}\n\n {% set target_columns = adapter.get_columns_in_relation(target_relation) %}\n {%- set target_cols_csv = target_columns | map(attribute='quoted') | join(', ') -%}\n {%- set loop_vars = {'sum_rows_inserted': 0} -%}\n\n -- commit each period as a separate transaction\n {% for i in range(num_periods) -%}\n {%- set msg = \"Running for \" ~ period ~ \" \" ~ (i + 1) ~ \" of \" ~ (num_periods) -%}\n {{ dbt_utils.log_info(msg) }}\n\n {%- set tmp_identifier = model['name'] ~ '__dbt_incremental_period' ~ i ~ '_tmp' -%}\n {%- set tmp_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema, type='table') -%}\n {% call statement() -%}\n {% set tmp_table_sql = dbt_utils.get_period_sql(target_cols_csv,\n sql,\n timestamp_field,\n period,\n start_timestamp,\n stop_timestamp,\n i) %}\n {{dbt.create_table_as(True, tmp_relation, tmp_table_sql)}}\n {%- endcall %}\n\n {{adapter.expand_target_column_types(from_relation=tmp_relation,\n to_relation=target_relation)}}\n {%- set name = 'main-' ~ i -%}\n {% call statement(name, fetch_result=True) -%}\n insert into {{target_relation}} ({{target_cols_csv}})\n (\n select\n {{target_cols_csv}}\n from {{tmp_relation.include(schema=False)}}\n );\n {%- endcall %}\n {% set result = load_result('main-' ~ i) %}\n {% if 'response' in result.keys() %} {# added in v0.19.0 #}\n {% set rows_inserted = result['response']['rows_affected'] %}\n {% else %} {# older versions #}\n {% set rows_inserted = result['status'].split(\" \")[2] | int %}\n {% endif %}\n \n {%- set sum_rows_inserted = loop_vars['sum_rows_inserted'] + rows_inserted -%}\n {%- if loop_vars.update({'sum_rows_inserted': sum_rows_inserted}) %} {% endif -%}\n\n {%- set msg = \"Ran for \" ~ period ~ \" \" ~ (i + 1) ~ \" of \" ~ (num_periods) ~ \"; \" ~ rows_inserted ~ \" records inserted\" -%}\n {{ dbt_utils.log_info(msg) }}\n\n {%- endfor %}\n\n {% call statement() -%}\n begin;\n {%- endcall %}\n\n {{run_hooks(post_hooks, inside_transaction=True)}}\n\n {% call statement() -%}\n commit;\n {%- endcall %}\n\n {{run_hooks(post_hooks, inside_transaction=False)}}\n\n {%- set status_string = \"INSERT \" ~ loop_vars['sum_rows_inserted'] -%}\n\n {% call noop_statement('main', status_string) -%}\n -- no-op\n {%- endcall %}\n\n -- Return the relations created in this materialization\n {{ return({'relations': [target_relation]}) }} \n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.pretty_log_format": {"unique_id": "macro.dbt_utils.pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/logger/pretty_log_format.sql", "original_file_path": "macros/logger/pretty_log_format.sql", "name": "pretty_log_format", "macro_sql": "{% macro pretty_log_format(message) %}\n {{ return(adapter.dispatch('pretty_log_format', packages = dbt_utils._get_utils_namespaces())(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__pretty_log_format": {"unique_id": "macro.dbt_utils.default__pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/logger/pretty_log_format.sql", "original_file_path": "macros/logger/pretty_log_format.sql", "name": "default__pretty_log_format", "macro_sql": "{% macro default__pretty_log_format(message) %}\n {{ return( dbt_utils.pretty_time() ~ ' + ' ~ message) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.pretty_time": {"unique_id": "macro.dbt_utils.pretty_time", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/logger/pretty_time.sql", "original_file_path": "macros/logger/pretty_time.sql", "name": "pretty_time", "macro_sql": "{% macro pretty_time(format='%H:%M:%S') %}\n {{ return(adapter.dispatch('pretty_time', packages = dbt_utils._get_utils_namespaces())(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__pretty_time": {"unique_id": "macro.dbt_utils.default__pretty_time", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/logger/pretty_time.sql", "original_file_path": "macros/logger/pretty_time.sql", "name": "default__pretty_time", "macro_sql": "{% macro default__pretty_time(format='%H:%M:%S') %}\n {{ return(modules.datetime.datetime.now().strftime(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.log_info": {"unique_id": "macro.dbt_utils.log_info", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/logger/log_info.sql", "original_file_path": "macros/logger/log_info.sql", "name": "log_info", "macro_sql": "{% macro log_info(message) %}\n {{ return(adapter.dispatch('log_info', packages = dbt_utils._get_utils_namespaces())(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__log_info": {"unique_id": "macro.dbt_utils.default__log_info", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/logger/log_info.sql", "original_file_path": "macros/logger/log_info.sql", "name": "default__log_info", "macro_sql": "{% macro default__log_info(message) %}\n {{ log(dbt_utils.pretty_log_format(message), info=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.get_intervals_between": {"unique_id": "macro.dbt_utils.get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/datetime/date_spine.sql", "original_file_path": "macros/datetime/date_spine.sql", "name": "get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('get_intervals_between', packages = dbt_utils._get_utils_namespaces())(start_date, end_date, datepart)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__get_intervals_between": {"unique_id": "macro.dbt_utils.default__get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/datetime/date_spine.sql", "original_file_path": "macros/datetime/date_spine.sql", "name": "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_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.date_spine": {"unique_id": "macro.dbt_utils.date_spine", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/datetime/date_spine.sql", "original_file_path": "macros/datetime/date_spine.sql", "name": "date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('date_spine', packages = dbt_utils._get_utils_namespaces())(datepart, start_date, end_date)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__date_spine": {"unique_id": "macro.dbt_utils.default__date_spine", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/datetime/date_spine.sql", "original_file_path": "macros/datetime/date_spine.sql", "name": "default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n/*\ncall as follows:\n\ndate_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dateadd(week, 1, current_date)\"\n)\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_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.get_url_host": {"unique_id": "macro.dbt_utils.get_url_host", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "get_url_host", "macro_sql": "{% macro get_url_host(field) -%}\n {{ return(adapter.dispatch('get_url_host', packages = dbt_utils._get_utils_namespaces())(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__get_url_host": {"unique_id": "macro.dbt_utils.default__get_url_host", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "default__get_url_host", "macro_sql": "{% macro default__get_url_host(field) -%}\n\n{%- set parsed = \n dbt_utils.split_part(\n dbt_utils.split_part(\n dbt_utils.replace(\n dbt_utils.replace(field, \"'http://'\", \"''\"\n ), \"'https://'\", \"''\"\n ), \"'/'\", 1\n ), \"'?'\", 1\n )\n \n-%}\n\n \n {{ dbt_utils.safe_cast(\n parsed,\n dbt_utils.type_string()\n )}}\n \n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.get_url_path": {"unique_id": "macro.dbt_utils.get_url_path", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "get_url_path", "macro_sql": "{% macro get_url_path(field) -%}\n {{ return(adapter.dispatch('get_url_path', packages = dbt_utils._get_utils_namespaces())(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__get_url_path": {"unique_id": "macro.dbt_utils.default__get_url_path", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "default__get_url_path", "macro_sql": "{% macro default__get_url_path(field) -%}\n\n {%- set stripped_url = \n dbt_utils.replace(\n dbt_utils.replace(field, \"'http://'\", \"''\"), \"'https://'\", \"''\")\n -%}\n\n {%- set first_slash_pos -%}\n coalesce(\n nullif({{dbt_utils.position(\"'/'\", stripped_url)}}, 0),\n {{dbt_utils.position(\"'?'\", stripped_url)}} - 1\n )\n {%- endset -%}\n\n {%- set parsed_path =\n dbt_utils.split_part(\n dbt_utils.right(\n stripped_url, \n dbt_utils.length(stripped_url) ~ \"-\" ~ first_slash_pos\n ), \n \"'?'\", 1\n )\n -%}\n\n {{ dbt_utils.safe_cast(\n parsed_path,\n dbt_utils.type_string()\n )}}\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.get_url_parameter": {"unique_id": "macro.dbt_utils.get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "get_url_parameter", "macro_sql": "{% macro get_url_parameter(field, url_parameter) -%}\n {{ return(adapter.dispatch('get_url_parameter', packages = dbt_utils._get_utils_namespaces())(field, url_parameter)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__get_url_parameter": {"unique_id": "macro.dbt_utils.default__get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "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_utils.split_part(dbt_utils.split_part(field, formatted_url_parameter, 2), \"'&'\", 1) -%}\n\nnullif({{ split }},'')\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.haversine_distance": {"unique_id": "macro.dbt_utils.haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/geo/haversine_distance.sql", "original_file_path": "macros/geo/haversine_distance.sql", "name": "haversine_distance", "macro_sql": "{% macro haversine_distance(lat1,lon1,lat2,lon2) -%}\n {{ return(adapter.dispatch('haversine_distance', packages = dbt_utils._get_utils_namespaces())(lat1,lon1,lat2,lon2)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__haversine_distance": {"unique_id": "macro.dbt_utils.default__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/geo/haversine_distance.sql", "original_file_path": "macros/geo/haversine_distance.sql", "name": "default__haversine_distance", "macro_sql": "{% macro default__haversine_distance(lat1,lon1,lat2,lon2) -%}\n\n 2 * 3961 * asin(sqrt((sin(radians(({{lat2}} - {{lat1}}) / 2))) ^ 2 +\n cos(radians({{lat1}})) * cos(radians({{lat2}})) *\n (sin(radians(({{lon2}} - {{lon1}}) / 2))) ^ 2))\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.test_equal_rowcount": {"unique_id": "macro.dbt_utils.test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/equal_rowcount.sql", "original_file_path": "macros/schema_tests/equal_rowcount.sql", "name": "test_equal_rowcount", "macro_sql": "{% macro test_equal_rowcount(model) %}\n {{ return(adapter.dispatch('test_equal_rowcount', packages = dbt_utils._get_utils_namespaces())(model, **kwargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__test_equal_rowcount": {"unique_id": "macro.dbt_utils.default__test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/equal_rowcount.sql", "original_file_path": "macros/schema_tests/equal_rowcount.sql", "name": "default__test_equal_rowcount", "macro_sql": "{% macro default__test_equal_rowcount(model) %}\n\n{% set compare_model = kwargs.get('compare_model', kwargs.get('arg')) %}\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\nwith a as (\n\n select count(*) as count_a from {{ model }}\n\n),\nb as (\n\n select count(*) as count_b from {{ compare_model }}\n\n),\nfinal as (\n\n select abs(\n (select count_a from a) -\n (select count_b from b)\n )\n as diff_count\n\n)\n\nselect diff_count from final\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.test_relationships_where": {"unique_id": "macro.dbt_utils.test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/relationships_where.sql", "original_file_path": "macros/schema_tests/relationships_where.sql", "name": "test_relationships_where", "macro_sql": "{% macro test_relationships_where(model, to, field) %}\n {{ return(adapter.dispatch('test_relationships_where', packages = dbt_utils._get_utils_namespaces())(model, to, field, **kwargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__test_relationships_where": {"unique_id": "macro.dbt_utils.default__test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/relationships_where.sql", "original_file_path": "macros/schema_tests/relationships_where.sql", "name": "default__test_relationships_where", "macro_sql": "{% macro default__test_relationships_where(model, to, field) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('from')) %}\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{% set from_condition = kwargs.get('from_condition', \"1=1\") %}\n{% set to_condition = kwargs.get('to_condition', \"1=1\") %}\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 count(*) from exceptions\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.test_recency": {"unique_id": "macro.dbt_utils.test_recency", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/recency.sql", "original_file_path": "macros/schema_tests/recency.sql", "name": "test_recency", "macro_sql": "{% macro test_recency(model, datepart, interval) %}\n {{ return(adapter.dispatch('test_recency', packages = dbt_utils._get_utils_namespaces())(model, datepart, interval, **kwargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__test_recency": {"unique_id": "macro.dbt_utils.default__test_recency", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/recency.sql", "original_file_path": "macros/schema_tests/recency.sql", "name": "default__test_recency", "macro_sql": "{% macro default__test_recency(model, datepart, interval) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('field')) %}\n\nselect\n case when count(*) > 0 then 0\n else 1\n end as error_result\nfrom {{model}}\nwhere {{column_name}} >=\n {{dbt_utils.dateadd(datepart, interval * -1, dbt_utils.current_timestamp())}}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.test_not_constant": {"unique_id": "macro.dbt_utils.test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/not_constant.sql", "original_file_path": "macros/schema_tests/not_constant.sql", "name": "test_not_constant", "macro_sql": "{% macro test_not_constant(model) %}\n {{ return(adapter.dispatch('test_not_constant', packages = dbt_utils._get_utils_namespaces())(model, **kwargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__test_not_constant": {"unique_id": "macro.dbt_utils.default__test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/not_constant.sql", "original_file_path": "macros/schema_tests/not_constant.sql", "name": "default__test_not_constant", "macro_sql": "{% macro default__test_not_constant(model) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}\n\nselect count(*)\n\nfrom (\n\n select\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n count(distinct {{ column_name }}) as filler_column\n\n from {{ model }}\n\n having count(distinct {{ column_name }}) = 1\n\n ) validation_errors\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.test_unique_where": {"unique_id": "macro.dbt_utils.test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/test_unique_where.sql", "original_file_path": "macros/schema_tests/test_unique_where.sql", "name": "test_unique_where", "macro_sql": "{% macro test_unique_where(model) %}\r\n {{ return(adapter.dispatch('test_unique_where', packages = dbt_utils._get_utils_namespaces())(model, **kwargs)) }}\r\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__test_unique_where": {"unique_id": "macro.dbt_utils.default__test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/test_unique_where.sql", "original_file_path": "macros/schema_tests/test_unique_where.sql", "name": "default__test_unique_where", "macro_sql": "{% macro default__test_unique_where(model) %}\r\n\r\n{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}\r\n{% set where = kwargs.get('where', kwargs.get('arg')) %}\r\n\r\nselect count(*)\r\nfrom (\r\n\r\n select\r\n {{ column_name }}\r\n\r\n from {{ model }}\r\n where {{ column_name }} is not null\r\n {% if where %} and {{ where }} {% endif %}\r\n group by {{ column_name }}\r\n having count(*) > 1\r\n\r\n) validation_errors\r\n\r\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.test_at_least_one": {"unique_id": "macro.dbt_utils.test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/at_least_one.sql", "original_file_path": "macros/schema_tests/at_least_one.sql", "name": "test_at_least_one", "macro_sql": "{% macro test_at_least_one(model) %}\n {{ return(adapter.dispatch('test_at_least_one', packages = dbt_utils._get_utils_namespaces())(model, **kwargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__test_at_least_one": {"unique_id": "macro.dbt_utils.default__test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/at_least_one.sql", "original_file_path": "macros/schema_tests/at_least_one.sql", "name": "default__test_at_least_one", "macro_sql": "{% macro default__test_at_least_one(model) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}\n\nselect count(*)\nfrom (\n select\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n count({{ column_name }}) as filler_column\n\n from {{ model }}\n\n having count({{ column_name }}) = 0\n\n) validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/unique_combination_of_columns.sql", "original_file_path": "macros/schema_tests/unique_combination_of_columns.sql", "name": "test_unique_combination_of_columns", "macro_sql": "{% macro test_unique_combination_of_columns(model, quote_columns = false) %}\n {{ return(adapter.dispatch('test_unique_combination_of_columns', packages = dbt_utils._get_utils_namespaces())(model, quote_columns, **kwargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.default__test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/unique_combination_of_columns.sql", "original_file_path": "macros/schema_tests/unique_combination_of_columns.sql", "name": "default__test_unique_combination_of_columns", "macro_sql": "{% macro default__test_unique_combination_of_columns(model, quote_columns = false) %}\n\n{%- set columns = kwargs.get('combination_of_columns', kwargs.get('arg')) %}\n\n{% if not quote_columns %}\n {%- set column_list=columns %}\n{% elif quote_columns %}\n {%- set column_list=[] %}\n {% for column in 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\n group by {{ columns_csv }}\n having count(*) > 1\n\n)\n\nselect count(*)\nfrom validation_errors\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.test_cardinality_equality": {"unique_id": "macro.dbt_utils.test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/cardinality_equality.sql", "original_file_path": "macros/schema_tests/cardinality_equality.sql", "name": "test_cardinality_equality", "macro_sql": "{% macro test_cardinality_equality(model, to, field) %}\n\n {{ return(adapter.dispatch('test_cardinality_equality', packages = dbt_utils._get_utils_namespaces())(model, to, field, **kwargs)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__test_cardinality_equality": {"unique_id": "macro.dbt_utils.default__test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/cardinality_equality.sql", "original_file_path": "macros/schema_tests/cardinality_equality.sql", "name": "default__test_cardinality_equality", "macro_sql": "{% macro default__test_cardinality_equality(model, to, field) %}\n\n{# T-SQL doesn't let you use numbers as aliases for columns #}\n{# Thus, no \"GROUP BY 1\" #}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('from')) %}\n\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 {{ column_name }}\n),\n\nexcept_a as (\n select *\n from table_a\n {{ dbt_utils.except() }}\n select *\n from table_b\n),\n\nexcept_b as (\n select *\n from table_b\n {{ dbt_utils.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 count(*)\nfrom unioned\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.test_expression_is_true": {"unique_id": "macro.dbt_utils.test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/expression_is_true.sql", "original_file_path": "macros/schema_tests/expression_is_true.sql", "name": "test_expression_is_true", "macro_sql": "{% macro test_expression_is_true(model, condition='1=1') %}\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 {{ return(adapter.dispatch('test_expression_is_true', packages = dbt_utils._get_utils_namespaces())(model, condition, **kwargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__test_expression_is_true": {"unique_id": "macro.dbt_utils.default__test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/expression_is_true.sql", "original_file_path": "macros/schema_tests/expression_is_true.sql", "name": "default__test_expression_is_true", "macro_sql": "{% macro default__test_expression_is_true(model, condition) %}\n\n{% set expression = kwargs.get('expression', kwargs.get('arg')) %}\n\nwith meet_condition as (\n\n select * from {{ model }} where {{ condition }}\n\n),\nvalidation_errors as (\n\n select\n *\n from meet_condition\n where not({{expression}})\n\n)\n\nselect count(*)\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.test_not_null_where": {"unique_id": "macro.dbt_utils.test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/test_not_null_where.sql", "original_file_path": "macros/schema_tests/test_not_null_where.sql", "name": "test_not_null_where", "macro_sql": "{% macro test_not_null_where(model) %}\r\n {{ return(adapter.dispatch('test_not_null_where', packages = dbt_utils._get_utils_namespaces())(model, **kwargs)) }}\r\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__test_not_null_where": {"unique_id": "macro.dbt_utils.default__test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/test_not_null_where.sql", "original_file_path": "macros/schema_tests/test_not_null_where.sql", "name": "default__test_not_null_where", "macro_sql": "{% macro default__test_not_null_where(model) %}\r\n\r\n{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}\r\n{% set where = kwargs.get('where', kwargs.get('arg')) %}\r\n\r\nselect count(*)\r\nfrom {{ model }}\r\nwhere {{ column_name }} is null\r\n{% if where %} and {{ where }} {% endif %}\r\n\r\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.test_equality": {"unique_id": "macro.dbt_utils.test_equality", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/equality.sql", "original_file_path": "macros/schema_tests/equality.sql", "name": "test_equality", "macro_sql": "{% macro test_equality(model) %}\n {{ return(adapter.dispatch('test_equality', packages = dbt_utils._get_utils_namespaces())(model, **kwargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__test_equality": {"unique_id": "macro.dbt_utils.default__test_equality", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/equality.sql", "original_file_path": "macros/schema_tests/equality.sql", "name": "default__test_equality", "macro_sql": "{% macro default__test_equality(model) %}\n\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{%- set compare_columns = kwargs.get('compare_columns', None) -%}\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_model = kwargs.get('compare_model', kwargs.get('arg')) %}\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_utils.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_utils.except() }}\n select {{compare_cols_csv}} from a\n\n),\n\nunioned as (\n\n select * from a_minus_b\n union all\n select * from b_minus_a\n\n),\n\nfinal as (\n\n select (select count(*) from unioned) +\n (select abs(\n (select count(*) from a_minus_b) -\n (select count(*) from b_minus_a)\n ))\n as count\n\n)\n\nselect count from final\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/schema_tests/mutually_exclusive_ranges.sql", "name": "test_mutually_exclusive_ranges", "macro_sql": "{% macro test_mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed') %}\n {{ return(adapter.dispatch('test_mutually_exclusive_ranges', packages = dbt_utils._get_utils_namespaces())(model, lower_bound_column, upper_bound_column, partition_by, gaps)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.default__test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/schema_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/schema_tests/mutually_exclusive_ranges.sql", "name": "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') %}\n\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\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 }},\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 }}\n ) as next_lower_bound,\n\n row_number() over (\n {{ partition_clause }}\n order by {{ lower_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 nore 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 < upper_bound,\n false\n ) as lower_bound_less_than_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_less_than_upper_bound\n and upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n )\n)\n\nselect count(*) from validation_errors\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.nullcheck_table": {"unique_id": "macro.dbt_utils.nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "nullcheck_table", "macro_sql": "{% macro nullcheck_table(relation) %}\n {{ return(adapter.dispatch('nullcheck_table', packages = dbt_utils._get_utils_namespaces())(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__nullcheck_table": {"unique_id": "macro.dbt_utils.default__nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.get_relations_by_pattern": {"unique_id": "macro.dbt_utils.get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "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', packages = dbt_utils._get_utils_namespaces())(schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__get_relations_by_pattern": {"unique_id": "macro.dbt_utils.default__get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.get_powers_of_two": {"unique_id": "macro.dbt_utils.get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('get_powers_of_two', packages = dbt_utils._get_utils_namespaces())(upper_bound)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__get_powers_of_two": {"unique_id": "macro.dbt_utils.default__get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.generate_series": {"unique_id": "macro.dbt_utils.generate_series", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', packages = dbt_utils._get_utils_namespaces())(upper_bound)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__generate_series": {"unique_id": "macro.dbt_utils.default__generate_series", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "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 * pow(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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.get_relations_by_prefix": {"unique_id": "macro.dbt_utils.get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "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', packages = dbt_utils._get_utils_namespaces())(schema, prefix, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__get_relations_by_prefix": {"unique_id": "macro.dbt_utils.default__get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "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', packages = dbt_utils._get_utils_namespaces())(schema, prefix, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.star": {"unique_id": "macro.dbt_utils.star", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "star", "macro_sql": "{% macro star(from, relation_alias=False, except=[]) -%}\n {{ return(adapter.dispatch('star', packages = dbt_utils._get_utils_namespaces())(from, relation_alias, except)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__star": {"unique_id": "macro.dbt_utils.default__star", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "default__star", "macro_sql": "{% macro default__star(from, relation_alias=False, except=[]) -%}\n {%- do dbt_utils._is_relation(from, 'star') -%}\n {%- do dbt_utils._is_ephemeral(from, 'star') -%}\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\n {%- for col in cols -%}\n\n {%- if col.column not in except -%}\n {% do include_cols.append(col.column) %}\n\n {%- endif %}\n {%- endfor %}\n\n {%- for col in include_cols %}\n\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}{{ adapter.quote(col)|trim }}\n {%- if not loop.last %},{{ '\\n ' }}{% endif %}\n\n {%- endfor -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.unpivot": {"unique_id": "macro.dbt_utils.unpivot", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "unpivot", "macro_sql": "{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', table=none) -%}\n {{ return(adapter.dispatch('unpivot', packages = dbt_utils._get_utils_namespaces())(relation, cast_to, exclude, remove, field_name, value_name, table)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__unpivot": {"unique_id": "macro.dbt_utils.default__unpivot", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "default__unpivot", "macro_sql": "{% macro default__unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', table=none) -%}\n\n {% if table %}\n {%- set error_message = '\n Warning: the `unpivot` macro no longer accepts a `table` parameter. \\\n This parameter will be deprecated in a future release of dbt-utils. Use the `relation` parameter instead. \\\n The {}.{} model triggered this warning. \\\n '.format(model.package_name, model.name) -%}\n {%- do exceptions.warn(error_message) -%}\n {% endif %}\n\n {% if relation and table %}\n {{ exceptions.raise_compiler_error(\"Error: both the `relation` and `table` parameters were provided to `unpivot` macro. Choose one only (we recommend `relation`).\") }}\n {% elif not relation and table %}\n {% set relation=table %}\n {% elif not relation and not table %}\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_utils.type_string() }}) as {{ field_name }},\n cast({{ col.column }} 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.union_relations": {"unique_id": "macro.dbt_utils.union_relations", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "union_relations", "macro_sql": "{%- macro union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation') -%}\n {{ return(adapter.dispatch('union_relations', packages = dbt_utils._get_utils_namespaces())(relations, column_override, include, exclude, source_column_name)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__union_relations": {"unique_id": "macro.dbt_utils.default__union_relations", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "default__union_relations", "macro_sql": "\n\n{%- macro default__union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation') -%}\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\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 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_utils.string_literal(relation) }} as {{ dbt_utils.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 {{ relation }}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.group_by": {"unique_id": "macro.dbt_utils.group_by", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "group_by", "macro_sql": "{%- macro group_by(n) -%}\n {{ return(adapter.dispatch('group_by', packages = dbt_utils._get_utils_namespaces())(n)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__group_by": {"unique_id": "macro.dbt_utils.default__group_by", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.surrogate_key": {"unique_id": "macro.dbt_utils.surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "surrogate_key", "macro_sql": "{%- macro surrogate_key(field_list) -%}\n {# needed for safe_add to allow for non-keyword arguments see SO post #}\n {# https://stackoverflow.com/questions/13944751/args-kwargs-in-jinja2-macros #}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('surrogate_key', packages = dbt_utils._get_utils_namespaces())(field_list, *varargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__surrogate_key": {"unique_id": "macro.dbt_utils.default__surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "default__surrogate_key", "macro_sql": "\n\n{%- macro default__surrogate_key(field_list) -%}\n\n{%- if varargs|length >= 1 or field_list is string %}\n\n{%- set error_message = '\nWarning: the `surrogate_key` macro now takes a single list argument instead of \\\nmultiple string arguments. Support for multiple string arguments will be \\\ndeprecated in a future release of dbt-utils. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.warn(error_message) -%}\n\n{# first argument is not included in varargs, so add first element to field_list_xf #}\n{%- set field_list_xf = [field_list] -%}\n\n{%- for field in varargs %}\n{%- set _ = field_list_xf.append(field) -%}\n{%- endfor -%}\n\n{%- else -%}\n\n{# if using list, just set field_list_xf as field_list #}\n{%- set field_list_xf = field_list -%}\n\n{%- endif -%}\n\n\n{%- set fields = [] -%}\n\n{%- for field in field_list_xf -%}\n\n {%- set _ = fields.append(\n \"coalesce(cast(\" ~ field ~ \" as \" ~ dbt_utils.type_string() ~ \"), '')\"\n ) -%}\n\n {%- if not loop.last %}\n {%- set _ = fields.append(\"'-'\") -%}\n {%- endif -%}\n\n{%- endfor -%}\n\n{{dbt_utils.hash(dbt_utils.concat(fields))}}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.safe_add": {"unique_id": "macro.dbt_utils.safe_add", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "safe_add", "macro_sql": "{%- macro safe_add() -%}\n {# needed for safe_add to allow for non-keyword arguments see SO post #}\n {# https://stackoverflow.com/questions/13944751/args-kwargs-in-jinja2-macros #}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('safe_add', packages = dbt_utils._get_utils_namespaces())(*varargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__safe_add": {"unique_id": "macro.dbt_utils.default__safe_add", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "default__safe_add", "macro_sql": "\n\n{%- macro default__safe_add() -%}\n\n{% set fields = [] %}\n\n{%- for field in varargs -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' +\\n ') }}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.nullcheck": {"unique_id": "macro.dbt_utils.nullcheck", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "nullcheck", "macro_sql": "{% macro nullcheck(cols) %}\n {{ return(adapter.dispatch('nullcheck', packages = dbt_utils._get_utils_namespaces())(cols)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__nullcheck": {"unique_id": "macro.dbt_utils.default__nullcheck", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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', packages = dbt_utils._get_utils_namespaces())\n (schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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 \"table_schema\",\n table_name as \"table_name\",\n case table_type\n when 'BASE TABLE' then 'table'\n else lower(table_type)\n end as \"table_type\"\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.bigquery__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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 case table_type\n when 'BASE TABLE' then 'table'\n else lower(table_type)\n end as table_type\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils._bigquery__get_matching_schemata": {"unique_id": "macro.dbt_utils._bigquery__get_matching_schemata", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.get_column_values": {"unique_id": "macro.dbt_utils.get_column_values", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "get_column_values", "macro_sql": "{% macro get_column_values(table, column, max_records=none, default=none) -%}\n {{ return(adapter.dispatch('get_column_values', packages = dbt_utils._get_utils_namespaces())(table, column, max_records, default)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__get_column_values": {"unique_id": "macro.dbt_utils.default__get_column_values", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "default__get_column_values", "macro_sql": "{% macro default__get_column_values(table, column, max_records=none, default=none) -%}\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\n {%- set target_relation = adapter.get_relation(database=table.database,\n schema=table.schema,\n identifier=table.identifier) -%}\n\n {%- call statement('get_column_values', fetch_result=true) %}\n\n {%- if not target_relation and default is none -%}\n\n {{ exceptions.raise_compiler_error(\"In get_column_values(): relation \" ~ table ~ \" does not exist and no default value was provided.\") }}\n\n {%- elif not target_relation and default is not none -%}\n\n {{ log(\"Relation \" ~ table ~ \" does not exist. Returning the default value: \" ~ default) }}\n\n {{ return(default) }}\n\n {%- else -%}\n\n select\n {{ column }} as value\n\n from {{ target_relation }}\n group by 1\n order by count(*) desc\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.pivot": {"unique_id": "macro.dbt_utils.pivot", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "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', packages = dbt_utils._get_utils_namespaces())(column, values, alias, agg, cmp, prefix, suffix, then_value, else_value, quote_identifiers, distinct)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__pivot": {"unique_id": "macro.dbt_utils.default__pivot", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "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 v in values %}\n {{ agg }}(\n {% if distinct %} distinct {% endif %}\n case\n when {{ column }} {{ cmp }} '{{ v }}'\n then {{ then_value }}\n else {{ else_value }}\n end\n )\n {% if alias %}\n {% if quote_identifiers %}\n as {{ adapter.quote(prefix ~ v ~ suffix) }}\n {% else %}\n as {{prefix ~ v ~ suffix }}\n {% endif %}\n {% endif %}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.get_query_results_as_dict": {"unique_id": "macro.dbt_utils.get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "get_query_results_as_dict", "macro_sql": "{% macro get_query_results_as_dict(query) %}\n {{ return(adapter.dispatch('get_query_results_as_dict', packages = dbt_utils._get_utils_namespaces())(query)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.dbt_utils.default__get_query_results_as_dict": {"unique_id": "macro.dbt_utils.default__get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.asana_source.get_story_columns": {"unique_id": "macro.asana_source.get_story_columns", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "macros/get_story_columns.sql", "original_file_path": "macros/get_story_columns.sql", "name": "get_story_columns", "macro_sql": "{% macro get_story_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_by_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"hearted\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"num_hearts\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"source\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"target_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"text\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"type\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.asana_source.get_task_tag_columns": {"unique_id": "macro.asana_source.get_task_tag_columns", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "macros/get_task_tag_columns.sql", "original_file_path": "macros/get_task_tag_columns.sql", "name": "get_task_tag_columns", "macro_sql": "{% macro get_task_tag_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"tag_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"task_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.asana_source.get_task_columns": {"unique_id": "macro.asana_source.get_task_columns", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "macros/get_task_columns.sql", "original_file_path": "macros/get_task_columns.sql", "name": "get_task_columns", "macro_sql": "{% macro get_task_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"assignee_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"assignee_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"completed\", \"datatype\": \"boolean\"},\n {\"name\": \"completed_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"completed_by_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"due_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"due_on\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"hearted\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"modified_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"notes\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"num_hearts\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"parent_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"start_on\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"workspace_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.asana_source.get_task_section_columns": {"unique_id": "macro.asana_source.get_task_section_columns", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "macros/get_task_section_columns.sql", "original_file_path": "macros/get_task_section_columns.sql", "name": "get_task_section_columns", "macro_sql": "{% macro get_task_section_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"section_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"task_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.asana_source.get_team_columns": {"unique_id": "macro.asana_source.get_team_columns", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "macros/get_team_columns.sql", "original_file_path": "macros/get_team_columns.sql", "name": "get_team_columns", "macro_sql": "{% macro get_team_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"organization_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.asana_source.get_user_columns": {"unique_id": "macro.asana_source.get_user_columns", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "macros/get_user_columns.sql", "original_file_path": "macros/get_user_columns.sql", "name": "get_user_columns", "macro_sql": "{% macro get_user_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.asana_source.get_project_columns": {"unique_id": "macro.asana_source.get_project_columns", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "macros/get_project_columns.sql", "original_file_path": "macros/get_project_columns.sql", "name": "get_project_columns", "macro_sql": "{% macro get_project_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"archived\", \"datatype\": \"boolean\"},\n {\"name\": \"color\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"current_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"due_date\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"modified_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"notes\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"owner_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"public\", \"datatype\": \"boolean\"},\n {\"name\": \"team_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"workspace_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.asana_source.get_task_follower_columns": {"unique_id": "macro.asana_source.get_task_follower_columns", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "macros/get_task_follower_columns.sql", "original_file_path": "macros/get_task_follower_columns.sql", "name": "get_task_follower_columns", "macro_sql": "{% macro get_task_follower_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"task_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"user_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.asana_source.get_section_columns": {"unique_id": "macro.asana_source.get_section_columns", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "macros/get_section_columns.sql", "original_file_path": "macros/get_section_columns.sql", "name": "get_section_columns", "macro_sql": "{% macro get_section_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"project_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.asana_source.get_project_task_columns": {"unique_id": "macro.asana_source.get_project_task_columns", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "macros/get_project_task_columns.sql", "original_file_path": "macros/get_project_task_columns.sql", "name": "get_project_task_columns", "macro_sql": "{% macro get_project_task_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"project_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"task_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.asana_source.get_tag_columns": {"unique_id": "macro.asana_source.get_tag_columns", "package_name": "asana_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/asana_source", "path": "macros/get_tag_columns.sql", "original_file_path": "macros/get_tag_columns.sql", "name": "get_tag_columns", "macro_sql": "{% macro get_tag_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"color\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"message\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"notes\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"workspace_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.enabled_vars": {"unique_id": "macro.fivetran_utils.enabled_vars", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/enabled_vars.sql", "original_file_path": "macros/enabled_vars.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.percentile": {"unique_id": "macro.fivetran_utils.percentile", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "percentile", "macro_sql": "{% macro percentile(percentile_field, partition_field, percent) -%}\n\n{{ adapter.dispatch('percentile', packages = fivetran_utils._get_utils_namespaces()) (percentile_field, partition_field, percent) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.default__percentile": {"unique_id": "macro.fivetran_utils.default__percentile", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.bigquery__percentile": {"unique_id": "macro.fivetran_utils.bigquery__percentile", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.max_bool": {"unique_id": "macro.fivetran_utils.max_bool", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "max_bool", "macro_sql": "{% macro max_bool(boolean_field) -%}\n\n{{ adapter.dispatch('max_bool', packages = fivetran_utils._get_utils_namespaces()) (boolean_field) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.default__max_bool": {"unique_id": "macro.fivetran_utils.default__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "default__max_bool", "macro_sql": "{% macro default__max_bool(boolean_field) %}\n\n bool_or( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.snowflake__max_bool": {"unique_id": "macro.fivetran_utils.snowflake__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "snowflake__max_bool", "macro_sql": "{% macro snowflake__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.bigquery__max_bool": {"unique_id": "macro.fivetran_utils.bigquery__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "bigquery__max_bool", "macro_sql": "{% macro bigquery__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.string_agg": {"unique_id": "macro.fivetran_utils.string_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "string_agg", "macro_sql": "{% macro string_agg(field_to_agg, delimiter) -%}\n\n{{ adapter.dispatch('string_agg', packages = fivetran_utils._get_utils_namespaces()) (field_to_agg, delimiter) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.default__string_agg": {"unique_id": "macro.fivetran_utils.default__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "default__string_agg", "macro_sql": "{% macro default__string_agg(field_to_agg, delimiter) %}\n string_agg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.snowflake__string_agg": {"unique_id": "macro.fivetran_utils.snowflake__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "snowflake__string_agg", "macro_sql": "{% macro snowflake__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.redshift__string_agg": {"unique_id": "macro.fivetran_utils.redshift__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "redshift__string_agg", "macro_sql": "{% macro redshift__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.timestamp_diff": {"unique_id": "macro.fivetran_utils.timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "timestamp_diff", "macro_sql": "{% macro timestamp_diff(first_date, second_date, datepart) %}\n {{ adapter.dispatch('datediff', packages = fivetran_utils._get_utils_namespaces())(first_date, second_date, datepart) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.default__timestamp_diff": {"unique_id": "macro.fivetran_utils.default__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.bigquery__timestamp_diff": {"unique_id": "macro.fivetran_utils.bigquery__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.postgres__datediff": {"unique_id": "macro.fivetran_utils.postgres__datediff", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 ({{ dbt_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.generate_columns_macro": {"unique_id": "macro.fivetran_utils.generate_columns_macro", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/generate_columns_macro.sql", "original_file_path": "macros/generate_columns_macro.sql", "name": "generate_columns_macro", "macro_sql": "{% macro generate_columns_macro(table_name, schema_name, database_name=target.database) %}\n\n{% set columns = get_columns_for_macro(table_name, schema_name, database_name) %}\n\n{% set jinja_macro=[] %}\n\n{% do jinja_macro.append('{% macro get_' ~ table_name ~ '_columns() %}') %}\n{% do jinja_macro.append('') %}\n{% do jinja_macro.append('{% set columns = [') %}\n\n{% for col in columns %}\n{% do jinja_macro.append(' ' ~ col ~ (',' if not loop.last)) %}\n{% endfor %}\n\n{% do jinja_macro.append('] %}') %}\n{% do jinja_macro.append('') %}\n{% do jinja_macro.append('{{ return(columns) }}') %}\n{% do jinja_macro.append('') %}\n{% do jinja_macro.append('{% endmacro %}') %}\n\n{% if execute %}\n\n {% set joined = jinja_macro | join ('\\n') %}\n {{ log(joined, info=True) }}\n {% do return(joined) %}\n\n{% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.first_value": {"unique_id": "macro.fivetran_utils.first_value", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "first_value", "macro_sql": "{% macro first_value(first_value_field, partition_field, order_by_field, order=\"asc\") -%}\n\n{{ adapter.dispatch('first_value', packages = fivetran_utils._get_utils_namespaces()) (first_value_field, partition_field, order_by_field, order) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.default__first_value": {"unique_id": "macro.fivetran_utils.default__first_value", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.redshift__first_value": {"unique_id": "macro.fivetran_utils.redshift__first_value", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.union_relations": {"unique_id": "macro.fivetran_utils.union_relations", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "name": "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_utils.string_literal(relation) }} as {{ dbt_utils.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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.union_tables": {"unique_id": "macro.fivetran_utils.union_tables", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.snowflake_seed_data": {"unique_id": "macro.fivetran_utils.snowflake_seed_data", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/snowflake_seed_data.sql", "original_file_path": "macros/snowflake_seed_data.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.snowflake__get_columns_for_macro": {"unique_id": "macro.fivetran_utils.snowflake__get_columns_for_macro", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/get_columns_for_macro.sql", "original_file_path": "macros/get_columns_for_macro.sql", "name": "snowflake__get_columns_for_macro", "macro_sql": "{% macro snowflake__get_columns_for_macro(table_name, schema_name, database_name=target.database) %}\n\n{% set query %}\n\nselect\n concat(\n '{\"name\": \"', \n lower(column_name), \n '\", \"datatype\": ',\n case\n when lower(data_type) like '%timestamp%' then 'dbt_utils.type_timestamp()' \n when lower(data_type) = 'text' then 'dbt_utils.type_string()' \n when lower(data_type) = 'boolean' then '\"boolean\"'\n when lower(data_type) = 'number' then 'dbt_utils.type_numeric()' \n when lower(data_type) = 'float' then 'dbt_utils.type_float()' \n when lower(data_type) = 'date' then '\"date\"'\n end,\n '}')\nfrom {{ database_name }}.information_schema.columns\nwhere lower(table_name) = '{{ table_name }}'\nand lower(table_schema) = '{{ schema_name }}'\norder by 1\n\n{% endset %}\n\n{% set results = run_query(query) %}\n{% set results_list = results.columns[0].values() %}}\n\n{{ return(results_list) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.bigquery__get_columns_for_macro": {"unique_id": "macro.fivetran_utils.bigquery__get_columns_for_macro", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/get_columns_for_macro.sql", "original_file_path": "macros/get_columns_for_macro.sql", "name": "bigquery__get_columns_for_macro", "macro_sql": "{% macro bigquery__get_columns_for_macro(table_name, schema_name, database_name=target.database) %}\n\n{% set query %}\n\nselect\n concat(\n '{\"name\": \"', \n lower(column_name), \n '\", \"datatype\": ',\n case\n when lower(data_type) like '%timestamp%' then 'dbt_utils.type_timestamp()' \n when lower(data_type) = 'string' then 'dbt_utils.type_string()' \n when lower(data_type) = 'bool' then '\"boolean\"'\n when lower(data_type) = 'numeric' then 'dbt_utils.type_numeric()' \n when lower(data_type) = 'float64' then 'dbt_utils.type_float()' \n when lower(data_type) = 'int64' then 'dbt_utils.type_int()' \n when lower(data_type) = 'date' then '\"date\"' \n when lower(data_type) = 'datetime' then '\"datetime\"' \n end,\n '}')\nfrom `{{ database_name }}`.{{ schema_name }}.INFORMATION_SCHEMA.COLUMNS\nwhere lower(table_name) = '{{ table_name }}'\nand lower(table_schema) = '{{ schema_name }}'\norder by 1\n\n{% endset %}\n\n{% set results = run_query(query) %}\n{% set results_list = results.columns[0].values() %}}\n\n{{ return(results_list) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.get_columns_for_macro": {"unique_id": "macro.fivetran_utils.get_columns_for_macro", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/get_columns_for_macro.sql", "original_file_path": "macros/get_columns_for_macro.sql", "name": "get_columns_for_macro", "macro_sql": "{% macro get_columns_for_macro(table_name, schema_name, database_name) -%}\n {{ return(adapter.dispatch('get_columns_for_macro')(table_name, schema_name, database_name)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.fill_staging_columns": {"unique_id": "macro.fivetran_utils.fill_staging_columns", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.quote_column": {"unique_id": "macro.fivetran_utils.quote_column", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "name": "quote_column", "macro_sql": "{% macro quote_column(column) %}\n {% if 'quote' in column %}\n {% if column.quote %}\n {% if target.type == 'bigquery' %}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.json_extract": {"unique_id": "macro.fivetran_utils.json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "json_extract", "macro_sql": "{% macro json_extract(string, string_path) -%}\n\n{{ adapter.dispatch('json_extract', packages = fivetran_utils._get_utils_namespaces()) (string, string_path) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.default__json_extract": {"unique_id": "macro.fivetran_utils.default__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "default__json_extract", "macro_sql": "{% macro default__json_extract(string, string_path) %}\n\n json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} )\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.bigquery__json_extract": {"unique_id": "macro.fivetran_utils.bigquery__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "bigquery__json_extract", "macro_sql": "{% macro bigquery__json_extract(string, string_path) %}\n\n json_extract_scalar({{string}}, {{ \"'$.\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.postgres__json_extract": {"unique_id": "macro.fivetran_utils.postgres__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "postgres__json_extract", "macro_sql": "{% macro postgres__json_extract(string, string_path) %}\n\n {{string}}::json->{{\"'\" ~ string_path ~ \"'\" }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.timestamp_add": {"unique_id": "macro.fivetran_utils.timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "timestamp_add", "macro_sql": "{% macro timestamp_add(datepart, interval, from_timestamp) -%}\n\n{{ adapter.dispatch('timestamp_add', packages = fivetran_utils._get_utils_namespaces()) (datepart, interval, from_timestamp) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.default__timestamp_add": {"unique_id": "macro.fivetran_utils.default__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.bigquery__timestamp_add": {"unique_id": "macro.fivetran_utils.bigquery__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.redshift__timestamp_add": {"unique_id": "macro.fivetran_utils.redshift__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.postgres__timestamp_add": {"unique_id": "macro.fivetran_utils.postgres__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "postgres__timestamp_add", "macro_sql": "{% macro postgres__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ from_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.ceiling": {"unique_id": "macro.fivetran_utils.ceiling", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "ceiling", "macro_sql": "{% macro ceiling(num) -%}\n\n{{ adapter.dispatch('ceiling', packages = fivetran_utils._get_utils_namespaces()) (num) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.default__ceiling": {"unique_id": "macro.fivetran_utils.default__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "default__ceiling", "macro_sql": "{% macro default__ceiling(num) %}\n ceiling({{ num }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.snowflake__ceiling": {"unique_id": "macro.fivetran_utils.snowflake__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "snowflake__ceiling", "macro_sql": "{% macro snowflake__ceiling(num) %}\n ceil({{ num }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.remove_prefix_from_columns": {"unique_id": "macro.fivetran_utils.remove_prefix_from_columns", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/remove_prefix_from_columns.sql", "original_file_path": "macros/remove_prefix_from_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.dummy_coalesce_value": {"unique_id": "macro.fivetran_utils.dummy_coalesce_value", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/dummy_coalesce_value.sql", "original_file_path": "macros/dummy_coalesce_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils._get_utils_namespaces": {"unique_id": "macro.fivetran_utils._get_utils_namespaces", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/_get_utils_namespaces.sql", "original_file_path": "macros/_get_utils_namespaces.sql", "name": "_get_utils_namespaces", "macro_sql": "{% macro _get_utils_namespaces() %}\n {% set override_namespaces = var('dbt_utils_dispatch_list', []) %}\n {% do return(override_namespaces + ['dbt_utils', 'fivetran_utils']) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.array_agg": {"unique_id": "macro.fivetran_utils.array_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "array_agg", "macro_sql": "{% macro array_agg(field_to_agg) -%}\n\n{{ adapter.dispatch('array_agg', packages = fivetran_utils._get_utils_namespaces()) (field_to_agg) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.default__array_agg": {"unique_id": "macro.fivetran_utils.default__array_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "default__array_agg", "macro_sql": "{% macro default__array_agg(field_to_agg) %}\n listagg({{ field_to_agg }}, ',')\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.snowflake__array_agg": {"unique_id": "macro.fivetran_utils.snowflake__array_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "snowflake__array_agg", "macro_sql": "{% macro snowflake__array_agg(field_to_agg) %}\n array_agg({{ field_to_agg }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.bigquery__array_agg": {"unique_id": "macro.fivetran_utils.bigquery__array_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "bigquery__array_agg", "macro_sql": "{% macro bigquery__array_agg(field_to_agg) %}\n array_agg({{ field_to_agg }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.empty_variable_warning": {"unique_id": "macro.fivetran_utils.empty_variable_warning", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/empty_variable_warning.sql", "original_file_path": "macros/empty_variable_warning.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}, "macro.fivetran_utils.enabled_vars_one_true": {"unique_id": "macro.fivetran_utils.enabled_vars_one_true", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/Asana/dbt_asana_source/integration_tests/dbt_modules/fivetran_utils", "path": "macros/enabled_vars_one_true.sql", "original_file_path": "macros/enabled_vars_one_true.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": []}}, "docs": {"dbt.__overview__": {"unique_id": "dbt.__overview__", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt/include/global_project", "path": "overview.md", "original_file_path": "docs/overview.md", "name": "__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 `--models` 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/overview)?\n- Read the [dbt viewpoint](https://docs.getdbt.com/docs/viewpoint)\n- [Installation](https://docs.getdbt.com/docs/installation)\n- Join the [chat](https://community.getdbt.com/) on Slack for live questions and support."}}, "exposures": {}, "selectors": {}, "disabled": [], "parent_map": {"seed.asana_source_integration_tests.project_task_data": [], "seed.asana_source_integration_tests.story_data": [], "seed.asana_source_integration_tests.task_tag_data": [], "seed.asana_source_integration_tests.task_section_data": [], "seed.asana_source_integration_tests.task_data": [], "seed.asana_source_integration_tests.task_follower_data": [], "seed.asana_source_integration_tests.tag_data": [], "seed.asana_source_integration_tests.project_data": [], "seed.asana_source_integration_tests.user_data": [], "seed.asana_source_integration_tests.team_data": [], "seed.asana_source_integration_tests.section_data": [], "model.asana_source.stg_asana__user": ["model.asana_source.stg_asana__user_tmp", "model.asana_source.stg_asana__user_tmp"], "model.asana_source.stg_asana__task": ["model.asana_source.stg_asana__task_tmp", "model.asana_source.stg_asana__task_tmp"], "model.asana_source.stg_asana__task_section": ["model.asana_source.stg_asana__task_section_tmp", "model.asana_source.stg_asana__task_section_tmp"], "model.asana_source.stg_asana__section": ["model.asana_source.stg_asana__section_tmp", "model.asana_source.stg_asana__section_tmp"], "model.asana_source.stg_asana__team": ["model.asana_source.stg_asana__team_tmp", "model.asana_source.stg_asana__team_tmp"], "model.asana_source.stg_asana__task_tag": ["model.asana_source.stg_asana__task_tag_tmp", "model.asana_source.stg_asana__task_tag_tmp"], "model.asana_source.stg_asana__story": ["model.asana_source.stg_asana__story_tmp", "model.asana_source.stg_asana__story_tmp"], "model.asana_source.stg_asana__tag": ["model.asana_source.stg_asana__tag_tmp", "model.asana_source.stg_asana__tag_tmp"], "model.asana_source.stg_asana__project_task": ["model.asana_source.stg_asana__project_task_tmp", "model.asana_source.stg_asana__project_task_tmp"], "model.asana_source.stg_asana__project": ["model.asana_source.stg_asana__project_tmp", "model.asana_source.stg_asana__project_tmp"], "model.asana_source.stg_asana__task_follower": ["model.asana_source.stg_asana__task_follower_tmp", "model.asana_source.stg_asana__task_follower_tmp"], "model.asana_source.stg_asana__story_tmp": ["seed.asana_source_integration_tests.story_data"], "model.asana_source.stg_asana__team_tmp": ["seed.asana_source_integration_tests.team_data"], "model.asana_source.stg_asana__task_tmp": ["seed.asana_source_integration_tests.task_data"], "model.asana_source.stg_asana__task_follower_tmp": ["seed.asana_source_integration_tests.task_follower_data"], "model.asana_source.stg_asana__tag_tmp": ["seed.asana_source_integration_tests.tag_data"], "model.asana_source.stg_asana__task_section_tmp": ["seed.asana_source_integration_tests.task_section_data"], "model.asana_source.stg_asana__task_tag_tmp": ["seed.asana_source_integration_tests.task_tag_data"], "model.asana_source.stg_asana__user_tmp": ["seed.asana_source_integration_tests.user_data"], "model.asana_source.stg_asana__section_tmp": ["seed.asana_source_integration_tests.section_data"], "model.asana_source.stg_asana__project_tmp": ["seed.asana_source_integration_tests.project_data"], "model.asana_source.stg_asana__project_task_tmp": ["seed.asana_source_integration_tests.project_task_data"], "test.asana_source.unique_stg_asana__project_project_id": ["model.asana_source.stg_asana__project"], "test.asana_source.not_null_stg_asana__project_project_id": ["model.asana_source.stg_asana__project"], "test.asana_source.not_null_stg_asana__project_task_project_id": ["model.asana_source.stg_asana__project_task"], "test.asana_source.not_null_stg_asana__project_task_task_id": ["model.asana_source.stg_asana__project_task"], "test.asana_source.unique_stg_asana__section_section_id": ["model.asana_source.stg_asana__section"], "test.asana_source.not_null_stg_asana__section_section_id": ["model.asana_source.stg_asana__section"], "test.asana_source.unique_stg_asana__story_story_id": ["model.asana_source.stg_asana__story"], "test.asana_source.not_null_stg_asana__story_story_id": ["model.asana_source.stg_asana__story"], "test.asana_source.not_null_stg_asana__story_target_task_id": ["model.asana_source.stg_asana__story"], "test.asana_source.unique_stg_asana__tag_tag_id": ["model.asana_source.stg_asana__tag"], "test.asana_source.not_null_stg_asana__tag_tag_id": ["model.asana_source.stg_asana__tag"], "test.asana_source.unique_stg_asana__task_task_id": ["model.asana_source.stg_asana__task"], "test.asana_source.not_null_stg_asana__task_task_id": ["model.asana_source.stg_asana__task"], "test.asana_source.not_null_stg_asana__task_follower_task_id": ["model.asana_source.stg_asana__task_follower"], "test.asana_source.not_null_stg_asana__task_follower_user_id": ["model.asana_source.stg_asana__task_follower"], "test.asana_source.not_null_stg_asana__task_section_task_id": ["model.asana_source.stg_asana__task_section"], "test.asana_source.not_null_stg_asana__task_section_section_id": ["model.asana_source.stg_asana__task_section"], "test.asana_source.not_null_stg_asana__task_tag_tag_id": ["model.asana_source.stg_asana__task_tag"], "test.asana_source.not_null_stg_asana__task_tag_task_id": ["model.asana_source.stg_asana__task_tag"], "test.asana_source.unique_stg_asana__team_team_id": ["model.asana_source.stg_asana__team"], "test.asana_source.not_null_stg_asana__team_team_id": ["model.asana_source.stg_asana__team"], "test.asana_source.unique_stg_asana__user_user_id": ["model.asana_source.stg_asana__user"], "test.asana_source.not_null_stg_asana__user_user_id": ["model.asana_source.stg_asana__user"], "source.asana_source.asana.user": [], "source.asana_source.asana.task": [], "source.asana_source.asana.project": [], "source.asana_source.asana.story": [], "source.asana_source.asana.team": [], "source.asana_source.asana.tag": [], "source.asana_source.asana.section": [], "source.asana_source.asana.project_task": [], "source.asana_source.asana.task_follower": [], "source.asana_source.asana.task_tag": [], "source.asana_source.asana.task_section": []}, "child_map": {"seed.asana_source_integration_tests.project_task_data": ["model.asana_source.stg_asana__project_task_tmp"], "seed.asana_source_integration_tests.story_data": ["model.asana_source.stg_asana__story_tmp"], "seed.asana_source_integration_tests.task_tag_data": ["model.asana_source.stg_asana__task_tag_tmp"], "seed.asana_source_integration_tests.task_section_data": ["model.asana_source.stg_asana__task_section_tmp"], "seed.asana_source_integration_tests.task_data": ["model.asana_source.stg_asana__task_tmp"], "seed.asana_source_integration_tests.task_follower_data": ["model.asana_source.stg_asana__task_follower_tmp"], "seed.asana_source_integration_tests.tag_data": ["model.asana_source.stg_asana__tag_tmp"], "seed.asana_source_integration_tests.project_data": ["model.asana_source.stg_asana__project_tmp"], "seed.asana_source_integration_tests.user_data": ["model.asana_source.stg_asana__user_tmp"], "seed.asana_source_integration_tests.team_data": ["model.asana_source.stg_asana__team_tmp"], "seed.asana_source_integration_tests.section_data": ["model.asana_source.stg_asana__section_tmp"], "model.asana_source.stg_asana__user": ["test.asana_source.not_null_stg_asana__user_user_id", "test.asana_source.unique_stg_asana__user_user_id"], "model.asana_source.stg_asana__task": ["test.asana_source.not_null_stg_asana__task_task_id", "test.asana_source.unique_stg_asana__task_task_id"], "model.asana_source.stg_asana__task_section": ["test.asana_source.not_null_stg_asana__task_section_section_id", "test.asana_source.not_null_stg_asana__task_section_task_id"], "model.asana_source.stg_asana__section": ["test.asana_source.not_null_stg_asana__section_section_id", "test.asana_source.unique_stg_asana__section_section_id"], "model.asana_source.stg_asana__team": ["test.asana_source.not_null_stg_asana__team_team_id", "test.asana_source.unique_stg_asana__team_team_id"], "model.asana_source.stg_asana__task_tag": ["test.asana_source.not_null_stg_asana__task_tag_tag_id", "test.asana_source.not_null_stg_asana__task_tag_task_id"], "model.asana_source.stg_asana__story": ["test.asana_source.not_null_stg_asana__story_story_id", "test.asana_source.not_null_stg_asana__story_target_task_id", "test.asana_source.unique_stg_asana__story_story_id"], "model.asana_source.stg_asana__tag": ["test.asana_source.not_null_stg_asana__tag_tag_id", "test.asana_source.unique_stg_asana__tag_tag_id"], "model.asana_source.stg_asana__project_task": ["test.asana_source.not_null_stg_asana__project_task_project_id", "test.asana_source.not_null_stg_asana__project_task_task_id"], "model.asana_source.stg_asana__project": ["test.asana_source.not_null_stg_asana__project_project_id", "test.asana_source.unique_stg_asana__project_project_id"], "model.asana_source.stg_asana__task_follower": ["test.asana_source.not_null_stg_asana__task_follower_task_id", "test.asana_source.not_null_stg_asana__task_follower_user_id"], "model.asana_source.stg_asana__story_tmp": ["model.asana_source.stg_asana__story", "model.asana_source.stg_asana__story"], "model.asana_source.stg_asana__team_tmp": ["model.asana_source.stg_asana__team", "model.asana_source.stg_asana__team"], "model.asana_source.stg_asana__task_tmp": ["model.asana_source.stg_asana__task", "model.asana_source.stg_asana__task"], "model.asana_source.stg_asana__task_follower_tmp": ["model.asana_source.stg_asana__task_follower", "model.asana_source.stg_asana__task_follower"], "model.asana_source.stg_asana__tag_tmp": ["model.asana_source.stg_asana__tag", "model.asana_source.stg_asana__tag"], "model.asana_source.stg_asana__task_section_tmp": ["model.asana_source.stg_asana__task_section", "model.asana_source.stg_asana__task_section"], "model.asana_source.stg_asana__task_tag_tmp": ["model.asana_source.stg_asana__task_tag", "model.asana_source.stg_asana__task_tag"], "model.asana_source.stg_asana__user_tmp": ["model.asana_source.stg_asana__user", "model.asana_source.stg_asana__user"], "model.asana_source.stg_asana__section_tmp": ["model.asana_source.stg_asana__section", "model.asana_source.stg_asana__section"], "model.asana_source.stg_asana__project_tmp": ["model.asana_source.stg_asana__project", "model.asana_source.stg_asana__project"], "model.asana_source.stg_asana__project_task_tmp": ["model.asana_source.stg_asana__project_task", "model.asana_source.stg_asana__project_task"], "test.asana_source.unique_stg_asana__project_project_id": [], "test.asana_source.not_null_stg_asana__project_project_id": [], "test.asana_source.not_null_stg_asana__project_task_project_id": [], "test.asana_source.not_null_stg_asana__project_task_task_id": [], "test.asana_source.unique_stg_asana__section_section_id": [], "test.asana_source.not_null_stg_asana__section_section_id": [], "test.asana_source.unique_stg_asana__story_story_id": [], "test.asana_source.not_null_stg_asana__story_story_id": [], "test.asana_source.not_null_stg_asana__story_target_task_id": [], "test.asana_source.unique_stg_asana__tag_tag_id": [], "test.asana_source.not_null_stg_asana__tag_tag_id": [], "test.asana_source.unique_stg_asana__task_task_id": [], "test.asana_source.not_null_stg_asana__task_task_id": [], "test.asana_source.not_null_stg_asana__task_follower_task_id": [], "test.asana_source.not_null_stg_asana__task_follower_user_id": [], "test.asana_source.not_null_stg_asana__task_section_task_id": [], "test.asana_source.not_null_stg_asana__task_section_section_id": [], "test.asana_source.not_null_stg_asana__task_tag_tag_id": [], "test.asana_source.not_null_stg_asana__task_tag_task_id": [], "test.asana_source.unique_stg_asana__team_team_id": [], "test.asana_source.not_null_stg_asana__team_team_id": [], "test.asana_source.unique_stg_asana__user_user_id": [], "test.asana_source.not_null_stg_asana__user_user_id": [], "source.asana_source.asana.user": [], "source.asana_source.asana.task": [], "source.asana_source.asana.project": [], "source.asana_source.asana.story": [], "source.asana_source.asana.team": [], "source.asana_source.asana.tag": [], "source.asana_source.asana.section": [], "source.asana_source.asana.project_task": [], "source.asana_source.asana.task_follower": [], "source.asana_source.asana.task_tag": [], "source.asana_source.asana.task_section": []}} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v4.json", "dbt_version": "1.0.0", "generated_at": "2022-07-11T22:12:14.698254Z", "invocation_id": "fe278798-a8f1-428d-abca-bea216b78c92", "env": {}, "project_id": "8026034a61eef02391ef24b373ea0dc0", "user_id": "535a716f-60c0-47b9-9763-5e1b450166b6", "send_anonymous_usage_stats": true, "adapter_type": "bigquery"}, "nodes": {"seed.asana_source_integration_tests.project_task_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "project_id": "int64", "task_id": "int64"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "project_task_data"], "unique_id": "seed.asana_source_integration_tests.project_task_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests", "path": "project_task_data.csv", "original_file_path": "seeds/project_task_data.csv", "name": "project_task_data", "alias": "project_task_data", "checksum": {"name": "sha256", "checksum": "b8ae363c3ab40609f8b5b0eee30e198bd124d781198ecda72e5409178aab17cd"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"project_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "task_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1657577414.372339, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`project_task_data`"}, "seed.asana_source_integration_tests.story_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "int64", "created_by_id": "int64", "target_id": "int64"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "story_data"], "unique_id": "seed.asana_source_integration_tests.story_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests", "path": "story_data.csv", "original_file_path": "seeds/story_data.csv", "name": "story_data", "alias": "story_data", "checksum": {"name": "sha256", "checksum": "207847a91c60ba0de1269fd0aef2a0e1f9d2c3e2b0fbae231ce69fce909dd15a"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "created_by_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "target_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1657577414.38145, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`story_data`"}, "seed.asana_source_integration_tests.task_tag_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "tag_id": "int64", "task_id": "int64"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "task_tag_data"], "unique_id": "seed.asana_source_integration_tests.task_tag_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests", "path": "task_tag_data.csv", "original_file_path": "seeds/task_tag_data.csv", "name": "task_tag_data", "alias": "task_tag_data", "checksum": {"name": "sha256", "checksum": "0209673eda201e499fc6c588fbc799e08b44a60168cabaa4dc3cee39bb250cbd"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"tag_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "task_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1657577414.383074, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`task_tag_data`"}, "seed.asana_source_integration_tests.task_section_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "section_id": "int64", "task_id": "int64"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "task_section_data"], "unique_id": "seed.asana_source_integration_tests.task_section_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests", "path": "task_section_data.csv", "original_file_path": "seeds/task_section_data.csv", "name": "task_section_data", "alias": "task_section_data", "checksum": {"name": "sha256", "checksum": "d0aab9b6565fdb541b9ed5122d66cc9fad61287d3374d8af41c25eaf9bcd5805"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"section_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "task_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1657577414.384714, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`task_section_data`"}, "seed.asana_source_integration_tests.task_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "int64", "assignee_id": "int64", "completed_by_id": "int64", "parent_id": "int64", "workspace_id": "int64"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "task_data"], "unique_id": "seed.asana_source_integration_tests.task_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests", "path": "task_data.csv", "original_file_path": "seeds/task_data.csv", "name": "task_data", "alias": "task_data", "checksum": {"name": "sha256", "checksum": "4eb44503e07b5c712bfdcead83ab4f20827e296d0457abde15155d979c5bae7a"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "assignee_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "completed_by_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "parent_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "workspace_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1657577414.386362, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`task_data`"}, "seed.asana_source_integration_tests.task_follower_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "user_id": "int64", "task_id": "int64"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "task_follower_data"], "unique_id": "seed.asana_source_integration_tests.task_follower_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests", "path": "task_follower_data.csv", "original_file_path": "seeds/task_follower_data.csv", "name": "task_follower_data", "alias": "task_follower_data", "checksum": {"name": "sha256", "checksum": "6171210df6abad2ffba8ff8d10c1feb73c13c41c8e86b32e59f5aa29a4571678"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"user_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "task_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1657577414.388085, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`task_follower_data`"}, "seed.asana_source_integration_tests.tag_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "int64", "workspace_id": "int64"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "tag_data"], "unique_id": "seed.asana_source_integration_tests.tag_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests", "path": "tag_data.csv", "original_file_path": "seeds/tag_data.csv", "name": "tag_data", "alias": "tag_data", "checksum": {"name": "sha256", "checksum": "e74c86b7fda7a484687ac7e16fd759233a2066632e6dd27acb481b0afa852548"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "workspace_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1657577414.389628, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`tag_data`"}, "seed.asana_source_integration_tests.project_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "int64", "owner_id": "int64", "team_id": "int64", "workspace_id": "int64"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "project_data"], "unique_id": "seed.asana_source_integration_tests.project_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests", "path": "project_data.csv", "original_file_path": "seeds/project_data.csv", "name": "project_data", "alias": "project_data", "checksum": {"name": "sha256", "checksum": "cf12cd38b9bdb3ec36cac1757ae4a17e7a8dc4182cb65995ec3fc9b7c2668378"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "owner_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "team_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "workspace_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1657577414.39118, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`project_data`"}, "seed.asana_source_integration_tests.user_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "int64"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "user_data"], "unique_id": "seed.asana_source_integration_tests.user_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests", "path": "user_data.csv", "original_file_path": "seeds/user_data.csv", "name": "user_data", "alias": "user_data", "checksum": {"name": "sha256", "checksum": "237db906018d65bbeeb08bd57c3cd23a91428412a882a0b59994658d564a9ad3"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1657577414.392737, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`user_data`"}, "seed.asana_source_integration_tests.team_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "int64", "organization_id": "int64"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "team_data"], "unique_id": "seed.asana_source_integration_tests.team_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests", "path": "team_data.csv", "original_file_path": "seeds/team_data.csv", "name": "team_data", "alias": "team_data", "checksum": {"name": "sha256", "checksum": "96c14731f1382783fd83b114321e23b5c2813b94f96a6e5422a5aca66157a1cd"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "organization_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1657577414.394444, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`team_data`"}, "seed.asana_source_integration_tests.section_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "int64", "project_id": "int64"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "fqn": ["asana_source_integration_tests", "section_data"], "unique_id": "seed.asana_source_integration_tests.section_data", "package_name": "asana_source_integration_tests", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests", "path": "section_data.csv", "original_file_path": "seeds/section_data.csv", "name": "section_data", "alias": "section_data", "checksum": {"name": "sha256", "checksum": "ca6f6bf502e9d65fcbe59590756a42979e31af8bf1db841a9292b56512252bde"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "project_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1657577414.396041, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`section_data`"}, "model.asana_source.stg_asana__user": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__user_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__user_tmp')),\n staging_columns=get_user_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n id as user_id,\n email,\n name as user_name\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * \nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.asana_source.get_user_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.asana_source.stg_asana__user_tmp", "model.asana_source.stg_asana__user_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__user"], "unique_id": "model.asana_source.stg_asana__user", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "stg_asana__user.sql", "original_file_path": "models/stg_asana__user.sql", "name": "stg_asana__user", "alias": "stg_asana__user", "checksum": {"name": "sha256", "checksum": "4e7279a7f3d7b9754c574de24021781c98bbbc1c0a99e0c7b3495c57a6d33e18"}, "tags": [], "refs": [["stg_asana__user_tmp"], ["stg_asana__user_tmp"]], "sources": [], "description": "Table of all accounts in the organization", "columns": {"user_id": {"name": "user_id", "description": "System generated unique ID for each user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The user's email", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_name": {"name": "user_name", "description": "The name of the user as it appears in the UI", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "asana_source://models/stg_asana.yml", "compiled_path": "target/compiled/asana_source/models/stg_asana__user.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.6686132, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__user_tmp`\n\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 email\n \n as \n \n email\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 \n from base\n),\n\nfinal as (\n \n select \n id as user_id,\n email,\n name as user_name\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__user`"}, "model.asana_source.stg_asana__task": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__task_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__task_tmp')),\n staging_columns=get_task_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('task_pass_through_columns') %}\n ,\n {{ var('task_pass_through_columns') | join (\", \") }}\n\n {% endif %}\n\n from base\n),\n\nfinal as (\n \n select \n id as task_id,\n assignee_id as assignee_user_id,\n assignee_status,\n completed as is_completed,\n cast(completed_at as {{ dbt_utils.type_timestamp() }}) as completed_at,\n completed_by_id as completed_by_user_id,\n cast(created_at as {{ dbt_utils.type_timestamp() }}) as created_at,\n cast(coalesce(due_on, due_at) as {{ dbt_utils.type_timestamp() }}) as due_date,\n cast(modified_at as {{ dbt_utils.type_timestamp() }}) as modified_at,\n name as task_name,\n parent_id as parent_task_id,\n cast(start_on as {{ dbt_utils.type_timestamp() }}) as start_date,\n notes as task_description,\n workspace_id\n\n --The below script allows for pass through columns.\n {% if var('task_pass_through_columns') %}\n ,\n {{ var('task_pass_through_columns') | join (\", \") }}\n\n {% endif %}\n\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.asana_source.get_task_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt_utils.type_timestamp"], "nodes": ["model.asana_source.stg_asana__task_tmp", "model.asana_source.stg_asana__task_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__task"], "unique_id": "model.asana_source.stg_asana__task", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "stg_asana__task.sql", "original_file_path": "models/stg_asana__task.sql", "name": "stg_asana__task", "alias": "stg_asana__task", "checksum": {"name": "sha256", "checksum": "a6ef714ec90946e373baf1a9702fa44d3141fae931e906ff25a605d2aeaf184f"}, "tags": [], "refs": [["stg_asana__task_tmp"], ["stg_asana__task_tmp"]], "sources": [], "description": "Table containing all created tasks", "columns": {"task_id": {"name": "task_id", "description": "System generated unique ID of the task", "meta": {}, "data_type": null, "quote": null, "tags": []}, "assignee_user_id": {"name": "assignee_user_id", "description": "Foreign key referencing the USER that is currently assigned the task.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "assignee_status": {"name": "assignee_status", "description": "Scheduling status for the assignee that the task is or will eventually be assigned to. This maps to the sections of \"My Tasks\"", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_completed": {"name": "is_completed", "description": "Boolean that is true if the task is currently marked complete.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "completed_at": {"name": "completed_at", "description": "Timestamp of when the task was marked complete.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "completed_by_user_id": {"name": "completed_by_user_id", "description": "Foreign key referencing the USER who completed the task.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the task was created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "Date the task is due, if provided.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "modified_at": {"name": "modified_at", "description": "Timestamp of when the task was last modified", "meta": {}, "data_type": null, "quote": null, "tags": []}, "task_name": {"name": "task_name", "description": "User-facing name of the task.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_task_id": {"name": "parent_task_id", "description": "Self-referential id of the parent TASK that this is a subtask of.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_date": {"name": "start_date", "description": "The start date of the task, if a date range is given.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "task_description": {"name": "task_description", "description": "Free-form text describing the task, as seen in the UI.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "workspace_id": {"name": "workspace_id", "description": "ID of the organization's Asana workspace. Irrelevant unless working with multiple companies.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "asana_source://models/stg_asana.yml", "compiled_path": "target/compiled/asana_source/models/stg_asana__task.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.662669, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_tmp`\n\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 assignee_id\n \n as \n \n assignee_id\n \n, \n \n \n assignee_status\n \n as \n \n assignee_status\n \n, \n \n \n completed\n \n as \n \n completed\n \n, \n \n \n completed_at\n \n as \n \n completed_at\n \n, \n \n \n completed_by_id\n \n as \n \n completed_by_id\n \n, \n \n \n created_at\n \n as \n \n created_at\n \n, \n \n \n due_at\n \n as \n \n due_at\n \n, \n \n \n due_on\n \n as \n \n due_on\n \n, \n \n \n hearted\n \n as \n \n hearted\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n modified_at\n \n as \n \n modified_at\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n notes\n \n as \n \n notes\n \n, \n \n \n num_hearts\n \n as \n \n num_hearts\n \n, \n \n \n parent_id\n \n as \n \n parent_id\n \n, \n \n \n start_on\n \n as \n \n start_on\n \n, \n \n \n workspace_id\n \n as \n \n workspace_id\n \n\n\n\n\n --The below script allows for pass through columns.\n \n\n from base\n),\n\nfinal as (\n \n select \n id as task_id,\n assignee_id as assignee_user_id,\n assignee_status,\n completed as is_completed,\n cast(completed_at as \n timestamp\n) as completed_at,\n completed_by_id as completed_by_user_id,\n cast(created_at as \n timestamp\n) as created_at,\n cast(coalesce(due_on, due_at) as \n timestamp\n) as due_date,\n cast(modified_at as \n timestamp\n) as modified_at,\n name as task_name,\n parent_id as parent_task_id,\n cast(start_on as \n timestamp\n) as start_date,\n notes as task_description,\n workspace_id\n\n --The below script allows for pass through columns.\n \n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task`"}, "model.asana_source.stg_asana__task_section": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__task_section_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__task_section_tmp')),\n staging_columns=get_task_section_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n section_id,\n task_id\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.asana_source.get_task_section_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.asana_source.stg_asana__task_section_tmp", "model.asana_source.stg_asana__task_section_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__task_section"], "unique_id": "model.asana_source.stg_asana__task_section", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "stg_asana__task_section.sql", "original_file_path": "models/stg_asana__task_section.sql", "name": "stg_asana__task_section", "alias": "stg_asana__task_section", "checksum": {"name": "sha256", "checksum": "4ead107e3627f57920f45d190c273a0fe706c9f911998f67769818fcd1bb4797"}, "tags": [], "refs": [["stg_asana__task_section_tmp"], ["stg_asana__task_section_tmp"]], "sources": [], "description": "Table of tasks and the section that they live under. Section-less tasks within projects appear here, but project-less tasks do not", "columns": {"task_id": {"name": "task_id", "description": "Foreign key referencing the ID of the TASK", "meta": {}, "data_type": null, "quote": null, "tags": []}, "section_id": {"name": "section_id", "description": "Foreign key referencing the ID of the SECTION housing the task", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "asana_source://models/stg_asana.yml", "compiled_path": "target/compiled/asana_source/models/stg_asana__task_section.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.664882, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_section_tmp`\n\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 section_id\n \n as \n \n section_id\n \n, \n \n \n task_id\n \n as \n \n task_id\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \n section_id,\n task_id\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_section`"}, "model.asana_source.stg_asana__section": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__section_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__section_tmp')),\n staging_columns=get_section_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n id as section_id,\n cast(created_at as {{ dbt_utils.type_timestamp() }}) as created_at,\n name as section_name,\n project_id\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.asana_source.get_section_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt_utils.type_timestamp"], "nodes": ["model.asana_source.stg_asana__section_tmp", "model.asana_source.stg_asana__section_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__section"], "unique_id": "model.asana_source.stg_asana__section", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "stg_asana__section.sql", "original_file_path": "models/stg_asana__section.sql", "name": "stg_asana__section", "alias": "stg_asana__section", "checksum": {"name": "sha256", "checksum": "d90fc22f0ad567e89c16207ef5da6678c7f35c117d3643476d5f6a8faf4430ed"}, "tags": [], "refs": [["stg_asana__section_tmp"], ["stg_asana__section_tmp"]], "sources": [], "description": "Table of all sections within projects. If tasks in a project are not in an explicit user-made section, a default section called \"(no section)\" is created here", "columns": {"section_id": {"name": "section_id", "description": "System-generated unique ID of the section", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the section was created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "section_name": {"name": "section_name", "description": "User-facing name of the section.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the id of the PROJECT the section lives in.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "asana_source://models/stg_asana.yml", "compiled_path": "target/compiled/asana_source/models/stg_asana__section.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.654109, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__section_tmp`\n\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 created_at\n \n as \n \n created_at\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 \n from base\n),\n\nfinal as (\n \n select \n id as section_id,\n cast(created_at as \n timestamp\n) as created_at,\n name as section_name,\n project_id\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__section`"}, "model.asana_source.stg_asana__team": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__team_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__team_tmp')),\n staging_columns=get_team_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n id as team_id,\n name as team_name\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * \nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.asana_source.get_team_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.asana_source.stg_asana__team_tmp", "model.asana_source.stg_asana__team_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__team"], "unique_id": "model.asana_source.stg_asana__team", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "stg_asana__team.sql", "original_file_path": "models/stg_asana__team.sql", "name": "stg_asana__team", "alias": "stg_asana__team", "checksum": {"name": "sha256", "checksum": "d2a65dca096a0320f59cc16346eb1854a1bc78135e11eb6b010fcc41fc49e4a0"}, "tags": [], "refs": [["stg_asana__team_tmp"], ["stg_asana__team_tmp"]], "sources": [], "description": "Table of the teams within the organization", "columns": {"team_id": {"name": "team_id", "description": "System generated unique ID for each team", "meta": {}, "data_type": null, "quote": null, "tags": []}, "team_name": {"name": "team_name", "description": "User-facing name of the team", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "asana_source://models/stg_asana.yml", "compiled_path": "target/compiled/asana_source/models/stg_asana__team.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.6671848, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__team_tmp`\n\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 id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n organization_id\n \n as \n \n organization_id\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \n id as team_id,\n name as team_name\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__team`"}, "model.asana_source.stg_asana__task_tag": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__task_tag_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__task_tag_tmp')),\n staging_columns=get_task_tag_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n tag_id,\n task_id\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.asana_source.get_task_tag_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.asana_source.stg_asana__task_tag_tmp", "model.asana_source.stg_asana__task_tag_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__task_tag"], "unique_id": "model.asana_source.stg_asana__task_tag", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "stg_asana__task_tag.sql", "original_file_path": "models/stg_asana__task_tag.sql", "name": "stg_asana__task_tag", "alias": "stg_asana__task_tag", "checksum": {"name": "sha256", "checksum": "7eba4b0f2dabd68e0a77d515c8406bb57bd6263b9ef551de3f06eded4c085de8"}, "tags": [], "refs": [["stg_asana__task_tag_tmp"], ["stg_asana__task_tag_tmp"]], "sources": [], "description": "Table of tasks with the tags attached to them. Tasks without tags (and vice versa) do not appear here.", "columns": {"tag_id": {"name": "tag_id", "description": "Foreign key referencing the ID of the TAG attached to the task", "meta": {}, "data_type": null, "quote": null, "tags": []}, "task_id": {"name": "task_id", "description": "Foreign key referencing the ID of the TASK", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "asana_source://models/stg_asana.yml", "compiled_path": "target/compiled/asana_source/models/stg_asana__task_tag.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.666102, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_tag_tmp`\n\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 tag_id\n \n as \n \n tag_id\n \n, \n \n \n task_id\n \n as \n \n task_id\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \n tag_id,\n task_id\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_tag`"}, "model.asana_source.stg_asana__story": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__story_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__story_tmp')),\n staging_columns=get_story_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n id as story_id,\n cast(created_at as {{ dbt_utils.type_timestamp() }}) as created_at,\n created_by_id as created_by_user_id,\n target_id as target_task_id,\n text as story_content,\n type as event_type\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.asana_source.get_story_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt_utils.type_timestamp"], "nodes": ["model.asana_source.stg_asana__story_tmp", "model.asana_source.stg_asana__story_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__story"], "unique_id": "model.asana_source.stg_asana__story", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "stg_asana__story.sql", "original_file_path": "models/stg_asana__story.sql", "name": "stg_asana__story", "alias": "stg_asana__story", "checksum": {"name": "sha256", "checksum": "1fa40f6bf001564761cfc1ba5373109afe18723902d8c52c36b185ac524aa7b4"}, "tags": [], "refs": [["stg_asana__story_tmp"], ["stg_asana__story_tmp"]], "sources": [], "description": "Table containing all stories -- stories are actions taken on tasks", "columns": {"story_id": {"name": "story_id", "description": "System generated unique ID of the story/action taken on a task.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the story occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_by_user_id": {"name": "created_by_user_id", "description": "Foreign key referencing the USER who took the action (sometimes null)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "target_task_id": {"name": "target_task_id", "description": "Foreign key referencing the TASK that the action was taken on.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "story_content": {"name": "story_content", "description": "Free-form text that is either the content of a comment (event_type=comment) or the description of an action (event_type=system)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_type": {"name": "event_type", "description": "The origin type of the story - a comment or change to the backend (ie altering a task somehow)", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "asana_source://models/stg_asana.yml", "compiled_path": "target/compiled/asana_source/models/stg_asana__story.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.656513, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__story_tmp`\n\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 created_at\n \n as \n \n created_at\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n hearted\n \n as \n \n hearted\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n num_hearts\n \n as \n \n num_hearts\n \n, \n \n \n source\n \n as \n \n source\n \n, \n \n \n target_id\n \n as \n \n target_id\n \n, \n \n \n text\n \n as \n \n text\n \n, \n \n \n type\n \n as \n \n type\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \n id as story_id,\n cast(created_at as \n timestamp\n) as created_at,\n created_by_id as created_by_user_id,\n target_id as target_task_id,\n text as story_content,\n type as event_type\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__story`"}, "model.asana_source.stg_asana__tag": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__tag_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__tag_tmp')),\n staging_columns=get_tag_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n id as tag_id,\n name as tag_name,\n cast(created_at as {{ dbt_utils.type_timestamp() }}) as created_at\n from fields\n where not _fivetran_deleted\n)\n\nselect * \nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.asana_source.get_tag_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt_utils.type_timestamp"], "nodes": ["model.asana_source.stg_asana__tag_tmp", "model.asana_source.stg_asana__tag_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__tag"], "unique_id": "model.asana_source.stg_asana__tag", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "stg_asana__tag.sql", "original_file_path": "models/stg_asana__tag.sql", "name": "stg_asana__tag", "alias": "stg_asana__tag", "checksum": {"name": "sha256", "checksum": "6199a35888ae80d4da05e4d46bc37ee0fe959b2a2bcc551f13d35f4b55626af7"}, "tags": [], "refs": [["stg_asana__tag_tmp"], ["stg_asana__tag_tmp"]], "sources": [], "description": "Table of the custom tags made in the organization", "columns": {"tag_id": {"name": "tag_id", "description": "System generated unique ID of the tag", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tag_name": {"name": "tag_name", "description": "User-facing name of the tag.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the tag was created", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "asana_source://models/stg_asana.yml", "compiled_path": "target/compiled/asana_source/models/stg_asana__tag.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.657943, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__tag_tmp`\n\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 color\n \n as \n \n color\n \n, \n \n \n created_at\n \n as \n \n created_at\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n message\n \n as \n \n message\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n notes\n \n as \n \n notes\n \n, \n \n \n workspace_id\n \n as \n \n workspace_id\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \n id as tag_id,\n name as tag_name,\n cast(created_at as \n timestamp\n) as created_at\n from fields\n where not _fivetran_deleted\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__tag`"}, "model.asana_source.stg_asana__project_task": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__project_task_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__project_task_tmp')),\n staging_columns=get_project_task_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n project_id,\n task_id\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.asana_source.get_project_task_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.asana_source.stg_asana__project_task_tmp", "model.asana_source.stg_asana__project_task_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__project_task"], "unique_id": "model.asana_source.stg_asana__project_task", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "stg_asana__project_task.sql", "original_file_path": "models/stg_asana__project_task.sql", "name": "stg_asana__project_task", "alias": "stg_asana__project_task", "checksum": {"name": "sha256", "checksum": "95153bcb4c7e9ccc7302710d14cf8d8120817eece7378f1f7c26f27b48129469"}, "tags": [], "refs": [["stg_asana__project_task_tmp"], ["stg_asana__project_task_tmp"]], "sources": [], "description": "Table of tasks and the project(s) they each belong to. If a project doesn't have a task, it won't be in here (and vice versa)", "columns": {"project_id": {"name": "project_id", "description": "Foreign key referencing the ID of the PROJECT", "meta": {}, "data_type": null, "quote": null, "tags": []}, "task_id": {"name": "task_id", "description": "Foreign key referencing the ID of the TASK", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "asana_source://models/stg_asana.yml", "compiled_path": "target/compiled/asana_source/models/stg_asana__project_task.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.652425, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project_task_tmp`\n\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 project_id\n \n as \n \n project_id\n \n, \n \n \n task_id\n \n as \n \n task_id\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \n project_id,\n task_id\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project_task`"}, "model.asana_source.stg_asana__project": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__project_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__project_tmp')),\n staging_columns=get_project_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n id as project_id,\n archived as is_archived,\n cast(created_at as {{ dbt_utils.type_timestamp() }}) as created_at,\n current_status, \n cast(due_date as {{ dbt_utils.type_timestamp() }}) as due_date,\n cast(modified_at as {{ dbt_utils.type_timestamp() }}) as modified_at,\n name as project_name,\n owner_id as owner_user_id,\n public as is_public,\n team_id,\n workspace_id,\n notes\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.asana_source.get_project_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt_utils.type_timestamp"], "nodes": ["model.asana_source.stg_asana__project_tmp", "model.asana_source.stg_asana__project_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__project"], "unique_id": "model.asana_source.stg_asana__project", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "stg_asana__project.sql", "original_file_path": "models/stg_asana__project.sql", "name": "stg_asana__project", "alias": "stg_asana__project", "checksum": {"name": "sha256", "checksum": "97d6c50b1ad228bd0fd749cd0f0a4e0fea8975cb47e25fb6a8a7cde594ceed4a"}, "tags": [], "refs": [["stg_asana__project_tmp"], ["stg_asana__project_tmp"]], "sources": [], "description": "Table containing all projects", "columns": {"project_id": {"name": "project_id", "description": "System-generated unique ID of the project", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_archived": {"name": "is_archived", "description": "Boolean representing if the project has been archived in the UI", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the project was created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "current_status": {"name": "current_status", "description": "The most recent progress status update for the project (free-form string)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "The date the project is due on, if given", "meta": {}, "data_type": null, "quote": null, "tags": []}, "modified_at": {"name": "modified_at", "description": "Timestamp of when the project was last modified (doesn't include comments or tasks)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "project_name": {"name": "project_name", "description": "The user-facing name of the project", "meta": {}, "data_type": null, "quote": null, "tags": []}, "owner_user_id": {"name": "owner_user_id", "description": "Foreign key referencing the USER who owns the project.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_public": {"name": "is_public", "description": "Boolean that is true if the project is public to all users in the organization", "meta": {}, "data_type": null, "quote": null, "tags": []}, "team_id": {"name": "team_id", "description": "Foreign key referencing the TEAM that the project is shared with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "workspace_id": {"name": "workspace_id", "description": "The ID of the organization's entire Asana workspace. Not relevant unless you're looking at multiple orgs", "meta": {}, "data_type": null, "quote": null, "tags": []}, "notes": {"name": "notes", "description": "Free-form textual notes associated with the project.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "asana_source://models/stg_asana.yml", "compiled_path": "target/compiled/asana_source/models/stg_asana__project.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.651217, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project_tmp`\n\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 archived\n \n as \n \n archived\n \n, \n \n \n color\n \n as \n \n color\n \n, \n \n \n created_at\n \n as \n \n created_at\n \n, \n \n \n current_status\n \n as \n \n current_status\n \n, \n \n \n due_date\n \n as \n \n due_date\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n modified_at\n \n as \n \n modified_at\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n notes\n \n as \n \n notes\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n public\n \n as \n \n public\n \n, \n \n \n team_id\n \n as \n \n team_id\n \n, \n \n \n workspace_id\n \n as \n \n workspace_id\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \n id as project_id,\n archived as is_archived,\n cast(created_at as \n timestamp\n) as created_at,\n current_status, \n cast(due_date as \n timestamp\n) as due_date,\n cast(modified_at as \n timestamp\n) as modified_at,\n name as project_name,\n owner_id as owner_user_id,\n public as is_public,\n team_id,\n workspace_id,\n notes\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project`"}, "model.asana_source.stg_asana__task_follower": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_asana__task_follower_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_asana__task_follower_tmp')),\n staging_columns=get_task_follower_columns()\n )\n }}\n \n from base\n),\n\nfinal as (\n \n select \n task_id,\n user_id\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.asana_source.get_task_follower_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.asana_source.stg_asana__task_follower_tmp", "model.asana_source.stg_asana__task_follower_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "stg_asana__task_follower"], "unique_id": "model.asana_source.stg_asana__task_follower", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "stg_asana__task_follower.sql", "original_file_path": "models/stg_asana__task_follower.sql", "name": "stg_asana__task_follower", "alias": "stg_asana__task_follower", "checksum": {"name": "sha256", "checksum": "8eb6b3969960cac92d44612ecb9f7486545bb7e92bcf1c96064a4f384ffed3e4"}, "tags": [], "refs": [["stg_asana__task_follower_tmp"], ["stg_asana__task_follower_tmp"]], "sources": [], "description": "Table of tasks with the users that are following them. Tasks without users do not appear here.", "columns": {"task_id": {"name": "task_id", "description": "Foreign key referencing the ID of the TASK being followed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Foreign key referencing the ID of the USER following the task.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "asana_source://models/stg_asana.yml", "compiled_path": "target/compiled/asana_source/models/stg_asana__task_follower.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.663779, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_follower_tmp`\n\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 task_id\n \n as \n \n task_id\n \n, \n \n \n user_id\n \n as \n \n user_id\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \n task_id,\n user_id\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_follower`"}, "model.asana_source.stg_asana__story_tmp": {"raw_sql": "select * \nfrom {{ var('story') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.story_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__story_tmp"], "unique_id": "model.asana_source.stg_asana__story_tmp", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "tmp/stg_asana__story_tmp.sql", "original_file_path": "models/tmp/stg_asana__story_tmp.sql", "name": "stg_asana__story_tmp", "alias": "stg_asana__story_tmp", "checksum": {"name": "sha256", "checksum": "699a08f0282626b405f0b4e5216cdbaa879e399314594a61b63ff4a7b042f677"}, "tags": [], "refs": [["story_data"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/tmp/stg_asana__story_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.584863, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`story_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__story_tmp`"}, "model.asana_source.stg_asana__team_tmp": {"raw_sql": "select * \nfrom {{ var('team') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.team_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__team_tmp"], "unique_id": "model.asana_source.stg_asana__team_tmp", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "tmp/stg_asana__team_tmp.sql", "original_file_path": "models/tmp/stg_asana__team_tmp.sql", "name": "stg_asana__team_tmp", "alias": "stg_asana__team_tmp", "checksum": {"name": "sha256", "checksum": "8c107692c9394962da82e0c2460045e6686d962c1eefe0cff564c618aed7a17d"}, "tags": [], "refs": [["team_data"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/tmp/stg_asana__team_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.5894809, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`team_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__team_tmp`"}, "model.asana_source.stg_asana__task_tmp": {"raw_sql": "select * \nfrom {{ var('task') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.task_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__task_tmp"], "unique_id": "model.asana_source.stg_asana__task_tmp", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "tmp/stg_asana__task_tmp.sql", "original_file_path": "models/tmp/stg_asana__task_tmp.sql", "name": "stg_asana__task_tmp", "alias": "stg_asana__task_tmp", "checksum": {"name": "sha256", "checksum": "ffb26301a2c952951441cf068b916101fb5cbb9841242e3511499262ffabd879"}, "tags": [], "refs": [["task_data"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/tmp/stg_asana__task_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.593685, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`task_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_tmp`"}, "model.asana_source.stg_asana__task_follower_tmp": {"raw_sql": "select * \nfrom {{ var('task_follower') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.task_follower_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__task_follower_tmp"], "unique_id": "model.asana_source.stg_asana__task_follower_tmp", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "tmp/stg_asana__task_follower_tmp.sql", "original_file_path": "models/tmp/stg_asana__task_follower_tmp.sql", "name": "stg_asana__task_follower_tmp", "alias": "stg_asana__task_follower_tmp", "checksum": {"name": "sha256", "checksum": "d03af085dd9a99b6a0d491b3729504de132fe2a3c8b930f72cb6d6774f714896"}, "tags": [], "refs": [["task_follower_data"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/tmp/stg_asana__task_follower_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.597857, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`task_follower_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_follower_tmp`"}, "model.asana_source.stg_asana__tag_tmp": {"raw_sql": "select * \nfrom {{ var('tag') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.tag_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__tag_tmp"], "unique_id": "model.asana_source.stg_asana__tag_tmp", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "tmp/stg_asana__tag_tmp.sql", "original_file_path": "models/tmp/stg_asana__tag_tmp.sql", "name": "stg_asana__tag_tmp", "alias": "stg_asana__tag_tmp", "checksum": {"name": "sha256", "checksum": "c394a64eb436d4592c23e4c1876d4e001907bdf6de6fa1267f9bd47c83678711"}, "tags": [], "refs": [["tag_data"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/tmp/stg_asana__tag_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.6021109, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`tag_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__tag_tmp`"}, "model.asana_source.stg_asana__task_section_tmp": {"raw_sql": "select * \nfrom {{ var('task_section') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.task_section_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__task_section_tmp"], "unique_id": "model.asana_source.stg_asana__task_section_tmp", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "tmp/stg_asana__task_section_tmp.sql", "original_file_path": "models/tmp/stg_asana__task_section_tmp.sql", "name": "stg_asana__task_section_tmp", "alias": "stg_asana__task_section_tmp", "checksum": {"name": "sha256", "checksum": "453db03084996d17e88a0f1ffda90ee349df4f262db7a3523578f5d4c6a4e5e6"}, "tags": [], "refs": [["task_section_data"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/tmp/stg_asana__task_section_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.60641, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`task_section_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_section_tmp`"}, "model.asana_source.stg_asana__task_tag_tmp": {"raw_sql": "select * \nfrom {{ var('task_tag') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.task_tag_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__task_tag_tmp"], "unique_id": "model.asana_source.stg_asana__task_tag_tmp", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "tmp/stg_asana__task_tag_tmp.sql", "original_file_path": "models/tmp/stg_asana__task_tag_tmp.sql", "name": "stg_asana__task_tag_tmp", "alias": "stg_asana__task_tag_tmp", "checksum": {"name": "sha256", "checksum": "00c6fa0be01310e2a827ce46dbadeb2cf3cc24dda4dc22142ed81b7bb0f85a4d"}, "tags": [], "refs": [["task_tag_data"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/tmp/stg_asana__task_tag_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.611267, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`task_tag_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_tag_tmp`"}, "model.asana_source.stg_asana__user_tmp": {"raw_sql": "select * \nfrom {{ var('user') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.user_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__user_tmp"], "unique_id": "model.asana_source.stg_asana__user_tmp", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "tmp/stg_asana__user_tmp.sql", "original_file_path": "models/tmp/stg_asana__user_tmp.sql", "name": "stg_asana__user_tmp", "alias": "stg_asana__user_tmp", "checksum": {"name": "sha256", "checksum": "6a45d1112d3ae79f22784f5fd5723a27b7894d57aea5795a37921842affc0085"}, "tags": [], "refs": [["user_data"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/tmp/stg_asana__user_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.615414, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`user_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__user_tmp`"}, "model.asana_source.stg_asana__section_tmp": {"raw_sql": "select * \nfrom {{ var('section') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.section_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__section_tmp"], "unique_id": "model.asana_source.stg_asana__section_tmp", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "tmp/stg_asana__section_tmp.sql", "original_file_path": "models/tmp/stg_asana__section_tmp.sql", "name": "stg_asana__section_tmp", "alias": "stg_asana__section_tmp", "checksum": {"name": "sha256", "checksum": "83155348ae27cce121000df7d3d07cd4f734098dca2747df7dd5affde1c84188"}, "tags": [], "refs": [["section_data"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/tmp/stg_asana__section_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.6196191, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`section_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__section_tmp`"}, "model.asana_source.stg_asana__project_tmp": {"raw_sql": "select * \nfrom {{ var('project') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.project_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__project_tmp"], "unique_id": "model.asana_source.stg_asana__project_tmp", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "tmp/stg_asana__project_tmp.sql", "original_file_path": "models/tmp/stg_asana__project_tmp.sql", "name": "stg_asana__project_tmp", "alias": "stg_asana__project_tmp", "checksum": {"name": "sha256", "checksum": "2c1320ac7d1c876b9aa540a4aa0a07bcacfa92e35d74a60cb09a5948ac6869ad"}, "tags": [], "refs": [["project_data"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/tmp/stg_asana__project_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.623832, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`project_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project_tmp`"}, "model.asana_source.stg_asana__project_task_tmp": {"raw_sql": "select * \nfrom {{ var('project_task') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["seed.asana_source_integration_tests.project_task_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_asana", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_stg_asana", "fqn": ["asana_source", "tmp", "stg_asana__project_task_tmp"], "unique_id": "model.asana_source.stg_asana__project_task_tmp", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "tmp/stg_asana__project_task_tmp.sql", "original_file_path": "models/tmp/stg_asana__project_task_tmp.sql", "name": "stg_asana__project_task_tmp", "alias": "stg_asana__project_task_tmp", "checksum": {"name": "sha256", "checksum": "2ad5271ec001d7cb80698feb2fcc08b189f360d756f86feb074bbd904002b10e"}, "tags": [], "refs": [["project_task_data"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/tmp/stg_asana__project_task_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_asana", "materialized": "table"}, "created_at": 1657577414.627987, "compiled_sql": "select * \nfrom `dbt-package-testing`.`asana_source_integration_tests`.`project_task_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project_task_tmp`"}, "test.asana_source.unique_stg_asana__project_project_id.67bfab1228": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "project_id", "model": "{{ get_where_subquery(ref('stg_asana__project')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__project"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "unique_stg_asana__project_project_id"], "unique_id": "test.asana_source.unique_stg_asana__project_project_id.67bfab1228", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "unique_stg_asana__project_project_id.sql", "original_file_path": "models/stg_asana.yml", "name": "unique_stg_asana__project_project_id", "alias": "unique_stg_asana__project_project_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__project"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/unique_stg_asana__project_project_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.675599, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n \n select project_id as unique_field\n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project`\n where project_id is not null\n \n)\n\nselect\n unique_field,\n count(*) as n_records\n\nfrom dbt_test__target\ngroup by unique_field\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "project_id", "file_key_name": "models.stg_asana__project"}, "test.asana_source.not_null_stg_asana__project_project_id.d27dae84fa": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "project_id", "model": "{{ get_where_subquery(ref('stg_asana__project')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__project"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "not_null_stg_asana__project_project_id"], "unique_id": "test.asana_source.not_null_stg_asana__project_project_id.d27dae84fa", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "not_null_stg_asana__project_project_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__project_project_id", "alias": "not_null_stg_asana__project_project_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__project"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/not_null_stg_asana__project_project_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.6773162, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project`\nwhere project_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "project_id", "file_key_name": "models.stg_asana__project"}, "test.asana_source.not_null_stg_asana__project_task_project_id.e2450d16b1": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "project_id", "model": "{{ get_where_subquery(ref('stg_asana__project_task')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__project_task"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "not_null_stg_asana__project_task_project_id"], "unique_id": "test.asana_source.not_null_stg_asana__project_task_project_id.e2450d16b1", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "not_null_stg_asana__project_task_project_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__project_task_project_id", "alias": "not_null_stg_asana__project_task_project_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__project_task"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/not_null_stg_asana__project_task_project_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.678923, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project_task`\nwhere project_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "project_id", "file_key_name": "models.stg_asana__project_task"}, "test.asana_source.not_null_stg_asana__project_task_task_id.9479566014": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "task_id", "model": "{{ get_where_subquery(ref('stg_asana__project_task')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__project_task"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "not_null_stg_asana__project_task_task_id"], "unique_id": "test.asana_source.not_null_stg_asana__project_task_task_id.9479566014", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "not_null_stg_asana__project_task_task_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__project_task_task_id", "alias": "not_null_stg_asana__project_task_task_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__project_task"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/not_null_stg_asana__project_task_task_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.6806662, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__project_task`\nwhere task_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "task_id", "file_key_name": "models.stg_asana__project_task"}, "test.asana_source.unique_stg_asana__section_section_id.0495dd3d2f": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "section_id", "model": "{{ get_where_subquery(ref('stg_asana__section')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__section"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "unique_stg_asana__section_section_id"], "unique_id": "test.asana_source.unique_stg_asana__section_section_id.0495dd3d2f", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "unique_stg_asana__section_section_id.sql", "original_file_path": "models/stg_asana.yml", "name": "unique_stg_asana__section_section_id", "alias": "unique_stg_asana__section_section_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__section"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/unique_stg_asana__section_section_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.682254, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n \n select section_id as unique_field\n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__section`\n where section_id is not null\n \n)\n\nselect\n unique_field,\n count(*) as n_records\n\nfrom dbt_test__target\ngroup by unique_field\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "section_id", "file_key_name": "models.stg_asana__section"}, "test.asana_source.not_null_stg_asana__section_section_id.389ebce958": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "section_id", "model": "{{ get_where_subquery(ref('stg_asana__section')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__section"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "not_null_stg_asana__section_section_id"], "unique_id": "test.asana_source.not_null_stg_asana__section_section_id.389ebce958", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "not_null_stg_asana__section_section_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__section_section_id", "alias": "not_null_stg_asana__section_section_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__section"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/not_null_stg_asana__section_section_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.683852, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__section`\nwhere section_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "section_id", "file_key_name": "models.stg_asana__section"}, "test.asana_source.unique_stg_asana__story_story_id.414f25bb84": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "story_id", "model": "{{ get_where_subquery(ref('stg_asana__story')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__story"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "unique_stg_asana__story_story_id"], "unique_id": "test.asana_source.unique_stg_asana__story_story_id.414f25bb84", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "unique_stg_asana__story_story_id.sql", "original_file_path": "models/stg_asana.yml", "name": "unique_stg_asana__story_story_id", "alias": "unique_stg_asana__story_story_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__story"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/unique_stg_asana__story_story_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.685707, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n \n select story_id as unique_field\n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__story`\n where story_id is not null\n \n)\n\nselect\n unique_field,\n count(*) as n_records\n\nfrom dbt_test__target\ngroup by unique_field\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "story_id", "file_key_name": "models.stg_asana__story"}, "test.asana_source.not_null_stg_asana__story_story_id.ca847d0848": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "story_id", "model": "{{ get_where_subquery(ref('stg_asana__story')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__story"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "not_null_stg_asana__story_story_id"], "unique_id": "test.asana_source.not_null_stg_asana__story_story_id.ca847d0848", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "not_null_stg_asana__story_story_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__story_story_id", "alias": "not_null_stg_asana__story_story_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__story"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/not_null_stg_asana__story_story_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.687289, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__story`\nwhere story_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "story_id", "file_key_name": "models.stg_asana__story"}, "test.asana_source.not_null_stg_asana__story_target_task_id.3f971de06e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "target_task_id", "model": "{{ get_where_subquery(ref('stg_asana__story')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__story"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "not_null_stg_asana__story_target_task_id"], "unique_id": "test.asana_source.not_null_stg_asana__story_target_task_id.3f971de06e", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "not_null_stg_asana__story_target_task_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__story_target_task_id", "alias": "not_null_stg_asana__story_target_task_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__story"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/not_null_stg_asana__story_target_task_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.688891, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__story`\nwhere target_task_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "target_task_id", "file_key_name": "models.stg_asana__story"}, "test.asana_source.unique_stg_asana__tag_tag_id.fd78b190c7": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "tag_id", "model": "{{ get_where_subquery(ref('stg_asana__tag')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__tag"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "unique_stg_asana__tag_tag_id"], "unique_id": "test.asana_source.unique_stg_asana__tag_tag_id.fd78b190c7", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "unique_stg_asana__tag_tag_id.sql", "original_file_path": "models/stg_asana.yml", "name": "unique_stg_asana__tag_tag_id", "alias": "unique_stg_asana__tag_tag_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__tag"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/unique_stg_asana__tag_tag_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.6906738, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n \n select tag_id as unique_field\n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__tag`\n where tag_id is not null\n \n)\n\nselect\n unique_field,\n count(*) as n_records\n\nfrom dbt_test__target\ngroup by unique_field\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tag_id", "file_key_name": "models.stg_asana__tag"}, "test.asana_source.not_null_stg_asana__tag_tag_id.c6a8187ca2": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tag_id", "model": "{{ get_where_subquery(ref('stg_asana__tag')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__tag"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "not_null_stg_asana__tag_tag_id"], "unique_id": "test.asana_source.not_null_stg_asana__tag_tag_id.c6a8187ca2", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "not_null_stg_asana__tag_tag_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__tag_tag_id", "alias": "not_null_stg_asana__tag_tag_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__tag"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/not_null_stg_asana__tag_tag_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.69227, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__tag`\nwhere tag_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tag_id", "file_key_name": "models.stg_asana__tag"}, "test.asana_source.unique_stg_asana__task_task_id.a5271275a5": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "task_id", "model": "{{ get_where_subquery(ref('stg_asana__task')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__task"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "unique_stg_asana__task_task_id"], "unique_id": "test.asana_source.unique_stg_asana__task_task_id.a5271275a5", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "unique_stg_asana__task_task_id.sql", "original_file_path": "models/stg_asana.yml", "name": "unique_stg_asana__task_task_id", "alias": "unique_stg_asana__task_task_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__task"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/unique_stg_asana__task_task_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.693867, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n \n select task_id as unique_field\n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task`\n where task_id is not null\n \n)\n\nselect\n unique_field,\n count(*) as n_records\n\nfrom dbt_test__target\ngroup by unique_field\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "task_id", "file_key_name": "models.stg_asana__task"}, "test.asana_source.not_null_stg_asana__task_task_id.924cc69000": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "task_id", "model": "{{ get_where_subquery(ref('stg_asana__task')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__task"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "not_null_stg_asana__task_task_id"], "unique_id": "test.asana_source.not_null_stg_asana__task_task_id.924cc69000", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "not_null_stg_asana__task_task_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__task_task_id", "alias": "not_null_stg_asana__task_task_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__task"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/not_null_stg_asana__task_task_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.6954482, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task`\nwhere task_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "task_id", "file_key_name": "models.stg_asana__task"}, "test.asana_source.not_null_stg_asana__task_follower_task_id.5af35f322c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "task_id", "model": "{{ get_where_subquery(ref('stg_asana__task_follower')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__task_follower"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "not_null_stg_asana__task_follower_task_id"], "unique_id": "test.asana_source.not_null_stg_asana__task_follower_task_id.5af35f322c", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "not_null_stg_asana__task_follower_task_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__task_follower_task_id", "alias": "not_null_stg_asana__task_follower_task_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__task_follower"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/not_null_stg_asana__task_follower_task_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.697236, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_follower`\nwhere task_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "task_id", "file_key_name": "models.stg_asana__task_follower"}, "test.asana_source.not_null_stg_asana__task_follower_user_id.e0aea0b15e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('stg_asana__task_follower')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__task_follower"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "not_null_stg_asana__task_follower_user_id"], "unique_id": "test.asana_source.not_null_stg_asana__task_follower_user_id.e0aea0b15e", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "not_null_stg_asana__task_follower_user_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__task_follower_user_id", "alias": "not_null_stg_asana__task_follower_user_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__task_follower"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/not_null_stg_asana__task_follower_user_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.698828, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_follower`\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "user_id", "file_key_name": "models.stg_asana__task_follower"}, "test.asana_source.not_null_stg_asana__task_section_task_id.ab81301de8": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "task_id", "model": "{{ get_where_subquery(ref('stg_asana__task_section')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__task_section"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "not_null_stg_asana__task_section_task_id"], "unique_id": "test.asana_source.not_null_stg_asana__task_section_task_id.ab81301de8", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "not_null_stg_asana__task_section_task_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__task_section_task_id", "alias": "not_null_stg_asana__task_section_task_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__task_section"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/not_null_stg_asana__task_section_task_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.7004118, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_section`\nwhere task_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "task_id", "file_key_name": "models.stg_asana__task_section"}, "test.asana_source.not_null_stg_asana__task_section_section_id.b0977a4cfe": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "section_id", "model": "{{ get_where_subquery(ref('stg_asana__task_section')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__task_section"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "not_null_stg_asana__task_section_section_id"], "unique_id": "test.asana_source.not_null_stg_asana__task_section_section_id.b0977a4cfe", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "not_null_stg_asana__task_section_section_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__task_section_section_id", "alias": "not_null_stg_asana__task_section_section_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__task_section"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/not_null_stg_asana__task_section_section_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.702317, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_section`\nwhere section_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "section_id", "file_key_name": "models.stg_asana__task_section"}, "test.asana_source.not_null_stg_asana__task_tag_tag_id.d523de41d8": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tag_id", "model": "{{ get_where_subquery(ref('stg_asana__task_tag')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__task_tag"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "not_null_stg_asana__task_tag_tag_id"], "unique_id": "test.asana_source.not_null_stg_asana__task_tag_tag_id.d523de41d8", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "not_null_stg_asana__task_tag_tag_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__task_tag_tag_id", "alias": "not_null_stg_asana__task_tag_tag_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__task_tag"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/not_null_stg_asana__task_tag_tag_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.7039082, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_tag`\nwhere tag_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tag_id", "file_key_name": "models.stg_asana__task_tag"}, "test.asana_source.not_null_stg_asana__task_tag_task_id.9d27624748": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "task_id", "model": "{{ get_where_subquery(ref('stg_asana__task_tag')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__task_tag"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "not_null_stg_asana__task_tag_task_id"], "unique_id": "test.asana_source.not_null_stg_asana__task_tag_task_id.9d27624748", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "not_null_stg_asana__task_tag_task_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__task_tag_task_id", "alias": "not_null_stg_asana__task_tag_task_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__task_tag"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/not_null_stg_asana__task_tag_task_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.705487, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__task_tag`\nwhere task_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "task_id", "file_key_name": "models.stg_asana__task_tag"}, "test.asana_source.unique_stg_asana__team_team_id.111fe15873": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "team_id", "model": "{{ get_where_subquery(ref('stg_asana__team')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__team"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "unique_stg_asana__team_team_id"], "unique_id": "test.asana_source.unique_stg_asana__team_team_id.111fe15873", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "unique_stg_asana__team_team_id.sql", "original_file_path": "models/stg_asana.yml", "name": "unique_stg_asana__team_team_id", "alias": "unique_stg_asana__team_team_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__team"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/unique_stg_asana__team_team_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.7070742, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n \n select team_id as unique_field\n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__team`\n where team_id is not null\n \n)\n\nselect\n unique_field,\n count(*) as n_records\n\nfrom dbt_test__target\ngroup by unique_field\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "team_id", "file_key_name": "models.stg_asana__team"}, "test.asana_source.not_null_stg_asana__team_team_id.e12b563474": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "team_id", "model": "{{ get_where_subquery(ref('stg_asana__team')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__team"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "not_null_stg_asana__team_team_id"], "unique_id": "test.asana_source.not_null_stg_asana__team_team_id.e12b563474", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "not_null_stg_asana__team_team_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__team_team_id", "alias": "not_null_stg_asana__team_team_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__team"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/not_null_stg_asana__team_team_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.709218, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__team`\nwhere team_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "team_id", "file_key_name": "models.stg_asana__team"}, "test.asana_source.unique_stg_asana__user_user_id.73808d6267": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('stg_asana__user')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__user"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "unique_stg_asana__user_user_id"], "unique_id": "test.asana_source.unique_stg_asana__user_user_id.73808d6267", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "unique_stg_asana__user_user_id.sql", "original_file_path": "models/stg_asana.yml", "name": "unique_stg_asana__user_user_id", "alias": "unique_stg_asana__user_user_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__user"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/unique_stg_asana__user_user_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.710923, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n \n select user_id as unique_field\n from `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__user`\n where user_id is not null\n \n)\n\nselect\n unique_field,\n count(*) as n_records\n\nfrom dbt_test__target\ngroup by unique_field\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "user_id", "file_key_name": "models.stg_asana__user"}, "test.asana_source.not_null_stg_asana__user_user_id.4e900e8ec6": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('stg_asana__user')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.asana_source.stg_asana__user"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "asana_source_integration_tests_dbt_test__audit", "fqn": ["asana_source", "not_null_stg_asana__user_user_id"], "unique_id": "test.asana_source.not_null_stg_asana__user_user_id.4e900e8ec6", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "not_null_stg_asana__user_user_id.sql", "original_file_path": "models/stg_asana.yml", "name": "not_null_stg_asana__user_user_id", "alias": "not_null_stg_asana__user_user_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_asana__user"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/asana_source/models/stg_asana.yml/not_null_stg_asana__user_user_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1657577414.712617, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`asana_source_integration_tests_stg_asana`.`stg_asana__user`\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "user_id", "file_key_name": "models.stg_asana__user"}}, "sources": {"source.asana_source.asana.user": {"fqn": ["asana_source", "asana", "user"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.user", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "user", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "user", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table of all accounts in the organization", "columns": {"id": {"name": "id", "description": "System generated unique ID for a user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "Email associated with the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Given name for the user as it appears in the UI", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`user`", "created_at": 1657577414.74462}, "source.asana_source.asana.task": {"fqn": ["asana_source", "asana", "task"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.task", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "task", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "task", "resource_type": "source", "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 all created tasks", "columns": {"id": {"name": "id", "description": "System generated unique identifier for the task", "meta": {}, "data_type": null, "quote": null, "tags": []}, "assignee_id": {"name": "assignee_id", "description": "Foreign key referencing the USER assigned to this task (note that a task may not have an assignee)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "assignee_status": {"name": "assignee_status", "description": "Scheduling status for the assignee that the task is or will eventually be assigned to. This maps to the sections of \"My Tasks\"", "meta": {}, "data_type": null, "quote": null, "tags": []}, "completed": {"name": "completed", "description": "Boolean that's true if the task is *currently* marked completed. Note that a task can be unmarked complete", "meta": {}, "data_type": null, "quote": null, "tags": []}, "completed_at": {"name": "completed_at", "description": "Timestamp of when the task was completed, if still currently completed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "completed_by_id": {"name": "completed_by_id", "description": "Foreign key that references the USER who completed the task, if currently completed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the task was first made", "meta": {}, "data_type": null, "quote": null, "tags": []}, "due_on": {"name": "due_on", "description": "The date on which the task is due. Note that not tasks may not have a due date", "meta": {}, "data_type": null, "quote": null, "tags": []}, "due_at": {"name": "due_at", "description": "The date and time at which the task is due, only if a specific time is given.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "modified_at": {"name": "modified_at", "description": "The last time the task was updated. Does not include comments nor changes in associations (ie their projects)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The title of the task", "meta": {}, "data_type": null, "quote": null, "tags": []}, "notes": {"name": "notes", "description": "Free-form textual description of the task (as seen in the UI)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The ID of the parent of the task, if it is a subtask. Self-refers to TASK", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_on": {"name": "start_on", "description": "The start date of the task, if given with the due date", "meta": {}, "data_type": null, "quote": null, "tags": []}, "workspace_id": {"name": "workspace_id", "description": "The id of an organization's workspace in asana. Not necessary unless you have access to multiple organization's asanas.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`task`", "created_at": 1657577414.7447948}, "source.asana_source.asana.project": {"fqn": ["asana_source", "asana", "project"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.project", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "project", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "project", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table containing all projects", "columns": {"id": {"name": "id", "description": "System generated unique ID of the project", "meta": {}, "data_type": null, "quote": null, "tags": []}, "archived": {"name": "archived", "description": "Boolean representing whether the project has been archived (removed from asana UI)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "color": {"name": "color", "description": "Color of the project as seen in the UI", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the story was made/the action was logged", "meta": {}, "data_type": null, "quote": null, "tags": []}, "current_status": {"name": "current_status", "description": "The most recent progress status update for the project. This is sent to all project followers", "meta": {}, "data_type": null, "quote": null, "tags": []}, "due_date": {"name": "due_date", "description": "The date the project is due", "meta": {}, "data_type": null, "quote": null, "tags": []}, "modified_at": {"name": "modified_at", "description": "The last time the project was updated. Does not include comments nor changes in associations (ie new tasks)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The given name of the project", "meta": {}, "data_type": null, "quote": null, "tags": []}, "notes": {"name": "notes", "description": "Free-form textual notes associated with the project.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "Foreign key referencing the USER who owns the project.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "public": {"name": "public", "description": "Boolean that is true if the project is public to the whole organization, false if not.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "team_id": {"name": "team_id", "description": "Foreign key referencing the TEAM that the project is shared with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "workspace_id": {"name": "workspace_id", "description": "The id of an organization's workspace in asana. Not necessary unless you have access to multiple asana workspaces.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`project`", "created_at": 1657577414.7449331}, "source.asana_source.asana.story": {"fqn": ["asana_source", "asana", "story"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.story", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "story", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "story", "resource_type": "source", "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 all stories -- stories are actions taken on tasks", "columns": {"id": {"name": "id", "description": "System generated unique ID of the story/action taken", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the story was made/the action was logged", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Foreign key referencing the USER who created the story/took the action on the task (sometimes null)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "target_id": {"name": "target_id", "description": "Foreign key referencing the TASK that the story is about.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "text": {"name": "text", "description": "Free-form text describing the action that was taken (if type = system), or the content of a comment (if type = comment)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "The origin type of the story - a comment or change to the backend/altering a task", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source": {"name": "source", "description": "Where the story occurred (web, mobile, email, or api)", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`story`", "created_at": 1657577414.745065}, "source.asana_source.asana.team": {"fqn": ["asana_source", "asana", "team"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.team", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "team", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "team", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table of the teams within the organization", "columns": {"id": {"name": "id", "description": "System generated unique ID for each team", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Provided name for each team. There can be duplicates", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Equivalent to the workspace_id, as organizations are a kind of workspace. Probably not relevant unless working with multiple orgs.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`team`", "created_at": 1657577414.745183}, "source.asana_source.asana.tag": {"fqn": ["asana_source", "asana", "tag"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.tag", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "tag", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "tag", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table of the custom tags made in the organization", "columns": {"id": {"name": "id", "description": "System generated ID for each tag", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The name of the tag as it appears in the UI. There can be duplicates.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the tag was created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "color": {"name": "color", "description": "Chosen color of the tag as it appears in the UI", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`tag`", "created_at": 1657577414.745302}, "source.asana_source.asana.section": {"fqn": ["asana_source", "asana", "section"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.section", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "section", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "section", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table of all sections within projects. If tasks in a project are not in an explicit user-made section, a default section called \"(no section)\" is created here", "columns": {"id": {"name": "id", "description": "System generated unique ID for each section", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the section was created by a user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The given name of the section as it appears in the UI. Is stored as \"(no section)\" when this is the default bucket for tasks with a section in a project", "meta": {}, "data_type": null, "quote": null, "tags": []}, "project_id": {"name": "project_id", "description": "Foreign key referencing the PROJECT that the section lives in", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`section`", "created_at": 1657577414.745418}, "source.asana_source.asana.project_task": {"fqn": ["asana_source", "asana", "project_task"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.project_task", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "project_task", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "project_task", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table of tasks and the project(s) they each belong to. If a project doesn't have a task, it won't be in here (and vice versa)", "columns": {"project_id": {"name": "project_id", "description": "Foreign key referencing a PROJECT the task belongs to", "meta": {}, "data_type": null, "quote": null, "tags": []}, "task_id": {"name": "task_id", "description": "Foreign key referencing the TASK in the project", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`project_task`", "created_at": 1657577414.745534}, "source.asana_source.asana.task_follower": {"fqn": ["asana_source", "asana", "task_follower"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.task_follower", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "task_follower", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "task_follower", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table of tasks with the users that are following them. Tasks without users do not appear here.", "columns": {"task_id": {"name": "task_id", "description": "Foreign key referencing the TASK being followed", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Foreign key referencing the USER that is following the task", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`task_follower`", "created_at": 1657577414.745645}, "source.asana_source.asana.task_tag": {"fqn": ["asana_source", "asana", "task_tag"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.task_tag", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "task_tag", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "task_tag", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table of tasks with the tags attached to them. Tasks without tags (and vice versa) do not appear here.", "columns": {"task_id": {"name": "task_id", "description": "Foreign key referencing the TASK that is tagged", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tag_id": {"name": "tag_id", "description": "Foreign key referencing the TAG that is applied to the task", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`task_tag`", "created_at": 1657577414.745756}, "source.asana_source.asana.task_section": {"fqn": ["asana_source", "asana", "task_section"], "database": "dbt-package-testing", "schema": "asana_source_integration_tests", "unique_id": "source.asana_source.asana.task_section", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "models/src_asana.yml", "original_file_path": "models/src_asana.yml", "name": "task_section", "source_name": "asana", "source_description": "", "loader": "fivetran", "identifier": "task_section", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Table of tasks and the section that they live under. Section-less tasks within projects appear here, but project-less tasks do not", "columns": {"section_id": {"name": "section_id", "description": "Foreign key referencing the SECTION that the task lives under.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "task_id": {"name": "task_id", "description": "Foreign key referencing the TASK that lives in a section.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`asana_source_integration_tests`.`task_section`", "created_at": 1657577414.74587}}, "macros": {"macro.dbt_bigquery.date_sharded_table": {"unique_id": "macro.dbt_bigquery.date_sharded_table", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/etc.sql", "original_file_path": "macros/etc.sql", "name": "date_sharded_table", "macro_sql": "{% macro date_sharded_table(base_name) %}\n {{ return(base_name ~ \"[DBT__PARTITION_DATE]\") }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.422268}, "macro.dbt_bigquery.grant_access_to": {"unique_id": "macro.dbt_bigquery.grant_access_to", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/etc.sql", "original_file_path": "macros/etc.sql", "name": "grant_access_to", "macro_sql": "{% macro grant_access_to(entity, entity_type, role, grant_target_dict) -%}\n {% do adapter.grant_access_to(entity, entity_type, role, grant_target_dict) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.422716}, "macro.dbt_bigquery.get_partitions_metadata": {"unique_id": "macro.dbt_bigquery.get_partitions_metadata", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/etc.sql", "original_file_path": "macros/etc.sql", "name": "get_partitions_metadata", "macro_sql": "\n\n{%- macro get_partitions_metadata(table) -%}\n {%- if execute -%}\n {%- set res = adapter.get_partitions_metadata(table) -%}\n {{- return(res) -}}\n {%- endif -%}\n {{- return(None) -}}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4233081}, "macro.dbt_bigquery.bigquery__get_catalog": {"unique_id": "macro.dbt_bigquery.bigquery__get_catalog", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "name": "bigquery__get_catalog", "macro_sql": "{% macro bigquery__get_catalog(information_schema, schemas) -%}\n\n {%- if (schemas | length) == 0 -%}\n {# Hopefully nothing cares about the columns we return when there are no rows #}\n {%- set query = \"select 1 as id limit 0\" -%}\n {%- else -%}\n\n {%- set query -%}\n with tables as (\n select\n project_id as table_database,\n dataset_id as table_schema,\n table_id as original_table_name,\n\n concat(project_id, '.', dataset_id, '.', table_id) as relation_id,\n\n row_count,\n size_bytes as size_bytes,\n case\n when type = 1 then 'table'\n when type = 2 then 'view'\n else 'external'\n end as table_type,\n\n REGEXP_CONTAINS(table_id, '^.+[0-9]{8}$') and coalesce(type, 0) = 1 as is_date_shard,\n REGEXP_EXTRACT(table_id, '^(.+)[0-9]{8}$') as shard_base_name,\n REGEXP_EXTRACT(table_id, '^.+([0-9]{8})$') as shard_name\n\n from {{ information_schema.replace(information_schema_view='__TABLES__') }}\n where (\n {%- for schema in schemas -%}\n upper(dataset_id) = upper('{{ schema }}'){%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n ),\n\n extracted as (\n\n select *,\n case\n when is_date_shard then shard_base_name\n else original_table_name\n end as table_name\n\n from tables\n\n ),\n\n unsharded_tables as (\n\n select\n table_database,\n table_schema,\n table_name,\n coalesce(table_type, 'external') as table_type,\n is_date_shard,\n\n struct(\n min(shard_name) as shard_min,\n max(shard_name) as shard_max,\n count(*) as shard_count\n ) as table_shards,\n\n sum(size_bytes) as size_bytes,\n sum(row_count) as row_count,\n\n max(relation_id) as relation_id\n\n from extracted\n group by 1,2,3,4,5\n\n ),\n\n info_schema_columns as (\n\n select\n concat(table_catalog, '.', table_schema, '.', table_name) as relation_id,\n table_catalog as table_database,\n table_schema,\n table_name,\n\n -- use the \"real\" column name from the paths query below\n column_name as base_column_name,\n ordinal_position as column_index,\n\n is_partitioning_column,\n clustering_ordinal_position\n\n from {{ information_schema.replace(information_schema_view='COLUMNS') }}\n where ordinal_position is not null\n\n ),\n\n info_schema_column_paths as (\n\n select\n concat(table_catalog, '.', table_schema, '.', table_name) as relation_id,\n field_path as column_name,\n data_type as column_type,\n column_name as base_column_name,\n description as column_comment\n\n from {{ information_schema.replace(information_schema_view='COLUMN_FIELD_PATHS') }}\n\n ),\n\n columns as (\n\n select * except (base_column_name)\n from info_schema_columns\n join info_schema_column_paths using (relation_id, base_column_name)\n\n ),\n\n column_stats as (\n\n select\n table_database,\n table_schema,\n table_name,\n max(relation_id) as relation_id,\n max(case when is_partitioning_column = 'YES' then 1 else 0 end) = 1 as is_partitioned,\n max(case when is_partitioning_column = 'YES' then column_name else null end) as partition_column,\n max(case when clustering_ordinal_position is not null then 1 else 0 end) = 1 as is_clustered,\n array_to_string(\n array_agg(\n case\n when clustering_ordinal_position is not null then column_name\n else null\n end ignore nulls\n order by clustering_ordinal_position\n ), ', '\n ) as clustering_columns\n\n from columns\n group by 1,2,3\n\n )\n\n select\n unsharded_tables.table_database,\n unsharded_tables.table_schema,\n case\n when is_date_shard then concat(unsharded_tables.table_name, '*')\n else unsharded_tables.table_name\n end as table_name,\n unsharded_tables.table_type,\n\n -- coalesce name and type for External tables - these columns are not\n -- present in the COLUMN_FIELD_PATHS resultset\n coalesce(columns.column_name, '') as column_name,\n -- invent a row number to account for nested fields -- BQ does\n -- not treat these nested properties as independent fields\n row_number() over (\n partition by relation_id\n order by columns.column_index, columns.column_name\n ) as column_index,\n coalesce(columns.column_type, '') as column_type,\n columns.column_comment,\n\n 'Shard count' as `stats__date_shards__label`,\n table_shards.shard_count as `stats__date_shards__value`,\n 'The number of date shards in this table' as `stats__date_shards__description`,\n is_date_shard as `stats__date_shards__include`,\n\n 'Shard (min)' as `stats__date_shard_min__label`,\n table_shards.shard_min as `stats__date_shard_min__value`,\n 'The first date shard in this table' as `stats__date_shard_min__description`,\n is_date_shard as `stats__date_shard_min__include`,\n\n 'Shard (max)' as `stats__date_shard_max__label`,\n table_shards.shard_max as `stats__date_shard_max__value`,\n 'The last date shard in this table' as `stats__date_shard_max__description`,\n is_date_shard as `stats__date_shard_max__include`,\n\n '# Rows' as `stats__num_rows__label`,\n row_count as `stats__num_rows__value`,\n 'Approximate count of rows in this table' as `stats__num_rows__description`,\n (unsharded_tables.table_type = 'table') as `stats__num_rows__include`,\n\n 'Approximate Size' as `stats__num_bytes__label`,\n size_bytes as `stats__num_bytes__value`,\n 'Approximate size of table as reported by BigQuery' as `stats__num_bytes__description`,\n (unsharded_tables.table_type = 'table') as `stats__num_bytes__include`,\n\n 'Partitioned By' as `stats__partitioning_type__label`,\n partition_column as `stats__partitioning_type__value`,\n 'The partitioning column for this table' as `stats__partitioning_type__description`,\n is_partitioned as `stats__partitioning_type__include`,\n\n 'Clustered By' as `stats__clustering_fields__label`,\n clustering_columns as `stats__clustering_fields__value`,\n 'The clustering columns for this table' as `stats__clustering_fields__description`,\n is_clustered as `stats__clustering_fields__include`\n\n -- join using relation_id (an actual relation, not a shard prefix) to make\n -- sure that column metadata is picked up through the join. This will only\n -- return the column information for the \"max\" table in a date-sharded table set\n from unsharded_tables\n left join columns using (relation_id)\n left join column_stats using (relation_id)\n {%- endset -%}\n\n {%- endif -%}\n\n {{ return(run_query(query)) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.428836}, "macro.dbt_bigquery.partition_by": {"unique_id": "macro.dbt_bigquery.partition_by", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "partition_by", "macro_sql": "{% macro partition_by(partition_config) -%}\n {%- if partition_config is none -%}\n {% do return('') %}\n {%- elif partition_config.data_type | lower in ('date','timestamp','datetime') -%}\n partition by {{ partition_config.render() }}\n {%- elif partition_config.data_type | lower in ('int64') -%}\n {%- set range = partition_config.range -%}\n partition by range_bucket(\n {{ partition_config.field }},\n generate_array({{ range.start}}, {{ range.end }}, {{ range.interval }})\n )\n {%- endif -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.437599}, "macro.dbt_bigquery.cluster_by": {"unique_id": "macro.dbt_bigquery.cluster_by", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "cluster_by", "macro_sql": "{% macro cluster_by(raw_cluster_by) %}\n {%- if raw_cluster_by is not none -%}\n cluster by {% if raw_cluster_by is string -%}\n {% set raw_cluster_by = [raw_cluster_by] %}\n {%- endif -%}\n {%- for cluster in raw_cluster_by -%}\n {{ cluster }}\n {%- if not loop.last -%}, {% endif -%}\n {%- endfor -%}\n\n {% endif %}\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.43847}, "macro.dbt_bigquery.bigquery_options": {"unique_id": "macro.dbt_bigquery.bigquery_options", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery_options", "macro_sql": "{% macro bigquery_options(opts) %}\n {% set options -%}\n OPTIONS({% for opt_key, opt_val in opts.items() %}\n {{ opt_key }}={{ opt_val }}{{ \",\" if not loop.last }}\n {% endfor %})\n {%- endset %}\n {%- do return(options) -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4392152}, "macro.dbt_bigquery.bigquery_table_options": {"unique_id": "macro.dbt_bigquery.bigquery_table_options", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery_table_options", "macro_sql": "{% macro bigquery_table_options(config, node, temporary) %}\n {% set opts = adapter.get_table_options(config, node, temporary) %}\n {%- do return(bigquery_options(opts)) -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery_options"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.439764}, "macro.dbt_bigquery.bigquery__create_table_as": {"unique_id": "macro.dbt_bigquery.bigquery__create_table_as", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__create_table_as", "macro_sql": "{% macro bigquery__create_table_as(temporary, relation, sql) -%}\n {%- set raw_partition_by = config.get('partition_by', none) -%}\n {%- set raw_cluster_by = config.get('cluster_by', none) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {%- set partition_config = adapter.parse_partition_by(raw_partition_by) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create or replace table {{ relation }}\n {{ partition_by(partition_config) }}\n {{ cluster_by(raw_cluster_by) }}\n {{ bigquery_table_options(config, model, temporary) }}\n as (\n {{ sql }}\n );\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.partition_by", "macro.dbt_bigquery.cluster_by", "macro.dbt_bigquery.bigquery_table_options"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.441077}, "macro.dbt_bigquery.bigquery_view_options": {"unique_id": "macro.dbt_bigquery.bigquery_view_options", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery_view_options", "macro_sql": "{% macro bigquery_view_options(config, node) %}\n {% set opts = adapter.get_view_options(config, node) %}\n {%- do return(bigquery_options(opts)) -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery_options"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.441584}, "macro.dbt_bigquery.bigquery__create_view_as": {"unique_id": "macro.dbt_bigquery.bigquery__create_view_as", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__create_view_as", "macro_sql": "{% macro bigquery__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\n create or replace view {{ relation }}\n {{ bigquery_view_options(config, model) }}\n as {{ sql }};\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery_view_options"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.442239}, "macro.dbt_bigquery.bigquery__create_schema": {"unique_id": "macro.dbt_bigquery.bigquery__create_schema", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__create_schema", "macro_sql": "{% macro bigquery__create_schema(relation) -%}\n {{ adapter.create_schema(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.442518}, "macro.dbt_bigquery.bigquery__drop_schema": {"unique_id": "macro.dbt_bigquery.bigquery__drop_schema", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__drop_schema", "macro_sql": "{% macro bigquery__drop_schema(relation) -%}\n {{ adapter.drop_schema(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.442785}, "macro.dbt_bigquery.bigquery__drop_relation": {"unique_id": "macro.dbt_bigquery.bigquery__drop_relation", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__drop_relation", "macro_sql": "{% macro bigquery__drop_relation(relation) -%}\n {% call statement('drop_relation') -%}\n drop {{ relation.type }} if exists {{ relation }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4431858}, "macro.dbt_bigquery.bigquery__get_columns_in_relation": {"unique_id": "macro.dbt_bigquery.bigquery__get_columns_in_relation", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__get_columns_in_relation", "macro_sql": "{% macro bigquery__get_columns_in_relation(relation) -%}\n {{ return(adapter.get_columns_in_relation(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.443497}, "macro.dbt_bigquery.bigquery__list_relations_without_caching": {"unique_id": "macro.dbt_bigquery.bigquery__list_relations_without_caching", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__list_relations_without_caching", "macro_sql": "{% macro bigquery__list_relations_without_caching(schema_relation) -%}\n {{ return(adapter.list_relations_without_caching(schema_relation)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4438012}, "macro.dbt_bigquery.bigquery__current_timestamp": {"unique_id": "macro.dbt_bigquery.bigquery__current_timestamp", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__current_timestamp", "macro_sql": "{% macro bigquery__current_timestamp() -%}\n CURRENT_TIMESTAMP()\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.44396}, "macro.dbt_bigquery.bigquery__snapshot_string_as_time": {"unique_id": "macro.dbt_bigquery.bigquery__snapshot_string_as_time", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__snapshot_string_as_time", "macro_sql": "{% macro bigquery__snapshot_string_as_time(timestamp) -%}\n {%- set result = 'TIMESTAMP(\"' ~ timestamp ~ '\")' -%}\n {{ return(result) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4443321}, "macro.dbt_bigquery.bigquery__list_schemas": {"unique_id": "macro.dbt_bigquery.bigquery__list_schemas", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__list_schemas", "macro_sql": "{% macro bigquery__list_schemas(database) -%}\n {{ return(adapter.list_schemas(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4446468}, "macro.dbt_bigquery.bigquery__check_schema_exists": {"unique_id": "macro.dbt_bigquery.bigquery__check_schema_exists", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__check_schema_exists", "macro_sql": "{% macro bigquery__check_schema_exists(information_schema, schema) %}\n {{ return(adapter.check_schema_exists(information_schema.database, schema)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.44503}, "macro.dbt_bigquery.bigquery__persist_docs": {"unique_id": "macro.dbt_bigquery.bigquery__persist_docs", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__persist_docs", "macro_sql": "{% macro bigquery__persist_docs(relation, model, for_relation, for_columns) -%}\n {% if for_columns and config.persist_column_docs() and model.columns %}\n {% do alter_column_comment(relation, model.columns) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4456189}, "macro.dbt_bigquery.bigquery__alter_column_comment": {"unique_id": "macro.dbt_bigquery.bigquery__alter_column_comment", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__alter_column_comment", "macro_sql": "{% macro bigquery__alter_column_comment(relation, column_dict) -%}\n {% do adapter.update_columns(relation, column_dict) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.44596}, "macro.dbt_bigquery.bigquery__rename_relation": {"unique_id": "macro.dbt_bigquery.bigquery__rename_relation", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__rename_relation", "macro_sql": "{% macro bigquery__rename_relation(from_relation, to_relation) -%}\n {% do adapter.rename_relation(from_relation, to_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.446294}, "macro.dbt_bigquery.bigquery__alter_relation_add_columns": {"unique_id": "macro.dbt_bigquery.bigquery__alter_relation_add_columns", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__alter_relation_add_columns", "macro_sql": "{% macro bigquery__alter_relation_add_columns(relation, add_columns) %}\n \n {% set sql -%}\n \n alter {{ relation.type }} {{ relation }}\n {% for column in add_columns %}\n add column {{ column.name }} {{ column.data_type }}{{ ',' if not loop.last }}\n {% endfor %}\n \n {%- endset -%}\n\n {{ return(run_query(sql)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.447137}, "macro.dbt_bigquery.bigquery__alter_relation_drop_columns": {"unique_id": "macro.dbt_bigquery.bigquery__alter_relation_drop_columns", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__alter_relation_drop_columns", "macro_sql": "{% macro bigquery__alter_relation_drop_columns(relation, drop_columns) %}\n \n {% set sql -%}\n \n alter {{ relation.type }} {{ relation }}\n\n {% for column in drop_columns %}\n drop column {{ column.name }}{{ ',' if not loop.last }}\n {% endfor %}\n \n {%- endset -%}\n \n {{ return(run_query(sql)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.448021}, "macro.dbt_bigquery.bigquery__alter_column_type": {"unique_id": "macro.dbt_bigquery.bigquery__alter_column_type", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__alter_column_type", "macro_sql": "{% macro bigquery__alter_column_type(relation, column_name, new_column_type) -%}\n {#-- Changing a column's data type using a query requires you to scan the entire table.\n The query charges can be significant if the table is very large.\n\n https://cloud.google.com/bigquery/docs/manually-changing-schemas#changing_a_columns_data_type\n #}\n {% set relation_columns = get_columns_in_relation(relation) %}\n\n {% set sql %}\n select\n {%- for col in relation_columns -%}\n {% if col.column == column_name %}\n CAST({{ col.quoted }} AS {{ new_column_type }}) AS {{ col.quoted }}\n {%- else %}\n {{ col.quoted }}\n {%- endif %}\n {%- if not loop.last %},{% endif -%}\n {%- endfor %}\n from {{ relation }}\n {% endset %}\n\n {% call statement('alter_column_type') %}\n {{ create_table_as(False, relation, sql)}}\n {%- endcall %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_columns_in_relation", "macro.dbt.statement", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4493802}, "macro.dbt_bigquery.bigquery__test_unique": {"unique_id": "macro.dbt_bigquery.bigquery__test_unique", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__test_unique", "macro_sql": "{% macro bigquery__test_unique(model, column_name) %}\n\nwith dbt_test__target as (\n \n select {{ column_name }} as unique_field\n from {{ model }}\n where {{ column_name }} is not null\n \n)\n\nselect\n unique_field,\n count(*) as n_records\n\nfrom dbt_test__target\ngroup by unique_field\nhaving count(*) > 1\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.449727}, "macro.dbt_bigquery.bigquery__create_csv_table": {"unique_id": "macro.dbt_bigquery.bigquery__create_csv_table", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "bigquery__create_csv_table", "macro_sql": "{% macro bigquery__create_csv_table(model, agate_table) %}\n -- no-op\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4504378}, "macro.dbt_bigquery.bigquery__reset_csv_table": {"unique_id": "macro.dbt_bigquery.bigquery__reset_csv_table", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "bigquery__reset_csv_table", "macro_sql": "{% macro bigquery__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.45077}, "macro.dbt_bigquery.bigquery__load_csv_rows": {"unique_id": "macro.dbt_bigquery.bigquery__load_csv_rows", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "bigquery__load_csv_rows", "macro_sql": "{% macro bigquery__load_csv_rows(model, agate_table) %}\n\n {%- set column_override = model['config'].get('column_types', {}) -%}\n {{ adapter.load_dataframe(model['database'], model['schema'], model['alias'],\n \t\t\t\t\t\t\tagate_table, column_override) }}\n {% if config.persist_relation_docs() and 'description' in model %}\n\n \t{{ adapter.update_table_description(model['database'], model['schema'], model['alias'], model['description']) }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4520051}, "macro.dbt_bigquery.bigquery__handle_existing_table": {"unique_id": "macro.dbt_bigquery.bigquery__handle_existing_table", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/materializations/view.sql", "original_file_path": "macros/materializations/view.sql", "name": "bigquery__handle_existing_table", "macro_sql": "{% macro bigquery__handle_existing_table(full_refresh, old_relation) %}\n {%- if full_refresh -%}\n {{ adapter.drop_relation(old_relation) }}\n {%- else -%}\n {{ exceptions.relation_wrong_type(old_relation, 'view') }}\n {%- endif -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.453113}, "macro.dbt_bigquery.materialization_view_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_view_bigquery", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/materializations/view.sql", "original_file_path": "macros/materializations/view.sql", "name": "materialization_view_bigquery", "macro_sql": "{% materialization view, adapter='bigquery' -%}\n {% set to_return = create_or_replace_view() %}\n\n {% set target_relation = this.incorporate(type='view') %}\n {% do persist_docs(target_relation, model) %}\n\n {% if config.get('grant_access_to') %}\n {% for grant_target_dict in config.get('grant_access_to') %}\n {% do adapter.grant_access_to(this, 'view', None, grant_target_dict) %}\n {% endfor %}\n {% endif %}\n\n {% do return(to_return) %}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_or_replace_view", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.454313}, "macro.dbt_bigquery.materialization_table_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_table_bigquery", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/materializations/table.sql", "original_file_path": "macros/materializations/table.sql", "name": "materialization_table_bigquery", "macro_sql": "{% materialization table, adapter='bigquery' -%}\n\n {%- set identifier = model['alias'] -%}\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set exists_not_as_table = (old_relation is not none and not old_relation.is_table) -%}\n {%- set target_relation = api.Relation.create(database=database, schema=schema, identifier=identifier, type='table') -%}\n\n {{ run_hooks(pre_hooks) }}\n\n {#\n We only need to drop this thing if it is not a table.\n If it _is_ already a table, then we can overwrite it without downtime\n Unlike table -> view, no need for `--full-refresh`: dropping a view is no big deal\n #}\n {%- if exists_not_as_table -%}\n {{ adapter.drop_relation(old_relation) }}\n {%- endif -%}\n\n -- build model\n {%- set raw_partition_by = config.get('partition_by', none) -%}\n {%- set partition_by = adapter.parse_partition_by(raw_partition_by) -%}\n {%- set cluster_by = config.get('cluster_by', none) -%}\n {% if not adapter.is_replaceable(old_relation, partition_by, cluster_by) %}\n {% do log(\"Hard refreshing \" ~ old_relation ~ \" because it is not replaceable\") %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n {% call statement('main') -%}\n {{ create_table_as(False, target_relation, sql) }}\n {% endcall -%}\n\n {{ run_hooks(post_hooks) }}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4578218}, "macro.dbt_bigquery.materialization_copy_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_copy_bigquery", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/materializations/copy.sql", "original_file_path": "macros/materializations/copy.sql", "name": "materialization_copy_bigquery", "macro_sql": "{% materialization copy, adapter='bigquery' -%}\n\n {# Setup #}\n {{ run_hooks(pre_hooks) }}\n\n {% set destination = this.incorporate(type='table') %}\n\n {# there can be several ref() or source() according to BQ copy API docs #}\n {# cycle over ref() and source() to create source tables array #}\n {% set source_array = [] %}\n {% for ref_table in model.refs %}\n {{ source_array.append(ref(*ref_table)) }}\n {% endfor %}\n\n {% for src_table in model.sources %}\n {{ source_array.append(source(*src_table)) }}\n {% endfor %}\n\n {# Call adapter's copy_table function #}\n {%- set result_str = adapter.copy_table(\n source_array,\n destination,\n config.get('copy_materialization', default = 'table')) -%}\n\n {{ store_result('main', response=result_str) }}\n\n {# Clean up #}\n {{ run_hooks(post_hooks) }}\n {{ adapter.commit() }}\n\n {{ return({'relations': [destination]}) }}\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.460186}, "macro.dbt_bigquery.declare_dbt_max_partition": {"unique_id": "macro.dbt_bigquery.declare_dbt_max_partition", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "declare_dbt_max_partition", "macro_sql": "{% macro declare_dbt_max_partition(relation, partition_by, sql) %}\n\n {% if '_dbt_max_partition' in sql %}\n\n declare _dbt_max_partition {{ partition_by.data_type }} default (\n select max({{ partition_by.field }}) from {{ this }}\n where {{ partition_by.field }} is not null\n );\n \n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.463379}, "macro.dbt_bigquery.dbt_bigquery_validate_get_incremental_strategy": {"unique_id": "macro.dbt_bigquery.dbt_bigquery_validate_get_incremental_strategy", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "dbt_bigquery_validate_get_incremental_strategy", "macro_sql": "{% macro dbt_bigquery_validate_get_incremental_strategy(config) %}\n {#-- Find and validate the incremental strategy #}\n {%- set strategy = config.get(\"incremental_strategy\", default=\"merge\") -%}\n\n {% set invalid_strategy_msg -%}\n Invalid incremental strategy provided: {{ strategy }}\n Expected one of: 'merge', 'insert_overwrite'\n {%- endset %}\n {% if strategy not in ['merge', 'insert_overwrite'] %}\n {% do exceptions.raise_compiler_error(invalid_strategy_msg) %}\n {% endif %}\n\n {% do return(strategy) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.464297}, "macro.dbt_bigquery.bq_insert_overwrite": {"unique_id": "macro.dbt_bigquery.bq_insert_overwrite", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "bq_insert_overwrite", "macro_sql": "{% macro bq_insert_overwrite(\n tmp_relation, target_relation, sql, unique_key, partition_by, partitions, dest_columns, tmp_relation_exists\n) %}\n\n {% if partitions is not none and partitions != [] %} {# static #}\n\n {% set predicate -%}\n {{ partition_by.render(alias='DBT_INTERNAL_DEST') }} in (\n {{ partitions | join (', ') }}\n )\n {%- endset %}\n\n {%- set source_sql -%}\n (\n {{sql}}\n )\n {%- endset -%}\n\n {{ get_insert_overwrite_merge_sql(target_relation, source_sql, dest_columns, [predicate], include_sql_header=true) }}\n\n {% else %} {# dynamic #}\n\n {% set predicate -%}\n {{ partition_by.render(alias='DBT_INTERNAL_DEST') }} in unnest(dbt_partitions_for_replacement)\n {%- endset %}\n\n {%- set source_sql -%}\n (\n select * from {{ tmp_relation }}\n )\n {%- endset -%}\n\n -- generated script to merge partitions into {{ target_relation }}\n declare dbt_partitions_for_replacement array<{{ partition_by.data_type }}>;\n\n {# have we already created the temp table to check for schema changes? #}\n {% if not tmp_relation_exists %}\n {{ declare_dbt_max_partition(this, partition_by, sql) }}\n \n -- 1. create a temp table\n {{ create_table_as(True, tmp_relation, sql) }}\n {% else %}\n -- 1. temp table already exists, we used it to check for schema changes\n {% endif %}\n\n -- 2. define partitions to update\n set (dbt_partitions_for_replacement) = (\n select as struct\n array_agg(distinct {{ partition_by.render() }})\n from {{ tmp_relation }}\n );\n\n {#\n TODO: include_sql_header is a hack; consider a better approach that includes\n the sql_header at the materialization-level instead\n #}\n -- 3. run the merge statement\n {{ get_insert_overwrite_merge_sql(target_relation, source_sql, dest_columns, [predicate], include_sql_header=false) }};\n\n -- 4. clean up the temp table\n drop table if exists {{ tmp_relation }}\n\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_insert_overwrite_merge_sql", "macro.dbt_bigquery.declare_dbt_max_partition", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.46686}, "macro.dbt_bigquery.bq_generate_incremental_build_sql": {"unique_id": "macro.dbt_bigquery.bq_generate_incremental_build_sql", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "bq_generate_incremental_build_sql", "macro_sql": "{% macro bq_generate_incremental_build_sql(\n strategy, tmp_relation, target_relation, sql, unique_key, partition_by, partitions, dest_columns, tmp_relation_exists\n) %}\n {#-- if partitioned, use BQ scripting to get the range of partition values to be updated --#}\n {% if strategy == 'insert_overwrite' %}\n\n {% set missing_partition_msg -%}\n The 'insert_overwrite' strategy requires the `partition_by` config.\n {%- endset %}\n {% if partition_by is none %}\n {% do exceptions.raise_compiler_error(missing_partition_msg) %}\n {% endif %}\n\n {% set build_sql = bq_insert_overwrite(\n tmp_relation, target_relation, sql, unique_key, partition_by, partitions, dest_columns, on_schema_change\n ) %}\n\n {% else %} {# strategy == 'merge' #}\n {%- set source_sql -%}\n {%- if tmp_relation_exists -%}\n (\n select * from {{ tmp_relation }}\n )\n {%- else -%} {#-- wrap sql in parens to make it a subquery --#}\n (\n {{sql}}\n )\n {%- endif -%}\n {%- endset -%}\n\n {% set build_sql = get_merge_sql(target_relation, source_sql, unique_key, dest_columns) %}\n\n {% endif %}\n\n {{ return(build_sql) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bq_insert_overwrite", "macro.dbt.get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.468787}, "macro.dbt_bigquery.materialization_incremental_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_incremental_bigquery", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "materialization_incremental_bigquery", "macro_sql": "{% materialization incremental, adapter='bigquery' -%}\n\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {%- set target_relation = this %}\n {%- set existing_relation = load_relation(this) %}\n {%- set tmp_relation = make_temp_relation(this) %}\n\n {#-- Validate early so we don't run SQL if the strategy is invalid --#}\n {% set strategy = dbt_bigquery_validate_get_incremental_strategy(config) -%}\n\n {%- set raw_partition_by = config.get('partition_by', none) -%}\n {%- set partition_by = adapter.parse_partition_by(raw_partition_by) -%}\n {%- set partitions = config.get('partitions', none) -%}\n {%- set cluster_by = config.get('cluster_by', none) -%}\n\n {% set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') %}\n\n {{ run_hooks(pre_hooks) }}\n\n {% if existing_relation is none %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n \n {% elif existing_relation.is_view %}\n {#-- There's no way to atomically replace a view with a table on BQ --#}\n {{ adapter.drop_relation(existing_relation) }}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n \n {% elif full_refresh_mode %}\n {#-- If the partition/cluster config has changed, then we must drop and recreate --#}\n {% if not adapter.is_replaceable(existing_relation, partition_by, cluster_by) %}\n {% do log(\"Hard refreshing \" ~ existing_relation ~ \" because it is not replaceable\") %}\n {{ adapter.drop_relation(existing_relation) }}\n {% endif %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n \n {% else %}\n {% set tmp_relation_exists = false %}\n {% if on_schema_change != 'ignore' %} {# Check first, since otherwise we may not build a temp table #}\n {% do run_query(\n declare_dbt_max_partition(this, partition_by, sql) + create_table_as(True, tmp_relation, sql)\n ) %}\n {% set tmp_relation_exists = true %}\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, tmp_relation, existing_relation) %}\n {% endif %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n {% set build_sql = bq_generate_incremental_build_sql(\n strategy, tmp_relation, target_relation, sql, unique_key, partition_by, partitions, dest_columns, tmp_relation_exists\n ) %}\n\n {% endif %}\n\n {%- call statement('main') -%}\n {{ build_sql }}\n {% endcall %}\n\n {{ run_hooks(post_hooks) }}\n\n {% set target_relation = this.incorporate(type='table') %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.load_relation", "macro.dbt.make_temp_relation", "macro.dbt_bigquery.dbt_bigquery_validate_get_incremental_strategy", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.run_hooks", "macro.dbt.create_table_as", "macro.dbt.run_query", "macro.dbt_bigquery.declare_dbt_max_partition", "macro.dbt.process_schema_changes", "macro.dbt_bigquery.bq_generate_incremental_build_sql", "macro.dbt.statement", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.47397}, "macro.dbt_bigquery.bigquery__snapshot_hash_arguments": {"unique_id": "macro.dbt_bigquery.bigquery__snapshot_hash_arguments", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "bigquery__snapshot_hash_arguments", "macro_sql": "{% macro bigquery__snapshot_hash_arguments(args) -%}\n to_hex(md5(concat({%- for arg in args -%}\n coalesce(cast({{ arg }} as string), ''){% if not loop.last %}, '|',{% endif -%}\n {%- endfor -%}\n )))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.474872}, "macro.dbt_bigquery.bigquery__create_columns": {"unique_id": "macro.dbt_bigquery.bigquery__create_columns", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "bigquery__create_columns", "macro_sql": "{% macro bigquery__create_columns(relation, columns) %}\n {{ adapter.alter_table_add_columns(relation, columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4752011}, "macro.dbt_bigquery.bigquery__post_snapshot": {"unique_id": "macro.dbt_bigquery.bigquery__post_snapshot", "package_name": "dbt_bigquery", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "bigquery__post_snapshot", "macro_sql": "{% macro bigquery__post_snapshot(staging_relation) %}\n -- Clean up the snapshot temp table\n {% do drop_relation(staging_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.475481}, "macro.dbt.run_hooks": {"unique_id": "macro.dbt.run_hooks", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.477637}, "macro.dbt.make_hook_config": {"unique_id": "macro.dbt.make_hook_config", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4780428}, "macro.dbt.before_begin": {"unique_id": "macro.dbt.before_begin", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "before_begin", "macro_sql": "{% macro before_begin(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4783502}, "macro.dbt.in_transaction": {"unique_id": "macro.dbt.in_transaction", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4786508}, "macro.dbt.after_commit": {"unique_id": "macro.dbt.after_commit", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "after_commit", "macro_sql": "{% macro after_commit(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.478951}, "macro.dbt.set_sql_header": {"unique_id": "macro.dbt.set_sql_header", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.479778}, "macro.dbt.should_full_refresh": {"unique_id": "macro.dbt.should_full_refresh", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.480407}, "macro.dbt.should_store_failures": {"unique_id": "macro.dbt.should_store_failures", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.481034}, "macro.dbt.snapshot_merge_sql": {"unique_id": "macro.dbt.snapshot_merge_sql", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.481975}, "macro.dbt.default__snapshot_merge_sql": {"unique_id": "macro.dbt.default__snapshot_merge_sql", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4825249}, "macro.dbt.strategy_dispatch": {"unique_id": "macro.dbt.strategy_dispatch", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.488551}, "macro.dbt.snapshot_hash_arguments": {"unique_id": "macro.dbt.snapshot_hash_arguments", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n {{ adapter.dispatch('snapshot_hash_arguments', 'dbt')(args) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.488906}, "macro.dbt.default__snapshot_hash_arguments": {"unique_id": "macro.dbt.default__snapshot_hash_arguments", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4893708}, "macro.dbt.snapshot_get_time": {"unique_id": "macro.dbt.snapshot_get_time", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_get_time", "macro_sql": "{% macro snapshot_get_time() -%}\n {{ adapter.dispatch('snapshot_get_time', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.489674}, "macro.dbt.default__snapshot_get_time": {"unique_id": "macro.dbt.default__snapshot_get_time", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() -%}\n {{ current_timestamp() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.489884}, "macro.dbt.snapshot_timestamp_strategy": {"unique_id": "macro.dbt.snapshot_timestamp_strategy", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.491339}, "macro.dbt.snapshot_string_as_time": {"unique_id": "macro.dbt.snapshot_string_as_time", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n {{ adapter.dispatch('snapshot_string_as_time', 'dbt')(timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4916859}, "macro.dbt.default__snapshot_string_as_time": {"unique_id": "macro.dbt.default__snapshot_string_as_time", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.492043}, "macro.dbt.snapshot_check_all_get_existing_columns": {"unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_check_all_get_existing_columns", "macro_sql": "{% macro snapshot_check_all_get_existing_columns(node, target_exists) -%}\n {%- set query_columns = get_columns_in_query(node['compiled_sql']) -%}\n {%- if not target_exists -%}\n {# no table yet -> return whatever the query does #}\n {{ return([false, query_columns]) }}\n {%- endif -%}\n {# handle any schema changes #}\n {%- set target_table = node.get('alias', node.get('name')) -%}\n {%- set target_relation = adapter.get_relation(database=node.database, schema=node.schema, identifier=target_table) -%}\n {%- set existing_cols = get_columns_in_query('select * from ' ~ target_relation) -%}\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(col) -%}\n {%- else -%}\n {% set ns.column_added = true %}\n {%- endif -%}\n {%- endfor -%}\n {{ return([ns.column_added, intersection]) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.4940538}, "macro.dbt.snapshot_check_strategy": {"unique_id": "macro.dbt.snapshot_check_strategy", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 \n {% set select_current_time -%}\n select {{ snapshot_get_time() }} as snapshot_start\n {%- endset %}\n\n {#-- don't access the column by name, to avoid dealing with casing issues on snowflake #}\n {%- set now = run_query(select_current_time)[0][0] -%}\n {% if now is none or now is undefined -%}\n {%- do exceptions.raise_compiler_error('Could not get a snapshot start time from the database') -%}\n {%- endif %}\n {% set updated_at = config.get('updated_at', snapshot_string_as_time(now)) %}\n\n {% set column_added = false %}\n\n {% if check_cols_config == 'all' %}\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists) %}\n {% elif check_cols_config is iterable and (check_cols_config | length) > 0 %}\n {% set check_cols = check_cols_config %}\n {% else %}\n {% do exceptions.raise_compiler_error(\"Invalid value for 'check_cols': \" ~ check_cols_config) %}\n {% endif %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n TRUE\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt.run_query", "macro.dbt.snapshot_string_as_time", "macro.dbt.snapshot_check_all_get_existing_columns", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.49799}, "macro.dbt.create_columns": {"unique_id": "macro.dbt.create_columns", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n {{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.5030851}, "macro.dbt.default__create_columns": {"unique_id": "macro.dbt.default__create_columns", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.5036721}, "macro.dbt.post_snapshot": {"unique_id": "macro.dbt.post_snapshot", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n {{ adapter.dispatch('post_snapshot', 'dbt')(staging_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.5040221}, "macro.dbt.default__post_snapshot": {"unique_id": "macro.dbt.default__post_snapshot", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n {# no-op #}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.504212}, "macro.dbt.snapshot_staging_table": {"unique_id": "macro.dbt.snapshot_staging_table", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_staging_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.504632}, "macro.dbt.default__snapshot_staging_table": {"unique_id": "macro.dbt.default__snapshot_staging_table", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.5063858}, "macro.dbt.build_snapshot_table": {"unique_id": "macro.dbt.build_snapshot_table", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "build_snapshot_table", "macro_sql": "{% macro build_snapshot_table(strategy, sql) -%}\n {{ adapter.dispatch('build_snapshot_table', 'dbt')(strategy, sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__build_snapshot_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.506785}, "macro.dbt.default__build_snapshot_table": {"unique_id": "macro.dbt.default__build_snapshot_table", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.507311}, "macro.dbt.build_snapshot_staging_table": {"unique_id": "macro.dbt.build_snapshot_staging_table", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "build_snapshot_staging_table", "macro_sql": "{% macro build_snapshot_staging_table(strategy, sql, target_relation) %}\n {% set tmp_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, tmp_relation, select) }}\n {% endcall %}\n\n {% do return(tmp_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1657577413.5081978}, "macro.dbt.materialization_snapshot_default": {"unique_id": "macro.dbt.materialization_snapshot_default", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot.sql", "original_file_path": "macros/materializations/snapshots/snapshot.sql", "name": "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\n {% if not adapter.check_schema_exists(model.database, model.schema) %}\n {% do create_schema(model.database, model.schema) %}\n {% endif %}\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_sql']) %}\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 {% 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_schema", "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.persist_docs", "macro.dbt.create_indexes", "macro.dbt.post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.519211}, "macro.dbt.materialization_test_default": {"unique_id": "macro.dbt.materialization_test_default", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1657577413.5233579}, "macro.dbt.get_test_sql": {"unique_id": "macro.dbt.get_test_sql", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.524361}, "macro.dbt.default__get_test_sql": {"unique_id": "macro.dbt.default__get_test_sql", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.524999}, "macro.dbt.get_where_subquery": {"unique_id": "macro.dbt.get_where_subquery", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.525846}, "macro.dbt.default__get_where_subquery": {"unique_id": "macro.dbt.default__get_where_subquery", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.526641}, "macro.dbt.get_quoted_csv": {"unique_id": "macro.dbt.get_quoted_csv", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.528275}, "macro.dbt.diff_columns": {"unique_id": "macro.dbt.diff_columns", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.529401}, "macro.dbt.diff_column_data_types": {"unique_id": "macro.dbt.diff_column_data_types", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "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 %}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.530658}, "macro.dbt.get_merge_sql": {"unique_id": "macro.dbt.get_merge_sql", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, predicates=none) -%}\n {{ adapter.dispatch('get_merge_sql', 'dbt')(target, source, unique_key, dest_columns, predicates) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.535531}, "macro.dbt.default__get_merge_sql": {"unique_id": "macro.dbt.default__get_merge_sql", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, predicates) -%}\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set update_columns = config.get('merge_update_columns', default = dest_columns | map(attribute=\"quoted\") | list) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {% if unique_key %}\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 {% 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.537903}, "macro.dbt.get_delete_insert_merge_sql": {"unique_id": "macro.dbt.get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n {{ adapter.dispatch('get_delete_insert_merge_sql', 'dbt')(target, source, unique_key, dest_columns) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.538389}, "macro.dbt.default__get_delete_insert_merge_sql": {"unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {% if unique_key is not none %}\n delete from {{ target }}\n where ({{ unique_key }}) in (\n select ({{ unique_key }})\n from {{ source }}\n );\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.539278}, "macro.dbt.get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.539819}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_insert_overwrite_merge_sql", "macro_sql": "{% macro default__get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header) -%}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.541114}, "macro.dbt.is_incremental": {"unique_id": "macro.dbt.is_incremental", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/is_incremental.sql", "original_file_path": "macros/materializations/models/incremental/is_incremental.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.542517}, "macro.dbt.materialization_incremental_default": {"unique_id": "macro.dbt.materialization_incremental_default", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/incremental.sql", "original_file_path": "macros/materializations/models/incremental/incremental.sql", "name": "materialization_incremental_default", "macro_sql": "{% materialization incremental, default -%}\n\n {% set unique_key = config.get('unique_key') %}\n\n {% set target_relation = this.incorporate(type='table') %}\n {% set existing_relation = load_relation(this) %}\n {% set tmp_relation = make_temp_relation(target_relation) %}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {% set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') %}\n\n {% set tmp_identifier = model['name'] + '__dbt_tmp' %}\n {% set backup_identifier = model['name'] + \"__dbt_backup\" %}\n\n -- the intermediate_ 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 = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) %} \n {% set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=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 {% set to_drop = [] %}\n\n {# -- first check whether we want to full refresh for source view or config reasons #}\n {% set trigger_full_refresh = (full_refresh_mode or existing_relation.is_view) %}\n\n {% if existing_relation is none %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n{% elif trigger_full_refresh %}\n {#-- Make sure the backup doesn't exist so we don't encounter issues with the rename below #}\n {% set tmp_identifier = model['name'] + '__dbt_tmp' %}\n {% set backup_identifier = model['name'] + '__dbt_backup' %}\n {% set intermediate_relation = existing_relation.incorporate(path={\"identifier\": tmp_identifier}) %}\n {% set backup_relation = existing_relation.incorporate(path={\"identifier\": backup_identifier}) %}\n\n {% set build_sql = create_table_as(False, intermediate_relation, sql) %}\n {% set need_swap = true %}\n {% do to_drop.append(backup_relation) %}\n {% else %}\n {% do run_query(create_table_as(True, tmp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=tmp_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, tmp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n {% set build_sql = get_delete_insert_merge_sql(target_relation, tmp_relation, unique_key, dest_columns) %}\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 {% endif %}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.load_relation", "macro.dbt.make_temp_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.create_table_as", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt.get_delete_insert_merge_sql", "macro.dbt.statement", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.551806}, "macro.dbt.incremental_validate_on_schema_change": {"unique_id": "macro.dbt.incremental_validate_on_schema_change", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.559605}, "macro.dbt.check_for_schema_changes": {"unique_id": "macro.dbt.check_for_schema_changes", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.diff_columns", "macro.dbt.diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.562049}, "macro.dbt.sync_column_schemas": {"unique_id": "macro.dbt.sync_column_schemas", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.564356}, "macro.dbt.process_schema_changes": {"unique_id": "macro.dbt.process_schema_changes", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "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 {% 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.check_for_schema_changes", "macro.dbt.sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.5657458}, "macro.dbt.materialization_table_default": {"unique_id": "macro.dbt.materialization_table_default", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/table.sql", "original_file_path": "macros/materializations/models/table/table.sql", "name": "materialization_table_default", "macro_sql": "{% materialization table, default %}\n {%- set identifier = model['alias'] -%}\n {%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}\n {%- set backup_identifier = model['name'] + '__dbt_backup' -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier,\n schema=schema,\n database=database,\n type='table') -%}\n {%- set intermediate_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema,\n database=database,\n type='table') -%}\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 = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) -%}\n /*\n See ../view/view.sql for more information about this relation.\n */\n {%- set backup_relation_type = 'table' if old_relation is none else old_relation.type -%}\n {%- set backup_relation = api.Relation.create(identifier=backup_identifier,\n schema=schema,\n database=database,\n type=backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=database) -%}\n\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 old_relation is not none %}\n {{ adapter.rename_relation(old_relation, backup_relation) }}\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 {% 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["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.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.572557}, "macro.dbt.get_create_table_as_sql": {"unique_id": "macro.dbt.get_create_table_as_sql", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_table_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.573462}, "macro.dbt.default__get_create_table_as_sql": {"unique_id": "macro.dbt.default__get_create_table_as_sql", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.573828}, "macro.dbt.create_table_as": {"unique_id": "macro.dbt.create_table_as", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "create_table_as", "macro_sql": "{% macro create_table_as(temporary, relation, sql) -%}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.574233}, "macro.dbt.default__create_table_as": {"unique_id": "macro.dbt.default__create_table_as", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.575039}, "macro.dbt.materialization_view_default": {"unique_id": "macro.dbt.materialization_view_default", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/view.sql", "original_file_path": "macros/materializations/models/view/view.sql", "name": "materialization_view_default", "macro_sql": "{%- materialization view, default -%}\n\n {%- set identifier = model['alias'] -%}\n {%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}\n {%- set backup_identifier = model['name'] + '__dbt_backup' -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier, schema=schema, database=database,\n type='view') -%}\n {%- set intermediate_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema, database=database, type='view') -%}\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 = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) -%}\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 \"old_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 old_relation, if it exists,\n or else \"view\" as a sane default if it does not. Note that if the old_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 old_relation is none else old_relation.type -%}\n {%- set backup_relation = api.Relation.create(identifier=backup_identifier,\n schema=schema, database=database,\n type=backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=database) -%}\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 {{ create_view_as(intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n -- move the existing view out of the way\n {% if old_relation is not none %}\n {{ adapter.rename_relation(old_relation, backup_relation) }}\n {% endif %}\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.create_view_as", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.581578}, "macro.dbt.handle_existing_table": {"unique_id": "macro.dbt.handle_existing_table", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.582311}, "macro.dbt.default__handle_existing_table": {"unique_id": "macro.dbt.default__handle_existing_table", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.582765}, "macro.dbt.create_or_replace_view": {"unique_id": "macro.dbt.create_or_replace_view", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_or_replace_view.sql", "original_file_path": "macros/materializations/models/view/create_or_replace_view.sql", "name": "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\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\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 {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.585165}, "macro.dbt.get_create_view_as_sql": {"unique_id": "macro.dbt.get_create_view_as_sql", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.585977}, "macro.dbt.default__get_create_view_as_sql": {"unique_id": "macro.dbt.default__get_create_view_as_sql", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.5862982}, "macro.dbt.create_view_as": {"unique_id": "macro.dbt.create_view_as", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n {{ adapter.dispatch('create_view_as', 'dbt')(relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.5866618}, "macro.dbt.default__create_view_as": {"unique_id": "macro.dbt.default__create_view_as", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "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 }} as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.5871801}, "macro.dbt.materialization_seed_default": {"unique_id": "macro.dbt.materialization_seed_default", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "name": "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 agate_table = load_agate_table() -%}\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 {{ create_table_sql }};\n -- dbt seed --\n {{ sql }}\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\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 %}", "resource_type": "macro", "tags": [], "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.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.592563}, "macro.dbt.create_csv_table": {"unique_id": "macro.dbt.create_csv_table", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n {{ adapter.dispatch('create_csv_table', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.5991411}, "macro.dbt.default__create_csv_table": {"unique_id": "macro.dbt.default__create_csv_table", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.600977}, "macro.dbt.reset_csv_table": {"unique_id": "macro.dbt.reset_csv_table", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.601459}, "macro.dbt.default__reset_csv_table": {"unique_id": "macro.dbt.default__reset_csv_table", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6024709}, "macro.dbt.get_binding_char": {"unique_id": "macro.dbt.get_binding_char", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_binding_char", "macro_sql": "{% macro get_binding_char() -%}\n {{ adapter.dispatch('get_binding_char', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.602768}, "macro.dbt.default__get_binding_char": {"unique_id": "macro.dbt.default__get_binding_char", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_binding_char", "macro_sql": "{% macro default__get_binding_char() %}\n {{ return('%s') }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.603008}, "macro.dbt.get_batch_size": {"unique_id": "macro.dbt.get_batch_size", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_batch_size", "macro_sql": "{% macro get_batch_size() -%}\n {{ return(adapter.dispatch('get_batch_size', 'dbt')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.603335}, "macro.dbt.default__get_batch_size": {"unique_id": "macro.dbt.default__get_batch_size", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_batch_size", "macro_sql": "{% macro default__get_batch_size() %}\n {{ return(10000) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.603574}, "macro.dbt.get_seed_column_quoted_csv": {"unique_id": "macro.dbt.get_seed_column_quoted_csv", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.604534}, "macro.dbt.load_csv_rows": {"unique_id": "macro.dbt.load_csv_rows", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n {{ adapter.dispatch('load_csv_rows', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.605011}, "macro.dbt.default__load_csv_rows": {"unique_id": "macro.dbt.default__load_csv_rows", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1657577413.607455}, "macro.dbt.generate_alias_name": {"unique_id": "macro.dbt.generate_alias_name", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_alias_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.608309}, "macro.dbt.default__generate_alias_name": {"unique_id": "macro.dbt.default__generate_alias_name", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "default__generate_alias_name", "macro_sql": "{% macro default__generate_alias_name(custom_alias_name=none, node=none) -%}\n\n {%- if custom_alias_name is none -%}\n\n {{ node.name }}\n\n {%- else -%}\n\n {{ custom_alias_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6087759}, "macro.dbt.generate_schema_name": {"unique_id": "macro.dbt.generate_schema_name", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.609823}, "macro.dbt.default__generate_schema_name": {"unique_id": "macro.dbt.default__generate_schema_name", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.610358}, "macro.dbt.generate_schema_name_for_env": {"unique_id": "macro.dbt.generate_schema_name_for_env", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.610935}, "macro.dbt.generate_database_name": {"unique_id": "macro.dbt.generate_database_name", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.611813}, "macro.dbt.default__generate_database_name": {"unique_id": "macro.dbt.default__generate_database_name", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.612339}, "macro.dbt.default__test_relationships": {"unique_id": "macro.dbt.default__test_relationships", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/relationships.sql", "original_file_path": "macros/generic_test_sql/relationships.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.613132}, "macro.dbt.default__test_not_null": {"unique_id": "macro.dbt.default__test_not_null", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/not_null.sql", "original_file_path": "macros/generic_test_sql/not_null.sql", "name": "default__test_not_null", "macro_sql": "{% macro default__test_not_null(model, column_name) %}\n\nselect *\nfrom {{ model }}\nwhere {{ column_name }} is null\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.613635}, "macro.dbt.default__test_unique": {"unique_id": "macro.dbt.default__test_unique", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/unique.sql", "original_file_path": "macros/generic_test_sql/unique.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.614261}, "macro.dbt.default__test_accepted_values": {"unique_id": "macro.dbt.default__test_accepted_values", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/accepted_values.sql", "original_file_path": "macros/generic_test_sql/accepted_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.615479}, "macro.dbt.statement": {"unique_id": "macro.dbt.statement", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "statement", "macro_sql": "{% macro statement(name=None, fetch_result=False, auto_begin=True) -%}\n {%- if execute: -%}\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 {%- set res, table = adapter.execute(sql, auto_begin=auto_begin, fetch=fetch_result) -%}\n {%- if name is not none -%}\n {{ store_result(name, response=res, agate_table=table) }}\n {%- endif -%}\n\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6176388}, "macro.dbt.noop_statement": {"unique_id": "macro.dbt.noop_statement", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6188009}, "macro.dbt.run_query": {"unique_id": "macro.dbt.run_query", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.619395}, "macro.dbt.convert_datetime": {"unique_id": "macro.dbt.convert_datetime", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.622391}, "macro.dbt.dates_in_range": {"unique_id": "macro.dbt.dates_in_range", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.62496}, "macro.dbt.partition_range": {"unique_id": "macro.dbt.partition_range", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dates_in_range"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6264992}, "macro.dbt.py_current_timestring": {"unique_id": "macro.dbt.py_current_timestring", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.626976}, "macro.dbt.create_schema": {"unique_id": "macro.dbt.create_schema", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n {{ adapter.dispatch('create_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6278038}, "macro.dbt.default__create_schema": {"unique_id": "macro.dbt.default__create_schema", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.628185}, "macro.dbt.drop_schema": {"unique_id": "macro.dbt.drop_schema", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n {{ adapter.dispatch('drop_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6285172}, "macro.dbt.default__drop_schema": {"unique_id": "macro.dbt.default__drop_schema", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.628891}, "macro.dbt.get_create_index_sql": {"unique_id": "macro.dbt.get_create_index_sql", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.629847}, "macro.dbt.default__get_create_index_sql": {"unique_id": "macro.dbt.default__get_create_index_sql", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "default__get_create_index_sql", "macro_sql": "{% macro default__get_create_index_sql(relation, index_dict) -%}\n {% do return(None) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6301289}, "macro.dbt.create_indexes": {"unique_id": "macro.dbt.create_indexes", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "create_indexes", "macro_sql": "{% macro create_indexes(relation) -%}\n {{ adapter.dispatch('create_indexes', 'dbt')(relation) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6304588}, "macro.dbt.default__create_indexes": {"unique_id": "macro.dbt.default__create_indexes", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_create_index_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6312609}, "macro.dbt.make_temp_relation": {"unique_id": "macro.dbt.make_temp_relation", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6340039}, "macro.dbt.default__make_temp_relation": {"unique_id": "macro.dbt.default__make_temp_relation", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__make_temp_relation", "macro_sql": "{% macro default__make_temp_relation(base_relation, suffix) %}\n {% set tmp_identifier = base_relation.identifier ~ suffix %}\n {% set tmp_relation = base_relation.incorporate(\n path={\"identifier\": tmp_identifier}) -%}\n\n {% do return(tmp_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.634639}, "macro.dbt.drop_relation": {"unique_id": "macro.dbt.drop_relation", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n {{ return(adapter.dispatch('drop_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6350248}, "macro.dbt.default__drop_relation": {"unique_id": "macro.dbt.default__drop_relation", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.635475}, "macro.dbt.truncate_relation": {"unique_id": "macro.dbt.truncate_relation", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n {{ return(adapter.dispatch('truncate_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__truncate_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6358578}, "macro.dbt.default__truncate_relation": {"unique_id": "macro.dbt.default__truncate_relation", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.63621}, "macro.dbt.rename_relation": {"unique_id": "macro.dbt.rename_relation", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n {{ return(adapter.dispatch('rename_relation', 'dbt')(from_relation, to_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.636651}, "macro.dbt.default__rename_relation": {"unique_id": "macro.dbt.default__rename_relation", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6372259}, "macro.dbt.get_or_create_relation": {"unique_id": "macro.dbt.get_or_create_relation", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_or_create_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.637718}, "macro.dbt.default__get_or_create_relation": {"unique_id": "macro.dbt.default__get_or_create_relation", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.639007}, "macro.dbt.load_relation": {"unique_id": "macro.dbt.load_relation", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "load_relation", "macro_sql": "{% macro load_relation(relation) %}\n {% do return(adapter.get_relation(\n database=relation.database,\n schema=relation.schema,\n identifier=relation.identifier\n )) -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.639468}, "macro.dbt.drop_relation_if_exists": {"unique_id": "macro.dbt.drop_relation_if_exists", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.63987}, "macro.dbt.current_timestamp": {"unique_id": "macro.dbt.current_timestamp", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "current_timestamp", "macro_sql": "{% macro current_timestamp() -%}\n {{ adapter.dispatch('current_timestamp', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6408079}, "macro.dbt.default__current_timestamp": {"unique_id": "macro.dbt.default__current_timestamp", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6411111}, "macro.dbt.collect_freshness": {"unique_id": "macro.dbt.collect_freshness", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6415749}, "macro.dbt.default__collect_freshness": {"unique_id": "macro.dbt.default__collect_freshness", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "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').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.642426}, "macro.dbt.alter_column_comment": {"unique_id": "macro.dbt.alter_column_comment", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.643702}, "macro.dbt.default__alter_column_comment": {"unique_id": "macro.dbt.default__alter_column_comment", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.644047}, "macro.dbt.alter_relation_comment": {"unique_id": "macro.dbt.alter_relation_comment", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.644464}, "macro.dbt.default__alter_relation_comment": {"unique_id": "macro.dbt.default__alter_relation_comment", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6448069}, "macro.dbt.persist_docs": {"unique_id": "macro.dbt.persist_docs", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.645353}, "macro.dbt.default__persist_docs": {"unique_id": "macro.dbt.default__persist_docs", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6463192}, "macro.dbt.get_catalog": {"unique_id": "macro.dbt.get_catalog", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n {{ return(adapter.dispatch('get_catalog', 'dbt')(information_schema, schemas)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6488168}, "macro.dbt.default__get_catalog": {"unique_id": "macro.dbt.default__get_catalog", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6493618}, "macro.dbt.information_schema_name": {"unique_id": "macro.dbt.information_schema_name", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n {{ return(adapter.dispatch('information_schema_name', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.649751}, "macro.dbt.default__information_schema_name": {"unique_id": "macro.dbt.default__information_schema_name", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.650081}, "macro.dbt.list_schemas": {"unique_id": "macro.dbt.list_schemas", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n {{ return(adapter.dispatch('list_schemas', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.650456}, "macro.dbt.default__list_schemas": {"unique_id": "macro.dbt.default__list_schemas", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.information_schema_name", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6509829}, "macro.dbt.check_schema_exists": {"unique_id": "macro.dbt.check_schema_exists", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.651419}, "macro.dbt.default__check_schema_exists": {"unique_id": "macro.dbt.default__check_schema_exists", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.652151}, "macro.dbt.list_relations_without_caching": {"unique_id": "macro.dbt.list_relations_without_caching", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.652522}, "macro.dbt.default__list_relations_without_caching": {"unique_id": "macro.dbt.default__list_relations_without_caching", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.652842}, "macro.dbt.get_columns_in_relation": {"unique_id": "macro.dbt.get_columns_in_relation", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n {{ return(adapter.dispatch('get_columns_in_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6557178}, "macro.dbt.default__get_columns_in_relation": {"unique_id": "macro.dbt.default__get_columns_in_relation", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.656051}, "macro.dbt.sql_convert_columns_in_relation": {"unique_id": "macro.dbt.sql_convert_columns_in_relation", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6566982}, "macro.dbt.get_columns_in_query": {"unique_id": "macro.dbt.get_columns_in_query", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6570828}, "macro.dbt.default__get_columns_in_query": {"unique_id": "macro.dbt.default__get_columns_in_query", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 select * from (\n {{ select_sql }}\n ) as __dbt_sbq\n where false\n limit 0\n {% endcall %}\n\n {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.65778}, "macro.dbt.alter_column_type": {"unique_id": "macro.dbt.alter_column_type", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.658255}, "macro.dbt.default__alter_column_type": {"unique_id": "macro.dbt.default__alter_column_type", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.659449}, "macro.dbt.alter_relation_add_remove_columns": {"unique_id": "macro.dbt.alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.659956}, "macro.dbt.default__alter_relation_add_remove_columns": {"unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.661539}, "macro.dbt.test_unique": {"unique_id": "macro.dbt.test_unique", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_unique", "macro_sql": "{% test unique(model, column_name) %}\n {% set macro = adapter.dispatch('test_unique', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6625988}, "macro.dbt.test_not_null": {"unique_id": "macro.dbt.test_not_null", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6630678}, "macro.dbt.test_accepted_values": {"unique_id": "macro.dbt.test_accepted_values", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6636422}, "macro.dbt.test_relationships": {"unique_id": "macro.dbt.test_relationships", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_relationships"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.664205}, "macro.dbt_utils.except": {"unique_id": "macro.dbt_utils.except", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "except", "macro_sql": "{% macro except() %}\n {{ return(adapter.dispatch('except', 'dbt_utils')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.664845}, "macro.dbt_utils.default__except": {"unique_id": "macro.dbt_utils.default__except", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "default__except", "macro_sql": "{% macro default__except() %}\n\n except\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.665007}, "macro.dbt_utils.bigquery__except": {"unique_id": "macro.dbt_utils.bigquery__except", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "bigquery__except", "macro_sql": "{% macro bigquery__except() %}\n\n except distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.665163}, "macro.dbt_utils.replace": {"unique_id": "macro.dbt_utils.replace", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/replace.sql", "original_file_path": "macros/cross_db_utils/replace.sql", "name": "replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n {{ return(adapter.dispatch('replace', 'dbt_utils') (field, old_chars, new_chars)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.66595}, "macro.dbt_utils.default__replace": {"unique_id": "macro.dbt_utils.default__replace", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/replace.sql", "original_file_path": "macros/cross_db_utils/replace.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6662989}, "macro.dbt_utils.concat": {"unique_id": "macro.dbt_utils.concat", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/concat.sql", "original_file_path": "macros/cross_db_utils/concat.sql", "name": "concat", "macro_sql": "{% macro concat(fields) -%}\n {{ return(adapter.dispatch('concat', 'dbt_utils')(fields)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.66694}, "macro.dbt_utils.default__concat": {"unique_id": "macro.dbt_utils.default__concat", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/concat.sql", "original_file_path": "macros/cross_db_utils/concat.sql", "name": "default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n {{ fields|join(' || ') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6673112}, "macro.dbt_utils.type_string": {"unique_id": "macro.dbt_utils.type_string", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n {{ return(adapter.dispatch('type_string', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6686022}, "macro.dbt_utils.default__type_string": {"unique_id": "macro.dbt_utils.default__type_string", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_string", "macro_sql": "{% macro default__type_string() %}\n string\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6687622}, "macro.dbt_utils.redshift__type_string": {"unique_id": "macro.dbt_utils.redshift__type_string", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "redshift__type_string", "macro_sql": "\n\n{%- macro redshift__type_string() -%}\n varchar\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.668915}, "macro.dbt_utils.postgres__type_string": {"unique_id": "macro.dbt_utils.postgres__type_string", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "postgres__type_string", "macro_sql": "{% macro postgres__type_string() %}\n varchar\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.669067}, "macro.dbt_utils.snowflake__type_string": {"unique_id": "macro.dbt_utils.snowflake__type_string", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "snowflake__type_string", "macro_sql": "{% macro snowflake__type_string() %}\n varchar\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.669219}, "macro.dbt_utils.type_timestamp": {"unique_id": "macro.dbt_utils.type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.669546}, "macro.dbt_utils.default__type_timestamp": {"unique_id": "macro.dbt_utils.default__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n timestamp\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.669703}, "macro.dbt_utils.postgres__type_timestamp": {"unique_id": "macro.dbt_utils.postgres__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "postgres__type_timestamp", "macro_sql": "{% macro postgres__type_timestamp() %}\n timestamp without time zone\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.669856}, "macro.dbt_utils.snowflake__type_timestamp": {"unique_id": "macro.dbt_utils.snowflake__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "snowflake__type_timestamp", "macro_sql": "{% macro snowflake__type_timestamp() %}\n timestamp_ntz\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.670007}, "macro.dbt_utils.type_float": {"unique_id": "macro.dbt_utils.type_float", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n {{ return(adapter.dispatch('type_float', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6703308}, "macro.dbt_utils.default__type_float": {"unique_id": "macro.dbt_utils.default__type_float", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_float", "macro_sql": "{% macro default__type_float() %}\n float\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.670488}, "macro.dbt_utils.bigquery__type_float": {"unique_id": "macro.dbt_utils.bigquery__type_float", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_float", "macro_sql": "{% macro bigquery__type_float() %}\n float64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6706402}, "macro.dbt_utils.type_numeric": {"unique_id": "macro.dbt_utils.type_numeric", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n {{ return(adapter.dispatch('type_numeric', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.670971}, "macro.dbt_utils.default__type_numeric": {"unique_id": "macro.dbt_utils.default__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n numeric(28, 6)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.671128}, "macro.dbt_utils.bigquery__type_numeric": {"unique_id": "macro.dbt_utils.bigquery__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_numeric", "macro_sql": "{% macro bigquery__type_numeric() %}\n numeric\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.671276}, "macro.dbt_utils.type_bigint": {"unique_id": "macro.dbt_utils.type_bigint", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n {{ return(adapter.dispatch('type_bigint', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.671603}, "macro.dbt_utils.default__type_bigint": {"unique_id": "macro.dbt_utils.default__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n bigint\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.671801}, "macro.dbt_utils.bigquery__type_bigint": {"unique_id": "macro.dbt_utils.bigquery__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_bigint", "macro_sql": "{% macro bigquery__type_bigint() %}\n int64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.672179}, "macro.dbt_utils.type_int": {"unique_id": "macro.dbt_utils.type_int", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n {{ return(adapter.dispatch('type_int', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6727722}, "macro.dbt_utils.default__type_int": {"unique_id": "macro.dbt_utils.default__type_int", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_int", "macro_sql": "{% macro default__type_int() %}\n int\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.672925}, "macro.dbt_utils.bigquery__type_int": {"unique_id": "macro.dbt_utils.bigquery__type_int", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_int", "macro_sql": "{% macro bigquery__type_int() %}\n int64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6730728}, "macro.dbt_utils._is_relation": {"unique_id": "macro.dbt_utils._is_relation", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/_is_relation.sql", "original_file_path": "macros/cross_db_utils/_is_relation.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.674062}, "macro.dbt_utils.cast_array_to_string": {"unique_id": "macro.dbt_utils.cast_array_to_string", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_array_to_string.sql", "original_file_path": "macros/cross_db_utils/cast_array_to_string.sql", "name": "cast_array_to_string", "macro_sql": "{% macro cast_array_to_string(array) %}\n {{ adapter.dispatch('cast_array_to_string', 'dbt_utils') (array) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__cast_array_to_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.674911}, "macro.dbt_utils.default__cast_array_to_string": {"unique_id": "macro.dbt_utils.default__cast_array_to_string", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_array_to_string.sql", "original_file_path": "macros/cross_db_utils/cast_array_to_string.sql", "name": "default__cast_array_to_string", "macro_sql": "{% macro default__cast_array_to_string(array) %}\n cast({{ array }} as {{ dbt_utils.type_string() }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.675199}, "macro.dbt_utils.postgres__cast_array_to_string": {"unique_id": "macro.dbt_utils.postgres__cast_array_to_string", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_array_to_string.sql", "original_file_path": "macros/cross_db_utils/cast_array_to_string.sql", "name": "postgres__cast_array_to_string", "macro_sql": "{% macro postgres__cast_array_to_string(array) %}\n {%- set array_as_string -%}cast({{ array }} as {{ dbt_utils.type_string() }}){%- endset -%}\n {{ dbt_utils.replace(dbt_utils.replace(array_as_string,\"'}'\",\"']'\"),\"'{'\",\"'['\") }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string", "macro.dbt_utils.replace"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.675821}, "macro.dbt_utils.redshift__cast_array_to_string": {"unique_id": "macro.dbt_utils.redshift__cast_array_to_string", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_array_to_string.sql", "original_file_path": "macros/cross_db_utils/cast_array_to_string.sql", "name": "redshift__cast_array_to_string", "macro_sql": "{% macro redshift__cast_array_to_string(array) %}\n cast({{ array }} as {{ dbt_utils.type_string() }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6761138}, "macro.dbt_utils.bigquery__cast_array_to_string": {"unique_id": "macro.dbt_utils.bigquery__cast_array_to_string", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_array_to_string.sql", "original_file_path": "macros/cross_db_utils/cast_array_to_string.sql", "name": "bigquery__cast_array_to_string", "macro_sql": "{% macro bigquery__cast_array_to_string(array) %}\n '['||(select string_agg(cast(element as string), ',') from unnest({{ array }}) element)||']'\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.676332}, "macro.dbt_utils.length": {"unique_id": "macro.dbt_utils.length", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "length", "macro_sql": "{% macro length(expression) -%}\n {{ return(adapter.dispatch('length', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__length"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.677045}, "macro.dbt_utils.default__length": {"unique_id": "macro.dbt_utils.default__length", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "default__length", "macro_sql": "{% macro default__length(expression) %}\n \n length(\n {{ expression }}\n )\n \n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6772668}, "macro.dbt_utils.redshift__length": {"unique_id": "macro.dbt_utils.redshift__length", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "redshift__length", "macro_sql": "{% macro redshift__length(expression) %}\n\n len(\n {{ expression }}\n )\n \n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.677481}, "macro.dbt_utils.dateadd": {"unique_id": "macro.dbt_utils.dateadd", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "dateadd", "macro_sql": "{% macro dateadd(datepart, interval, from_date_or_timestamp) %}\n {{ return(adapter.dispatch('dateadd', 'dbt_utils')(datepart, interval, from_date_or_timestamp)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.678585}, "macro.dbt_utils.default__dateadd": {"unique_id": "macro.dbt_utils.default__dateadd", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.678934}, "macro.dbt_utils.bigquery__dateadd": {"unique_id": "macro.dbt_utils.bigquery__dateadd", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "bigquery__dateadd", "macro_sql": "{% macro bigquery__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n datetime_add(\n cast( {{ from_date_or_timestamp }} as datetime),\n interval {{ interval }} {{ datepart }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.679272}, "macro.dbt_utils.postgres__dateadd": {"unique_id": "macro.dbt_utils.postgres__dateadd", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.679602}, "macro.dbt_utils.redshift__dateadd": {"unique_id": "macro.dbt_utils.redshift__dateadd", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "redshift__dateadd", "macro_sql": "{% macro redshift__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {{ return(dbt_utils.default__dateadd(datepart, interval, from_date_or_timestamp)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.679997}, "macro.dbt_utils.intersect": {"unique_id": "macro.dbt_utils.intersect", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "intersect", "macro_sql": "{% macro intersect() %}\n {{ return(adapter.dispatch('intersect', 'dbt_utils')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__intersect"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.680644}, "macro.dbt_utils.default__intersect": {"unique_id": "macro.dbt_utils.default__intersect", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n intersect\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6808078}, "macro.dbt_utils.bigquery__intersect": {"unique_id": "macro.dbt_utils.bigquery__intersect", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "bigquery__intersect", "macro_sql": "{% macro bigquery__intersect() %}\n\n intersect distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.680966}, "macro.dbt_utils.escape_single_quotes": {"unique_id": "macro.dbt_utils.escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "escape_single_quotes", "macro_sql": "{% macro escape_single_quotes(expression) %}\n {{ return(adapter.dispatch('escape_single_quotes', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.681757}, "macro.dbt_utils.default__escape_single_quotes": {"unique_id": "macro.dbt_utils.default__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "default__escape_single_quotes", "macro_sql": "{% macro default__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\",\"''\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.682047}, "macro.dbt_utils.snowflake__escape_single_quotes": {"unique_id": "macro.dbt_utils.snowflake__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "snowflake__escape_single_quotes", "macro_sql": "{% macro snowflake__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\", \"\\\\'\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6824331}, "macro.dbt_utils.bigquery__escape_single_quotes": {"unique_id": "macro.dbt_utils.bigquery__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "bigquery__escape_single_quotes", "macro_sql": "{% macro bigquery__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\", \"\\\\'\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.68273}, "macro.dbt_utils.right": {"unique_id": "macro.dbt_utils.right", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n {{ return(adapter.dispatch('right', 'dbt_utils') (string_text, length_expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__right"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.683798}, "macro.dbt_utils.default__right": {"unique_id": "macro.dbt_utils.default__right", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n right(\n {{ string_text }},\n {{ length_expression }}\n )\n \n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6840808}, "macro.dbt_utils.bigquery__right": {"unique_id": "macro.dbt_utils.bigquery__right", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "bigquery__right", "macro_sql": "{% macro bigquery__right(string_text, length_expression) %}\n\n case when {{ length_expression }} = 0 \n then ''\n else \n substr(\n {{ string_text }},\n -1 * ({{ length_expression }})\n )\n end\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6844008}, "macro.dbt_utils.snowflake__right": {"unique_id": "macro.dbt_utils.snowflake__right", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "snowflake__right", "macro_sql": "{% macro snowflake__right(string_text, length_expression) %}\n\n case when {{ length_expression }} = 0 \n then ''\n else \n right(\n {{ string_text }},\n {{ length_expression }}\n )\n end\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6847239}, "macro.dbt_utils.listagg": {"unique_id": "macro.dbt_utils.listagg", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "listagg", "macro_sql": "{% macro listagg(measure, delimiter_text=\"','\", order_by_clause=none, limit_num=none) -%}\n {{ return(adapter.dispatch('listagg', 'dbt_utils') (measure, delimiter_text, order_by_clause, limit_num)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__listagg"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.688541}, "macro.dbt_utils.default__listagg": {"unique_id": "macro.dbt_utils.default__listagg", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.689406}, "macro.dbt_utils.bigquery__listagg": {"unique_id": "macro.dbt_utils.bigquery__listagg", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "bigquery__listagg", "macro_sql": "{% macro bigquery__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n {% if limit_num -%}\n limit {{ limit_num }}\n {%- endif %}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6899981}, "macro.dbt_utils.postgres__listagg": {"unique_id": "macro.dbt_utils.postgres__listagg", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6908002}, "macro.dbt_utils.redshift__listagg": {"unique_id": "macro.dbt_utils.redshift__listagg", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.692703}, "macro.dbt_utils.datediff": {"unique_id": "macro.dbt_utils.datediff", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n {{ return(adapter.dispatch('datediff', 'dbt_utils')(first_date, second_date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.697035}, "macro.dbt_utils.default__datediff": {"unique_id": "macro.dbt_utils.default__datediff", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6973891}, "macro.dbt_utils.bigquery__datediff": {"unique_id": "macro.dbt_utils.bigquery__datediff", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "bigquery__datediff", "macro_sql": "{% macro bigquery__datediff(first_date, second_date, datepart) -%}\n\n datetime_diff(\n cast({{second_date}} as datetime),\n cast({{first_date}} as datetime),\n {{datepart}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.6977332}, "macro.dbt_utils.postgres__datediff": {"unique_id": "macro.dbt_utils.postgres__datediff", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "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 ({{ dbt_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.701302}, "macro.dbt_utils.redshift__datediff": {"unique_id": "macro.dbt_utils.redshift__datediff", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "redshift__datediff", "macro_sql": "{% macro redshift__datediff(first_date, second_date, datepart) -%}\n\n {{ return(dbt_utils.default__datediff(first_date, second_date, datepart)) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.701706}, "macro.dbt_utils.safe_cast": {"unique_id": "macro.dbt_utils.safe_cast", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n {{ return(adapter.dispatch('safe_cast', 'dbt_utils') (field, type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.702516}, "macro.dbt_utils.default__safe_cast": {"unique_id": "macro.dbt_utils.default__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7028108}, "macro.dbt_utils.snowflake__safe_cast": {"unique_id": "macro.dbt_utils.snowflake__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "snowflake__safe_cast", "macro_sql": "{% macro snowflake__safe_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7030761}, "macro.dbt_utils.bigquery__safe_cast": {"unique_id": "macro.dbt_utils.bigquery__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "bigquery__safe_cast", "macro_sql": "{% macro bigquery__safe_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.703339}, "macro.dbt_utils.hash": {"unique_id": "macro.dbt_utils.hash", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "hash", "macro_sql": "{% macro hash(field) -%}\n {{ return(adapter.dispatch('hash', 'dbt_utils') (field)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.704036}, "macro.dbt_utils.default__hash": {"unique_id": "macro.dbt_utils.default__hash", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "default__hash", "macro_sql": "{% macro default__hash(field) -%}\n md5(cast({{field}} as {{dbt_utils.type_string()}}))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7043252}, "macro.dbt_utils.bigquery__hash": {"unique_id": "macro.dbt_utils.bigquery__hash", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "bigquery__hash", "macro_sql": "{% macro bigquery__hash(field) -%}\n to_hex({{dbt_utils.default__hash(field)}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.704591}, "macro.dbt_utils.cast_bool_to_text": {"unique_id": "macro.dbt_utils.cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "cast_bool_to_text", "macro_sql": "{% macro cast_bool_to_text(field) %}\n {{ adapter.dispatch('cast_bool_to_text', 'dbt_utils') (field) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.705311}, "macro.dbt_utils.default__cast_bool_to_text": {"unique_id": "macro.dbt_utils.default__cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "default__cast_bool_to_text", "macro_sql": "{% macro default__cast_bool_to_text(field) %}\n cast({{ field }} as {{ dbt_utils.type_string() }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.705614}, "macro.dbt_utils.redshift__cast_bool_to_text": {"unique_id": "macro.dbt_utils.redshift__cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.705868}, "macro.dbt_utils.identifier": {"unique_id": "macro.dbt_utils.identifier", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "identifier", "macro_sql": "{% macro identifier(value) %}\t\n {%- set error_message = '\n Warning: the `identifier` macro is no longer supported and will be deprecated in a future release of dbt-utils. \\\n Use `adapter.quote` instead. The {}.{} model triggered this warning. \\\n '.format(model.package_name, model.name) -%}\n {%- do exceptions.warn(error_message) -%}\n {{ return(adapter.dispatch('identifier', 'dbt_utils') (value)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__identifier"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.706964}, "macro.dbt_utils.default__identifier": {"unique_id": "macro.dbt_utils.default__identifier", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "default__identifier", "macro_sql": "{% macro default__identifier(value) -%}\t\n \"{{ value }}\"\t\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.707184}, "macro.dbt_utils.bigquery__identifier": {"unique_id": "macro.dbt_utils.bigquery__identifier", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "bigquery__identifier", "macro_sql": "{% macro bigquery__identifier(value) -%}\t\n `{{ value }}`\t\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7073998}, "macro.dbt_utils.any_value": {"unique_id": "macro.dbt_utils.any_value", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "any_value", "macro_sql": "{% macro any_value(expression) -%}\n {{ return(adapter.dispatch('any_value', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__any_value"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.708104}, "macro.dbt_utils.default__any_value": {"unique_id": "macro.dbt_utils.default__any_value", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "default__any_value", "macro_sql": "{% macro default__any_value(expression) -%}\n \n any_value({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7083251}, "macro.dbt_utils.postgres__any_value": {"unique_id": "macro.dbt_utils.postgres__any_value", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "postgres__any_value", "macro_sql": "{% macro postgres__any_value(expression) -%}\n {#- /*Postgres doesn't support any_value, so we're using min() to get the same result*/ -#}\n min({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.708558}, "macro.dbt_utils.position": {"unique_id": "macro.dbt_utils.position", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n {{ return(adapter.dispatch('position', 'dbt_utils') (substring_text, string_text)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__position"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7093902}, "macro.dbt_utils.default__position": {"unique_id": "macro.dbt_utils.default__position", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n position(\n {{ substring_text }} in {{ string_text }}\n )\n \n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.70969}, "macro.dbt_utils.bigquery__position": {"unique_id": "macro.dbt_utils.bigquery__position", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "bigquery__position", "macro_sql": "{% macro bigquery__position(substring_text, string_text) %}\n\n strpos(\n {{ string_text }},\n {{ substring_text }}\n \n )\n \n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7099662}, "macro.dbt_utils.string_literal": {"unique_id": "macro.dbt_utils.string_literal", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/literal.sql", "original_file_path": "macros/cross_db_utils/literal.sql", "name": "string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n {{ return(adapter.dispatch('string_literal', 'dbt_utils') (value)) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7106829}, "macro.dbt_utils.default__string_literal": {"unique_id": "macro.dbt_utils.default__string_literal", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/literal.sql", "original_file_path": "macros/cross_db_utils/literal.sql", "name": "default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n '{{ value }}'\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7109}, "macro.dbt_utils.current_timestamp": {"unique_id": "macro.dbt_utils.current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "current_timestamp", "macro_sql": "{% macro current_timestamp() -%}\n {{ return(adapter.dispatch('current_timestamp', 'dbt_utils')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.711972}, "macro.dbt_utils.default__current_timestamp": {"unique_id": "macro.dbt_utils.default__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() %}\n current_timestamp::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7122061}, "macro.dbt_utils.redshift__current_timestamp": {"unique_id": "macro.dbt_utils.redshift__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "redshift__current_timestamp", "macro_sql": "{% macro redshift__current_timestamp() %}\n getdate()\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.71236}, "macro.dbt_utils.bigquery__current_timestamp": {"unique_id": "macro.dbt_utils.bigquery__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "bigquery__current_timestamp", "macro_sql": "{% macro bigquery__current_timestamp() %}\n current_timestamp\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.712529}, "macro.dbt_utils.current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "current_timestamp_in_utc", "macro_sql": "{% macro current_timestamp_in_utc() -%}\n {{ return(adapter.dispatch('current_timestamp_in_utc', 'dbt_utils')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__current_timestamp_in_utc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.712865}, "macro.dbt_utils.default__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.default__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "default__current_timestamp_in_utc", "macro_sql": "{% macro default__current_timestamp_in_utc() %}\n {{dbt_utils.current_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.713105}, "macro.dbt_utils.snowflake__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.snowflake__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "snowflake__current_timestamp_in_utc", "macro_sql": "{% macro snowflake__current_timestamp_in_utc() %}\n convert_timezone('UTC', {{dbt_utils.current_timestamp()}})::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp", "macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.713415}, "macro.dbt_utils.postgres__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.postgres__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "postgres__current_timestamp_in_utc", "macro_sql": "{% macro postgres__current_timestamp_in_utc() %}\n (current_timestamp at time zone 'utc')::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.713662}, "macro.dbt_utils.redshift__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.redshift__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "redshift__current_timestamp_in_utc", "macro_sql": "{% macro redshift__current_timestamp_in_utc() %}\n {{ return(dbt_utils.default__current_timestamp_in_utc()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__current_timestamp_in_utc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7139342}, "macro.dbt_utils.width_bucket": {"unique_id": "macro.dbt_utils.width_bucket", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__width_bucket"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7163038}, "macro.dbt_utils.default__width_bucket": {"unique_id": "macro.dbt_utils.default__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "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_utils.safe_cast(expr, dbt_utils.type_numeric() ) }},\n {{ dbt_utils.safe_cast(bin_size, dbt_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.safe_cast", "macro.dbt_utils.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.717267}, "macro.dbt_utils.redshift__width_bucket": {"unique_id": "macro.dbt_utils.redshift__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "redshift__width_bucket", "macro_sql": "{% macro redshift__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 exactly at the bucket edge\n case\n when\n {{ dbt_utils.safe_cast(expr, dbt_utils.type_numeric() ) }} %\n {{ dbt_utils.safe_cast(bin_size, dbt_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.safe_cast", "macro.dbt_utils.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.718215}, "macro.dbt_utils.snowflake__width_bucket": {"unique_id": "macro.dbt_utils.snowflake__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.718606}, "macro.dbt_utils.array_concat": {"unique_id": "macro.dbt_utils.array_concat", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_concat.sql", "original_file_path": "macros/cross_db_utils/array_concat.sql", "name": "array_concat", "macro_sql": "{% macro array_concat(array_1, array_2) -%}\n {{ return(adapter.dispatch('array_concat', 'dbt_utils')(array_1, array_2)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__array_concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.719441}, "macro.dbt_utils.default__array_concat": {"unique_id": "macro.dbt_utils.default__array_concat", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_concat.sql", "original_file_path": "macros/cross_db_utils/array_concat.sql", "name": "default__array_concat", "macro_sql": "{% macro default__array_concat(array_1, array_2) -%}\n array_cat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.719716}, "macro.dbt_utils.bigquery__array_concat": {"unique_id": "macro.dbt_utils.bigquery__array_concat", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_concat.sql", "original_file_path": "macros/cross_db_utils/array_concat.sql", "name": "bigquery__array_concat", "macro_sql": "{% macro bigquery__array_concat(array_1, array_2) -%}\n array_concat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.719987}, "macro.dbt_utils.redshift__array_concat": {"unique_id": "macro.dbt_utils.redshift__array_concat", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_concat.sql", "original_file_path": "macros/cross_db_utils/array_concat.sql", "name": "redshift__array_concat", "macro_sql": "{% macro redshift__array_concat(array_1, array_2) -%}\n array_concat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.720256}, "macro.dbt_utils.bool_or": {"unique_id": "macro.dbt_utils.bool_or", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "bool_or", "macro_sql": "{% macro bool_or(expression) -%}\n {{ return(adapter.dispatch('bool_or', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.721023}, "macro.dbt_utils.default__bool_or": {"unique_id": "macro.dbt_utils.default__bool_or", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "default__bool_or", "macro_sql": "{% macro default__bool_or(expression) -%}\n \n bool_or({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7212439}, "macro.dbt_utils.snowflake__bool_or": {"unique_id": "macro.dbt_utils.snowflake__bool_or", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "snowflake__bool_or", "macro_sql": "{% macro snowflake__bool_or(expression) -%}\n \n boolor_agg({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.721733}, "macro.dbt_utils.bigquery__bool_or": {"unique_id": "macro.dbt_utils.bigquery__bool_or", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "bigquery__bool_or", "macro_sql": "{% macro bigquery__bool_or(expression) -%}\n \n logical_or({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.721941}, "macro.dbt_utils.last_day": {"unique_id": "macro.dbt_utils.last_day", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n {{ return(adapter.dispatch('last_day', 'dbt_utils') (date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7230139}, "macro.dbt_utils.default_last_day": {"unique_id": "macro.dbt_utils.default_last_day", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "default_last_day", "macro_sql": "\n\n\n{%- macro default_last_day(date, datepart) -%}\n cast(\n {{dbt_utils.dateadd('day', '-1',\n dbt_utils.dateadd(datepart, '1', dbt_utils.date_trunc(datepart, date))\n )}}\n as date)\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7235599}, "macro.dbt_utils.default__last_day": {"unique_id": "macro.dbt_utils.default__last_day", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n {{dbt_utils.default_last_day(date, datepart)}}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.723874}, "macro.dbt_utils.postgres__last_day": {"unique_id": "macro.dbt_utils.postgres__last_day", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "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_utils.dateadd('day', '-1',\n dbt_utils.dateadd('month', '3', dbt_utils.date_trunc(datepart, date))\n )}}\n as date)\n {%- else -%}\n {{dbt_utils.default_last_day(date, datepart)}}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.date_trunc", "macro.dbt_utils.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.724687}, "macro.dbt_utils.redshift__last_day": {"unique_id": "macro.dbt_utils.redshift__last_day", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "redshift__last_day", "macro_sql": "{% macro redshift__last_day(date, datepart) %}\n\n {{ return(dbt_utils.default__last_day(date, datepart)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.725045}, "macro.dbt_utils.split_part": {"unique_id": "macro.dbt_utils.split_part", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "split_part", "macro_sql": "{% macro split_part(string_text, delimiter_text, part_number) %}\n {{ return(adapter.dispatch('split_part', 'dbt_utils') (string_text, delimiter_text, part_number)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.727673}, "macro.dbt_utils.default__split_part": {"unique_id": "macro.dbt_utils.default__split_part", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7280152}, "macro.dbt_utils._split_part_negative": {"unique_id": "macro.dbt_utils._split_part_negative", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7284741}, "macro.dbt_utils.postgres__split_part": {"unique_id": "macro.dbt_utils.postgres__split_part", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "postgres__split_part", "macro_sql": "{% macro postgres__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n {{ dbt_utils.default__split_part(string_text, delimiter_text, part_number) }}\n {% else %}\n {{ dbt_utils._split_part_negative(string_text, delimiter_text, part_number) }}\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__split_part", "macro.dbt_utils._split_part_negative"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7291362}, "macro.dbt_utils.redshift__split_part": {"unique_id": "macro.dbt_utils.redshift__split_part", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "redshift__split_part", "macro_sql": "{% macro redshift__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n {{ dbt_utils.default__split_part(string_text, delimiter_text, part_number) }}\n {% else %}\n {{ dbt_utils._split_part_negative(string_text, delimiter_text, part_number) }}\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__split_part", "macro.dbt_utils._split_part_negative"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7298088}, "macro.dbt_utils.bigquery__split_part": {"unique_id": "macro.dbt_utils.bigquery__split_part", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "bigquery__split_part", "macro_sql": "{% macro bigquery__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n split(\n {{ string_text }},\n {{ delimiter_text }}\n )[safe_offset({{ part_number - 1 }})]\n {% else %}\n split(\n {{ string_text }},\n {{ delimiter_text }}\n )[safe_offset(\n length({{ string_text }}) \n - length(\n replace({{ string_text }}, {{ delimiter_text }}, '')\n ) + 1\n )]\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.730538}, "macro.dbt_utils.date_trunc": {"unique_id": "macro.dbt_utils.date_trunc", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n {{ return(adapter.dispatch('date_trunc', 'dbt_utils') (datepart, date)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.731317}, "macro.dbt_utils.default__date_trunc": {"unique_id": "macro.dbt_utils.default__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) -%}\n date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.731594}, "macro.dbt_utils.bigquery__date_trunc": {"unique_id": "macro.dbt_utils.bigquery__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "bigquery__date_trunc", "macro_sql": "{% macro bigquery__date_trunc(datepart, date) -%}\n timestamp_trunc(\n cast({{date}} as timestamp),\n {{datepart}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7318652}, "macro.dbt_utils.array_construct": {"unique_id": "macro.dbt_utils.array_construct", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_construct.sql", "original_file_path": "macros/cross_db_utils/array_construct.sql", "name": "array_construct", "macro_sql": "{% macro array_construct(inputs = [], data_type = api.Column.translate_type('integer')) -%}\n {{ return(adapter.dispatch('array_construct', 'dbt_utils')(inputs, data_type)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__array_construct"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.73294}, "macro.dbt_utils.default__array_construct": {"unique_id": "macro.dbt_utils.default__array_construct", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_construct.sql", "original_file_path": "macros/cross_db_utils/array_construct.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.733419}, "macro.dbt_utils.snowflake__array_construct": {"unique_id": "macro.dbt_utils.snowflake__array_construct", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_construct.sql", "original_file_path": "macros/cross_db_utils/array_construct.sql", "name": "snowflake__array_construct", "macro_sql": "{% macro snowflake__array_construct(inputs, data_type) -%}\n array_construct( {{ inputs|join(' , ') }} )\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.733726}, "macro.dbt_utils.redshift__array_construct": {"unique_id": "macro.dbt_utils.redshift__array_construct", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_construct.sql", "original_file_path": "macros/cross_db_utils/array_construct.sql", "name": "redshift__array_construct", "macro_sql": "{% macro redshift__array_construct(inputs, data_type) -%}\n array( {{ inputs|join(' , ') }} )\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.734018}, "macro.dbt_utils.bigquery__array_construct": {"unique_id": "macro.dbt_utils.bigquery__array_construct", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_construct.sql", "original_file_path": "macros/cross_db_utils/array_construct.sql", "name": "bigquery__array_construct", "macro_sql": "{% macro bigquery__array_construct(inputs, data_type) -%}\n [ {{ inputs|join(' , ') }} ]\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7343118}, "macro.dbt_utils._is_ephemeral": {"unique_id": "macro.dbt_utils._is_ephemeral", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/_is_ephemeral.sql", "original_file_path": "macros/cross_db_utils/_is_ephemeral.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7362292}, "macro.dbt_utils.array_append": {"unique_id": "macro.dbt_utils.array_append", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_append.sql", "original_file_path": "macros/cross_db_utils/array_append.sql", "name": "array_append", "macro_sql": "{% macro array_append(array, new_element) -%}\n {{ return(adapter.dispatch('array_append', 'dbt_utils')(array, new_element)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__array_append"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.737065}, "macro.dbt_utils.default__array_append": {"unique_id": "macro.dbt_utils.default__array_append", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_append.sql", "original_file_path": "macros/cross_db_utils/array_append.sql", "name": "default__array_append", "macro_sql": "{% macro default__array_append(array, new_element) -%}\n array_append({{ array }}, {{ new_element }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.737344}, "macro.dbt_utils.bigquery__array_append": {"unique_id": "macro.dbt_utils.bigquery__array_append", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_append.sql", "original_file_path": "macros/cross_db_utils/array_append.sql", "name": "bigquery__array_append", "macro_sql": "{% macro bigquery__array_append(array, new_element) -%}\n {{ dbt_utils.array_concat(array, dbt_utils.array_construct([new_element])) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.array_concat", "macro.dbt_utils.array_construct"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.737725}, "macro.dbt_utils.redshift__array_append": {"unique_id": "macro.dbt_utils.redshift__array_append", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_append.sql", "original_file_path": "macros/cross_db_utils/array_append.sql", "name": "redshift__array_append", "macro_sql": "{% macro redshift__array_append(array, new_element) -%}\n {{ dbt_utils.array_concat(array, dbt_utils.array_construct([new_element])) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.array_concat", "macro.dbt_utils.array_construct"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.738104}, "macro.dbt_utils.get_period_boundaries": {"unique_id": "macro.dbt_utils.get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "get_period_boundaries", "macro_sql": "{% macro get_period_boundaries(target_schema, target_table, timestamp_field, start_date, stop_date, period) -%}\n {{ return(adapter.dispatch('get_period_boundaries', 'dbt_utils')(target_schema, target_table, timestamp_field, start_date, stop_date, period)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_period_boundaries"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7474508}, "macro.dbt_utils.default__get_period_boundaries": {"unique_id": "macro.dbt_utils.default__get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "default__get_period_boundaries", "macro_sql": "{% macro default__get_period_boundaries(target_schema, target_table, timestamp_field, start_date, stop_date, period) -%}\n\n {% call statement('period_boundaries', fetch_result=True) -%}\n with data as (\n select\n coalesce(max(\"{{timestamp_field}}\"), '{{start_date}}')::timestamp as start_timestamp,\n coalesce(\n {{dbt_utils.dateadd('millisecond',\n -1,\n \"nullif('\" ~ stop_date ~ \"','')::timestamp\")}},\n {{dbt_utils.current_timestamp()}}\n ) as stop_timestamp\n from \"{{target_schema}}\".\"{{target_table}}\"\n )\n\n select\n start_timestamp,\n stop_timestamp,\n {{dbt_utils.datediff('start_timestamp',\n 'stop_timestamp',\n period)}} + 1 as num_periods\n from data\n {%- endcall %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.dateadd", "macro.dbt_utils.current_timestamp", "macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.748514}, "macro.dbt_utils.get_period_sql": {"unique_id": "macro.dbt_utils.get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "get_period_sql", "macro_sql": "{% macro get_period_sql(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset) -%}\n {{ return(adapter.dispatch('get_period_sql', 'dbt_utils')(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_period_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7491488}, "macro.dbt_utils.default__get_period_sql": {"unique_id": "macro.dbt_utils.default__get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "default__get_period_sql", "macro_sql": "{% macro default__get_period_sql(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset) -%}\n\n {%- set period_filter -%}\n (\"{{timestamp_field}}\" > '{{start_timestamp}}'::timestamp + interval '{{offset}} {{period}}' and\n \"{{timestamp_field}}\" <= '{{start_timestamp}}'::timestamp + interval '{{offset}} {{period}}' + interval '1 {{period}}' and\n \"{{timestamp_field}}\" < '{{stop_timestamp}}'::timestamp)\n {%- endset -%}\n\n {%- set filtered_sql = sql | replace(\"__PERIOD_FILTER__\", period_filter) -%}\n\n select\n {{target_cols_csv}}\n from (\n {{filtered_sql}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.750159}, "macro.dbt_utils.materialization_insert_by_period_default": {"unique_id": "macro.dbt_utils.materialization_insert_by_period_default", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "materialization_insert_by_period_default", "macro_sql": "{% materialization insert_by_period, default -%}\n {%- set timestamp_field = config.require('timestamp_field') -%}\n {%- set start_date = config.require('start_date') -%}\n {%- set stop_date = config.get('stop_date') or '' -%}\n {%- set period = config.get('period') or 'week' -%}\n\n {%- if sql.find('__PERIOD_FILTER__') == -1 -%}\n {%- set error_message -%}\n Model '{{ model.unique_id }}' does not include the required string '__PERIOD_FILTER__' in its sql\n {%- endset -%}\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n\n {%- set identifier = model['name'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier, schema=schema, type='table') -%}\n\n {%- set non_destructive_mode = (flags.NON_DESTRUCTIVE == True) -%}\n {%- set full_refresh_mode = (flags.FULL_REFRESH == True) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_not_as_table = (old_relation is not none and not old_relation.is_table) -%}\n\n {%- set should_truncate = (non_destructive_mode and full_refresh_mode and exists_as_table) -%}\n {%- set should_drop = (not should_truncate and (full_refresh_mode or exists_not_as_table)) -%}\n {%- set force_create = (flags.FULL_REFRESH and not flags.NON_DESTRUCTIVE) -%}\n\n -- setup\n {% if old_relation is none -%}\n -- noop\n {%- elif should_truncate -%}\n {{adapter.truncate_relation(old_relation)}}\n {%- elif should_drop -%}\n {{adapter.drop_relation(old_relation)}}\n {%- set old_relation = none -%}\n {%- endif %}\n\n {{run_hooks(pre_hooks, inside_transaction=False)}}\n\n -- `begin` happens here, so `commit` after it to finish the transaction\n {{run_hooks(pre_hooks, inside_transaction=True)}}\n {% call statement() -%}\n begin; -- make extra sure we've closed out the transaction\n commit;\n {%- endcall %}\n\n -- build model\n {% if force_create or old_relation is none -%}\n {# Create an empty target table -#}\n {% call statement('main') -%}\n {%- set empty_sql = sql | replace(\"__PERIOD_FILTER__\", 'false') -%}\n {{create_table_as(False, target_relation, empty_sql)}}\n {%- endcall %}\n {%- endif %}\n\n {% set _ = dbt_utils.get_period_boundaries(schema,\n identifier,\n timestamp_field,\n start_date,\n stop_date,\n period) %}\n {%- set start_timestamp = load_result('period_boundaries')['data'][0][0] | string -%}\n {%- set stop_timestamp = load_result('period_boundaries')['data'][0][1] | string -%}\n {%- set num_periods = load_result('period_boundaries')['data'][0][2] | int -%}\n\n {% set target_columns = adapter.get_columns_in_relation(target_relation) %}\n {%- set target_cols_csv = target_columns | map(attribute='quoted') | join(', ') -%}\n {%- set loop_vars = {'sum_rows_inserted': 0} -%}\n\n -- commit each period as a separate transaction\n {% for i in range(num_periods) -%}\n {%- set msg = \"Running for \" ~ period ~ \" \" ~ (i + 1) ~ \" of \" ~ (num_periods) -%}\n {{ dbt_utils.log_info(msg) }}\n\n {%- set tmp_identifier = model['name'] ~ '__dbt_incremental_period' ~ i ~ '_tmp' -%}\n {%- set tmp_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema, type='table') -%}\n {% call statement() -%}\n {% set tmp_table_sql = dbt_utils.get_period_sql(target_cols_csv,\n sql,\n timestamp_field,\n period,\n start_timestamp,\n stop_timestamp,\n i) %}\n {{dbt.create_table_as(True, tmp_relation, tmp_table_sql)}}\n {%- endcall %}\n\n {{adapter.expand_target_column_types(from_relation=tmp_relation,\n to_relation=target_relation)}}\n {%- set name = 'main-' ~ i -%}\n {% call statement(name, fetch_result=True) -%}\n insert into {{target_relation}} ({{target_cols_csv}})\n (\n select\n {{target_cols_csv}}\n from {{tmp_relation.include(schema=False)}}\n );\n {%- endcall %}\n {% set result = load_result('main-' ~ i) %}\n {% if 'response' in result.keys() %} {# added in v0.19.0 #}\n {% set rows_inserted = result['response']['rows_affected'] %}\n {% else %} {# older versions #}\n {% set rows_inserted = result['status'].split(\" \")[2] | int %}\n {% endif %}\n \n {%- set sum_rows_inserted = loop_vars['sum_rows_inserted'] + rows_inserted -%}\n {%- if loop_vars.update({'sum_rows_inserted': sum_rows_inserted}) %} {% endif -%}\n\n {%- set msg = \"Ran for \" ~ period ~ \" \" ~ (i + 1) ~ \" of \" ~ (num_periods) ~ \"; \" ~ rows_inserted ~ \" records inserted\" -%}\n {{ dbt_utils.log_info(msg) }}\n\n {%- endfor %}\n\n {% call statement() -%}\n begin;\n {%- endcall %}\n\n {{run_hooks(post_hooks, inside_transaction=True)}}\n\n {% call statement() -%}\n commit;\n {%- endcall %}\n\n {{run_hooks(post_hooks, inside_transaction=False)}}\n\n {%- set status_string = \"INSERT \" ~ loop_vars['sum_rows_inserted'] -%}\n\n {% call noop_statement('main', status_string) -%}\n -- no-op\n {%- endcall %}\n\n -- Return the relations created in this materialization\n {{ return({'relations': [target_relation]}) }} \n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt_utils.get_period_boundaries", "macro.dbt_utils.log_info", "macro.dbt_utils.get_period_sql", "macro.dbt.noop_statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.760305}, "macro.dbt_utils.get_url_host": {"unique_id": "macro.dbt_utils.get_url_host", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "get_url_host", "macro_sql": "{% macro get_url_host(field) -%}\n {{ return(adapter.dispatch('get_url_host', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_host"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.761163}, "macro.dbt_utils.default__get_url_host": {"unique_id": "macro.dbt_utils.default__get_url_host", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "default__get_url_host", "macro_sql": "{% macro default__get_url_host(field) -%}\n\n{%- set parsed =\n dbt_utils.split_part(\n dbt_utils.split_part(\n dbt_utils.replace(\n dbt_utils.replace(\n dbt_utils.replace(field, \"'android-app://'\", \"''\"\n ), \"'http://'\", \"''\"\n ), \"'https://'\", \"''\"\n ), \"'/'\", 1\n ), \"'?'\", 1\n )\n\n-%}\n\n\n {{ dbt_utils.safe_cast(\n parsed,\n dbt_utils.type_string()\n )}}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.split_part", "macro.dbt_utils.replace", "macro.dbt_utils.safe_cast", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7621272}, "macro.dbt_utils.get_url_path": {"unique_id": "macro.dbt_utils.get_url_path", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "get_url_path", "macro_sql": "{% macro get_url_path(field) -%}\n {{ return(adapter.dispatch('get_url_path', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_path"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7631302}, "macro.dbt_utils.default__get_url_path": {"unique_id": "macro.dbt_utils.default__get_url_path", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "default__get_url_path", "macro_sql": "{% macro default__get_url_path(field) -%}\n\n {%- set stripped_url = \n dbt_utils.replace(\n dbt_utils.replace(field, \"'http://'\", \"''\"), \"'https://'\", \"''\")\n -%}\n\n {%- set first_slash_pos -%}\n coalesce(\n nullif({{dbt_utils.position(\"'/'\", stripped_url)}}, 0),\n {{dbt_utils.position(\"'?'\", stripped_url)}} - 1\n )\n {%- endset -%}\n\n {%- set parsed_path =\n dbt_utils.split_part(\n dbt_utils.right(\n stripped_url, \n dbt_utils.length(stripped_url) ~ \"-\" ~ first_slash_pos\n ), \n \"'?'\", 1\n )\n -%}\n\n {{ dbt_utils.safe_cast(\n parsed_path,\n dbt_utils.type_string()\n )}}\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.replace", "macro.dbt_utils.position", "macro.dbt_utils.split_part", "macro.dbt_utils.right", "macro.dbt_utils.length", "macro.dbt_utils.safe_cast", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7644649}, "macro.dbt_utils.get_url_parameter": {"unique_id": "macro.dbt_utils.get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.765214}, "macro.dbt_utils.default__get_url_parameter": {"unique_id": "macro.dbt_utils.default__get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "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_utils.split_part(dbt_utils.split_part(field, formatted_url_parameter, 2), \"'&'\", 1) -%}\n\nnullif({{ split }},'')\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7658439}, "macro.dbt_utils.test_fewer_rows_than": {"unique_id": "macro.dbt_utils.test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "test_fewer_rows_than", "macro_sql": "{% test fewer_rows_than(model, compare_model) %}\n {{ return(adapter.dispatch('test_fewer_rows_than', 'dbt_utils')(model, compare_model)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_fewer_rows_than"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.76689}, "macro.dbt_utils.default__test_fewer_rows_than": {"unique_id": "macro.dbt_utils.default__test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "default__test_fewer_rows_than", "macro_sql": "{% macro default__test_fewer_rows_than(model, compare_model) %}\n\n{{ config(fail_calc = 'coalesce(row_count_delta, 0)') }}\n\nwith a as (\n\n select count(*) as count_our_model from {{ model }}\n\n),\nb as (\n\n select count(*) as count_comparison_model from {{ compare_model }}\n\n),\ncounts as (\n\n select\n count_our_model,\n count_comparison_model\n from a\n cross join b\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7673442}, "macro.dbt_utils.test_equal_rowcount": {"unique_id": "macro.dbt_utils.test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "test_equal_rowcount", "macro_sql": "{% test equal_rowcount(model, compare_model) %}\n {{ return(adapter.dispatch('test_equal_rowcount', 'dbt_utils')(model, compare_model)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equal_rowcount"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7682}, "macro.dbt_utils.default__test_equal_rowcount": {"unique_id": "macro.dbt_utils.default__test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "default__test_equal_rowcount", "macro_sql": "{% macro default__test_equal_rowcount(model, compare_model) %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = '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\nwith a as (\n\n select count(*) as count_a from {{ model }}\n\n),\nb as (\n\n select count(*) as count_b from {{ compare_model }}\n\n),\nfinal as (\n\n select\n count_a,\n count_b,\n abs(count_a - count_b) as diff_count\n from a\n cross join b\n\n)\n\nselect * from final\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.768806}, "macro.dbt_utils.test_relationships_where": {"unique_id": "macro.dbt_utils.test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_relationships_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.770058}, "macro.dbt_utils.default__test_relationships_where": {"unique_id": "macro.dbt_utils.default__test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.770742}, "macro.dbt_utils.test_recency": {"unique_id": "macro.dbt_utils.test_recency", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "test_recency", "macro_sql": "{% test recency(model, field, datepart, interval) %}\n {{ return(adapter.dispatch('test_recency', 'dbt_utils')(model, field, datepart, interval)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_recency"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7716322}, "macro.dbt_utils.default__test_recency": {"unique_id": "macro.dbt_utils.default__test_recency", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "default__test_recency", "macro_sql": "{% macro default__test_recency(model, field, datepart, interval) %}\n\n{% set threshold = dbt_utils.dateadd(datepart, interval * -1, dbt_utils.current_timestamp()) %}\n\nwith recency as (\n\n select max({{field}}) as most_recent\n from {{ model }}\n\n)\n\nselect\n\n most_recent,\n {{ threshold }} as threshold\n\nfrom recency\nwhere most_recent < {{ threshold }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7722938}, "macro.dbt_utils.test_not_constant": {"unique_id": "macro.dbt_utils.test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "test_not_constant", "macro_sql": "{% test not_constant(model, column_name) %}\n {{ return(adapter.dispatch('test_not_constant', 'dbt_utils')(model, column_name)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_constant"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.773043}, "macro.dbt_utils.default__test_not_constant": {"unique_id": "macro.dbt_utils.default__test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "default__test_not_constant", "macro_sql": "{% macro default__test_not_constant(model, column_name) %}\n\n\nselect\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n count(distinct {{ column_name }}) as filler_column\n\nfrom {{ model }}\n\nhaving count(distinct {{ column_name }}) = 1\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.773397}, "macro.dbt_utils.test_accepted_range": {"unique_id": "macro.dbt_utils.test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_accepted_range"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7746089}, "macro.dbt_utils.default__test_accepted_range": {"unique_id": "macro.dbt_utils.default__test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.775657}, "macro.dbt_utils.test_not_accepted_values": {"unique_id": "macro.dbt_utils.test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.77676}, "macro.dbt_utils.default__test_not_accepted_values": {"unique_id": "macro.dbt_utils.default__test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.777538}, "macro.dbt_utils.test_unique_where": {"unique_id": "macro.dbt_utils.test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_unique_where.sql", "original_file_path": "macros/generic_tests/test_unique_where.sql", "name": "test_unique_where", "macro_sql": "{% test unique_where(model, column_name) %}\r\n {%- set deprecation_warning = '\r\n Warning: `dbt_utils.unique_where` is no longer supported.\r\n Starting in dbt v0.20.0, the built-in `unique` test supports a `where` config.\r\n ' -%}\r\n {%- do exceptions.warn(deprecation_warning) -%}\r\n {{ return(adapter.dispatch('test_unique_where', 'dbt_utils')(model, column_name)) }}\r\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7784698}, "macro.dbt_utils.default__test_unique_where": {"unique_id": "macro.dbt_utils.default__test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_unique_where.sql", "original_file_path": "macros/generic_tests/test_unique_where.sql", "name": "default__test_unique_where", "macro_sql": "{% macro default__test_unique_where(model, column_name) %}\r\n {{ return(test_unique(model, column_name)) }}\r\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.test_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7788138}, "macro.dbt_utils.test_at_least_one": {"unique_id": "macro.dbt_utils.test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "test_at_least_one", "macro_sql": "{% test at_least_one(model, column_name) %}\n {{ return(adapter.dispatch('test_at_least_one', 'dbt_utils')(model, column_name)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_at_least_one"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7795799}, "macro.dbt_utils.default__test_at_least_one": {"unique_id": "macro.dbt_utils.default__test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "default__test_at_least_one", "macro_sql": "{% macro default__test_at_least_one(model, column_name) %}\n\nselect *\nfrom (\n select\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n count({{ column_name }}) as filler_column\n\n from {{ model }}\n\n having count({{ column_name }}) = 0\n\n) validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.779943}, "macro.dbt_utils.test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_combination_of_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.781139}, "macro.dbt_utils.default__test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.default__test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.782441}, "macro.dbt_utils.test_cardinality_equality": {"unique_id": "macro.dbt_utils.test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_cardinality_equality"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7835221}, "macro.dbt_utils.default__test_cardinality_equality": {"unique_id": "macro.dbt_utils.default__test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "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_utils.except() }}\n select *\n from table_b\n),\n\nexcept_b as (\n select *\n from table_b\n {{ dbt_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7842119}, "macro.dbt_utils.test_expression_is_true": {"unique_id": "macro.dbt_utils.test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "test_expression_is_true", "macro_sql": "{% test expression_is_true(model, expression, column_name=None, condition='1=1') %}\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 {{ return(adapter.dispatch('test_expression_is_true', 'dbt_utils')(model, expression, column_name, condition)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.785214}, "macro.dbt_utils.default__test_expression_is_true": {"unique_id": "macro.dbt_utils.default__test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "default__test_expression_is_true", "macro_sql": "{% macro default__test_expression_is_true(model, expression, column_name, condition) %}\n\nwith meet_condition as (\n select * from {{ model }} where {{ condition }}\n)\n\nselect\n *\nfrom meet_condition\n{% if column_name is none %}\nwhere not({{ expression }})\n{%- else %}\nwhere not({{ column_name }} {{ expression }})\n{%- endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7858062}, "macro.dbt_utils.test_not_null_proportion": {"unique_id": "macro.dbt_utils.test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "test_not_null_proportion", "macro_sql": "{% macro test_not_null_proportion(model) %}\n {{ return(adapter.dispatch('test_not_null_proportion', 'dbt_utils')(model, **kwargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_proportion"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.786714}, "macro.dbt_utils.default__test_not_null_proportion": {"unique_id": "macro.dbt_utils.default__test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "default__test_not_null_proportion", "macro_sql": "{% macro default__test_not_null_proportion(model) %}\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\nwith validation as (\n select\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),\nvalidation_errors as (\n select\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.787759}, "macro.dbt_utils.test_sequential_values": {"unique_id": "macro.dbt_utils.test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "test_sequential_values", "macro_sql": "{% test sequential_values(model, column_name, interval=1, datepart=None) %}\n\n {{ return(adapter.dispatch('test_sequential_values', 'dbt_utils')(model, column_name, interval, datepart)) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_sequential_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7890189}, "macro.dbt_utils.default__test_sequential_values": {"unique_id": "macro.dbt_utils.default__test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "default__test_sequential_values", "macro_sql": "{% macro default__test_sequential_values(model, column_name, interval=1, datepart=None) %}\n\n{% set previous_column_name = \"previous_\" ~ dbt_utils.slugify(column_name) %}\n\nwith windowed as (\n\n select\n {{ column_name }},\n lag({{ column_name }}) over (\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_utils.type_timestamp() }})= cast({{ dbt_utils.dateadd(datepart, interval, previous_column_name) }} as {{ dbt_utils.type_timestamp() }}))\n {% else %}\n where not({{ column_name }} = {{ previous_column_name }} + {{ interval }})\n {% endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.slugify", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7903621}, "macro.dbt_utils.test_not_null_where": {"unique_id": "macro.dbt_utils.test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_not_null_where.sql", "original_file_path": "macros/generic_tests/test_not_null_where.sql", "name": "test_not_null_where", "macro_sql": "{% test not_null_where(model, column_name) %}\r\n {%- set deprecation_warning = '\r\n Warning: `dbt_utils.not_null_where` is no longer supported.\r\n Starting in dbt v0.20.0, the built-in `not_null` test supports a `where` config.\r\n ' -%}\r\n {%- do exceptions.warn(deprecation_warning) -%}\r\n {{ return(adapter.dispatch('test_not_null_where', 'dbt_utils')(model, column_name)) }}\r\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7912982}, "macro.dbt_utils.default__test_not_null_where": {"unique_id": "macro.dbt_utils.default__test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_not_null_where.sql", "original_file_path": "macros/generic_tests/test_not_null_where.sql", "name": "default__test_not_null_where", "macro_sql": "{% macro default__test_not_null_where(model, column_name) %}\r\n {{ return(test_not_null(model, column_name)) }}\r\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.791648}, "macro.dbt_utils.test_equality": {"unique_id": "macro.dbt_utils.test_equality", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equality"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.7930071}, "macro.dbt_utils.default__test_equality": {"unique_id": "macro.dbt_utils.default__test_equality", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "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_utils.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_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.794774}, "macro.dbt_utils.test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_mutually_exclusive_ranges"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.799762}, "macro.dbt_utils.default__test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.default__test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "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 }}\n ) as next_lower_bound,\n\n row_number() over (\n {{ partition_clause }}\n order by {{ lower_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 nore 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.802848}, "macro.dbt_utils.pretty_log_format": {"unique_id": "macro.dbt_utils.pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "pretty_log_format", "macro_sql": "{% macro pretty_log_format(message) %}\n {{ return(adapter.dispatch('pretty_log_format', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.803522}, "macro.dbt_utils.default__pretty_log_format": {"unique_id": "macro.dbt_utils.default__pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "default__pretty_log_format", "macro_sql": "{% macro default__pretty_log_format(message) %}\n {{ return( dbt_utils.pretty_time() ~ ' + ' ~ message) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.803861}, "macro.dbt_utils.pretty_time": {"unique_id": "macro.dbt_utils.pretty_time", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "pretty_time", "macro_sql": "{% macro pretty_time(format='%H:%M:%S') %}\n {{ return(adapter.dispatch('pretty_time', 'dbt_utils')(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.804553}, "macro.dbt_utils.default__pretty_time": {"unique_id": "macro.dbt_utils.default__pretty_time", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "default__pretty_time", "macro_sql": "{% macro default__pretty_time(format='%H:%M:%S') %}\n {{ return(modules.datetime.datetime.now().strftime(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.80495}, "macro.dbt_utils.log_info": {"unique_id": "macro.dbt_utils.log_info", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "log_info", "macro_sql": "{% macro log_info(message) %}\n {{ return(adapter.dispatch('log_info', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__log_info"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.805611}, "macro.dbt_utils.default__log_info": {"unique_id": "macro.dbt_utils.default__log_info", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "default__log_info", "macro_sql": "{% macro default__log_info(message) %}\n {{ log(dbt_utils.pretty_log_format(message), info=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.805954}, "macro.dbt_utils.slugify": {"unique_id": "macro.dbt_utils.slugify", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/slugify.sql", "original_file_path": "macros/jinja_helpers/slugify.sql", "name": "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\n{{ return(string) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8069959}, "macro.dbt_utils.get_intervals_between": {"unique_id": "macro.dbt_utils.get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8083048}, "macro.dbt_utils.default__get_intervals_between": {"unique_id": "macro.dbt_utils.default__get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.809498}, "macro.dbt_utils.date_spine": {"unique_id": "macro.dbt_utils.date_spine", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.809972}, "macro.dbt_utils.default__date_spine": {"unique_id": "macro.dbt_utils.default__date_spine", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 \"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_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.generate_series", "macro.dbt_utils.get_intervals_between", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.810699}, "macro.dbt_utils.nullcheck_table": {"unique_id": "macro.dbt_utils.nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "nullcheck_table", "macro_sql": "{% macro nullcheck_table(relation) %}\n {{ return(adapter.dispatch('nullcheck_table', 'dbt_utils')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.811439}, "macro.dbt_utils.default__nullcheck_table": {"unique_id": "macro.dbt_utils.default__nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.812243}, "macro.dbt_utils.get_relations_by_pattern": {"unique_id": "macro.dbt_utils.get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8135538}, "macro.dbt_utils.default__get_relations_by_pattern": {"unique_id": "macro.dbt_utils.default__get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8152692}, "macro.dbt_utils.get_powers_of_two": {"unique_id": "macro.dbt_utils.get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.816757}, "macro.dbt_utils.default__get_powers_of_two": {"unique_id": "macro.dbt_utils.default__get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.817596}, "macro.dbt_utils.generate_series": {"unique_id": "macro.dbt_utils.generate_series", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.817983}, "macro.dbt_utils.default__generate_series": {"unique_id": "macro.dbt_utils.default__generate_series", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8190432}, "macro.dbt_utils.get_relations_by_prefix": {"unique_id": "macro.dbt_utils.get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.820353}, "macro.dbt_utils.default__get_relations_by_prefix": {"unique_id": "macro.dbt_utils.default__get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8220842}, "macro.dbt_utils.get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8230028}, "macro.dbt_utils.default__get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.82357}, "macro.dbt_utils.star": {"unique_id": "macro.dbt_utils.star", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "star", "macro_sql": "{% macro star(from, relation_alias=False, except=[], prefix='', suffix='') -%}\n {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.824933}, "macro.dbt_utils.default__star": {"unique_id": "macro.dbt_utils.default__star", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "default__star", "macro_sql": "{% macro default__star(from, relation_alias=False, except=[], prefix='', suffix='') -%}\n {%- do dbt_utils._is_relation(from, 'star') -%}\n {%- do dbt_utils._is_ephemeral(from, 'star') -%}\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 cols = dbt_utils.get_filtered_columns_in_relation(from, except) %}\n\n {%- if cols|length <= 0 -%}\n {{- return('*') -}}\n {%- else -%}\n {%- for col in cols %}\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}{{ adapter.quote(col)|trim }} {%- if prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }} {%- endif -%}\n {%- if not loop.last %},{{ '\\n ' }}{% endif %}\n {%- endfor -%}\n {% endif %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1657577413.8269382}, "macro.dbt_utils.unpivot": {"unique_id": "macro.dbt_utils.unpivot", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "unpivot", "macro_sql": "{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', table=none) -%}\n {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name, table)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8299289}, "macro.dbt_utils.default__unpivot": {"unique_id": "macro.dbt_utils.default__unpivot", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "default__unpivot", "macro_sql": "{% macro default__unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', table=none) -%}\n\n {% if table %}\n {%- set error_message = '\n Warning: the `unpivot` macro no longer accepts a `table` parameter. \\\n This parameter will be deprecated in a future release of dbt-utils. Use the `relation` parameter instead. \\\n The {}.{} model triggered this warning. \\\n '.format(model.package_name, model.name) -%}\n {%- do exceptions.warn(error_message) -%}\n {% endif %}\n\n {% if relation and table %}\n {{ exceptions.raise_compiler_error(\"Error: both the `relation` and `table` parameters were provided to `unpivot` macro. Choose one only (we recommend `relation`).\") }}\n {% elif not relation and table %}\n {% set relation=table %}\n {% elif not relation and not table %}\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_utils.type_string() }}) as {{ field_name }},\n cast( {% if col.data_type == 'boolean' %}\n {{ dbt_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.type_string", "macro.dbt_utils.cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.83408}, "macro.dbt_utils.union_relations": {"unique_id": "macro.dbt_utils.union_relations", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__union_relations"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.83836}, "macro.dbt_utils.default__union_relations": {"unique_id": "macro.dbt_utils.default__union_relations", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "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\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 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 {%- 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 cast({{ dbt_utils.string_literal(relation) }} as {{ dbt_utils.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 {{ 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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.string_literal", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8443148}, "macro.dbt_utils.group_by": {"unique_id": "macro.dbt_utils.group_by", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "group_by", "macro_sql": "{%- macro group_by(n) -%}\n {{ return(adapter.dispatch('group_by', 'dbt_utils')(n)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__group_by"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8450282}, "macro.dbt_utils.default__group_by": {"unique_id": "macro.dbt_utils.default__group_by", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.84553}, "macro.dbt_utils.deduplicate": {"unique_id": "macro.dbt_utils.deduplicate", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "deduplicate", "macro_sql": "{%- macro deduplicate(relation, partition_by, order_by=none, relation_alias=none) -%}\n\n {%- set error_message_group_by -%}\nWarning: the `group_by` parameter of the `deduplicate` macro is no longer supported and will be deprecated in a future release of dbt-utils.\nUse `partition_by` instead.\nThe {{ model.package_name }}.{{ model.name }} model triggered this warning.\n {%- endset -%}\n\n {% if kwargs.get('group_by') %}\n {%- do exceptions.warn(error_message_group_by) -%}\n {%- endif -%}\n\n {%- set error_message_order_by -%}\nWarning: `order_by` as an optional parameter of the `deduplicate` macro is no longer supported and will be deprecated in a future release of dbt-utils.\nSupply a non-null value for `order_by` instead.\nThe {{ model.package_name }}.{{ model.name }} model triggered this warning.\n {%- endset -%}\n\n {% if not order_by %}\n {%- do exceptions.warn(error_message_order_by) -%}\n {%- endif -%}\n\n {%- set error_message_alias -%}\nWarning: the `relation_alias` parameter of the `deduplicate` macro is no longer supported and will be deprecated in a future release of dbt-utils.\nIf you were using `relation_alias` to point to a CTE previously then you can now pass the alias directly to `relation` instead.\nThe {{ model.package_name }}.{{ model.name }} model triggered this warning.\n {%- endset -%}\n\n {% if relation_alias %}\n {%- do exceptions.warn(error_message_alias) -%}\n {%- endif -%}\n\n {% set partition_by = partition_by or kwargs.get('group_by') %}\n {% set relation = relation_alias or relation %}\n {% set order_by = order_by or \"'1'\" %}\n\n {{ return(adapter.dispatch('deduplicate', 'dbt_utils')(relation, partition_by, order_by)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8498838}, "macro.dbt_utils.default__deduplicate": {"unique_id": "macro.dbt_utils.default__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.85033}, "macro.dbt_utils.redshift__deduplicate": {"unique_id": "macro.dbt_utils.redshift__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8507462}, "macro.dbt_utils.postgres__deduplicate": {"unique_id": "macro.dbt_utils.postgres__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.851149}, "macro.dbt_utils.snowflake__deduplicate": {"unique_id": "macro.dbt_utils.snowflake__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8515131}, "macro.dbt_utils.bigquery__deduplicate": {"unique_id": "macro.dbt_utils.bigquery__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.851851}, "macro.dbt_utils.surrogate_key": {"unique_id": "macro.dbt_utils.surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "surrogate_key", "macro_sql": "{%- macro surrogate_key(field_list) -%}\n {# needed for safe_add to allow for non-keyword arguments see SO post #}\n {# https://stackoverflow.com/questions/13944751/args-kwargs-in-jinja2-macros #}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('surrogate_key', 'dbt_utils')(field_list, *varargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.852989}, "macro.dbt_utils.default__surrogate_key": {"unique_id": "macro.dbt_utils.default__surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "default__surrogate_key", "macro_sql": "\n\n{%- macro default__surrogate_key(field_list) -%}\n\n{%- if varargs|length >= 1 or field_list is string %}\n\n{%- set error_message = '\nWarning: the `surrogate_key` macro now takes a single list argument instead of \\\nmultiple string arguments. Support for multiple string arguments will be \\\ndeprecated in a future release of dbt-utils. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.warn(error_message) -%}\n\n{# first argument is not included in varargs, so add first element to field_list_xf #}\n{%- set field_list_xf = [field_list] -%}\n\n{%- for field in varargs %}\n{%- set _ = field_list_xf.append(field) -%}\n{%- endfor -%}\n\n{%- else -%}\n\n{# if using list, just set field_list_xf as field_list #}\n{%- set field_list_xf = field_list -%}\n\n{%- endif -%}\n\n\n{%- set fields = [] -%}\n\n{%- for field in field_list_xf -%}\n\n {%- set _ = fields.append(\n \"coalesce(cast(\" ~ field ~ \" as \" ~ dbt_utils.type_string() ~ \"), '')\"\n ) -%}\n\n {%- if not loop.last %}\n {%- set _ = fields.append(\"'-'\") -%}\n {%- endif -%}\n\n{%- endfor -%}\n\n{{dbt_utils.hash(dbt_utils.concat(fields))}}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string", "macro.dbt_utils.hash", "macro.dbt_utils.concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.854861}, "macro.dbt_utils.safe_add": {"unique_id": "macro.dbt_utils.safe_add", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "safe_add", "macro_sql": "{%- macro safe_add() -%}\n {# needed for safe_add to allow for non-keyword arguments see SO post #}\n {# https://stackoverflow.com/questions/13944751/args-kwargs-in-jinja2-macros #}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('safe_add', 'dbt_utils')(*varargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__safe_add"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.855723}, "macro.dbt_utils.default__safe_add": {"unique_id": "macro.dbt_utils.default__safe_add", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "default__safe_add", "macro_sql": "\n\n{%- macro default__safe_add() -%}\n\n{% set fields = [] %}\n\n{%- for field in varargs -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' +\\n ') }}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.856302}, "macro.dbt_utils.nullcheck": {"unique_id": "macro.dbt_utils.nullcheck", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "nullcheck", "macro_sql": "{% macro nullcheck(cols) %}\n {{ return(adapter.dispatch('nullcheck', 'dbt_utils')(cols)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8570821}, "macro.dbt_utils.default__nullcheck": {"unique_id": "macro.dbt_utils.default__nullcheck", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8577678}, "macro.dbt_utils.get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.86036}, "macro.dbt_utils.default__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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 \"table_schema\",\n table_name as \"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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8609312}, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.bigquery__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._bigquery__get_matching_schemata", "macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.862512}, "macro.dbt_utils._bigquery__get_matching_schemata": {"unique_id": "macro.dbt_utils._bigquery__get_matching_schemata", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8635242}, "macro.dbt_utils.get_column_values": {"unique_id": "macro.dbt_utils.get_column_values", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_column_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8655019}, "macro.dbt_utils.default__get_column_values": {"unique_id": "macro.dbt_utils.default__get_column_values", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_ephemeral", "macro.dbt.load_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.868595}, "macro.dbt_utils.pivot": {"unique_id": "macro.dbt_utils.pivot", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pivot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.870537}, "macro.dbt_utils.default__pivot": {"unique_id": "macro.dbt_utils.default__pivot", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "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_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.escape_single_quotes", "macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.872237}, "macro.dbt_utils.get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.873218}, "macro.dbt_utils.default__get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.default__get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.874679}, "macro.dbt_utils.get_query_results_as_dict": {"unique_id": "macro.dbt_utils.get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_query_results_as_dict"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.875531}, "macro.dbt_utils.default__get_query_results_as_dict": {"unique_id": "macro.dbt_utils.default__get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.876734}, "macro.dbt_utils.get_table_types_sql": {"unique_id": "macro.dbt_utils.get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8776681}, "macro.dbt_utils.default__get_table_types_sql": {"unique_id": "macro.dbt_utils.default__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "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 \"table_type\"\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.877846}, "macro.dbt_utils.postgres__get_table_types_sql": {"unique_id": "macro.dbt_utils.postgres__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "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 \"table_type\"\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.878015}, "macro.dbt_utils.bigquery__get_table_types_sql": {"unique_id": "macro.dbt_utils.bigquery__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "bigquery__get_table_types_sql", "macro_sql": "{% macro bigquery__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 `table_type`\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8781838}, "macro.dbt_utils.degrees_to_radians": {"unique_id": "macro.dbt_utils.degrees_to_radians", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "degrees_to_radians", "macro_sql": "{% macro degrees_to_radians(degrees) -%}\n acos(-1) * {{degrees}} / 180\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.879963}, "macro.dbt_utils.haversine_distance": {"unique_id": "macro.dbt_utils.haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__haversine_distance"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.880547}, "macro.dbt_utils.default__haversine_distance": {"unique_id": "macro.dbt_utils.default__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8817239}, "macro.dbt_utils.bigquery__haversine_distance": {"unique_id": "macro.dbt_utils.bigquery__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.degrees_to_radians"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8835042}, "macro.asana_source.get_story_columns": {"unique_id": "macro.asana_source.get_story_columns", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "macros/get_story_columns.sql", "original_file_path": "macros/get_story_columns.sql", "name": "get_story_columns", "macro_sql": "{% macro get_story_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_by_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"hearted\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"num_hearts\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"source\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"target_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"text\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"type\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string", "macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.885856}, "macro.asana_source.get_task_tag_columns": {"unique_id": "macro.asana_source.get_task_tag_columns", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "macros/get_task_tag_columns.sql", "original_file_path": "macros/get_task_tag_columns.sql", "name": "get_task_tag_columns", "macro_sql": "{% macro get_task_tag_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"tag_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"task_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8869681}, "macro.asana_source.get_task_columns": {"unique_id": "macro.asana_source.get_task_columns", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "macros/get_task_columns.sql", "original_file_path": "macros/get_task_columns.sql", "name": "get_task_columns", "macro_sql": "{% macro get_task_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"assignee_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"assignee_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"completed\", \"datatype\": \"boolean\"},\n {\"name\": \"completed_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"completed_by_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"due_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"due_on\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"hearted\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"modified_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"notes\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"num_hearts\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"parent_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"start_on\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"workspace_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string", "macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.890861}, "macro.asana_source.get_task_section_columns": {"unique_id": "macro.asana_source.get_task_section_columns", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "macros/get_task_section_columns.sql", "original_file_path": "macros/get_task_section_columns.sql", "name": "get_task_section_columns", "macro_sql": "{% macro get_task_section_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"section_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"task_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.891977}, "macro.asana_source.get_team_columns": {"unique_id": "macro.asana_source.get_team_columns", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "macros/get_team_columns.sql", "original_file_path": "macros/get_team_columns.sql", "name": "get_team_columns", "macro_sql": "{% macro get_team_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"organization_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.893418}, "macro.asana_source.get_user_columns": {"unique_id": "macro.asana_source.get_user_columns", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "macros/get_user_columns.sql", "original_file_path": "macros/get_user_columns.sql", "name": "get_user_columns", "macro_sql": "{% macro get_user_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.894866}, "macro.asana_source.get_project_columns": {"unique_id": "macro.asana_source.get_project_columns", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "macros/get_project_columns.sql", "original_file_path": "macros/get_project_columns.sql", "name": "get_project_columns", "macro_sql": "{% macro get_project_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"archived\", \"datatype\": \"boolean\"},\n {\"name\": \"color\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"current_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"due_date\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"modified_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"notes\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"owner_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"public\", \"datatype\": \"boolean\"},\n {\"name\": \"team_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"workspace_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.8982651}, "macro.asana_source.get_task_follower_columns": {"unique_id": "macro.asana_source.get_task_follower_columns", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "macros/get_task_follower_columns.sql", "original_file_path": "macros/get_task_follower_columns.sql", "name": "get_task_follower_columns", "macro_sql": "{% macro get_task_follower_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"task_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"user_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.899391}, "macro.asana_source.get_section_columns": {"unique_id": "macro.asana_source.get_section_columns", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "macros/get_section_columns.sql", "original_file_path": "macros/get_section_columns.sql", "name": "get_section_columns", "macro_sql": "{% macro get_section_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"project_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9008598}, "macro.asana_source.get_project_task_columns": {"unique_id": "macro.asana_source.get_project_task_columns", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "macros/get_project_task_columns.sql", "original_file_path": "macros/get_project_task_columns.sql", "name": "get_project_task_columns", "macro_sql": "{% macro get_project_task_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"project_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"task_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.901966}, "macro.asana_source.get_tag_columns": {"unique_id": "macro.asana_source.get_tag_columns", "package_name": "asana_source", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/asana_source", "path": "macros/get_tag_columns.sql", "original_file_path": "macros/get_tag_columns.sql", "name": "get_tag_columns", "macro_sql": "{% macro get_tag_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"color\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"message\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"notes\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"workspace_id\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.904129}, "macro.fivetran_utils.enabled_vars": {"unique_id": "macro.fivetran_utils.enabled_vars", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/enabled_vars.sql", "original_file_path": "macros/enabled_vars.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.905065}, "macro.fivetran_utils.percentile": {"unique_id": "macro.fivetran_utils.percentile", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__percentile"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.906752}, "macro.fivetran_utils.default__percentile": {"unique_id": "macro.fivetran_utils.default__percentile", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9070988}, "macro.fivetran_utils.redshift__percentile": {"unique_id": "macro.fivetran_utils.redshift__percentile", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.907437}, "macro.fivetran_utils.bigquery__percentile": {"unique_id": "macro.fivetran_utils.bigquery__percentile", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.907777}, "macro.fivetran_utils.postgres__percentile": {"unique_id": "macro.fivetran_utils.postgres__percentile", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9080791}, "macro.fivetran_utils.spark__percentile": {"unique_id": "macro.fivetran_utils.spark__percentile", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9084191}, "macro.fivetran_utils.pivot_json_extract": {"unique_id": "macro.fivetran_utils.pivot_json_extract", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/pivot_json_extract.sql", "original_file_path": "macros/pivot_json_extract.sql", "name": "pivot_json_extract", "macro_sql": "{% macro pivot_json_extract(string, list_of_properties) %}\n\n{%- for property in list_of_properties -%}\n\nreplace( {{ fivetran_utils.json_extract(string, property) }}, '\"', '') as {{ property | replace(' ', '_') | lower }}\n\n{%- if not loop.last -%},{%- endif %}\n{% endfor -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.json_extract"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.909493}, "macro.fivetran_utils.persist_pass_through_columns": {"unique_id": "macro.fivetran_utils.persist_pass_through_columns", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/persist_pass_through_columns.sql", "original_file_path": "macros/persist_pass_through_columns.sql", "name": "persist_pass_through_columns", "macro_sql": "{% macro persist_pass_through_columns(pass_through_variable) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n , {{ field.alias if field.alias else field.name }}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.910408}, "macro.fivetran_utils.json_parse": {"unique_id": "macro.fivetran_utils.json_parse", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "json_parse", "macro_sql": "{% macro json_parse(string, string_path) -%}\n\n{{ adapter.dispatch('json_parse', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__json_parse"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.912298}, "macro.fivetran_utils.default__json_parse": {"unique_id": "macro.fivetran_utils.default__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.912833}, "macro.fivetran_utils.redshift__json_parse": {"unique_id": "macro.fivetran_utils.redshift__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9133599}, "macro.fivetran_utils.bigquery__json_parse": {"unique_id": "macro.fivetran_utils.bigquery__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.913881}, "macro.fivetran_utils.postgres__json_parse": {"unique_id": "macro.fivetran_utils.postgres__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9143848}, "macro.fivetran_utils.snowflake__json_parse": {"unique_id": "macro.fivetran_utils.snowflake__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.914935}, "macro.fivetran_utils.spark__json_parse": {"unique_id": "macro.fivetran_utils.spark__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.915649}, "macro.fivetran_utils.max_bool": {"unique_id": "macro.fivetran_utils.max_bool", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "max_bool", "macro_sql": "{% macro max_bool(boolean_field) -%}\n\n{{ adapter.dispatch('max_bool', 'fivetran_utils') (boolean_field) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__max_bool"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.916388}, "macro.fivetran_utils.default__max_bool": {"unique_id": "macro.fivetran_utils.default__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "default__max_bool", "macro_sql": "{% macro default__max_bool(boolean_field) %}\n\n bool_or( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.916613}, "macro.fivetran_utils.snowflake__max_bool": {"unique_id": "macro.fivetran_utils.snowflake__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "snowflake__max_bool", "macro_sql": "{% macro snowflake__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.916815}, "macro.fivetran_utils.bigquery__max_bool": {"unique_id": "macro.fivetran_utils.bigquery__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "bigquery__max_bool", "macro_sql": "{% macro bigquery__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.917015}, "macro.fivetran_utils.calculated_fields": {"unique_id": "macro.fivetran_utils.calculated_fields", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/calculated_fields.sql", "original_file_path": "macros/calculated_fields.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.917888}, "macro.fivetran_utils.seed_data_helper": {"unique_id": "macro.fivetran_utils.seed_data_helper", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/seed_data_helper.sql", "original_file_path": "macros/seed_data_helper.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9191658}, "macro.fivetran_utils.fill_pass_through_columns": {"unique_id": "macro.fivetran_utils.fill_pass_through_columns", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/fill_pass_through_columns.sql", "original_file_path": "macros/fill_pass_through_columns.sql", "name": "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.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 {% endfor %}\n{% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.920495}, "macro.fivetran_utils.string_agg": {"unique_id": "macro.fivetran_utils.string_agg", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__string_agg"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.92147}, "macro.fivetran_utils.default__string_agg": {"unique_id": "macro.fivetran_utils.default__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "default__string_agg", "macro_sql": "{% macro default__string_agg(field_to_agg, delimiter) %}\n string_agg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.921748}, "macro.fivetran_utils.snowflake__string_agg": {"unique_id": "macro.fivetran_utils.snowflake__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "snowflake__string_agg", "macro_sql": "{% macro snowflake__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9220212}, "macro.fivetran_utils.redshift__string_agg": {"unique_id": "macro.fivetran_utils.redshift__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "redshift__string_agg", "macro_sql": "{% macro redshift__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.922294}, "macro.fivetran_utils.spark__string_agg": {"unique_id": "macro.fivetran_utils.spark__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.922814}, "macro.fivetran_utils.timestamp_diff": {"unique_id": "macro.fivetran_utils.timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__timestamp_diff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.927433}, "macro.fivetran_utils.default__timestamp_diff": {"unique_id": "macro.fivetran_utils.default__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9277902}, "macro.fivetran_utils.redshift__timestamp_diff": {"unique_id": "macro.fivetran_utils.redshift__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.928137}, "macro.fivetran_utils.bigquery__timestamp_diff": {"unique_id": "macro.fivetran_utils.bigquery__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.928482}, "macro.fivetran_utils.postgres__timestamp_diff": {"unique_id": "macro.fivetran_utils.postgres__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9318788}, "macro.fivetran_utils.try_cast": {"unique_id": "macro.fivetran_utils.try_cast", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "try_cast", "macro_sql": "{% macro try_cast(field, type) %}\n {{ adapter.dispatch('try_cast', 'fivetran_utils') (field, type) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__try_cast"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9333918}, "macro.fivetran_utils.default__safe_cast": {"unique_id": "macro.fivetran_utils.default__safe_cast", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9337}, "macro.fivetran_utils.redshift__try_cast": {"unique_id": "macro.fivetran_utils.redshift__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.934283}, "macro.fivetran_utils.postgres__try_cast": {"unique_id": "macro.fivetran_utils.postgres__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.934879}, "macro.fivetran_utils.snowflake__try_cast": {"unique_id": "macro.fivetran_utils.snowflake__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "snowflake__try_cast", "macro_sql": "{% macro snowflake__try_cast(field, type) %}\n try_cast(cast({{field}} as varchar) as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.935153}, "macro.fivetran_utils.bigquery__try_cast": {"unique_id": "macro.fivetran_utils.bigquery__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "bigquery__try_cast", "macro_sql": "{% macro bigquery__try_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9354188}, "macro.fivetran_utils.spark__try_cast": {"unique_id": "macro.fivetran_utils.spark__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "spark__try_cast", "macro_sql": "{% macro spark__try_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.935688}, "macro.fivetran_utils.source_relation": {"unique_id": "macro.fivetran_utils.source_relation", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__source_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9366798}, "macro.fivetran_utils.default__source_relation": {"unique_id": "macro.fivetran_utils.default__source_relation", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "name": "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_utils.type_string() }}) as source_relation\n{% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.937845}, "macro.fivetran_utils.first_value": {"unique_id": "macro.fivetran_utils.first_value", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__first_value"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.938884}, "macro.fivetran_utils.default__first_value": {"unique_id": "macro.fivetran_utils.default__first_value", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.939306}, "macro.fivetran_utils.redshift__first_value": {"unique_id": "macro.fivetran_utils.redshift__first_value", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9397619}, "macro.fivetran_utils.add_dbt_source_relation": {"unique_id": "macro.fivetran_utils.add_dbt_source_relation", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/add_dbt_source_relation.sql", "original_file_path": "macros/add_dbt_source_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.940423}, "macro.fivetran_utils.add_pass_through_columns": {"unique_id": "macro.fivetran_utils.add_pass_through_columns", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/add_pass_through_columns.sql", "original_file_path": "macros/add_pass_through_columns.sql", "name": "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.alias %}\n\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt_utils.type_string()}) %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt_utils.type_string()}) %}\n \n {% endif %}\n\n {% endfor %}\n\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9422562}, "macro.fivetran_utils.union_relations": {"unique_id": "macro.fivetran_utils.union_relations", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "name": "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_utils.string_literal(relation) }} as {{ dbt_utils.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", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils.string_literal", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.949561}, "macro.fivetran_utils.union_tables": {"unique_id": "macro.fivetran_utils.union_tables", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.union_relations"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9502568}, "macro.fivetran_utils.snowflake_seed_data": {"unique_id": "macro.fivetran_utils.snowflake_seed_data", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/snowflake_seed_data.sql", "original_file_path": "macros/snowflake_seed_data.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.951177}, "macro.fivetran_utils.fill_staging_columns": {"unique_id": "macro.fivetran_utils.fill_staging_columns", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.quote_column"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.954048}, "macro.fivetran_utils.quote_column": {"unique_id": "macro.fivetran_utils.quote_column", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "name": "quote_column", "macro_sql": "{% macro quote_column(column) %}\n {% if 'quote' in column %}\n {% if column.quote %}\n {% if target.type in ('bigquery', 'spark') %}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.955169}, "macro.fivetran_utils.json_extract": {"unique_id": "macro.fivetran_utils.json_extract", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "json_extract", "macro_sql": "{% macro json_extract(string, string_path) -%}\n\n{{ adapter.dispatch('json_extract', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__json_extract"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.956285}, "macro.fivetran_utils.default__json_extract": {"unique_id": "macro.fivetran_utils.default__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "default__json_extract", "macro_sql": "{% macro default__json_extract(string, string_path) %}\n\n json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} )\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.95661}, "macro.fivetran_utils.snowflake__json_extract": {"unique_id": "macro.fivetran_utils.snowflake__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.956927}, "macro.fivetran_utils.redshift__json_extract": {"unique_id": "macro.fivetran_utils.redshift__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9572842}, "macro.fivetran_utils.bigquery__json_extract": {"unique_id": "macro.fivetran_utils.bigquery__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "bigquery__json_extract", "macro_sql": "{% macro bigquery__json_extract(string, string_path) %}\n\n json_extract_scalar({{string}}, {{ \"'$.\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.957601}, "macro.fivetran_utils.postgres__json_extract": {"unique_id": "macro.fivetran_utils.postgres__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "postgres__json_extract", "macro_sql": "{% macro postgres__json_extract(string, string_path) %}\n\n {{string}}::json->>{{\"'\" ~ string_path ~ \"'\" }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9579132}, "macro.fivetran_utils.collect_freshness": {"unique_id": "macro.fivetran_utils.collect_freshness", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9592252}, "macro.fivetran_utils.default__collect_freshness": {"unique_id": "macro.fivetran_utils.default__collect_freshness", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9611971}, "macro.fivetran_utils.timestamp_add": {"unique_id": "macro.fivetran_utils.timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__timestamp_add"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.962504}, "macro.fivetran_utils.default__timestamp_add": {"unique_id": "macro.fivetran_utils.default__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.962851}, "macro.fivetran_utils.bigquery__timestamp_add": {"unique_id": "macro.fivetran_utils.bigquery__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.963188}, "macro.fivetran_utils.redshift__timestamp_add": {"unique_id": "macro.fivetran_utils.redshift__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.963538}, "macro.fivetran_utils.postgres__timestamp_add": {"unique_id": "macro.fivetran_utils.postgres__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "postgres__timestamp_add", "macro_sql": "{% macro postgres__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ from_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.963865}, "macro.fivetran_utils.spark__timestamp_add": {"unique_id": "macro.fivetran_utils.spark__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "spark__timestamp_add", "macro_sql": "{% macro spark__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ dbt_utils.dateadd(datepart, interval, from_timestamp) }}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.964222}, "macro.fivetran_utils.ceiling": {"unique_id": "macro.fivetran_utils.ceiling", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "ceiling", "macro_sql": "{% macro ceiling(num) -%}\n\n{{ adapter.dispatch('ceiling', 'fivetran_utils') (num) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__ceiling"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.964854}, "macro.fivetran_utils.default__ceiling": {"unique_id": "macro.fivetran_utils.default__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "default__ceiling", "macro_sql": "{% macro default__ceiling(num) %}\n ceiling({{ num }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9651682}, "macro.fivetran_utils.snowflake__ceiling": {"unique_id": "macro.fivetran_utils.snowflake__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "snowflake__ceiling", "macro_sql": "{% macro snowflake__ceiling(num) %}\n ceil({{ num }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9653811}, "macro.fivetran_utils.remove_prefix_from_columns": {"unique_id": "macro.fivetran_utils.remove_prefix_from_columns", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/remove_prefix_from_columns.sql", "original_file_path": "macros/remove_prefix_from_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.9667368}, "macro.fivetran_utils.union_data": {"unique_id": "macro.fivetran_utils.union_data", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__union_data"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.968933}, "macro.fivetran_utils.default__union_data": {"unique_id": "macro.fivetran_utils.default__union_data", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "name": "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\n {% set relation=adapter.get_relation(\n database=var(database_variable, default_database),\n schema=schema,\n identifier=table_identifier\n ) -%}\n \n {% set relation_exists=relation is not none %}\n\n {% if relation_exists %}\n\n {% do relations.append(relation) %}\n \n {% endif %}\n\n {% endfor %}\n\n {{ dbt_utils.union_relations(relations) }}\n\n{% elif var(union_database_variable, none) %}\n\n {% set relations = [] %}\n\n {% for database in var(union_database_variable) %}\n\n {% set relation=adapter.get_relation(\n database=database,\n schema=var(schema_variable, default_schema),\n identifier=table_identifier\n ) -%}\n\n {% set relation_exists=relation is not none %}\n\n {% if relation_exists %}\n\n {% do relations.append(relation) %}\n \n {% endif %}\n\n {% endfor %}\n\n {{ dbt_utils.union_relations(relations) }}\n\n{% else %}\n\n select * \n from {{ var(default_variable) }}\n\n{% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.union_relations"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.97245}, "macro.fivetran_utils.dummy_coalesce_value": {"unique_id": "macro.fivetran_utils.dummy_coalesce_value", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/dummy_coalesce_value.sql", "original_file_path": "macros/dummy_coalesce_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.975279}, "macro.fivetran_utils.array_agg": {"unique_id": "macro.fivetran_utils.array_agg", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "array_agg", "macro_sql": "{% macro array_agg(field_to_agg) -%}\n\n{{ adapter.dispatch('array_agg', 'fivetran_utils') (field_to_agg) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__array_agg"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.97598}, "macro.fivetran_utils.default__array_agg": {"unique_id": "macro.fivetran_utils.default__array_agg", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "default__array_agg", "macro_sql": "{% macro default__array_agg(field_to_agg) %}\n array_agg({{ field_to_agg }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.976195}, "macro.fivetran_utils.redshift__array_agg": {"unique_id": "macro.fivetran_utils.redshift__array_agg", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "redshift__array_agg", "macro_sql": "{% macro redshift__array_agg(field_to_agg) %}\n listagg({{ field_to_agg }}, ',')\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.976407}, "macro.fivetran_utils.empty_variable_warning": {"unique_id": "macro.fivetran_utils.empty_variable_warning", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/empty_variable_warning.sql", "original_file_path": "macros/empty_variable_warning.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.977311}, "macro.fivetran_utils.enabled_vars_one_true": {"unique_id": "macro.fivetran_utils.enabled_vars_one_true", "package_name": "fivetran_utils", "root_path": "/Users/sheri.nguyen/dbt-packages/asana/dbt_asana_source/integration_tests/dbt_packages/fivetran_utils", "path": "macros/enabled_vars_one_true.sql", "original_file_path": "macros/enabled_vars_one_true.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1657577413.978213}}, "docs": {"dbt.__overview__": {"unique_id": "dbt.__overview__", "package_name": "dbt", "root_path": "/usr/local/lib/python3.9/site-packages/dbt/include/global_project", "path": "overview.md", "original_file_path": "docs/overview.md", "name": "__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/overview)?\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": {}, "selectors": {}, "disabled": {}, "parent_map": {"seed.asana_source_integration_tests.project_task_data": [], "seed.asana_source_integration_tests.story_data": [], "seed.asana_source_integration_tests.task_tag_data": [], "seed.asana_source_integration_tests.task_section_data": [], "seed.asana_source_integration_tests.task_data": [], "seed.asana_source_integration_tests.task_follower_data": [], "seed.asana_source_integration_tests.tag_data": [], "seed.asana_source_integration_tests.project_data": [], "seed.asana_source_integration_tests.user_data": [], "seed.asana_source_integration_tests.team_data": [], "seed.asana_source_integration_tests.section_data": [], "model.asana_source.stg_asana__user": ["model.asana_source.stg_asana__user_tmp", "model.asana_source.stg_asana__user_tmp"], "model.asana_source.stg_asana__task": ["model.asana_source.stg_asana__task_tmp", "model.asana_source.stg_asana__task_tmp"], "model.asana_source.stg_asana__task_section": ["model.asana_source.stg_asana__task_section_tmp", "model.asana_source.stg_asana__task_section_tmp"], "model.asana_source.stg_asana__section": ["model.asana_source.stg_asana__section_tmp", "model.asana_source.stg_asana__section_tmp"], "model.asana_source.stg_asana__team": ["model.asana_source.stg_asana__team_tmp", "model.asana_source.stg_asana__team_tmp"], "model.asana_source.stg_asana__task_tag": ["model.asana_source.stg_asana__task_tag_tmp", "model.asana_source.stg_asana__task_tag_tmp"], "model.asana_source.stg_asana__story": ["model.asana_source.stg_asana__story_tmp", "model.asana_source.stg_asana__story_tmp"], "model.asana_source.stg_asana__tag": ["model.asana_source.stg_asana__tag_tmp", "model.asana_source.stg_asana__tag_tmp"], "model.asana_source.stg_asana__project_task": ["model.asana_source.stg_asana__project_task_tmp", "model.asana_source.stg_asana__project_task_tmp"], "model.asana_source.stg_asana__project": ["model.asana_source.stg_asana__project_tmp", "model.asana_source.stg_asana__project_tmp"], "model.asana_source.stg_asana__task_follower": ["model.asana_source.stg_asana__task_follower_tmp", "model.asana_source.stg_asana__task_follower_tmp"], "model.asana_source.stg_asana__story_tmp": ["seed.asana_source_integration_tests.story_data"], "model.asana_source.stg_asana__team_tmp": ["seed.asana_source_integration_tests.team_data"], "model.asana_source.stg_asana__task_tmp": ["seed.asana_source_integration_tests.task_data"], "model.asana_source.stg_asana__task_follower_tmp": ["seed.asana_source_integration_tests.task_follower_data"], "model.asana_source.stg_asana__tag_tmp": ["seed.asana_source_integration_tests.tag_data"], "model.asana_source.stg_asana__task_section_tmp": ["seed.asana_source_integration_tests.task_section_data"], "model.asana_source.stg_asana__task_tag_tmp": ["seed.asana_source_integration_tests.task_tag_data"], "model.asana_source.stg_asana__user_tmp": ["seed.asana_source_integration_tests.user_data"], "model.asana_source.stg_asana__section_tmp": ["seed.asana_source_integration_tests.section_data"], "model.asana_source.stg_asana__project_tmp": ["seed.asana_source_integration_tests.project_data"], "model.asana_source.stg_asana__project_task_tmp": ["seed.asana_source_integration_tests.project_task_data"], "test.asana_source.unique_stg_asana__project_project_id.67bfab1228": ["model.asana_source.stg_asana__project"], "test.asana_source.not_null_stg_asana__project_project_id.d27dae84fa": ["model.asana_source.stg_asana__project"], "test.asana_source.not_null_stg_asana__project_task_project_id.e2450d16b1": ["model.asana_source.stg_asana__project_task"], "test.asana_source.not_null_stg_asana__project_task_task_id.9479566014": ["model.asana_source.stg_asana__project_task"], "test.asana_source.unique_stg_asana__section_section_id.0495dd3d2f": ["model.asana_source.stg_asana__section"], "test.asana_source.not_null_stg_asana__section_section_id.389ebce958": ["model.asana_source.stg_asana__section"], "test.asana_source.unique_stg_asana__story_story_id.414f25bb84": ["model.asana_source.stg_asana__story"], "test.asana_source.not_null_stg_asana__story_story_id.ca847d0848": ["model.asana_source.stg_asana__story"], "test.asana_source.not_null_stg_asana__story_target_task_id.3f971de06e": ["model.asana_source.stg_asana__story"], "test.asana_source.unique_stg_asana__tag_tag_id.fd78b190c7": ["model.asana_source.stg_asana__tag"], "test.asana_source.not_null_stg_asana__tag_tag_id.c6a8187ca2": ["model.asana_source.stg_asana__tag"], "test.asana_source.unique_stg_asana__task_task_id.a5271275a5": ["model.asana_source.stg_asana__task"], "test.asana_source.not_null_stg_asana__task_task_id.924cc69000": ["model.asana_source.stg_asana__task"], "test.asana_source.not_null_stg_asana__task_follower_task_id.5af35f322c": ["model.asana_source.stg_asana__task_follower"], "test.asana_source.not_null_stg_asana__task_follower_user_id.e0aea0b15e": ["model.asana_source.stg_asana__task_follower"], "test.asana_source.not_null_stg_asana__task_section_task_id.ab81301de8": ["model.asana_source.stg_asana__task_section"], "test.asana_source.not_null_stg_asana__task_section_section_id.b0977a4cfe": ["model.asana_source.stg_asana__task_section"], "test.asana_source.not_null_stg_asana__task_tag_tag_id.d523de41d8": ["model.asana_source.stg_asana__task_tag"], "test.asana_source.not_null_stg_asana__task_tag_task_id.9d27624748": ["model.asana_source.stg_asana__task_tag"], "test.asana_source.unique_stg_asana__team_team_id.111fe15873": ["model.asana_source.stg_asana__team"], "test.asana_source.not_null_stg_asana__team_team_id.e12b563474": ["model.asana_source.stg_asana__team"], "test.asana_source.unique_stg_asana__user_user_id.73808d6267": ["model.asana_source.stg_asana__user"], "test.asana_source.not_null_stg_asana__user_user_id.4e900e8ec6": ["model.asana_source.stg_asana__user"], "source.asana_source.asana.user": [], "source.asana_source.asana.task": [], "source.asana_source.asana.project": [], "source.asana_source.asana.story": [], "source.asana_source.asana.team": [], "source.asana_source.asana.tag": [], "source.asana_source.asana.section": [], "source.asana_source.asana.project_task": [], "source.asana_source.asana.task_follower": [], "source.asana_source.asana.task_tag": [], "source.asana_source.asana.task_section": []}, "child_map": {"seed.asana_source_integration_tests.project_task_data": ["model.asana_source.stg_asana__project_task_tmp"], "seed.asana_source_integration_tests.story_data": ["model.asana_source.stg_asana__story_tmp"], "seed.asana_source_integration_tests.task_tag_data": ["model.asana_source.stg_asana__task_tag_tmp"], "seed.asana_source_integration_tests.task_section_data": ["model.asana_source.stg_asana__task_section_tmp"], "seed.asana_source_integration_tests.task_data": ["model.asana_source.stg_asana__task_tmp"], "seed.asana_source_integration_tests.task_follower_data": ["model.asana_source.stg_asana__task_follower_tmp"], "seed.asana_source_integration_tests.tag_data": ["model.asana_source.stg_asana__tag_tmp"], "seed.asana_source_integration_tests.project_data": ["model.asana_source.stg_asana__project_tmp"], "seed.asana_source_integration_tests.user_data": ["model.asana_source.stg_asana__user_tmp"], "seed.asana_source_integration_tests.team_data": ["model.asana_source.stg_asana__team_tmp"], "seed.asana_source_integration_tests.section_data": ["model.asana_source.stg_asana__section_tmp"], "model.asana_source.stg_asana__user": ["test.asana_source.not_null_stg_asana__user_user_id.4e900e8ec6", "test.asana_source.unique_stg_asana__user_user_id.73808d6267"], "model.asana_source.stg_asana__task": ["test.asana_source.not_null_stg_asana__task_task_id.924cc69000", "test.asana_source.unique_stg_asana__task_task_id.a5271275a5"], "model.asana_source.stg_asana__task_section": ["test.asana_source.not_null_stg_asana__task_section_section_id.b0977a4cfe", "test.asana_source.not_null_stg_asana__task_section_task_id.ab81301de8"], "model.asana_source.stg_asana__section": ["test.asana_source.not_null_stg_asana__section_section_id.389ebce958", "test.asana_source.unique_stg_asana__section_section_id.0495dd3d2f"], "model.asana_source.stg_asana__team": ["test.asana_source.not_null_stg_asana__team_team_id.e12b563474", "test.asana_source.unique_stg_asana__team_team_id.111fe15873"], "model.asana_source.stg_asana__task_tag": ["test.asana_source.not_null_stg_asana__task_tag_tag_id.d523de41d8", "test.asana_source.not_null_stg_asana__task_tag_task_id.9d27624748"], "model.asana_source.stg_asana__story": ["test.asana_source.not_null_stg_asana__story_story_id.ca847d0848", "test.asana_source.not_null_stg_asana__story_target_task_id.3f971de06e", "test.asana_source.unique_stg_asana__story_story_id.414f25bb84"], "model.asana_source.stg_asana__tag": ["test.asana_source.not_null_stg_asana__tag_tag_id.c6a8187ca2", "test.asana_source.unique_stg_asana__tag_tag_id.fd78b190c7"], "model.asana_source.stg_asana__project_task": ["test.asana_source.not_null_stg_asana__project_task_project_id.e2450d16b1", "test.asana_source.not_null_stg_asana__project_task_task_id.9479566014"], "model.asana_source.stg_asana__project": ["test.asana_source.not_null_stg_asana__project_project_id.d27dae84fa", "test.asana_source.unique_stg_asana__project_project_id.67bfab1228"], "model.asana_source.stg_asana__task_follower": ["test.asana_source.not_null_stg_asana__task_follower_task_id.5af35f322c", "test.asana_source.not_null_stg_asana__task_follower_user_id.e0aea0b15e"], "model.asana_source.stg_asana__story_tmp": ["model.asana_source.stg_asana__story", "model.asana_source.stg_asana__story"], "model.asana_source.stg_asana__team_tmp": ["model.asana_source.stg_asana__team", "model.asana_source.stg_asana__team"], "model.asana_source.stg_asana__task_tmp": ["model.asana_source.stg_asana__task", "model.asana_source.stg_asana__task"], "model.asana_source.stg_asana__task_follower_tmp": ["model.asana_source.stg_asana__task_follower", "model.asana_source.stg_asana__task_follower"], "model.asana_source.stg_asana__tag_tmp": ["model.asana_source.stg_asana__tag", "model.asana_source.stg_asana__tag"], "model.asana_source.stg_asana__task_section_tmp": ["model.asana_source.stg_asana__task_section", "model.asana_source.stg_asana__task_section"], "model.asana_source.stg_asana__task_tag_tmp": ["model.asana_source.stg_asana__task_tag", "model.asana_source.stg_asana__task_tag"], "model.asana_source.stg_asana__user_tmp": ["model.asana_source.stg_asana__user", "model.asana_source.stg_asana__user"], "model.asana_source.stg_asana__section_tmp": ["model.asana_source.stg_asana__section", "model.asana_source.stg_asana__section"], "model.asana_source.stg_asana__project_tmp": ["model.asana_source.stg_asana__project", "model.asana_source.stg_asana__project"], "model.asana_source.stg_asana__project_task_tmp": ["model.asana_source.stg_asana__project_task", "model.asana_source.stg_asana__project_task"], "test.asana_source.unique_stg_asana__project_project_id.67bfab1228": [], "test.asana_source.not_null_stg_asana__project_project_id.d27dae84fa": [], "test.asana_source.not_null_stg_asana__project_task_project_id.e2450d16b1": [], "test.asana_source.not_null_stg_asana__project_task_task_id.9479566014": [], "test.asana_source.unique_stg_asana__section_section_id.0495dd3d2f": [], "test.asana_source.not_null_stg_asana__section_section_id.389ebce958": [], "test.asana_source.unique_stg_asana__story_story_id.414f25bb84": [], "test.asana_source.not_null_stg_asana__story_story_id.ca847d0848": [], "test.asana_source.not_null_stg_asana__story_target_task_id.3f971de06e": [], "test.asana_source.unique_stg_asana__tag_tag_id.fd78b190c7": [], "test.asana_source.not_null_stg_asana__tag_tag_id.c6a8187ca2": [], "test.asana_source.unique_stg_asana__task_task_id.a5271275a5": [], "test.asana_source.not_null_stg_asana__task_task_id.924cc69000": [], "test.asana_source.not_null_stg_asana__task_follower_task_id.5af35f322c": [], "test.asana_source.not_null_stg_asana__task_follower_user_id.e0aea0b15e": [], "test.asana_source.not_null_stg_asana__task_section_task_id.ab81301de8": [], "test.asana_source.not_null_stg_asana__task_section_section_id.b0977a4cfe": [], "test.asana_source.not_null_stg_asana__task_tag_tag_id.d523de41d8": [], "test.asana_source.not_null_stg_asana__task_tag_task_id.9d27624748": [], "test.asana_source.unique_stg_asana__team_team_id.111fe15873": [], "test.asana_source.not_null_stg_asana__team_team_id.e12b563474": [], "test.asana_source.unique_stg_asana__user_user_id.73808d6267": [], "test.asana_source.not_null_stg_asana__user_user_id.4e900e8ec6": [], "source.asana_source.asana.user": [], "source.asana_source.asana.task": [], "source.asana_source.asana.project": [], "source.asana_source.asana.story": [], "source.asana_source.asana.team": [], "source.asana_source.asana.tag": [], "source.asana_source.asana.section": [], "source.asana_source.asana.project_task": [], "source.asana_source.asana.task_follower": [], "source.asana_source.asana.task_tag": [], "source.asana_source.asana.task_section": []}} \ No newline at end of file diff --git a/docs/run_results.json b/docs/run_results.json index 94a0f35..94fe11e 100644 --- a/docs/run_results.json +++ b/docs/run_results.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/run-results/v1.json", "dbt_version": "0.19.0", "generated_at": "2021-03-22T21:23:06.777483Z", "invocation_id": "bfc7fb27-b9ab-4502-8f1f-2285a837b343", "env": {}}, "results": [{"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:05.833492Z", "completed_at": "2021-03-22T21:23:05.853713Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:05.859904Z", "completed_at": "2021-03-22T21:23:05.859924Z"}], "thread_id": "Thread-1", "execution_time": 0.038034915924072266, "message": null, "adapter_response": {}, "unique_id": "seed.asana_source_integration_tests.project_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:05.853577Z", "completed_at": "2021-03-22T21:23:05.871322Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:05.872382Z", "completed_at": "2021-03-22T21:23:05.872391Z"}], "thread_id": "Thread-2", "execution_time": 0.02320575714111328, "message": null, "adapter_response": {}, "unique_id": "seed.asana_source_integration_tests.project_task_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:05.853991Z", "completed_at": "2021-03-22T21:23:05.871568Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:05.872650Z", "completed_at": "2021-03-22T21:23:05.872658Z"}], "thread_id": "Thread-3", "execution_time": 0.020871877670288086, "message": null, "adapter_response": {}, "unique_id": "seed.asana_source_integration_tests.section_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:05.873971Z", "completed_at": "2021-03-22T21:23:05.885899Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:05.891966Z", "completed_at": "2021-03-22T21:23:05.891976Z"}], "thread_id": "Thread-1", "execution_time": 0.02685999870300293, "message": null, "adapter_response": {}, "unique_id": "seed.asana_source_integration_tests.tag_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:05.854128Z", "completed_at": "2021-03-22T21:23:05.886281Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:05.899360Z", "completed_at": "2021-03-22T21:23:05.899369Z"}], "thread_id": "Thread-4", "execution_time": 0.047405242919921875, "message": null, "adapter_response": {}, "unique_id": "seed.asana_source_integration_tests.story_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:05.885745Z", "completed_at": "2021-03-22T21:23:05.899929Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:05.901189Z", "completed_at": "2021-03-22T21:23:05.901197Z"}], "thread_id": "Thread-2", "execution_time": 0.022443056106567383, "message": null, "adapter_response": {}, "unique_id": "seed.asana_source_integration_tests.task_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:05.886163Z", "completed_at": "2021-03-22T21:23:05.900178Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:05.901552Z", "completed_at": "2021-03-22T21:23:05.901559Z"}], "thread_id": "Thread-3", "execution_time": 0.021368026733398438, "message": null, "adapter_response": {}, "unique_id": "seed.asana_source_integration_tests.task_follower_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:05.903213Z", "completed_at": "2021-03-22T21:23:05.917708Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:05.918433Z", "completed_at": "2021-03-22T21:23:05.918444Z"}], "thread_id": "Thread-1", "execution_time": 0.029414892196655273, "message": null, "adapter_response": {}, "unique_id": "seed.asana_source_integration_tests.task_section_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:05.903950Z", "completed_at": "2021-03-22T21:23:05.918186Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:05.931035Z", "completed_at": "2021-03-22T21:23:05.931044Z"}], "thread_id": "Thread-4", "execution_time": 0.029397964477539062, "message": null, "adapter_response": {}, "unique_id": "seed.asana_source_integration_tests.task_tag_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:05.917962Z", "completed_at": "2021-03-22T21:23:05.931625Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:05.932863Z", "completed_at": "2021-03-22T21:23:05.932871Z"}], "thread_id": "Thread-2", "execution_time": 0.023818016052246094, "message": null, "adapter_response": {}, "unique_id": "seed.asana_source_integration_tests.team_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:05.918081Z", "completed_at": "2021-03-22T21:23:05.931870Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:05.933232Z", "completed_at": "2021-03-22T21:23:05.933239Z"}], "thread_id": "Thread-3", "execution_time": 0.02387213706970215, "message": null, "adapter_response": {}, "unique_id": "seed.asana_source_integration_tests.user_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:05.935801Z", "completed_at": "2021-03-22T21:23:05.970678Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:05.979719Z", "completed_at": "2021-03-22T21:23:05.979731Z"}], "thread_id": "Thread-4", "execution_time": 0.04586911201477051, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__project_task_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:05.935086Z", "completed_at": "2021-03-22T21:23:05.970907Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:05.980155Z", "completed_at": "2021-03-22T21:23:05.980164Z"}], "thread_id": "Thread-1", "execution_time": 0.04739713668823242, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__project_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:05.961461Z", "completed_at": "2021-03-22T21:23:05.980801Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:05.981973Z", "completed_at": "2021-03-22T21:23:05.981980Z"}], "thread_id": "Thread-2", "execution_time": 0.03563499450683594, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__section_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:05.961736Z", "completed_at": "2021-03-22T21:23:05.981737Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:05.982812Z", "completed_at": "2021-03-22T21:23:05.982820Z"}], "thread_id": "Thread-3", "execution_time": 0.031307220458984375, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__tag_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:05.983632Z", "completed_at": "2021-03-22T21:23:06.009600Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.022282Z", "completed_at": "2021-03-22T21:23:06.022295Z"}], "thread_id": "Thread-4", "execution_time": 0.040911197662353516, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__story_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:05.984315Z", "completed_at": "2021-03-22T21:23:06.018023Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.022707Z", "completed_at": "2021-03-22T21:23:06.022716Z"}], "thread_id": "Thread-1", "execution_time": 0.04068779945373535, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__task_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.002957Z", "completed_at": "2021-03-22T21:23:06.023615Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.024787Z", "completed_at": "2021-03-22T21:23:06.024795Z"}], "thread_id": "Thread-2", "execution_time": 0.03236794471740723, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__task_follower_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.003092Z", "completed_at": "2021-03-22T21:23:06.024466Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.025617Z", "completed_at": "2021-03-22T21:23:06.025624Z"}], "thread_id": "Thread-3", "execution_time": 0.026534080505371094, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__task_section_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.026427Z", "completed_at": "2021-03-22T21:23:06.046927Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.069564Z", "completed_at": "2021-03-22T21:23:06.069576Z"}], "thread_id": "Thread-4", "execution_time": 0.04529094696044922, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__task_tag_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.027112Z", "completed_at": "2021-03-22T21:23:06.069780Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.070757Z", "completed_at": "2021-03-22T21:23:06.070764Z"}], "thread_id": "Thread-1", "execution_time": 0.0463261604309082, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__team_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.046569Z", "completed_at": "2021-03-22T21:23:06.071005Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.073257Z", "completed_at": "2021-03-22T21:23:06.073266Z"}], "thread_id": "Thread-2", "execution_time": 0.03751492500305176, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__user_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.046845Z", "completed_at": "2021-03-22T21:23:06.187642Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.187951Z", "completed_at": "2021-03-22T21:23:06.187962Z"}], "thread_id": "Thread-3", "execution_time": 0.14216327667236328, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__project_task"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.102436Z", "completed_at": "2021-03-22T21:23:06.232856Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.233126Z", "completed_at": "2021-03-22T21:23:06.233138Z"}], "thread_id": "Thread-2", "execution_time": 0.14293885231018066, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__tag"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.074826Z", "completed_at": "2021-03-22T21:23:06.240169Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.245892Z", "completed_at": "2021-03-22T21:23:06.245902Z"}], "thread_id": "Thread-4", "execution_time": 0.17659687995910645, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__project"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.090387Z", "completed_at": "2021-03-22T21:23:06.275447Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.275912Z", "completed_at": "2021-03-22T21:23:06.275923Z"}], "thread_id": "Thread-1", "execution_time": 0.20133304595947266, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__section"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.189218Z", "completed_at": "2021-03-22T21:23:06.382840Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.383126Z", "completed_at": "2021-03-22T21:23:06.383136Z"}], "thread_id": "Thread-3", "execution_time": 0.19471096992492676, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__story"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.234085Z", "completed_at": "2021-03-22T21:23:06.389755Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.396326Z", "completed_at": "2021-03-22T21:23:06.396342Z"}], "thread_id": "Thread-2", "execution_time": 0.16474485397338867, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__task"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.252340Z", "completed_at": "2021-03-22T21:23:06.405745Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.406518Z", "completed_at": "2021-03-22T21:23:06.406527Z"}], "thread_id": "Thread-4", "execution_time": 0.15558695793151855, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__task_follower"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.277036Z", "completed_at": "2021-03-22T21:23:06.406727Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.407738Z", "completed_at": "2021-03-22T21:23:06.407746Z"}], "thread_id": "Thread-1", "execution_time": 0.14217019081115723, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__task_section"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.427787Z", "completed_at": "2021-03-22T21:23:06.452618Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.453006Z", "completed_at": "2021-03-22T21:23:06.453018Z"}], "thread_id": "Thread-1", "execution_time": 0.0317692756652832, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.not_null_stg_asana__project_task_project_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.454024Z", "completed_at": "2021-03-22T21:23:06.463384Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.463914Z", "completed_at": "2021-03-22T21:23:06.463926Z"}], "thread_id": "Thread-1", "execution_time": 0.011718988418579102, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.not_null_stg_asana__project_task_task_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.466743Z", "completed_at": "2021-03-22T21:23:06.477720Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.478234Z", "completed_at": "2021-03-22T21:23:06.478244Z"}], "thread_id": "Thread-1", "execution_time": 0.012541055679321289, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.not_null_stg_asana__tag_tag_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.480854Z", "completed_at": "2021-03-22T21:23:06.493486Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.493939Z", "completed_at": "2021-03-22T21:23:06.493952Z"}], "thread_id": "Thread-1", "execution_time": 0.015390157699584961, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.unique_stg_asana__tag_tag_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.495259Z", "completed_at": "2021-03-22T21:23:06.506753Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.507002Z", "completed_at": "2021-03-22T21:23:06.507011Z"}], "thread_id": "Thread-1", "execution_time": 0.012421131134033203, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.not_null_stg_asana__project_project_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.507836Z", "completed_at": "2021-03-22T21:23:06.516803Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.517117Z", "completed_at": "2021-03-22T21:23:06.517146Z"}], "thread_id": "Thread-1", "execution_time": 0.010023117065429688, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.unique_stg_asana__project_project_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.518241Z", "completed_at": "2021-03-22T21:23:06.528838Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.529154Z", "completed_at": "2021-03-22T21:23:06.529163Z"}], "thread_id": "Thread-1", "execution_time": 0.01149892807006836, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.not_null_stg_asana__section_section_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.530136Z", "completed_at": "2021-03-22T21:23:06.539380Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.539702Z", "completed_at": "2021-03-22T21:23:06.539714Z"}], "thread_id": "Thread-1", "execution_time": 0.010201215744018555, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.unique_stg_asana__section_section_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.384102Z", "completed_at": "2021-03-22T21:23:06.554153Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.554422Z", "completed_at": "2021-03-22T21:23:06.554432Z"}], "thread_id": "Thread-3", "execution_time": 0.1709733009338379, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__task_tag"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.540850Z", "completed_at": "2021-03-22T21:23:06.555418Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.564682Z", "completed_at": "2021-03-22T21:23:06.564690Z"}], "thread_id": "Thread-1", "execution_time": 0.02463698387145996, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.not_null_stg_asana__story_story_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.555322Z", "completed_at": "2021-03-22T21:23:06.572138Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.572450Z", "completed_at": "2021-03-22T21:23:06.572459Z"}], "thread_id": "Thread-3", "execution_time": 0.017742156982421875, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.not_null_stg_asana__story_target_task_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.565883Z", "completed_at": "2021-03-22T21:23:06.585729Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.589430Z", "completed_at": "2021-03-22T21:23:06.589447Z"}], "thread_id": "Thread-1", "execution_time": 0.024779081344604492, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.unique_stg_asana__story_story_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.575859Z", "completed_at": "2021-03-22T21:23:06.589101Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.589857Z", "completed_at": "2021-03-22T21:23:06.589866Z"}], "thread_id": "Thread-3", "execution_time": 0.015799760818481445, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.not_null_stg_asana__task_task_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.407270Z", "completed_at": "2021-03-22T21:23:06.590700Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.591800Z", "completed_at": "2021-03-22T21:23:06.591810Z"}], "thread_id": "Thread-2", "execution_time": 0.18713593482971191, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__team"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.593831Z", "completed_at": "2021-03-22T21:23:06.618666Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.626945Z", "completed_at": "2021-03-22T21:23:06.626954Z"}], "thread_id": "Thread-1", "execution_time": 0.03512406349182129, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.unique_stg_asana__task_task_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.594167Z", "completed_at": "2021-03-22T21:23:06.627424Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.628253Z", "completed_at": "2021-03-22T21:23:06.628261Z"}], "thread_id": "Thread-3", "execution_time": 0.035981178283691406, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.not_null_stg_asana__task_follower_task_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.421359Z", "completed_at": "2021-03-22T21:23:06.628041Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.628885Z", "completed_at": "2021-03-22T21:23:06.628891Z"}], "thread_id": "Thread-4", "execution_time": 0.21047091484069824, "message": null, "adapter_response": {}, "unique_id": "model.asana_source.stg_asana__user"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.618201Z", "completed_at": "2021-03-22T21:23:06.628452Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.629639Z", "completed_at": "2021-03-22T21:23:06.629646Z"}], "thread_id": "Thread-2", "execution_time": 0.026319026947021484, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.not_null_stg_asana__task_follower_user_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.631225Z", "completed_at": "2021-03-22T21:23:06.659258Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.671321Z", "completed_at": "2021-03-22T21:23:06.671332Z"}], "thread_id": "Thread-1", "execution_time": 0.04220414161682129, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.not_null_stg_asana__task_section_section_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.642354Z", "completed_at": "2021-03-22T21:23:06.671620Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.672497Z", "completed_at": "2021-03-22T21:23:06.672505Z"}], "thread_id": "Thread-3", "execution_time": 0.04192185401916504, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.not_null_stg_asana__task_section_task_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.642927Z", "completed_at": "2021-03-22T21:23:06.672782Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.673676Z", "completed_at": "2021-03-22T21:23:06.673682Z"}], "thread_id": "Thread-4", "execution_time": 0.032836198806762695, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.not_null_stg_asana__task_tag_tag_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.652815Z", "completed_at": "2021-03-22T21:23:06.673125Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.674159Z", "completed_at": "2021-03-22T21:23:06.674166Z"}], "thread_id": "Thread-2", "execution_time": 0.032672882080078125, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.not_null_stg_asana__task_tag_task_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.674938Z", "completed_at": "2021-03-22T21:23:06.698731Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.718011Z", "completed_at": "2021-03-22T21:23:06.718023Z"}], "thread_id": "Thread-1", "execution_time": 0.04522085189819336, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.not_null_stg_asana__team_team_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.684698Z", "completed_at": "2021-03-22T21:23:06.718462Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.719571Z", "completed_at": "2021-03-22T21:23:06.719579Z"}], "thread_id": "Thread-3", "execution_time": 0.04526114463806152, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.unique_stg_asana__team_team_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.696263Z", "completed_at": "2021-03-22T21:23:06.719327Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.720197Z", "completed_at": "2021-03-22T21:23:06.720205Z"}], "thread_id": "Thread-4", "execution_time": 0.03629589080810547, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.not_null_stg_asana__user_user_id"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2021-03-22T21:23:06.698634Z", "completed_at": "2021-03-22T21:23:06.719813Z"}, {"name": "execute", "started_at": "2021-03-22T21:23:06.720754Z", "completed_at": "2021-03-22T21:23:06.720762Z"}], "thread_id": "Thread-2", "execution_time": 0.03642416000366211, "message": null, "adapter_response": {}, "unique_id": "test.asana_source.unique_stg_asana__user_user_id"}], "elapsed_time": 2.3419852256774902, "args": {"log_format": "default", "write_json": true, "profiles_dir": "/Users/joseph.markiewicz/.dbt", "target": "bigquery", "use_cache": true, "compile": true, "version_check": true, "which": "generate", "rpc_method": "docs.generate"}} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/run-results/v4.json", "dbt_version": "1.0.0", "generated_at": "2022-07-11T22:12:19.957423Z", "invocation_id": "fe278798-a8f1-428d-abca-bea216b78c92", "env": {}}, "results": [{"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.870500Z", "completed_at": "2022-07-11T22:12:16.874223Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.874677Z", "completed_at": "2022-07-11T22:12:16.874703Z"}], "thread_id": "Thread-1", "execution_time": 0.005360841751098633, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.asana_source_integration_tests.project_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.876593Z", "completed_at": "2022-07-11T22:12:16.878903Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.879310Z", "completed_at": "2022-07-11T22:12:16.879319Z"}], "thread_id": "Thread-1", "execution_time": 0.003699779510498047, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.asana_source_integration_tests.project_task_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.880975Z", "completed_at": "2022-07-11T22:12:16.883255Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.883775Z", "completed_at": "2022-07-11T22:12:16.883785Z"}], "thread_id": "Thread-1", "execution_time": 0.0037801265716552734, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.asana_source_integration_tests.section_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.885413Z", "completed_at": "2022-07-11T22:12:16.892213Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.892610Z", "completed_at": "2022-07-11T22:12:16.892620Z"}], "thread_id": "Thread-1", "execution_time": 0.008218050003051758, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.asana_source_integration_tests.story_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.894292Z", "completed_at": "2022-07-11T22:12:16.896513Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.896904Z", "completed_at": "2022-07-11T22:12:16.896913Z"}], "thread_id": "Thread-1", "execution_time": 0.0035049915313720703, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.asana_source_integration_tests.tag_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.898537Z", "completed_at": "2022-07-11T22:12:16.900877Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.901265Z", "completed_at": "2022-07-11T22:12:16.901274Z"}], "thread_id": "Thread-1", "execution_time": 0.0037779808044433594, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.asana_source_integration_tests.task_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.902851Z", "completed_at": "2022-07-11T22:12:16.905043Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.905442Z", "completed_at": "2022-07-11T22:12:16.905450Z"}], "thread_id": "Thread-1", "execution_time": 0.003590106964111328, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.asana_source_integration_tests.task_follower_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.907068Z", "completed_at": "2022-07-11T22:12:16.909253Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.909663Z", "completed_at": "2022-07-11T22:12:16.909672Z"}], "thread_id": "Thread-1", "execution_time": 0.003712177276611328, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.asana_source_integration_tests.task_section_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.911236Z", "completed_at": "2022-07-11T22:12:16.913340Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.913705Z", "completed_at": "2022-07-11T22:12:16.913714Z"}], "thread_id": "Thread-1", "execution_time": 0.0035381317138671875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.asana_source_integration_tests.task_tag_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.915137Z", "completed_at": "2022-07-11T22:12:16.918358Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.918707Z", "completed_at": "2022-07-11T22:12:16.918715Z"}], "thread_id": "Thread-1", "execution_time": 0.004461050033569336, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.asana_source_integration_tests.team_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.919962Z", "completed_at": "2022-07-11T22:12:16.921658Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.921981Z", "completed_at": "2022-07-11T22:12:16.921988Z"}], "thread_id": "Thread-1", "execution_time": 0.0027642250061035156, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.asana_source_integration_tests.user_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.923276Z", "completed_at": "2022-07-11T22:12:16.927252Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.927602Z", "completed_at": "2022-07-11T22:12:16.927611Z"}], "thread_id": "Thread-1", "execution_time": 0.005177021026611328, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__project_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.928908Z", "completed_at": "2022-07-11T22:12:16.932467Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.932819Z", "completed_at": "2022-07-11T22:12:16.932827Z"}], "thread_id": "Thread-1", "execution_time": 0.004703998565673828, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__project_task_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.934146Z", "completed_at": "2022-07-11T22:12:16.937581Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.937931Z", "completed_at": "2022-07-11T22:12:16.937938Z"}], "thread_id": "Thread-1", "execution_time": 0.004555940628051758, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__section_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.939208Z", "completed_at": "2022-07-11T22:12:16.942501Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.942843Z", "completed_at": "2022-07-11T22:12:16.942851Z"}], "thread_id": "Thread-1", "execution_time": 0.004385948181152344, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__story_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.944097Z", "completed_at": "2022-07-11T22:12:16.947477Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.947856Z", "completed_at": "2022-07-11T22:12:16.947864Z"}], "thread_id": "Thread-1", "execution_time": 0.004525899887084961, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__tag_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.949111Z", "completed_at": "2022-07-11T22:12:16.953489Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.953841Z", "completed_at": "2022-07-11T22:12:16.953848Z"}], "thread_id": "Thread-1", "execution_time": 0.005476236343383789, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__task_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.955114Z", "completed_at": "2022-07-11T22:12:16.958177Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.958489Z", "completed_at": "2022-07-11T22:12:16.958496Z"}], "thread_id": "Thread-1", "execution_time": 0.0041081905364990234, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__task_follower_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.959626Z", "completed_at": "2022-07-11T22:12:16.962405Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.962700Z", "completed_at": "2022-07-11T22:12:16.962706Z"}], "thread_id": "Thread-1", "execution_time": 0.003740072250366211, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__task_section_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.963903Z", "completed_at": "2022-07-11T22:12:16.966617Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.966900Z", "completed_at": "2022-07-11T22:12:16.966906Z"}], "thread_id": "Thread-1", "execution_time": 0.0037660598754882812, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__task_tag_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.967948Z", "completed_at": "2022-07-11T22:12:16.970975Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.971259Z", "completed_at": "2022-07-11T22:12:16.971265Z"}], "thread_id": "Thread-1", "execution_time": 0.0039370059967041016, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__team_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.972297Z", "completed_at": "2022-07-11T22:12:16.975070Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:16.975357Z", "completed_at": "2022-07-11T22:12:16.975363Z"}], "thread_id": "Thread-1", "execution_time": 0.0036878585815429688, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__user_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:16.976627Z", "completed_at": "2022-07-11T22:12:17.316477Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:17.316912Z", "completed_at": "2022-07-11T22:12:17.316923Z"}], "thread_id": "Thread-1", "execution_time": 0.3410518169403076, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__project"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:17.318641Z", "completed_at": "2022-07-11T22:12:17.547938Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:17.548376Z", "completed_at": "2022-07-11T22:12:17.548388Z"}], "thread_id": "Thread-1", "execution_time": 0.23074722290039062, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__project_task"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:17.550124Z", "completed_at": "2022-07-11T22:12:17.803388Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:17.803912Z", "completed_at": "2022-07-11T22:12:17.803926Z"}], "thread_id": "Thread-1", "execution_time": 0.254849910736084, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__section"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:17.805814Z", "completed_at": "2022-07-11T22:12:18.046166Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:18.046530Z", "completed_at": "2022-07-11T22:12:18.046540Z"}], "thread_id": "Thread-1", "execution_time": 0.24176478385925293, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__story"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:18.048064Z", "completed_at": "2022-07-11T22:12:18.264235Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:18.264684Z", "completed_at": "2022-07-11T22:12:18.264703Z"}], "thread_id": "Thread-1", "execution_time": 0.21771860122680664, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__tag"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:18.266474Z", "completed_at": "2022-07-11T22:12:18.554272Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:18.554708Z", "completed_at": "2022-07-11T22:12:18.554720Z"}], "thread_id": "Thread-1", "execution_time": 0.28922176361083984, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__task"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:18.556357Z", "completed_at": "2022-07-11T22:12:18.785051Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:18.785574Z", "completed_at": "2022-07-11T22:12:18.785588Z"}], "thread_id": "Thread-1", "execution_time": 0.23023486137390137, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__task_follower"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:18.787310Z", "completed_at": "2022-07-11T22:12:19.044120Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.044640Z", "completed_at": "2022-07-11T22:12:19.044654Z"}], "thread_id": "Thread-1", "execution_time": 0.25850915908813477, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__task_section"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.046490Z", "completed_at": "2022-07-11T22:12:19.349105Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.349639Z", "completed_at": "2022-07-11T22:12:19.349653Z"}], "thread_id": "Thread-1", "execution_time": 0.3043372631072998, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__task_tag"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.351687Z", "completed_at": "2022-07-11T22:12:19.584502Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.585026Z", "completed_at": "2022-07-11T22:12:19.585039Z"}], "thread_id": "Thread-1", "execution_time": 0.23473620414733887, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__team"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.586941Z", "completed_at": "2022-07-11T22:12:19.814602Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.815115Z", "completed_at": "2022-07-11T22:12:19.815129Z"}], "thread_id": "Thread-1", "execution_time": 0.22953104972839355, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.asana_source.stg_asana__user"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.817125Z", "completed_at": "2022-07-11T22:12:19.830047Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.830479Z", "completed_at": "2022-07-11T22:12:19.830489Z"}], "thread_id": "Thread-1", "execution_time": 0.014660120010375977, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.not_null_stg_asana__project_project_id.d27dae84fa"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.831981Z", "completed_at": "2022-07-11T22:12:19.841644Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.842052Z", "completed_at": "2022-07-11T22:12:19.842060Z"}], "thread_id": "Thread-1", "execution_time": 0.01098489761352539, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.unique_stg_asana__project_project_id.67bfab1228"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.843503Z", "completed_at": "2022-07-11T22:12:19.850681Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.851105Z", "completed_at": "2022-07-11T22:12:19.851115Z"}], "thread_id": "Thread-1", "execution_time": 0.008526802062988281, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.not_null_stg_asana__project_task_project_id.e2450d16b1"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.852703Z", "completed_at": "2022-07-11T22:12:19.857451Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.857952Z", "completed_at": "2022-07-11T22:12:19.857962Z"}], "thread_id": "Thread-1", "execution_time": 0.006292819976806641, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.not_null_stg_asana__project_task_task_id.9479566014"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.859540Z", "completed_at": "2022-07-11T22:12:19.864188Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.864618Z", "completed_at": "2022-07-11T22:12:19.864626Z"}], "thread_id": "Thread-1", "execution_time": 0.006117105484008789, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.not_null_stg_asana__section_section_id.389ebce958"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.865972Z", "completed_at": "2022-07-11T22:12:19.870085Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.870455Z", "completed_at": "2022-07-11T22:12:19.870463Z"}], "thread_id": "Thread-1", "execution_time": 0.0053119659423828125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.unique_stg_asana__section_section_id.0495dd3d2f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.871690Z", "completed_at": "2022-07-11T22:12:19.875495Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.875845Z", "completed_at": "2022-07-11T22:12:19.875852Z"}], "thread_id": "Thread-1", "execution_time": 0.004914760589599609, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.not_null_stg_asana__story_story_id.ca847d0848"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.877045Z", "completed_at": "2022-07-11T22:12:19.880835Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.881195Z", "completed_at": "2022-07-11T22:12:19.881203Z"}], "thread_id": "Thread-1", "execution_time": 0.004898786544799805, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.not_null_stg_asana__story_target_task_id.3f971de06e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.882339Z", "completed_at": "2022-07-11T22:12:19.886698Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.886979Z", "completed_at": "2022-07-11T22:12:19.886985Z"}], "thread_id": "Thread-1", "execution_time": 0.00533604621887207, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.unique_stg_asana__story_story_id.414f25bb84"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.887963Z", "completed_at": "2022-07-11T22:12:19.890878Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.891491Z", "completed_at": "2022-07-11T22:12:19.891522Z"}], "thread_id": "Thread-1", "execution_time": 0.004583835601806641, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.not_null_stg_asana__tag_tag_id.c6a8187ca2"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.892980Z", "completed_at": "2022-07-11T22:12:19.896061Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.896360Z", "completed_at": "2022-07-11T22:12:19.896366Z"}], "thread_id": "Thread-1", "execution_time": 0.00396418571472168, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.unique_stg_asana__tag_tag_id.fd78b190c7"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.897882Z", "completed_at": "2022-07-11T22:12:19.901258Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.901569Z", "completed_at": "2022-07-11T22:12:19.901575Z"}], "thread_id": "Thread-1", "execution_time": 0.004580974578857422, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.not_null_stg_asana__task_task_id.924cc69000"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.902622Z", "completed_at": "2022-07-11T22:12:19.906342Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.906707Z", "completed_at": "2022-07-11T22:12:19.906713Z"}], "thread_id": "Thread-1", "execution_time": 0.004669189453125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.unique_stg_asana__task_task_id.a5271275a5"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.907573Z", "completed_at": "2022-07-11T22:12:19.910589Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.910908Z", "completed_at": "2022-07-11T22:12:19.910913Z"}], "thread_id": "Thread-1", "execution_time": 0.0039060115814208984, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.not_null_stg_asana__task_follower_task_id.5af35f322c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.912122Z", "completed_at": "2022-07-11T22:12:19.916091Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.916387Z", "completed_at": "2022-07-11T22:12:19.916393Z"}], "thread_id": "Thread-1", "execution_time": 0.005175113677978516, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.not_null_stg_asana__task_follower_user_id.e0aea0b15e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.917281Z", "completed_at": "2022-07-11T22:12:19.920245Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.920509Z", "completed_at": "2022-07-11T22:12:19.920514Z"}], "thread_id": "Thread-1", "execution_time": 0.0038330554962158203, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.not_null_stg_asana__task_section_section_id.b0977a4cfe"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.921465Z", "completed_at": "2022-07-11T22:12:19.924320Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.924623Z", "completed_at": "2022-07-11T22:12:19.924629Z"}], "thread_id": "Thread-1", "execution_time": 0.0037899017333984375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.not_null_stg_asana__task_section_task_id.ab81301de8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.925634Z", "completed_at": "2022-07-11T22:12:19.928859Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.929121Z", "completed_at": "2022-07-11T22:12:19.929127Z"}], "thread_id": "Thread-1", "execution_time": 0.00415492057800293, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.not_null_stg_asana__task_tag_tag_id.d523de41d8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.930045Z", "completed_at": "2022-07-11T22:12:19.933012Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.933277Z", "completed_at": "2022-07-11T22:12:19.933283Z"}], "thread_id": "Thread-1", "execution_time": 0.003815889358520508, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.not_null_stg_asana__task_tag_task_id.9d27624748"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.934191Z", "completed_at": "2022-07-11T22:12:19.937108Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.937660Z", "completed_at": "2022-07-11T22:12:19.937667Z"}], "thread_id": "Thread-1", "execution_time": 0.004327058792114258, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.not_null_stg_asana__team_team_id.e12b563474"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.939172Z", "completed_at": "2022-07-11T22:12:19.942412Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.942679Z", "completed_at": "2022-07-11T22:12:19.942685Z"}], "thread_id": "Thread-1", "execution_time": 0.004086732864379883, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.unique_stg_asana__team_team_id.111fe15873"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.943603Z", "completed_at": "2022-07-11T22:12:19.948246Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.948588Z", "completed_at": "2022-07-11T22:12:19.948597Z"}], "thread_id": "Thread-1", "execution_time": 0.00569605827331543, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.not_null_stg_asana__user_user_id.4e900e8ec6"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-07-11T22:12:19.949951Z", "completed_at": "2022-07-11T22:12:19.954798Z"}, {"name": "execute", "started_at": "2022-07-11T22:12:19.955319Z", "completed_at": "2022-07-11T22:12:19.955334Z"}], "thread_id": "Thread-1", "execution_time": 0.006362199783325195, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.asana_source.unique_stg_asana__user_user_id.73808d6267"}], "elapsed_time": 5.1832780838012695, "args": {"write_json": true, "use_colors": true, "printer_width": 80, "version_check": true, "partial_parse": true, "static_parser": true, "profiles_dir": "/Users/sheri.nguyen/.dbt", "send_anonymous_usage_stats": true, "event_buffer_size": 100000, "compile": true, "which": "generate", "rpc_method": "docs.generate", "indirect_selection": "eager"}} \ No newline at end of file diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index f23fefe..140db8a 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,7 +1,7 @@ config-version: 2 name: 'asana_source_integration_tests' -version: '0.4.0' +version: '0.5.1' profile: 'integration_tests' @@ -41,6 +41,13 @@ seeds: completed_by_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}" parent_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}" workspace_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}" + completed_at: "timestamp" + created_at: "timestamp" + due_on: "timestamp" + due_at: "timestamp" + modified_at: "timestamp" + start_on: "timestamp" + _fivetran_synced: "timestamp" story_data: +column_types: id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}" diff --git a/integration_tests/seeds/task_data.csv b/integration_tests/seeds/task_data.csv index 74ba5b0..f413394 100644 --- a/integration_tests/seeds/task_data.csv +++ b/integration_tests/seeds/task_data.csv @@ -1,2 +1,2 @@ -id,_fivetran_synced,assignee_id,assignee_status,completed,completed_at,completed_by_id,created_at,due_at,due_on,hearted,modified_at,name,notes,num_hearts,parent_id,start_on,workspace_id -1199893417793941,2021-02-04 02:24:35,1137799670337705,inbox,FALSE,,,2021-02-04 00:11:27,,,FALSE,2021-02-04 00:22:16,dab5f67e57087576d51dc40d79c517bc,,0,,,2104505001950 \ No newline at end of file +id,assignee_id,completed,completed_at,completed_by_id,created_at,due_on,due_at,modified_at,name,parent_id,start_on,notes,workspace_id +1138074657603006,1126539287026862,true,2019-09-18T16:48:31.176Z,,2019-09-02T14:53:02.685Z,2019-09-25T00:00:00Z,,2021-12-18T14:01:40.058Z,cool name,,,many notes,2104505001950 \ No newline at end of file diff --git a/models/stg_asana__project.sql b/models/stg_asana__project.sql index 1494d6c..5484e2d 100644 --- a/models/stg_asana__project.sql +++ b/models/stg_asana__project.sql @@ -24,10 +24,10 @@ final as ( select id as project_id, archived as is_archived, - created_at, + cast(created_at as {{ dbt_utils.type_timestamp() }}) as created_at, current_status, - due_date, - modified_at, + cast(due_date as {{ dbt_utils.type_timestamp() }}) as due_date, + cast(modified_at as {{ dbt_utils.type_timestamp() }}) as modified_at, name as project_name, owner_id as owner_user_id, public as is_public, diff --git a/models/stg_asana__section.sql b/models/stg_asana__section.sql index b22dbbe..7e28658 100644 --- a/models/stg_asana__section.sql +++ b/models/stg_asana__section.sql @@ -23,7 +23,7 @@ final as ( select id as section_id, - created_at, + cast(created_at as {{ dbt_utils.type_timestamp() }}) as created_at, name as section_name, project_id from fields diff --git a/models/stg_asana__story.sql b/models/stg_asana__story.sql index 6c360a3..c69d023 100644 --- a/models/stg_asana__story.sql +++ b/models/stg_asana__story.sql @@ -23,7 +23,7 @@ final as ( select id as story_id, - created_at, + cast(created_at as {{ dbt_utils.type_timestamp() }}) as created_at, created_by_id as created_by_user_id, target_id as target_task_id, text as story_content, diff --git a/models/stg_asana__tag.sql b/models/stg_asana__tag.sql index 80f19d5..58e5b1c 100644 --- a/models/stg_asana__tag.sql +++ b/models/stg_asana__tag.sql @@ -24,7 +24,7 @@ final as ( select id as tag_id, name as tag_name, - created_at + cast(created_at as {{ dbt_utils.type_timestamp() }}) as created_at from fields where not _fivetran_deleted ) diff --git a/models/stg_asana__task.sql b/models/stg_asana__task.sql index 6c70173..f4f2c4b 100644 --- a/models/stg_asana__task.sql +++ b/models/stg_asana__task.sql @@ -33,14 +33,14 @@ final as ( assignee_id as assignee_user_id, assignee_status, completed as is_completed, - completed_at, + cast(completed_at as {{ dbt_utils.type_timestamp() }}) as completed_at, completed_by_id as completed_by_user_id, - created_at, - coalesce(due_on, due_at) as due_date, - modified_at, + cast(created_at as {{ dbt_utils.type_timestamp() }}) as created_at, + cast(coalesce(due_on, due_at) as {{ dbt_utils.type_timestamp() }}) as due_date, + cast(modified_at as {{ dbt_utils.type_timestamp() }}) as modified_at, name as task_name, parent_id as parent_task_id, - start_on as start_date, + cast(start_on as {{ dbt_utils.type_timestamp() }}) as start_date, notes as task_description, workspace_id