From a3b4501fa9fb8febc1360b6bd0b474c05fbae3a7 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 4 May 2022 15:04:58 +0700 Subject: [PATCH] remove tracking_product_shares --- .../unibag/tracking_product_shares_ab1.sql | 22 ------------------ .../unibag/tracking_product_shares_ab2.sql | 22 ------------------ .../unibag/tracking_product_shares_ab3.sql | 22 ------------------ .../unibag/tracking_product_shares.sql | 23 ------------------- 4 files changed, 89 deletions(-) delete mode 100644 models/generated/airbyte_ctes/unibag/tracking_product_shares_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/tracking_product_shares_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/tracking_product_shares_ab3.sql delete mode 100644 models/generated/airbyte_tables/unibag/tracking_product_shares.sql diff --git a/models/generated/airbyte_ctes/unibag/tracking_product_shares_ab1.sql b/models/generated/airbyte_ctes/unibag/tracking_product_shares_ab1.sql deleted file mode 100644 index 963e2ff..0000000 --- a/models/generated/airbyte_ctes/unibag/tracking_product_shares_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - unique_key = '_airbyte_ab_id', - schema = "_airbyte_unibag", - tags = [ "top-level-intermediate" ] -) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema --- depends_on: {{ source('unibag', '_airbyte_raw_tracking_product_shares') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['user'], ['user']) }} as {{ adapter.quote('user') }}, - {{ json_extract_scalar('_airbyte_data', ['source'], ['source']) }} as {{ adapter.quote('source') }}, - {{ json_extract_scalar('_airbyte_data', ['options'], ['options']) }} as {{ adapter.quote('options') }}, - {{ json_extract_scalar('_airbyte_data', ['products'], ['products']) }} as products, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_tracking_product_shares') }} as table_alias --- tracking_product_shares -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/tracking_product_shares_ab2.sql b/models/generated/airbyte_ctes/unibag/tracking_product_shares_ab2.sql deleted file mode 100644 index 5faf1fe..0000000 --- a/models/generated/airbyte_ctes/unibag/tracking_product_shares_ab2.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - unique_key = '_airbyte_ab_id', - schema = "_airbyte_unibag", - tags = [ "top-level-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('tracking_product_shares_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('user') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('user') }}, - cast({{ adapter.quote('source') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('source') }}, - cast({{ adapter.quote('options') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('options') }}, - cast(products as {{ dbt_utils.type_string() }}) as products, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('tracking_product_shares_ab1') }} --- tracking_product_shares -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/tracking_product_shares_ab3.sql b/models/generated/airbyte_ctes/unibag/tracking_product_shares_ab3.sql deleted file mode 100644 index c3be48b..0000000 --- a/models/generated/airbyte_ctes/unibag/tracking_product_shares_ab3.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - unique_key = '_airbyte_ab_id', - schema = "_airbyte_unibag", - tags = [ "top-level-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('tracking_product_shares_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - adapter.quote('user'), - adapter.quote('source'), - adapter.quote('options'), - 'products', - 'createdat', - ]) }} as _airbyte_tracking_product_shares_hashid, - tmp.* -from {{ ref('tracking_product_shares_ab2') }} tmp --- tracking_product_shares -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/tracking_product_shares.sql b/models/generated/airbyte_tables/unibag/tracking_product_shares.sql deleted file mode 100644 index cfb3ded..0000000 --- a/models/generated/airbyte_tables/unibag/tracking_product_shares.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('tracking_product_shares_ab3') }} -select - _id, - {{ adapter.quote('source') }}, - {{ adapter.quote('user') }} AS seller_id, - products AS product_id, - {{ adapter.quote('options') }}::json->>'action' AS options_action, - createdat::timestamp AS created_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_tracking_product_shares_hashid -from {{ ref('tracking_product_shares_ab3') }} --- tracking_product_shares from {{ source('unibag', '_airbyte_raw_tracking_product_shares') }} -where 1 = 1 -