From efe4c716882f2d4909dc1051a624328e6ef37457 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 19 Apr 2022 17:27:57 +0700 Subject: [PATCH] update --- Makefile | 10 --- destination_catalog.json | 2 +- .../airbyte_ctes/unibag/admin_tags_ab1.sql | 24 ------ .../airbyte_ctes/unibag/admin_tags_ab2.sql | 24 ------ .../airbyte_ctes/unibag/admin_tags_ab3.sql | 24 ------ .../airbyte_ctes/unibag/cash_flows_ab1.sql | 32 -------- .../airbyte_ctes/unibag/cash_flows_ab2.sql | 32 -------- .../airbyte_ctes/unibag/cash_flows_ab3.sql | 32 -------- .../airbyte_ctes/unibag/cities_ab1.sql | 29 -------- .../airbyte_ctes/unibag/cities_ab2.sql | 29 -------- .../airbyte_ctes/unibag/cities_ab3.sql | 29 -------- .../airbyte_ctes/unibag/customers_ab1.sql | 29 -------- .../airbyte_ctes/unibag/customers_ab2.sql | 29 -------- .../airbyte_ctes/unibag/customers_ab3.sql | 29 -------- .../airbyte_ctes/unibag/districts_ab1.sql | 29 -------- .../airbyte_ctes/unibag/districts_ab2.sql | 29 -------- .../airbyte_ctes/unibag/districts_ab3.sql | 29 -------- .../airbyte_ctes/unibag/event_rewards_ab1.sql | 25 ------- .../airbyte_ctes/unibag/event_rewards_ab2.sql | 25 ------- .../airbyte_ctes/unibag/event_rewards_ab3.sql | 25 ------- .../airbyte_ctes/unibag/events_ab1.sql | 38 ---------- .../airbyte_ctes/unibag/events_ab2.sql | 38 ---------- .../airbyte_ctes/unibag/events_ab3.sql | 38 ---------- .../airbyte_ctes/unibag/inventories_ab1.sql | 38 ---------- .../airbyte_ctes/unibag/inventories_ab2.sql | 38 ---------- .../airbyte_ctes/unibag/inventories_ab3.sql | 38 ---------- .../airbyte_ctes/unibag/membership_ab1.sql | 30 -------- .../airbyte_ctes/unibag/membership_ab2.sql | 30 -------- .../airbyte_ctes/unibag/membership_ab3.sql | 30 -------- .../unibag/membership_histories_ab1.sql | 22 ------ .../unibag/membership_histories_ab2.sql | 22 ------ .../unibag/membership_histories_ab3.sql | 22 ------ .../unibag/membership_orders_ab1.sql | 28 ------- .../unibag/membership_orders_ab2.sql | 28 ------- .../unibag/membership_orders_ab3.sql | 28 ------- .../unibag/order_deliveries_ab1.sql | 33 --------- .../unibag/order_deliveries_ab2.sql | 33 --------- .../unibag/order_deliveries_ab3.sql | 33 --------- .../unibag/order_histories_ab1.sql | 22 ------ .../unibag/order_histories_ab2.sql | 22 ------ .../unibag/order_histories_ab3.sql | 22 ------ .../airbyte_ctes/unibag/order_items_ab1.sql | 45 ----------- .../airbyte_ctes/unibag/order_items_ab2.sql | 45 ----------- .../airbyte_ctes/unibag/order_items_ab3.sql | 45 ----------- .../airbyte_ctes/unibag/orders_ab1.sql | 74 ------------------- .../airbyte_ctes/unibag/orders_ab2.sql | 74 ------------------- .../airbyte_ctes/unibag/orders_ab3.sql | 74 ------------------- .../unibag/product_categories_ab1.sql | 27 ------- .../unibag/product_categories_ab2.sql | 27 ------- .../unibag/product_categories_ab3.sql | 27 ------- .../airbyte_ctes/unibag/product_sku_ab1.sql | 48 ------------ .../airbyte_ctes/unibag/product_sku_ab2.sql | 48 ------------ .../airbyte_ctes/unibag/product_sku_ab3.sql | 48 ------------ .../unibag/product_sku_versions_ab1.sql | 30 -------- .../unibag/product_sku_versions_ab2.sql | 30 -------- .../unibag/product_sku_versions_ab3.sql | 30 -------- .../unibag/product_sub_categories_ab1.sql | 25 ------- .../unibag/product_sub_categories_ab2.sql | 25 ------- .../unibag/product_sub_categories_ab3.sql | 25 ------- .../airbyte_ctes/unibag/products_ab1.sql | 52 ------------- .../airbyte_ctes/unibag/products_ab2.sql | 52 ------------- .../airbyte_ctes/unibag/products_ab3.sql | 52 ------------- .../unibag/promotion_orders_ab1.sql | 31 -------- .../unibag/promotion_orders_ab2.sql | 31 -------- .../unibag/promotion_orders_ab3.sql | 31 -------- .../airbyte_ctes/unibag/promotions_ab1.sql | 35 --------- .../airbyte_ctes/unibag/promotions_ab2.sql | 35 --------- .../airbyte_ctes/unibag/promotions_ab3.sql | 35 --------- .../airbyte_ctes/unibag/referrals_ab1.sql | 21 ------ .../airbyte_ctes/unibag/referrals_ab2.sql | 21 ------ .../airbyte_ctes/unibag/referrals_ab3.sql | 21 ------ .../unibag/social_post_views_ab1.sql | 21 ------ .../unibag/social_post_views_ab2.sql | 21 ------ .../unibag/social_post_views_ab3.sql | 21 ------ .../airbyte_ctes/unibag/social_posts_ab1.sql | 43 ----------- .../airbyte_ctes/unibag/social_posts_ab2.sql | 43 ----------- .../airbyte_ctes/unibag/social_posts_ab3.sql | 43 ----------- .../airbyte_ctes/unibag/suppliers_ab1.sql | 40 ---------- .../airbyte_ctes/unibag/suppliers_ab2.sql | 40 ---------- .../airbyte_ctes/unibag/suppliers_ab3.sql | 40 ---------- .../unibag/team_activities_ab1.sql | 23 ------ .../unibag/team_activities_ab2.sql | 23 ------ .../unibag/team_activities_ab3.sql | 23 ------ .../airbyte_ctes/unibag/team_bonus_ab1.sql | 29 -------- .../airbyte_ctes/unibag/team_bonus_ab2.sql | 29 -------- .../airbyte_ctes/unibag/team_bonus_ab3.sql | 29 -------- .../airbyte_ctes/unibag/team_members_ab1.sql | 31 -------- .../airbyte_ctes/unibag/team_members_ab2.sql | 31 -------- .../airbyte_ctes/unibag/team_members_ab3.sql | 31 -------- .../airbyte_ctes/unibag/teams_ab1.sql | 34 --------- .../airbyte_ctes/unibag/teams_ab2.sql | 34 --------- .../airbyte_ctes/unibag/teams_ab3.sql | 34 --------- .../unibag/user_identifications_ab1.sql | 38 ---------- .../unibag/user_identifications_ab2.sql | 38 ---------- .../unibag/user_identifications_ab3.sql | 38 ---------- .../airbyte_ctes/unibag/users_ab1.sql | 44 ----------- .../airbyte_ctes/unibag/users_ab2.sql | 44 ----------- .../airbyte_ctes/unibag/users_ab3.sql | 44 ----------- .../airbyte_ctes/unibag/wards_ab1.sql | 32 -------- .../airbyte_ctes/unibag/wards_ab2.sql | 32 -------- .../airbyte_ctes/unibag/wards_ab3.sql | 32 -------- .../airbyte_tables/unibag/admin_tags.sql | 23 ------ .../airbyte_tables/unibag/cash_flows.sql | 25 ------- .../airbyte_tables/unibag/cities.sql | 22 ------ .../airbyte_tables/unibag/customers.sql | 28 ------- .../airbyte_tables/unibag/districts.sql | 22 ------ .../airbyte_tables/unibag/event_rewards.sql | 32 -------- .../airbyte_tables/unibag/events.sql | 22 ------ .../airbyte_tables/unibag/inventories.sql | 29 -------- .../airbyte_tables/unibag/membership.sql | 26 ------- .../unibag/membership_histories.sql | 25 ------- .../unibag/membership_orders.sql | 29 -------- .../unibag/order_deliveries.sql | 50 ------------- .../airbyte_tables/unibag/order_histories.sql | 21 ------ .../airbyte_tables/unibag/order_items.sql | 38 ---------- .../airbyte_tables/unibag/orders.sql | 56 -------------- .../unibag/product_categories.sql | 20 ----- .../airbyte_tables/unibag/product_sku.sql | 43 ----------- .../unibag/product_sku_versions.sql | 41 ---------- .../unibag/product_sub_categories.sql | 21 ------ .../airbyte_tables/unibag/products.sql | 28 ------- .../unibag/promotion_orders.sql | 34 --------- .../airbyte_tables/unibag/promotions.sql | 38 ---------- .../airbyte_tables/unibag/referrals.sql | 21 ------ .../unibag/social_post_views.sql | 20 ----- .../airbyte_tables/unibag/social_posts.sql | 38 ---------- .../airbyte_tables/unibag/suppliers.sql | 20 ----- .../airbyte_tables/unibag/team_activities.sql | 22 ------ .../airbyte_tables/unibag/team_bonus.sql | 30 -------- .../airbyte_tables/unibag/team_members.sql | 26 ------- .../generated/airbyte_tables/unibag/teams.sql | 30 -------- .../unibag/user_identifications.sql | 27 ------- .../generated/airbyte_tables/unibag/users.sql | 36 --------- .../generated/airbyte_tables/unibag/wards.sql | 23 ------ models/generated/sources.yml | 33 --------- 135 files changed, 1 insertion(+), 4316 deletions(-) delete mode 100644 Makefile delete mode 100644 models/generated/airbyte_ctes/unibag/admin_tags_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/admin_tags_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/admin_tags_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/cash_flows_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/cash_flows_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/cash_flows_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/cities_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/cities_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/cities_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/customers_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/customers_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/customers_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/districts_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/districts_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/districts_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/event_rewards_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/event_rewards_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/event_rewards_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_orders_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_orders_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_orders_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_histories_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_histories_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_histories_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_items_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_items_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_items_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sub_categories_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sub_categories_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sub_categories_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotion_orders_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotion_orders_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotion_orders_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/referrals_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/referrals_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/referrals_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/social_post_views_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/social_post_views_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/social_post_views_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/social_posts_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/social_posts_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/social_posts_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_activities_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_activities_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_activities_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_bonus_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_bonus_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_bonus_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_members_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_members_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_members_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/wards_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/wards_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/wards_ab3.sql delete mode 100644 models/generated/airbyte_tables/unibag/admin_tags.sql delete mode 100644 models/generated/airbyte_tables/unibag/cash_flows.sql delete mode 100644 models/generated/airbyte_tables/unibag/cities.sql delete mode 100644 models/generated/airbyte_tables/unibag/customers.sql delete mode 100644 models/generated/airbyte_tables/unibag/districts.sql delete mode 100644 models/generated/airbyte_tables/unibag/event_rewards.sql delete mode 100644 models/generated/airbyte_tables/unibag/events.sql delete mode 100644 models/generated/airbyte_tables/unibag/inventories.sql delete mode 100644 models/generated/airbyte_tables/unibag/membership.sql delete mode 100644 models/generated/airbyte_tables/unibag/membership_histories.sql delete mode 100644 models/generated/airbyte_tables/unibag/membership_orders.sql delete mode 100644 models/generated/airbyte_tables/unibag/order_deliveries.sql delete mode 100644 models/generated/airbyte_tables/unibag/order_histories.sql delete mode 100644 models/generated/airbyte_tables/unibag/order_items.sql delete mode 100644 models/generated/airbyte_tables/unibag/orders.sql delete mode 100644 models/generated/airbyte_tables/unibag/product_categories.sql delete mode 100644 models/generated/airbyte_tables/unibag/product_sku.sql delete mode 100644 models/generated/airbyte_tables/unibag/product_sku_versions.sql delete mode 100644 models/generated/airbyte_tables/unibag/product_sub_categories.sql delete mode 100644 models/generated/airbyte_tables/unibag/products.sql delete mode 100644 models/generated/airbyte_tables/unibag/promotion_orders.sql delete mode 100644 models/generated/airbyte_tables/unibag/promotions.sql delete mode 100644 models/generated/airbyte_tables/unibag/referrals.sql delete mode 100644 models/generated/airbyte_tables/unibag/social_post_views.sql delete mode 100644 models/generated/airbyte_tables/unibag/social_posts.sql delete mode 100644 models/generated/airbyte_tables/unibag/suppliers.sql delete mode 100644 models/generated/airbyte_tables/unibag/team_activities.sql delete mode 100644 models/generated/airbyte_tables/unibag/team_bonus.sql delete mode 100644 models/generated/airbyte_tables/unibag/team_members.sql delete mode 100644 models/generated/airbyte_tables/unibag/teams.sql delete mode 100644 models/generated/airbyte_tables/unibag/user_identifications.sql delete mode 100644 models/generated/airbyte_tables/unibag/users.sql delete mode 100644 models/generated/airbyte_tables/unibag/wards.sql diff --git a/Makefile b/Makefile deleted file mode 100644 index 01621ed..0000000 --- a/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -#!bin/bash - -push: - git add . && git commit -a -m "update" && git push - -run: - dbt deps --profiles-dir=. --project-dir=. - #dbt run --profiles-dir=. --project-dir=. --full-refresh - dbt run --profiles-dir=. --project-dir=. --full-refresh --select tracking_product_shares - diff --git a/destination_catalog.json b/destination_catalog.json index 0118dcb..391f1d6 100644 --- a/destination_catalog.json +++ b/destination_catalog.json @@ -1 +1 @@ -{"streams":[{"stream":{"name":"admin-tags","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"color":{"type":"string"},"active":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"searchString":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"cash-flows","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"hash":{"type":"string"},"user":{"type":"string"},"value":{"type":"number"},"action":{"type":"string"},"options":{"type":"string"},"category":{"type":"string"},"targetId":{"type":"string"},"createdAt":{"type":"string"},"isAudited":{"type":"boolean"},"updatedAt":{"type":"string"},"newBalance":{"type":"number"},"oldBalance":{"type":"number"},"targetType":{"type":"string"},"isProcessed":{"type":"boolean"},"processStatus":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"cities","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"number"},"name":{"type":"string"},"slug":{"type":"string"},"order":{"type":"number"},"tncId":{"type":"number"},"region":{"type":"string"},"source":{"type":"string"},"tempId":{"type":"number"},"tncCode":{"type":"string"},"osirisId":{"type":"number"},"updatedAt":{"type":"string"},"searchString":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"customers","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"info":{"type":"string"},"name":{"type":"string"},"user":{"type":"string"},"phone":{"type":"string"},"source":{"type":"string"},"location":{"type":"array"},"createdAt":{"type":"string"},"isDeleted":{"type":"boolean"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"searchString":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"districts","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"city":{"type":"string"},"code":{"type":"number"},"name":{"type":"string"},"slug":{"type":"string"},"tncId":{"type":"number"},"cityId":{"type":"number"},"source":{"type":"string"},"tncCode":{"type":"string"},"gidoCode":{"type":"number"},"osirisId":{"type":"number"},"updatedAt":{"type":"string"},"searchString":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"event-rewards","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"cash":{"type":"number"},"type":{"type":"string"},"user":{"type":"string"},"event":{"type":"string"},"status":{"type":"string"},"options":{"type":"string"},"createdAt":{"type":"string"},"updatedat":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"events","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"desc":{"type":"string"},"icon":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"cover":{"type":"string"},"endAt":{"type":"string"},"active":{"type":"boolean"},"notice":{"type":"string"},"article":{"type":"string"},"options":{"type":"string"},"startAt":{"type":"string"},"segments":{"type":"string"},"createdAt":{"type":"string"},"suppliers":{"type":"array"},"updatedAt":{"type":"string"},"information":{"type":"array"},"displayEndAt":{"type":"string"},"isApplyForAll":{"type":"boolean"},"displayStartAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"inventories","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"number"},"name":{"type":"string"},"slug":{"type":"string"},"active":{"type":"boolean"},"contact":{"type":"string"},"partner":{"type":"string"},"checksum":{"type":"string"},"location":{"type":"string"},"supplier":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"minimumValue":{"type":"number"},"searchString":{"type":"string"},"paymentMethods":{"type":"string"},"canIssueInvoice":{"type":"boolean"},"deliveryMethods":{"type":"array"},"canAutoSendEmail":{"type":"boolean"},"invoiceDeliveryMethod":{"type":"string"},"doesSupportSellyExpress":{"type":"boolean"},"priorityDeliveryServiceCodes":{"type":"array"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"membership","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"guide":{"type":"string"},"level":{"type":"number"},"sales":{"type":"number"},"active":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"transaction":{"type":"number"},"bonusPercent":{"type":"number"},"transactionMinValue":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"membership-histories","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"new":{"type":"string"},"old":{"type":"string"},"type":{"type":"string"},"user":{"type":"string"},"createdAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"membership-orders","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"status":{"type":"string"},"percent":{"type":"number"},"targetID":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"commission":{"type":"number"},"isRejected":{"type":"boolean"},"membershipName":{"type":"string"},"membershipLevel":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"order-deliveries","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"order":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"weight":{"type":"string"},"service":{"type":"string"},"customer":{"type":"string"},"delivery":{"type":"string"},"location":{"type":"string"},"createdAt":{"type":"string"},"promotion":{"type":"string"},"updatedAt":{"type":"string"},"trackingCode":{"type":"string"},"trackingTime":{"type":"string"},"isAdminChange":{"type":"boolean"},"trackingOrderCode":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"order-histories","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"order":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"timeStamp":{"type":"number"},"updatedAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"order-items","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"sku":{"type":"string"},"date":{"type":"string"},"user":{"type":"string"},"order":{"type":"string"},"price":{"type":"string"},"status":{"type":"string"},"product":{"type":"string"},"customer":{"type":"string"},"quantity":{"type":"number"},"createdAt":{"type":"string"},"totalSell":{"type":"number"},"updatedAt":{"type":"string"},"cashbackAt":{"type":"string"},"totalPrice":{"type":"number"},"deliveredAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"orders","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"date":{"type":"string"},"hour":{"type":"number"},"note":{"type":"string"},"skus":{"type":"array"},"tags":{"type":"array"},"user":{"type":"string"},"price":{"type":"string"},"banned":{"type":"boolean"},"reason":{"type":"string"},"source":{"type":"string"},"status":{"type":"string"},"update":{"type":"string"},"payment":{"type":"string"},"remarks":{"type":"string"},"customer":{"type":"string"},"delivery":{"type":"string"},"pickupAt":{"type":"string"},"products":{"type":"array"},"supplier":{"type":"string"},"approveAt":{"type":"string"},"createdAt":{"type":"string"},"inventory":{"type":"string"},"isDeleted":{"type":"boolean"},"promotion":{"type":"string"},"requestId":{"type":"string"},"sendEmail":{"type":"string"},"totalItem":{"type":"number"},"updatedAt":{"type":"string"},"userAgent":{"type":"string"},"wholesale":{"type":"boolean"},"approvedAt":{"type":"string"},"cashbackAt":{"type":"string"},"codeOsiris":{"type":"string"},"isPreorder":{"type":"boolean"},"membership":{"type":"string"},"rejectedAt":{"type":"string"},"deliveredAt":{"type":"string"},"deliveringAt":{"type":"string"},"deliveryCode":{"type":"string"},"searchString":{"type":"string"},"staffApprove":{"type":"string"},"trackingCode":{"type":"string"},"processStatus":{"type":"string"},"hookTimeLastAt":{"type":"string"},"trackingCodeURL":{"type":"string"},"approvePaymentAt":{"type":"string"},"isChangeDelivery":{"type":"boolean"},"trackingOrderCode":{"type":"string"},"estimateCashbackAt":{"type":"string"},"isWaitingCancelled":{"type":"boolean"},"fromNewActiveSeller":{"type":"boolean"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"product-categories","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"icon":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"},"active":{"type":"boolean"},"covers":{"type":"array"},"featured":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"totalProduct":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"product-sku","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"sku":{"type":"string"},"info":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"brand":{"type":"string"},"cover":{"type":"string"},"price":{"type":"string"},"active":{"type":"boolean"},"author":{"type":"string"},"manual":{"type":"boolean"},"source":{"type":"string"},"display":{"type":"boolean"},"picture":{"type":"string"},"product":{"type":"string"},"version":{"type":"number"},"groupSku":{"type":"string"},"unitCode":{"type":"string"},"createdAt":{"type":"string"},"restockAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"properties":{"type":"array"},"canPreorder":{"type":"boolean"},"supplierSku":{"type":"string"},"isOutOfStock":{"type":"boolean"},"pricePercent":{"type":"string"},"searchString":{"type":"string"},"updateReason":{"type":"string"},"updateActiveId":{"type":"string"},"displayInventory":{"type":"boolean"},"showRemainingQuantity":{"type":"boolean"},"quantity_aibyte_transform":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"product-sku-versions","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"sku":{"type":"string"},"info":{"type":"string"},"name":{"type":"string"},"price":{"type":"string"},"source":{"type":"string"},"codeSku":{"type":"string"},"picture":{"type":"string"},"product":{"type":"string"},"version":{"type":"number"},"createdAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"properties":{"type":"array"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"product-sub-categories","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"order":{"type":"number"},"active":{"type":"boolean"},"parent":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"searchString":{"type":"string"},"totalProduct":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"products","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"desc":{"type":"string"},"info":{"type":"string"},"name":{"type":"string"},"temp":{"type":"string"},"brand":{"type":"string"},"order":{"type":"string"},"price":{"type":"string"},"score":{"type":"string"},"active":{"type":"boolean"},"author":{"type":"string"},"guides":{"type":"array"},"photos":{"type":"array"},"videos":{"type":"array"},"quantity":{"type":"number"},"createdAt":{"type":"string"},"documents":{"type":"array"},"shareDesc":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"categories":{"type":"array"},"inactiveAt":{"type":"string"},"properties":{"type":"array"},"reActiveAt":{"type":"string"},"inventories":{"type":"array"},"displaySKUId":{"type":"string"},"isOutOfStock":{"type":"boolean"},"pricePercent":{"type":"string"},"searchString":{"type":"string"},"subCategories":{"type":"array"},"inactiveReason":{"type":"string"},"propertiesMain":{"type":"string"},"shareStatistic":{"type":"string"},"updateActiveId":{"type":"string"},"canIssueInvoice":{"type":"boolean"},"pendingInactive":{"type":"boolean"},"reviewStatistic":{"type":"string"},"highlightProperties":{"type":"array"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"promotion-orders","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"order":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"supplier":{"type":"string"},"createdAt":{"type":"string"},"promotion":{"type":"string"},"updatedAt":{"type":"string"},"cashbackAt":{"type":"string"},"commission":{"type":"number"},"isRejected":{"type":"boolean"},"orderPriceTotal":{"type":"number"},"quantityPromotion":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"promotions","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"rest":{"type":"number"},"type":{"type":"string"},"endAt":{"type":"string"},"title":{"type":"string"},"active":{"type":"boolean"},"options":{"type":"string"},"startAt":{"type":"string"},"applyFor":{"type":"string"},"quantity":{"type":"number"},"articleID":{"type":"string"},"createdAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"searchString":{"type":"string"},"conditionForUser":{"type":"string"},"supplierCommission":{"type":"string"},"isUnlimitedQuantity":{"type":"boolean"},"isApplyForOrderWholesale":{"type":"boolean"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"referrals","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"invitee":{"type":"string"},"createdAt":{"type":"string"},"fromSystem":{"type":"boolean"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"social-post-views","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"clientIP":{"type":"string"},"lastViewAt":{"type":"string"},"socialPost":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"social-posts","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"tags":{"type":"array"},"isPin":{"type":"boolean"},"order":{"type":"number"},"title":{"type":"string"},"author":{"type":"string"},"cities":{"type":"array"},"photos":{"type":"array"},"reason":{"type":"string"},"status":{"type":"string"},"videos":{"type":"array"},"content":{"type":"string"},"isTimer":{"type":"boolean"},"startAt":{"type":"string"},"products":{"type":"array"},"createdAt":{"type":"string"},"hasUpdate":{"type":"boolean"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"categories":{"type":"array"},"fromSystem":{"type":"boolean"},"contributor":{"type":"string"},"publishedAt":{"type":"string"},"searchString":{"type":"string"},"updatedCount":{"type":"number"},"shareStatistic":{"type":"string"},"enableNotificationForContributor":{"type":"boolean"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"suppliers","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"tax":{"type":"string"},"bank":{"type":"string"},"logo":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean"},"balance":{"type":"string"},"checkSum":{"type":"string"},"checksum":{"type":"string"},"location":{"type":"string"},"contracts":{"type":"array"},"createdAt":{"type":"string"},"documents":{"type":"array"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"categories":{"type":"array"},"inventories":{"type":"array"},"identifyCode":{"type":"number"},"searchString":{"type":"string"},"reconcileDays":{"type":"array"},"contractNumber":{"type":"string"},"reviewStatistic":{"type":"string"},"contractSignedAt":{"type":"string"},"emailForInvoices":{"type":"array"},"contractExpiredAt":{"type":"string"},"sendInvoiceRequestEveryDay":{"type":"boolean"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"team-activities","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"team":{"type":"string"},"action":{"type":"string"},"options":{"type":"string"},"targetId":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"team-bonus","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"team":{"type":"string"},"user":{"type":"string"},"status":{"type":"string"},"percent":{"type":"number"},"targetId":{"type":"string"},"teamName":{"type":"string"},"createdAt":{"type":"string"},"teamLevel":{"type":"number"},"updatedAt":{"type":"string"},"commission":{"type":"number"},"teamMember":{"type":"string"},"teamPromotion":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"team-members","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"role":{"type":"string"},"team":{"type":"string"},"user":{"type":"string"},"isLeft":{"type":"boolean"},"leftAt":{"type":"string"},"joinedAt":{"type":"string"},"roleCode":{"type":"number"},"createdAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"isRemovedBy":{"type":"string"},"searchString":{"type":"string"},"statisticMonth":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"teams","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"desc":{"type":"string"},"logo":{"type":"string"},"name":{"type":"string"},"temp":{"type":"string"},"level":{"type":"string"},"active":{"type":"boolean"},"isFull":{"type":"boolean"},"cityCode":{"type":"number"},"adminUser":{"type":"string"},"createdAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"inviteLink":{"type":"string"},"information":{"type":"string"},"searchString":{"type":"string"},"inactiveReason":{"type":"string"},"changingNameCount":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"tracking-product-shares","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"source":{"type":"string"},"options":{"type":"string"},"products":{"type":"string"},"createdAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"user-identifications","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"dob":{"type":"string"},"name":{"type":"string"},"note":{"type":"string"},"type":{"type":"string"},"user":{"type":"string"},"gender":{"type":"string"},"nation":{"type":"string"},"number":{"type":"string"},"status":{"type":"string"},"address":{"type":"string"},"backSide":{"type":"string"},"birthday":{"type":"string"},"createdAt":{"type":"string"},"frontSide":{"type":"string"},"issueDate":{"type":"string"},"updatedAt":{"type":"string"},"expiryDate":{"type":"string"},"issuePlace":{"type":"string"},"timeUpdate":{"type":"number"},"detectInformation":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"users","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"info":{"type":"string"},"name":{"type":"string"},"team":{"type":"string"},"zalo":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"avatar":{"type":"string"},"banned":{"type":"boolean"},"segment":{"type":"string"},"facebook":{"type":"string"},"hasOrder":{"type":"boolean"},"referral":{"type":"string"},"segments":{"type":"array"},"createdAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"membership":{"type":"string"},"registerFrom":{"type":"string"},"searchString":{"type":"string"},"isUpdatedInfo":{"type":"boolean"},"identification":{"type":"string"},"lastActivatedAt":{"type":"string"},"lastViewNotificationAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"wards","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"city":{"type":"string"},"code":{"type":"number"},"name":{"type":"string"},"slug":{"type":"string"},"tncId":{"type":"number"},"cityId":{"type":"number"},"source":{"type":"string"},"tncCode":{"type":"string"},"district":{"type":"string"},"gidoCode":{"type":"number"},"osirisId":{"type":"number"},"updatedAt":{"type":"string"},"districtId":{"type":"number"},"provinceId":{"type":"number"},"searchString":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]}]} \ No newline at end of file +{"streams":[{"stream":{"name":"tracking-product-shares","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"source":{"type":"string"},"options":{"type":"string"},"products":{"type":"string"},"createdAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":["createdAt"],"destination_sync_mode":"overwrite","primary_key":[["_id"]]}]} \ No newline at end of file diff --git a/models/generated/airbyte_ctes/unibag/admin_tags_ab1.sql b/models/generated/airbyte_ctes/unibag/admin_tags_ab1.sql deleted file mode 100644 index c0e6cf2..0000000 --- a/models/generated/airbyte_ctes/unibag/admin_tags_ab1.sql +++ /dev/null @@ -1,24 +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_admin_tags') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_scalar('_airbyte_data', ['color'], ['color']) }} as color, - {{ json_extract_scalar('_airbyte_data', ['active'], ['active']) }} as active, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_admin_tags') }} as table_alias --- admin_tags -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/admin_tags_ab2.sql b/models/generated/airbyte_ctes/unibag/admin_tags_ab2.sql deleted file mode 100644 index 6aeb0d2..0000000 --- a/models/generated/airbyte_ctes/unibag/admin_tags_ab2.sql +++ /dev/null @@ -1,24 +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('admin_tags_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - cast(color as {{ dbt_utils.type_string() }}) as color, - {{ cast_to_boolean('active') }} as active, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('admin_tags_ab1') }} --- admin_tags -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/admin_tags_ab3.sql b/models/generated/airbyte_ctes/unibag/admin_tags_ab3.sql deleted file mode 100644 index ff25742..0000000 --- a/models/generated/airbyte_ctes/unibag/admin_tags_ab3.sql +++ /dev/null @@ -1,24 +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('admin_tags_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - adapter.quote('name'), - adapter.quote('type'), - 'color', - boolean_to_string('active'), - 'createdat', - 'updatedat', - 'searchstring', - ]) }} as _airbyte_admin_tags_hashid, - tmp.* -from {{ ref('admin_tags_ab2') }} tmp --- admin_tags -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/cash_flows_ab1.sql b/models/generated/airbyte_ctes/unibag/cash_flows_ab1.sql deleted file mode 100644 index 0bd7698..0000000 --- a/models/generated/airbyte_ctes/unibag/cash_flows_ab1.sql +++ /dev/null @@ -1,32 +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_cash_flows') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['hash'], ['hash']) }} as hash, - {{ json_extract_scalar('_airbyte_data', ['user'], ['user']) }} as {{ adapter.quote('user') }}, - {{ json_extract_scalar('_airbyte_data', ['value'], ['value']) }} as {{ adapter.quote('value') }}, - {{ json_extract_scalar('_airbyte_data', ['action'], ['action']) }} as {{ adapter.quote('action') }}, - {{ json_extract_scalar('_airbyte_data', ['options'], ['options']) }} as {{ adapter.quote('options') }}, - {{ json_extract_scalar('_airbyte_data', ['category'], ['category']) }} as category, - {{ json_extract_scalar('_airbyte_data', ['targetId'], ['targetId']) }} as targetid, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['isAudited'], ['isAudited']) }} as isaudited, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['newBalance'], ['newBalance']) }} as newbalance, - {{ json_extract_scalar('_airbyte_data', ['oldBalance'], ['oldBalance']) }} as oldbalance, - {{ json_extract_scalar('_airbyte_data', ['targetType'], ['targetType']) }} as targettype, - {{ json_extract_scalar('_airbyte_data', ['isProcessed'], ['isProcessed']) }} as isprocessed, - {{ json_extract_scalar('_airbyte_data', ['processStatus'], ['processStatus']) }} as processstatus, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_cash_flows') }} as table_alias --- cash_flows -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/cash_flows_ab2.sql b/models/generated/airbyte_ctes/unibag/cash_flows_ab2.sql deleted file mode 100644 index 25e9b92..0000000 --- a/models/generated/airbyte_ctes/unibag/cash_flows_ab2.sql +++ /dev/null @@ -1,32 +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('cash_flows_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(hash as {{ dbt_utils.type_string() }}) as hash, - cast({{ adapter.quote('user') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('user') }}, - cast({{ adapter.quote('value') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('value') }}, - cast({{ adapter.quote('action') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('action') }}, - cast({{ adapter.quote('options') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('options') }}, - cast(category as {{ dbt_utils.type_string() }}) as category, - cast(targetid as {{ dbt_utils.type_string() }}) as targetid, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - {{ cast_to_boolean('isaudited') }} as isaudited, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(newbalance as {{ dbt_utils.type_float() }}) as newbalance, - cast(oldbalance as {{ dbt_utils.type_float() }}) as oldbalance, - cast(targettype as {{ dbt_utils.type_string() }}) as targettype, - {{ cast_to_boolean('isprocessed') }} as isprocessed, - cast(processstatus as {{ dbt_utils.type_string() }}) as processstatus, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('cash_flows_ab1') }} --- cash_flows -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/cash_flows_ab3.sql b/models/generated/airbyte_ctes/unibag/cash_flows_ab3.sql deleted file mode 100644 index c4f4b73..0000000 --- a/models/generated/airbyte_ctes/unibag/cash_flows_ab3.sql +++ /dev/null @@ -1,32 +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('cash_flows_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'hash', - adapter.quote('user'), - adapter.quote('value'), - adapter.quote('action'), - adapter.quote('options'), - 'category', - 'targetid', - 'createdat', - boolean_to_string('isaudited'), - 'updatedat', - 'newbalance', - 'oldbalance', - 'targettype', - boolean_to_string('isprocessed'), - 'processstatus', - ]) }} as _airbyte_cash_flows_hashid, - tmp.* -from {{ ref('cash_flows_ab2') }} tmp --- cash_flows -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/cities_ab1.sql b/models/generated/airbyte_ctes/unibag/cities_ab1.sql deleted file mode 100644 index 5e51367..0000000 --- a/models/generated/airbyte_ctes/unibag/cities_ab1.sql +++ /dev/null @@ -1,29 +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_cities') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['code'], ['code']) }} as code, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['slug'], ['slug']) }} as slug, - {{ json_extract_scalar('_airbyte_data', ['order'], ['order']) }} as {{ adapter.quote('order') }}, - {{ json_extract_scalar('_airbyte_data', ['tncId'], ['tncId']) }} as tncid, - {{ json_extract_scalar('_airbyte_data', ['region'], ['region']) }} as region, - {{ json_extract_scalar('_airbyte_data', ['source'], ['source']) }} as {{ adapter.quote('source') }}, - {{ json_extract_scalar('_airbyte_data', ['tempId'], ['tempId']) }} as tempid, - {{ json_extract_scalar('_airbyte_data', ['tncCode'], ['tncCode']) }} as tnccode, - {{ json_extract_scalar('_airbyte_data', ['osirisId'], ['osirisId']) }} as osirisid, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_cities') }} as table_alias --- cities -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/cities_ab2.sql b/models/generated/airbyte_ctes/unibag/cities_ab2.sql deleted file mode 100644 index 3f37336..0000000 --- a/models/generated/airbyte_ctes/unibag/cities_ab2.sql +++ /dev/null @@ -1,29 +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('cities_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(code as {{ dbt_utils.type_float() }}) as code, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(slug as {{ dbt_utils.type_string() }}) as slug, - cast({{ adapter.quote('order') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('order') }}, - cast(tncid as {{ dbt_utils.type_float() }}) as tncid, - cast(region as {{ dbt_utils.type_string() }}) as region, - cast({{ adapter.quote('source') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('source') }}, - cast(tempid as {{ dbt_utils.type_float() }}) as tempid, - cast(tnccode as {{ dbt_utils.type_string() }}) as tnccode, - cast(osirisid as {{ dbt_utils.type_float() }}) as osirisid, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('cities_ab1') }} --- cities -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/cities_ab3.sql b/models/generated/airbyte_ctes/unibag/cities_ab3.sql deleted file mode 100644 index 99965ed..0000000 --- a/models/generated/airbyte_ctes/unibag/cities_ab3.sql +++ /dev/null @@ -1,29 +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('cities_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'code', - adapter.quote('name'), - 'slug', - adapter.quote('order'), - 'tncid', - 'region', - adapter.quote('source'), - 'tempid', - 'tnccode', - 'osirisid', - 'updatedat', - 'searchstring', - ]) }} as _airbyte_cities_hashid, - tmp.* -from {{ ref('cities_ab2') }} tmp --- cities -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/customers_ab1.sql b/models/generated/airbyte_ctes/unibag/customers_ab1.sql deleted file mode 100644 index 977ea06..0000000 --- a/models/generated/airbyte_ctes/unibag/customers_ab1.sql +++ /dev/null @@ -1,29 +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_customers') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['info'], ['info']) }} as info, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['user'], ['user']) }} as {{ adapter.quote('user') }}, - {{ json_extract_scalar('_airbyte_data', ['email'], ['email']) }} as email, - {{ json_extract_scalar('_airbyte_data', ['phone'], ['phone']) }} as phone, - {{ json_extract_scalar('_airbyte_data', ['source'], ['source']) }} as {{ adapter.quote('source') }}, - {{ json_extract_array('_airbyte_data', ['location'], ['location']) }} as {{ adapter.quote('location') }}, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['isDeleted'], ['isDeleted']) }} as isdeleted, - {{ json_extract_scalar('_airbyte_data', ['statistic'], ['statistic']) }} as statistic, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_customers') }} as table_alias --- customers -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/customers_ab2.sql b/models/generated/airbyte_ctes/unibag/customers_ab2.sql deleted file mode 100644 index c4ca101..0000000 --- a/models/generated/airbyte_ctes/unibag/customers_ab2.sql +++ /dev/null @@ -1,29 +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('customers_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(info as {{ dbt_utils.type_string() }}) as info, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast({{ adapter.quote('user') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('user') }}, - cast(email as {{ dbt_utils.type_string() }}) as email, - cast(phone as {{ dbt_utils.type_string() }}) as phone, - cast({{ adapter.quote('source') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('source') }}, - {{ adapter.quote('location') }}, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - {{ cast_to_boolean('isdeleted') }} as isdeleted, - cast(statistic as {{ dbt_utils.type_string() }}) as statistic, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('customers_ab1') }} --- customers -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/customers_ab3.sql b/models/generated/airbyte_ctes/unibag/customers_ab3.sql deleted file mode 100644 index c980251..0000000 --- a/models/generated/airbyte_ctes/unibag/customers_ab3.sql +++ /dev/null @@ -1,29 +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('customers_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'info', - adapter.quote('name'), - adapter.quote('user'), - 'email', - 'phone', - adapter.quote('source'), - array_to_string(adapter.quote('location')), - 'createdat', - boolean_to_string('isdeleted'), - 'statistic', - 'updatedat', - 'searchstring', - ]) }} as _airbyte_customers_hashid, - tmp.* -from {{ ref('customers_ab2') }} tmp --- customers -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/districts_ab1.sql b/models/generated/airbyte_ctes/unibag/districts_ab1.sql deleted file mode 100644 index d9d32cf..0000000 --- a/models/generated/airbyte_ctes/unibag/districts_ab1.sql +++ /dev/null @@ -1,29 +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_districts') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['city'], ['city']) }} as city, - {{ json_extract_scalar('_airbyte_data', ['code'], ['code']) }} as code, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['slug'], ['slug']) }} as slug, - {{ json_extract_scalar('_airbyte_data', ['tncId'], ['tncId']) }} as tncid, - {{ json_extract_scalar('_airbyte_data', ['cityId'], ['cityId']) }} as cityid, - {{ json_extract_scalar('_airbyte_data', ['source'], ['source']) }} as {{ adapter.quote('source') }}, - {{ json_extract_scalar('_airbyte_data', ['tncCode'], ['tncCode']) }} as tnccode, - {{ json_extract_scalar('_airbyte_data', ['gidoCode'], ['gidoCode']) }} as gidocode, - {{ json_extract_scalar('_airbyte_data', ['osirisId'], ['osirisId']) }} as osirisid, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_districts') }} as table_alias --- districts -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/districts_ab2.sql b/models/generated/airbyte_ctes/unibag/districts_ab2.sql deleted file mode 100644 index c7d5ef7..0000000 --- a/models/generated/airbyte_ctes/unibag/districts_ab2.sql +++ /dev/null @@ -1,29 +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('districts_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(city as {{ dbt_utils.type_string() }}) as city, - cast(code as {{ dbt_utils.type_float() }}) as code, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(slug as {{ dbt_utils.type_string() }}) as slug, - cast(tncid as {{ dbt_utils.type_float() }}) as tncid, - cast(cityid as {{ dbt_utils.type_float() }}) as cityid, - cast({{ adapter.quote('source') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('source') }}, - cast(tnccode as {{ dbt_utils.type_string() }}) as tnccode, - cast(gidocode as {{ dbt_utils.type_float() }}) as gidocode, - cast(osirisid as {{ dbt_utils.type_float() }}) as osirisid, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('districts_ab1') }} --- districts -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/districts_ab3.sql b/models/generated/airbyte_ctes/unibag/districts_ab3.sql deleted file mode 100644 index eea5d42..0000000 --- a/models/generated/airbyte_ctes/unibag/districts_ab3.sql +++ /dev/null @@ -1,29 +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('districts_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'city', - 'code', - adapter.quote('name'), - 'slug', - 'tncid', - 'cityid', - adapter.quote('source'), - 'tnccode', - 'gidocode', - 'osirisid', - 'updatedat', - 'searchstring', - ]) }} as _airbyte_districts_hashid, - tmp.* -from {{ ref('districts_ab2') }} tmp --- districts -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/event_rewards_ab1.sql b/models/generated/airbyte_ctes/unibag/event_rewards_ab1.sql deleted file mode 100644 index fa06cec..0000000 --- a/models/generated/airbyte_ctes/unibag/event_rewards_ab1.sql +++ /dev/null @@ -1,25 +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_event_rewards') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['cash'], ['cash']) }} as cash, - {{ json_extract_scalar('_airbyte_data', ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_scalar('_airbyte_data', ['user'], ['user']) }} as {{ adapter.quote('user') }}, - {{ json_extract_scalar('_airbyte_data', ['event'], ['event']) }} as {{ adapter.quote('event') }}, - {{ json_extract_scalar('_airbyte_data', ['status'], ['status']) }} as status, - {{ json_extract_scalar('_airbyte_data', ['options'], ['options']) }} as {{ adapter.quote('options') }}, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['updatedat'], ['updatedat']) }} as updatedat, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_event_rewards') }} as table_alias --- event_rewards -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/event_rewards_ab2.sql b/models/generated/airbyte_ctes/unibag/event_rewards_ab2.sql deleted file mode 100644 index bfcdc1a..0000000 --- a/models/generated/airbyte_ctes/unibag/event_rewards_ab2.sql +++ /dev/null @@ -1,25 +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('event_rewards_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(cash as {{ dbt_utils.type_float() }}) as cash, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - cast({{ adapter.quote('user') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('user') }}, - cast({{ adapter.quote('event') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('event') }}, - cast(status as {{ dbt_utils.type_string() }}) as status, - cast({{ adapter.quote('options') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('options') }}, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('event_rewards_ab1') }} --- event_rewards -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/event_rewards_ab3.sql b/models/generated/airbyte_ctes/unibag/event_rewards_ab3.sql deleted file mode 100644 index 95be1f6..0000000 --- a/models/generated/airbyte_ctes/unibag/event_rewards_ab3.sql +++ /dev/null @@ -1,25 +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('event_rewards_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'cash', - adapter.quote('type'), - adapter.quote('user'), - adapter.quote('event'), - 'status', - adapter.quote('options'), - 'createdat', - 'updatedat', - ]) }} as _airbyte_event_rewards_hashid, - tmp.* -from {{ ref('event_rewards_ab2') }} tmp --- event_rewards -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_ab1.sql b/models/generated/airbyte_ctes/unibag/events_ab1.sql deleted file mode 100644 index 3966a3a..0000000 --- a/models/generated/airbyte_ctes/unibag/events_ab1.sql +++ /dev/null @@ -1,38 +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_events') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['desc'], ['desc']) }} as {{ adapter.quote('desc') }}, - {{ json_extract_scalar('_airbyte_data', ['icon'], ['icon']) }} as icon, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_scalar('_airbyte_data', ['cover'], ['cover']) }} as cover, - {{ json_extract_scalar('_airbyte_data', ['endAt'], ['endAt']) }} as endat, - {{ json_extract_scalar('_airbyte_data', ['active'], ['active']) }} as active, - {{ json_extract_scalar('_airbyte_data', ['notice'], ['notice']) }} as notice, - {{ json_extract_scalar('_airbyte_data', ['screen'], ['screen']) }} as screen, - {{ json_extract_scalar('_airbyte_data', ['article'], ['article']) }} as article, - {{ json_extract_scalar('_airbyte_data', ['options'], ['options']) }} as {{ adapter.quote('options') }}, - {{ json_extract_scalar('_airbyte_data', ['startAt'], ['startAt']) }} as startat, - {{ json_extract_scalar('_airbyte_data', ['segments'], ['segments']) }} as segments, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['groupType'], ['groupType']) }} as grouptype, - {{ json_extract_array('_airbyte_data', ['suppliers'], ['suppliers']) }} as suppliers, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_array('_airbyte_data', ['information'], ['information']) }} as information, - {{ json_extract_scalar('_airbyte_data', ['displayEndAt'], ['displayEndAt']) }} as displayendat, - {{ json_extract_scalar('_airbyte_data', ['isApplyForAll'], ['isApplyForAll']) }} as isapplyforall, - {{ json_extract_scalar('_airbyte_data', ['displayStartAt'], ['displayStartAt']) }} as displaystartat, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_events') }} as table_alias --- events -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_ab2.sql b/models/generated/airbyte_ctes/unibag/events_ab2.sql deleted file mode 100644 index 3a43ded..0000000 --- a/models/generated/airbyte_ctes/unibag/events_ab2.sql +++ /dev/null @@ -1,38 +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('events_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('desc') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('desc') }}, - cast(icon as {{ dbt_utils.type_string() }}) as icon, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - cast(cover as {{ dbt_utils.type_string() }}) as cover, - cast(endat as {{ dbt_utils.type_string() }}) as endat, - {{ cast_to_boolean('active') }} as active, - cast(notice as {{ dbt_utils.type_string() }}) as notice, - cast(screen as {{ dbt_utils.type_string() }}) as screen, - cast(article as {{ dbt_utils.type_string() }}) as article, - cast({{ adapter.quote('options') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('options') }}, - cast(startat as {{ dbt_utils.type_string() }}) as startat, - cast(segments as {{ dbt_utils.type_string() }}) as segments, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(grouptype as {{ dbt_utils.type_string() }}) as grouptype, - suppliers, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - information, - cast(displayendat as {{ dbt_utils.type_string() }}) as displayendat, - {{ cast_to_boolean('isapplyforall') }} as isapplyforall, - cast(displaystartat as {{ dbt_utils.type_string() }}) as displaystartat, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_ab1') }} --- events -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_ab3.sql b/models/generated/airbyte_ctes/unibag/events_ab3.sql deleted file mode 100644 index d7029d7..0000000 --- a/models/generated/airbyte_ctes/unibag/events_ab3.sql +++ /dev/null @@ -1,38 +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('events_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - adapter.quote('desc'), - 'icon', - adapter.quote('name'), - adapter.quote('type'), - 'cover', - 'endat', - boolean_to_string('active'), - 'notice', - 'screen', - 'article', - adapter.quote('options'), - 'startat', - 'segments', - 'createdat', - 'grouptype', - array_to_string('suppliers'), - 'updatedat', - array_to_string('information'), - 'displayendat', - boolean_to_string('isapplyforall'), - 'displaystartat', - ]) }} as _airbyte_events_hashid, - tmp.* -from {{ ref('events_ab2') }} tmp --- events -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/inventories_ab1.sql b/models/generated/airbyte_ctes/unibag/inventories_ab1.sql deleted file mode 100644 index e064db0..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_ab1.sql +++ /dev/null @@ -1,38 +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_inventories') }} -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['code'], ['code']) }} as code, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['slug'], ['slug']) }} as slug, - {{ json_extract_scalar('_airbyte_data', ['active'], ['active']) }} as active, - {{ json_extract_scalar('_airbyte_data', ['contact'], ['contact']) }} as contact, - {{ json_extract_scalar('_airbyte_data', ['partner'], ['partner']) }} as partner, - {{ json_extract_scalar('_airbyte_data', ['checksum'], ['checksum']) }} as checksum, - {{ json_extract_scalar('_airbyte_data', ['location'], ['location']) }} as {{ adapter.quote('location') }}, - {{ json_extract_scalar('_airbyte_data', ['supplier'], ['supplier']) }} as supplier, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['minimumValue'], ['minimumValue']) }} as minimumvalue, - {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - {{ json_extract_scalar('_airbyte_data', ['paymentMethods'], ['paymentMethods']) }} as paymentmethods, - {{ json_extract_scalar('_airbyte_data', ['canIssueInvoice'], ['canIssueInvoice']) }} as canissueinvoice, - {{ json_extract_array('_airbyte_data', ['deliveryMethods'], ['deliveryMethods']) }} as deliverymethods, - {{ json_extract_scalar('_airbyte_data', ['canAutoSendEmail'], ['canAutoSendEmail']) }} as canautosendemail, - {{ json_extract_scalar('_airbyte_data', ['invoiceDeliveryMethod'], ['invoiceDeliveryMethod']) }} as invoicedeliverymethod, - {{ json_extract_scalar('_airbyte_data', ['doesSupportSellyExpress'], ['doesSupportSellyExpress']) }} as doessupportsellyexpress, - {{ json_extract_array('_airbyte_data', ['priorityDeliveryServiceCodes'], ['priorityDeliveryServiceCodes']) }} as prioritydeliveryservicecodes, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_inventories') }} as table_alias --- inventories -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/inventories_ab2.sql b/models/generated/airbyte_ctes/unibag/inventories_ab2.sql deleted file mode 100644 index b8968d3..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_ab2.sql +++ /dev/null @@ -1,38 +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('inventories_ab1') }} -select - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('id') }}, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(code as {{ dbt_utils.type_float() }}) as code, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(slug as {{ dbt_utils.type_string() }}) as slug, - {{ cast_to_boolean('active') }} as active, - cast(contact as {{ dbt_utils.type_string() }}) as contact, - cast(partner as {{ dbt_utils.type_string() }}) as partner, - cast(checksum as {{ dbt_utils.type_string() }}) as checksum, - cast({{ adapter.quote('location') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('location') }}, - cast(supplier as {{ dbt_utils.type_string() }}) as supplier, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(minimumvalue as {{ dbt_utils.type_float() }}) as minimumvalue, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - cast(paymentmethods as {{ dbt_utils.type_string() }}) as paymentmethods, - {{ cast_to_boolean('canissueinvoice') }} as canissueinvoice, - deliverymethods, - {{ cast_to_boolean('canautosendemail') }} as canautosendemail, - cast(invoicedeliverymethod as {{ dbt_utils.type_string() }}) as invoicedeliverymethod, - {{ cast_to_boolean('doessupportsellyexpress') }} as doessupportsellyexpress, - prioritydeliveryservicecodes, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('inventories_ab1') }} --- inventories -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/inventories_ab3.sql b/models/generated/airbyte_ctes/unibag/inventories_ab3.sql deleted file mode 100644 index c0e65e2..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_ab3.sql +++ /dev/null @@ -1,38 +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('inventories_ab2') }} -select - {{ dbt_utils.surrogate_key([ - adapter.quote('id'), - '_id', - 'code', - adapter.quote('name'), - 'slug', - boolean_to_string('active'), - 'contact', - 'partner', - 'checksum', - adapter.quote('location'), - 'supplier', - 'createdat', - 'updatedat', - 'minimumvalue', - 'searchstring', - 'paymentmethods', - boolean_to_string('canissueinvoice'), - array_to_string('deliverymethods'), - boolean_to_string('canautosendemail'), - 'invoicedeliverymethod', - boolean_to_string('doessupportsellyexpress'), - array_to_string('prioritydeliveryservicecodes'), - ]) }} as _airbyte_inventories_hashid, - tmp.* -from {{ ref('inventories_ab2') }} tmp --- inventories -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_ab1.sql b/models/generated/airbyte_ctes/unibag/membership_ab1.sql deleted file mode 100644 index ce7d6ce..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_ab1.sql +++ /dev/null @@ -1,30 +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_membership') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['color'], ['color']) }} as color, - {{ json_extract_scalar('_airbyte_data', ['guide'], ['guide']) }} as guide, - {{ json_extract_scalar('_airbyte_data', ['level'], ['level']) }} as {{ adapter.quote('level') }}, - {{ json_extract_scalar('_airbyte_data', ['sales'], ['sales']) }} as sales, - {{ json_extract_scalar('_airbyte_data', ['active'], ['active']) }} as active, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['updatedat'], ['updatedat']) }} as updatedat_1, - {{ json_extract_scalar('_airbyte_data', ['transaction'], ['transaction']) }} as {{ adapter.quote('transaction') }}, - {{ json_extract_scalar('_airbyte_data', ['bonusPercent'], ['bonusPercent']) }} as bonuspercent, - {{ json_extract_scalar('_airbyte_data', ['bonuspercent'], ['bonuspercent']) }} as bonuspercent_1, - {{ json_extract_scalar('_airbyte_data', ['transactionMinValue'], ['transactionMinValue']) }} as transactionminvalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_membership') }} as table_alias --- membership -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_ab2.sql b/models/generated/airbyte_ctes/unibag/membership_ab2.sql deleted file mode 100644 index 60c1e91..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_ab2.sql +++ /dev/null @@ -1,30 +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('membership_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(color as {{ dbt_utils.type_string() }}) as color, - cast(guide as {{ dbt_utils.type_string() }}) as guide, - cast({{ adapter.quote('level') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('level') }}, - cast(sales as {{ dbt_utils.type_float() }}) as sales, - {{ cast_to_boolean('active') }} as active, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(updatedat_1 as {{ dbt_utils.type_string() }}) as updatedat_1, - cast({{ adapter.quote('transaction') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('transaction') }}, - cast(bonuspercent as {{ dbt_utils.type_float() }}) as bonuspercent, - cast(bonuspercent_1 as {{ dbt_utils.type_float() }}) as bonuspercent_1, - cast(transactionminvalue as {{ dbt_utils.type_float() }}) as transactionminvalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('membership_ab1') }} --- membership -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_ab3.sql b/models/generated/airbyte_ctes/unibag/membership_ab3.sql deleted file mode 100644 index 44e9ab5..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_ab3.sql +++ /dev/null @@ -1,30 +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('membership_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - adapter.quote('name'), - 'color', - 'guide', - adapter.quote('level'), - 'sales', - boolean_to_string('active'), - 'createdat', - 'updatedat', - 'updatedat_1', - adapter.quote('transaction'), - 'bonuspercent', - 'bonuspercent_1', - 'transactionminvalue', - ]) }} as _airbyte_membership_hashid, - tmp.* -from {{ ref('membership_ab2') }} tmp --- membership -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_ab1.sql b/models/generated/airbyte_ctes/unibag/membership_histories_ab1.sql deleted file mode 100644 index c920079..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_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_membership_histories') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['new'], ['new']) }} as {{ adapter.quote('new') }}, - {{ json_extract_scalar('_airbyte_data', ['old'], ['old']) }} as {{ adapter.quote('old') }}, - {{ json_extract_scalar('_airbyte_data', ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_scalar('_airbyte_data', ['user'], ['user']) }} as {{ adapter.quote('user') }}, - {{ 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_membership_histories') }} as table_alias --- membership_histories -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_ab2.sql b/models/generated/airbyte_ctes/unibag/membership_histories_ab2.sql deleted file mode 100644 index 2453c8d..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_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('membership_histories_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('new') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('new') }}, - cast({{ adapter.quote('old') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('old') }}, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - cast({{ adapter.quote('user') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('user') }}, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('membership_histories_ab1') }} --- membership_histories -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_ab3.sql b/models/generated/airbyte_ctes/unibag/membership_histories_ab3.sql deleted file mode 100644 index 49f6c05..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_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('membership_histories_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - adapter.quote('new'), - adapter.quote('old'), - adapter.quote('type'), - adapter.quote('user'), - 'createdat', - ]) }} as _airbyte_membership_histories_hashid, - tmp.* -from {{ ref('membership_histories_ab2') }} tmp --- membership_histories -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_orders_ab1.sql b/models/generated/airbyte_ctes/unibag/membership_orders_ab1.sql deleted file mode 100644 index 1f7b78c..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_orders_ab1.sql +++ /dev/null @@ -1,28 +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_membership_orders') }} -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', ['status'], ['status']) }} as status, - {{ json_extract_scalar('_airbyte_data', ['percent'], ['percent']) }} as {{ adapter.quote('percent') }}, - {{ json_extract_scalar('_airbyte_data', ['targetID'], ['targetID']) }} as targetid, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['commission'], ['commission']) }} as commission, - {{ json_extract_scalar('_airbyte_data', ['isRejected'], ['isRejected']) }} as isrejected, - {{ json_extract_scalar('_airbyte_data', ['membershipName'], ['membershipName']) }} as membershipname, - {{ json_extract_scalar('_airbyte_data', ['membershipLevel'], ['membershipLevel']) }} as membershiplevel, - {{ json_extract_scalar('_airbyte_data', ['membershipPromotion'], ['membershipPromotion']) }} as membershippromotion, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_membership_orders') }} as table_alias --- membership_orders -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_orders_ab2.sql b/models/generated/airbyte_ctes/unibag/membership_orders_ab2.sql deleted file mode 100644 index 9235cee..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_orders_ab2.sql +++ /dev/null @@ -1,28 +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('membership_orders_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(status as {{ dbt_utils.type_string() }}) as status, - cast({{ adapter.quote('percent') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('percent') }}, - cast(targetid as {{ dbt_utils.type_string() }}) as targetid, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(commission as {{ dbt_utils.type_float() }}) as commission, - {{ cast_to_boolean('isrejected') }} as isrejected, - cast(membershipname as {{ dbt_utils.type_string() }}) as membershipname, - cast(membershiplevel as {{ dbt_utils.type_float() }}) as membershiplevel, - cast({{ adapter.quote('membershippromotion') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('membershippromotion') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('membership_orders_ab1') }} --- membership_orders -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_orders_ab3.sql b/models/generated/airbyte_ctes/unibag/membership_orders_ab3.sql deleted file mode 100644 index 23d74cf..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_orders_ab3.sql +++ /dev/null @@ -1,28 +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('membership_orders_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - adapter.quote('user'), - 'status', - adapter.quote('percent'), - 'targetid', - 'createdat', - 'updatedat', - 'commission', - boolean_to_string('isrejected'), - 'membershipname', - 'membershiplevel', - 'membershippromotion' - ]) }} as _airbyte_membership_orders_hashid, - tmp.* -from {{ ref('membership_orders_ab2') }} tmp --- membership_orders -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_ab1.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_ab1.sql deleted file mode 100644 index e08806f..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_ab1.sql +++ /dev/null @@ -1,33 +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_order_deliveries') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['code'], ['code']) }} as code, - {{ json_extract_scalar('_airbyte_data', ['order'], ['order']) }} as {{ adapter.quote('order') }}, - {{ json_extract_scalar('_airbyte_data', ['title'], ['title']) }} as title, - {{ json_extract_scalar('_airbyte_data', ['status'], ['status']) }} as status, - {{ json_extract_scalar('_airbyte_data', ['service'], ['service']) }} as service, - {{ json_extract_scalar('_airbyte_data', ['customer'], ['customer']) }} as customer, - {{ json_extract_scalar('_airbyte_data', ['delivery'], ['delivery']) }} as delivery, - {{ json_extract_scalar('_airbyte_data', ['location'], ['location']) }} as {{ adapter.quote('location') }}, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['promotion'], ['promotion']) }} as promotion, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['trackingCode'], ['trackingCode']) }} as trackingcode, - {{ json_extract_scalar('_airbyte_data', ['trackingTime'], ['trackingTime']) }} as trackingtime, - {{ json_extract_scalar('_airbyte_data', ['isAdminChange'], ['isAdminChange']) }} as isadminchange, - {{ json_extract_scalar('_airbyte_data', ['trackingOrderCode'], ['trackingOrderCode']) }} as trackingordercode, - {{ json_extract_scalar('_airbyte_data', ['weight'], ['weight']) }} as weight, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_order_deliveries') }} as table_alias --- order_deliveries -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_ab2.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_ab2.sql deleted file mode 100644 index bd88883..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_ab2.sql +++ /dev/null @@ -1,33 +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('order_deliveries_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(code as {{ dbt_utils.type_string() }}) as code, - cast({{ adapter.quote('order') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('order') }}, - cast(title as {{ dbt_utils.type_string() }}) as title, - cast(status as {{ dbt_utils.type_string() }}) as status, - cast(service as {{ dbt_utils.type_string() }}) as service, - cast(customer as {{ dbt_utils.type_string() }}) as customer, - cast(delivery as {{ dbt_utils.type_string() }}) as delivery, - cast({{ adapter.quote('location') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('location') }}, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(promotion as {{ dbt_utils.type_string() }}) as promotion, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(trackingcode as {{ dbt_utils.type_string() }}) as trackingcode, - cast(trackingtime as {{ dbt_utils.type_string() }}) as trackingtime, - {{ cast_to_boolean('isadminchange') }} as isadminchange, - cast(trackingordercode as {{ dbt_utils.type_string() }}) as trackingordercode, - cast(weight as {{ dbt_utils.type_string() }}) as weight, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_deliveries_ab1') }} --- order_deliveries -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_ab3.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_ab3.sql deleted file mode 100644 index 68b2c60..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_ab3.sql +++ /dev/null @@ -1,33 +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('order_deliveries_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'code', - adapter.quote('order'), - 'title', - 'status', - 'service', - 'customer', - 'delivery', - adapter.quote('location'), - 'createdat', - 'promotion', - 'updatedat', - 'trackingcode', - 'trackingtime', - boolean_to_string('isadminchange'), - 'trackingordercode', - 'weight', - ]) }} as _airbyte_order_deliveries_hashid, - tmp.* -from {{ ref('order_deliveries_ab2') }} tmp --- order_deliveries -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_histories_ab1.sql b/models/generated/airbyte_ctes/unibag/order_histories_ab1.sql deleted file mode 100644 index a29935e..0000000 --- a/models/generated/airbyte_ctes/unibag/order_histories_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_order_histories') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['order'], ['order']) }} as {{ adapter.quote('order') }}, - {{ json_extract_scalar('_airbyte_data', ['status'], ['status']) }} as status, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['timestamp'], ['timestamp']) }} as {{ adapter.quote('timestamp') }}, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_order_histories') }} as table_alias --- order_histories -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_histories_ab2.sql b/models/generated/airbyte_ctes/unibag/order_histories_ab2.sql deleted file mode 100644 index 6829844..0000000 --- a/models/generated/airbyte_ctes/unibag/order_histories_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('order_histories_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('order') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('order') }}, - cast(status as {{ dbt_utils.type_string() }}) as status, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast({{ adapter.quote('timestamp') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('timestamp') }}, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_histories_ab1') }} --- order_histories -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_histories_ab3.sql b/models/generated/airbyte_ctes/unibag/order_histories_ab3.sql deleted file mode 100644 index 1f63e99..0000000 --- a/models/generated/airbyte_ctes/unibag/order_histories_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('order_histories_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - adapter.quote('order'), - 'status', - 'createdat', - adapter.quote('timestamp'), - 'updatedat', - ]) }} as _airbyte_order_histories_hashid, - tmp.* -from {{ ref('order_histories_ab2') }} tmp --- order_histories -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_items_ab1.sql b/models/generated/airbyte_ctes/unibag/order_items_ab1.sql deleted file mode 100644 index bc10213..0000000 --- a/models/generated/airbyte_ctes/unibag/order_items_ab1.sql +++ /dev/null @@ -1,45 +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_order_items') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['sku'], ['sku']) }} as sku, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, - {{ json_extract_scalar('_airbyte_data', ['user'], ['user']) }} as {{ adapter.quote('user') }}, - {{ json_extract_scalar('_airbyte_data', ['brand'], ['brand']) }} as brand, - {{ json_extract_scalar('_airbyte_data', ['order'], ['order']) }} as {{ adapter.quote('order') }}, - {{ json_extract_scalar('_airbyte_data', ['price'], ['price']) }} as price, - {{ json_extract_scalar('_airbyte_data', ['status'], ['status']) }} as status, - {{ json_extract_scalar('_airbyte_data', ['teamId'], ['teamId']) }} as teamid, - {{ json_extract_scalar('_airbyte_data', ['product'], ['product']) }} as product, - {{ json_extract_scalar('_airbyte_data', ['voucher'], ['voucher']) }} as voucher, - {{ json_extract_scalar('_airbyte_data', ['customer'], ['customer']) }} as customer, - {{ json_extract_scalar('_airbyte_data', ['quantity'], ['quantity']) }} as quantity, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['inventory'], ['inventory']) }} as inventory, - {{ json_extract_scalar('_airbyte_data', ['totalSell'], ['totalSell']) }} as totalsell, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['cashbackAt'], ['cashbackAt']) }} as cashbackat, - {{ json_extract_array('_airbyte_data', ['promotions'], ['promotions']) }} as promotions, - {{ json_extract_scalar('_airbyte_data', ['totalPrice'], ['totalPrice']) }} as totalprice, - {{ json_extract_scalar('_airbyte_data', ['deliveredAt'], ['deliveredAt']) }} as deliveredat, - {{ json_extract_scalar('_airbyte_data', ['teamMemberId'], ['teamMemberId']) }} as teammemberid, - {{ json_extract_scalar('_airbyte_data', ['isAssignCoupon'], ['isAssignCoupon']) }} as isassigncoupon, - {{ json_extract_scalar('_airbyte_data', ['totalPromotion'], ['totalPromotion']) }} as totalpromotion, - {{ json_extract_scalar('_airbyte_data', ['inWholesaleRange'], ['inWholesaleRange']) }} as inwholesalerange, - {{ json_extract_scalar('_airbyte_data', ['voucherCashTotal'], ['voucherCashTotal']) }} as vouchercashtotal, - {{ json_extract_scalar('_airbyte_data', ['wholesaleRangeId'], ['wholesaleRangeId']) }} as wholesalerangeid, - {{ json_extract_scalar('_airbyte_data', ['totalWholesaleBonus'], ['totalWholesaleBonus']) }} as totalwholesalebonus, - {{ json_extract_scalar('_airbyte_data', ['totalSellyWholesaleBonus'], ['totalSellyWholesaleBonus']) }} as totalsellywholesalebonus, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_order_items') }} as table_alias --- order_items -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_items_ab2.sql b/models/generated/airbyte_ctes/unibag/order_items_ab2.sql deleted file mode 100644 index 441ca5c..0000000 --- a/models/generated/airbyte_ctes/unibag/order_items_ab2.sql +++ /dev/null @@ -1,45 +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('order_items_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(sku as {{ dbt_utils.type_string() }}) as sku, - cast({{ adapter.quote('date') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('date') }}, - cast({{ adapter.quote('user') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('user') }}, - cast(brand as {{ dbt_utils.type_string() }}) as brand, - cast({{ adapter.quote('order') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('order') }}, - cast(price as {{ dbt_utils.type_string() }}) as price, - cast(status as {{ dbt_utils.type_string() }}) as status, - cast(teamid as {{ dbt_utils.type_string() }}) as teamid, - cast(product as {{ dbt_utils.type_string() }}) as product, - cast(voucher as {{ dbt_utils.type_string() }}) as voucher, - cast(customer as {{ dbt_utils.type_string() }}) as customer, - cast(quantity as {{ dbt_utils.type_float() }}) as quantity, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(inventory as {{ dbt_utils.type_string() }}) as inventory, - cast(totalsell as {{ dbt_utils.type_float() }}) as totalsell, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(cashbackat as {{ dbt_utils.type_string() }}) as cashbackat, - promotions, - cast(totalprice as {{ dbt_utils.type_float() }}) as totalprice, - cast(deliveredat as {{ dbt_utils.type_string() }}) as deliveredat, - cast(teammemberid as {{ dbt_utils.type_string() }}) as teammemberid, - {{ cast_to_boolean('isassigncoupon') }} as isassigncoupon, - cast(totalpromotion as {{ dbt_utils.type_float() }}) as totalpromotion, - {{ cast_to_boolean('inwholesalerange') }} as inwholesalerange, - cast(vouchercashtotal as {{ dbt_utils.type_float() }}) as vouchercashtotal, - cast(wholesalerangeid as {{ dbt_utils.type_string() }}) as wholesalerangeid, - cast(totalwholesalebonus as {{ dbt_utils.type_float() }}) as totalwholesalebonus, - cast(totalsellywholesalebonus as {{ dbt_utils.type_float() }}) as totalsellywholesalebonus, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_items_ab1') }} --- order_items -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_items_ab3.sql b/models/generated/airbyte_ctes/unibag/order_items_ab3.sql deleted file mode 100644 index 2f34c0b..0000000 --- a/models/generated/airbyte_ctes/unibag/order_items_ab3.sql +++ /dev/null @@ -1,45 +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('order_items_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'sku', - adapter.quote('date'), - adapter.quote('user'), - 'brand', - adapter.quote('order'), - 'price', - 'status', - 'teamid', - 'product', - 'voucher', - 'customer', - 'quantity', - 'createdat', - 'inventory', - 'totalsell', - 'updatedat', - 'cashbackat', - array_to_string('promotions'), - 'totalprice', - 'deliveredat', - 'teammemberid', - boolean_to_string('isassigncoupon'), - 'totalpromotion', - boolean_to_string('inwholesalerange'), - 'vouchercashtotal', - 'wholesalerangeid', - 'totalwholesalebonus', - 'totalsellywholesalebonus', - ]) }} as _airbyte_order_items_hashid, - tmp.* -from {{ ref('order_items_ab2') }} tmp --- order_items -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_ab1.sql b/models/generated/airbyte_ctes/unibag/orders_ab1.sql deleted file mode 100644 index a4896c8..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_ab1.sql +++ /dev/null @@ -1,74 +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_orders') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['code'], ['code']) }} as code, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, - {{ json_extract_scalar('_airbyte_data', ['hour'], ['hour']) }} as {{ adapter.quote('hour') }}, - {{ json_extract_scalar('_airbyte_data', ['note'], ['note']) }} as note, - {{ json_extract_array('_airbyte_data', ['tags'], ['tags']) }} as tags, - {{ json_extract_scalar('_airbyte_data', ['user'], ['user']) }} as {{ adapter.quote('user') }}, - {{ json_extract_scalar('_airbyte_data', ['price'], ['price']) }} as price, - {{ json_extract_scalar('_airbyte_data', ['banned'], ['banned']) }} as banned, - {{ json_extract_scalar('_airbyte_data', ['reason'], ['reason']) }} as reason, - {{ json_extract_scalar('_airbyte_data', ['source'], ['source']) }} as {{ adapter.quote('source') }}, - {{ json_extract_scalar('_airbyte_data', ['status'], ['status']) }} as status, - {{ json_extract_scalar('_airbyte_data', ['teamId'], ['teamId']) }} as teamid, - {{ json_extract_scalar('_airbyte_data', ['payment'], ['payment']) }} as payment, - {{ json_extract_scalar('_airbyte_data', ['remarks'], ['remarks']) }} as remarks, - {{ json_extract_scalar('_airbyte_data', ['customer'], ['customer']) }} as customer, - {{ json_extract_scalar('_airbyte_data', ['delivery'], ['delivery']) }} as delivery, - {{ json_extract_scalar('_airbyte_data', ['isCalled'], ['isCalled']) }} as iscalled, - {{ json_extract_scalar('_airbyte_data', ['merchant'], ['merchant']) }} as merchant, - {{ json_extract_scalar('_airbyte_data', ['pickupAt'], ['pickupAt']) }} as pickupat, - {{ json_extract_scalar('_airbyte_data', ['supplier'], ['supplier']) }} as supplier, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['inventory'], ['inventory']) }} as inventory, - {{ json_extract_scalar('_airbyte_data', ['invoiceId'], ['invoiceId']) }} as invoiceid, - {{ json_extract_scalar('_airbyte_data', ['isDeleted'], ['isDeleted']) }} as isdeleted, - {{ json_extract_scalar('_airbyte_data', ['promotion'], ['promotion']) }} as promotion, - {{ json_extract_scalar('_airbyte_data', ['requestId'], ['requestId']) }} as requestid, - {{ json_extract_scalar('_airbyte_data', ['restockAt'], ['restockAt']) }} as restockat, - {{ json_extract_scalar('_airbyte_data', ['sendEmail'], ['sendEmail']) }} as sendemail, - {{ json_extract_scalar('_airbyte_data', ['totalItem'], ['totalItem']) }} as totalitem, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['userAgent'], ['userAgent']) }} as useragent, - {{ json_extract_scalar('_airbyte_data', ['wholesale'], ['wholesale']) }} as wholesale, - {{ json_extract_scalar('_airbyte_data', ['approvedAt'], ['approvedAt']) }} as approvedat, - {{ json_extract_scalar('_airbyte_data', ['cashbackAt'], ['cashbackAt']) }} as cashbackat, - {{ json_extract_scalar('_airbyte_data', ['isPreorder'], ['isPreorder']) }} as ispreorder, - {{ json_extract_scalar('_airbyte_data', ['isReviewed'], ['isReviewed']) }} as isreviewed, - {{ json_extract_scalar('_airbyte_data', ['rejectedAt'], ['rejectedAt']) }} as rejectedat, - {{ json_extract_scalar('_airbyte_data', ['deliveredAt'], ['deliveredAt']) }} as deliveredat, - {{ json_extract_scalar('_airbyte_data', ['deliveringAt'], ['deliveringAt']) }} as deliveringat, - {{ json_extract_scalar('_airbyte_data', ['deliveryCode'], ['deliveryCode']) }} as deliverycode, - {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - {{ json_extract_scalar('_airbyte_data', ['staffApprove'], ['staffApprove']) }} as staffapprove, - {{ json_extract_scalar('_airbyte_data', ['teamMemberId'], ['teamMemberId']) }} as teammemberid, - {{ json_extract_scalar('_airbyte_data', ['processStatus'], ['processStatus']) }} as processstatus, - {{ json_extract_scalar('_airbyte_data', ['hookTimeLastAt'], ['hookTimeLastAt']) }} as hooktimelastat, - {{ json_extract_scalar('_airbyte_data', ['isAssignCoupon'], ['isAssignCoupon']) }} as isassigncoupon, - {{ json_extract_scalar('_airbyte_data', ['isAutoApproved'], ['isAutoApproved']) }} as isautoapproved, - {{ json_extract_scalar('_airbyte_data', ['outboundRequest'], ['outboundRequest']) }} as outboundrequest, - {{ json_extract_scalar('_airbyte_data', ['trackingCodeURL'], ['trackingCodeURL']) }} as trackingcodeurl, - {{ json_extract_scalar('_airbyte_data', ['trackingCode'], ['trackingcode']) }} as trackingCode, - {{ json_extract_scalar('_airbyte_data', ['waitingCancelBy'], ['waitingCancelBy']) }} as waitingcancelby, - {{ json_extract_scalar('_airbyte_data', ['isChangeDelivery'], ['isChangeDelivery']) }} as ischangedelivery, - {{ json_extract_scalar('_airbyte_data', ['estimateCashbackAt'], ['estimateCashbackAt']) }} as estimatecashbackat, - {{ json_extract_scalar('_airbyte_data', ['fromNewActiveBuyer'], ['fromNewActiveBuyer']) }} as fromnewactivebuyer, - {{ json_extract_scalar('_airbyte_data', ['isWaitingCancelled'], ['isWaitingCancelled']) }} as iswaitingcancelled, - {{ json_extract_scalar('_airbyte_data', ['fromNewActiveSeller'], ['fromNewActiveSeller']) }} as fromnewactiveseller, - {{ json_extract_scalar('_airbyte_data', ['waitingCancelReason'], ['waitingCancelReason']) }} as waitingcancelreason, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_orders') }} as table_alias --- orders -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_ab2.sql b/models/generated/airbyte_ctes/unibag/orders_ab2.sql deleted file mode 100644 index 1435977..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_ab2.sql +++ /dev/null @@ -1,74 +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('orders_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(code as {{ dbt_utils.type_string() }}) as code, - cast({{ adapter.quote('date') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('date') }}, - cast({{ adapter.quote('hour') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('hour') }}, - cast(note as {{ dbt_utils.type_string() }}) as note, - tags, - cast({{ adapter.quote('user') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('user') }}, - cast(price as {{ dbt_utils.type_string() }}) as price, - {{ cast_to_boolean('banned') }} as banned, - cast(reason as {{ dbt_utils.type_string() }}) as reason, - cast({{ adapter.quote('source') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('source') }}, - cast(status as {{ dbt_utils.type_string() }}) as status, - cast(teamid as {{ dbt_utils.type_string() }}) as teamid, - cast(payment as {{ dbt_utils.type_string() }}) as payment, - cast(remarks as {{ dbt_utils.type_string() }}) as remarks, - cast(customer as {{ dbt_utils.type_string() }}) as customer, - cast(delivery as {{ dbt_utils.type_string() }}) as delivery, - {{ cast_to_boolean('iscalled') }} as iscalled, - cast(merchant as {{ dbt_utils.type_string() }}) as merchant, - cast(pickupat as {{ dbt_utils.type_string() }}) as pickupat, - cast(supplier as {{ dbt_utils.type_string() }}) as supplier, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(inventory as {{ dbt_utils.type_string() }}) as inventory, - cast(invoiceid as {{ dbt_utils.type_string() }}) as invoiceid, - {{ cast_to_boolean('isdeleted') }} as isdeleted, - cast(promotion as {{ dbt_utils.type_string() }}) as promotion, - cast(requestid as {{ dbt_utils.type_string() }}) as requestid, - cast(restockat as {{ dbt_utils.type_string() }}) as restockat, - cast(sendemail as {{ dbt_utils.type_string() }}) as sendemail, - cast(totalitem as {{ dbt_utils.type_float() }}) as totalitem, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(useragent as {{ dbt_utils.type_string() }}) as useragent, - {{ cast_to_boolean('wholesale') }} as wholesale, - cast(approvedat as {{ dbt_utils.type_string() }}) as approvedat, - cast(cashbackat as {{ dbt_utils.type_string() }}) as cashbackat, - {{ cast_to_boolean('ispreorder') }} as ispreorder, - {{ cast_to_boolean('isreviewed') }} as isreviewed, - cast(rejectedat as {{ dbt_utils.type_string() }}) as rejectedat, - cast(deliveredat as {{ dbt_utils.type_string() }}) as deliveredat, - cast(deliveringat as {{ dbt_utils.type_string() }}) as deliveringat, - cast(deliverycode as {{ dbt_utils.type_string() }}) as deliverycode, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - cast(staffapprove as {{ dbt_utils.type_string() }}) as staffapprove, - cast(teammemberid as {{ dbt_utils.type_string() }}) as teammemberid, - cast(processstatus as {{ dbt_utils.type_string() }}) as processstatus, - cast(hooktimelastat as {{ dbt_utils.type_string() }}) as hooktimelastat, - {{ cast_to_boolean('isassigncoupon') }} as isassigncoupon, - {{ cast_to_boolean('isautoapproved') }} as isautoapproved, - cast(outboundrequest as {{ dbt_utils.type_string() }}) as outboundrequest, - cast(trackingcodeurl as {{ dbt_utils.type_string() }}) as trackingcodeurl, - cast(trackingcode as {{ dbt_utils.type_string() }}) as trackingcode, - cast(waitingcancelby as {{ dbt_utils.type_string() }}) as waitingcancelby, - {{ cast_to_boolean('ischangedelivery') }} as ischangedelivery, - cast(estimatecashbackat as {{ dbt_utils.type_string() }}) as estimatecashbackat, - {{ cast_to_boolean('fromnewactivebuyer') }} as fromnewactivebuyer, - {{ cast_to_boolean('iswaitingcancelled') }} as iswaitingcancelled, - {{ cast_to_boolean('fromnewactiveseller') }} as fromnewactiveseller, - cast(waitingcancelreason as {{ dbt_utils.type_string() }}) as waitingcancelreason, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders_ab1') }} --- orders -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_ab3.sql b/models/generated/airbyte_ctes/unibag/orders_ab3.sql deleted file mode 100644 index c222dbd..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_ab3.sql +++ /dev/null @@ -1,74 +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('orders_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'code', - adapter.quote('date'), - adapter.quote('hour'), - 'note', - array_to_string('tags'), - adapter.quote('user'), - 'price', - boolean_to_string('banned'), - 'reason', - adapter.quote('source'), - 'status', - 'teamid', - 'payment', - 'remarks', - 'customer', - 'delivery', - boolean_to_string('iscalled'), - 'merchant', - 'pickupat', - 'supplier', - 'createdat', - 'inventory', - 'invoiceid', - boolean_to_string('isdeleted'), - 'promotion', - 'requestid', - 'restockat', - 'sendemail', - 'totalitem', - 'updatedat', - 'useragent', - boolean_to_string('wholesale'), - 'approvedat', - 'cashbackat', - boolean_to_string('ispreorder'), - boolean_to_string('isreviewed'), - 'rejectedat', - 'deliveredat', - 'deliveringat', - 'deliverycode', - 'searchstring', - 'staffapprove', - 'teammemberid', - 'processstatus', - 'hooktimelastat', - boolean_to_string('isassigncoupon'), - boolean_to_string('isautoapproved'), - 'outboundrequest', - 'trackingcodeurl', - 'trackingcode', - 'waitingcancelby', - boolean_to_string('ischangedelivery'), - 'estimatecashbackat', - boolean_to_string('fromnewactivebuyer'), - boolean_to_string('iswaitingcancelled'), - boolean_to_string('fromnewactiveseller'), - 'waitingcancelreason', - ]) }} as _airbyte_orders_hashid, - tmp.* -from {{ ref('orders_ab2') }} tmp --- orders -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_categories_ab1.sql b/models/generated/airbyte_ctes/unibag/product_categories_ab1.sql deleted file mode 100644 index 3b71d62..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_ab1.sql +++ /dev/null @@ -1,27 +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_product_categories') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['icon'], ['icon']) }} as icon, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['color'], ['color']) }} as color, - {{ json_extract_scalar('_airbyte_data', ['order'], ['order']) }} as {{ adapter.quote('order') }}, - {{ json_extract_scalar('_airbyte_data', ['active'], ['active']) }} as active, - {{ json_extract_array('_airbyte_data', ['covers'], ['covers']) }} as covers, - {{ json_extract_scalar('_airbyte_data', ['featured'], ['featured']) }} as featured, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['totalProduct'], ['totalProduct']) }} as totalproduct, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_product_categories') }} as table_alias --- product_categories -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_categories_ab2.sql b/models/generated/airbyte_ctes/unibag/product_categories_ab2.sql deleted file mode 100644 index ccdf80e..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_ab2.sql +++ /dev/null @@ -1,27 +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('product_categories_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(icon as {{ dbt_utils.type_string() }}) as icon, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(color as {{ dbt_utils.type_string() }}) as color, - cast({{ adapter.quote('order') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('order') }}, - {{ cast_to_boolean('active') }} as active, - covers, - {{ cast_to_boolean('featured') }} as featured, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(totalproduct as {{ dbt_utils.type_float() }}) as totalproduct, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_categories_ab1') }} --- product_categories -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_categories_ab3.sql b/models/generated/airbyte_ctes/unibag/product_categories_ab3.sql deleted file mode 100644 index 4efd8d0..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_ab3.sql +++ /dev/null @@ -1,27 +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('product_categories_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'icon', - adapter.quote('name'), - 'color', - adapter.quote('order'), - boolean_to_string('active'), - array_to_string('covers'), - boolean_to_string('featured'), - 'createdat', - 'updatedat', - 'totalproduct', - ]) }} as _airbyte_product_categories_hashid, - tmp.* -from {{ ref('product_categories_ab2') }} tmp --- product_categories -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sku_ab1.sql deleted file mode 100644 index 9a8e52a..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_ab1.sql +++ /dev/null @@ -1,48 +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_product_sku') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['sku'], ['sku']) }} as sku, - {{ json_extract_scalar('_airbyte_data', ['info'], ['info']) }} as info, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_scalar('_airbyte_data', ['brand'], ['brand']) }} as brand, - {{ json_extract_scalar('_airbyte_data', ['cover'], ['cover']) }} as cover, - {{ json_extract_scalar('_airbyte_data', ['price'], ['price']) }} as price, - {{ json_extract_scalar('_airbyte_data', ['active'], ['active']) }} as active, - {{ json_extract_scalar('_airbyte_data', ['author'], ['author']) }} as author, - {{ json_extract_scalar('_airbyte_data', ['source'], ['source']) }} as {{ adapter.quote('source') }}, - {{ json_extract_scalar('_airbyte_data', ['display'], ['display']) }} as display, - {{ json_extract_scalar('_airbyte_data', ['picture'], ['picture']) }} as picture, - {{ json_extract_scalar('_airbyte_data', ['product'], ['product']) }} as product, - {{ json_extract_scalar('_airbyte_data', ['version'], ['version']) }} as {{ adapter.quote('version') }}, - {{ json_extract_scalar('_airbyte_data', ['groupSku'], ['groupSku']) }} as groupsku, - {{ json_extract_scalar('_airbyte_data', ['unitCode'], ['unitCode']) }} as unitcode, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['restockAt'], ['restockAt']) }} as restockat, - {{ json_extract_scalar('_airbyte_data', ['statistic'], ['statistic']) }} as statistic, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['couponInfo'], ['couponInfo']) }} as couponinfo, - {{ json_extract_array('_airbyte_data', ['properties'], ['properties']) }} as properties, - {{ json_extract_scalar('_airbyte_data', ['canPreorder'], ['canPreorder']) }} as canpreorder, - {{ json_extract_scalar('_airbyte_data', ['supplierSku'], ['supplierSku']) }} as suppliersku, - {{ json_extract_scalar('_airbyte_data', ['isOutOfStock'], ['isOutOfStock']) }} as isoutofstock, - {{ json_extract_scalar('_airbyte_data', ['pricePercent'], ['pricePercent']) }} as pricepercent, - {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - {{ json_extract_scalar('_airbyte_data', ['quantity'], ['quantity']) }} as quantity, - {{ json_extract_scalar('_airbyte_data', ['displayInventory'], ['displayInventory']) }} as displayinventory, - {{ json_extract_scalar('_airbyte_data', ['showRemainingQuantity'], ['showRemainingQuantity']) }} as showremainingquantity, - {{ json_extract_scalar('_airbyte_data', ['quantity_aibyte_transform'], ['quantity_aibyte_transform']) }} as quantity_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_product_sku') }} as table_alias --- product_sku -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_ab2.sql deleted file mode 100644 index 4a1fb08..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_ab2.sql +++ /dev/null @@ -1,48 +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('product_sku_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(sku as {{ dbt_utils.type_string() }}) as sku, - cast(info as {{ dbt_utils.type_string() }}) as info, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - cast(brand as {{ dbt_utils.type_string() }}) as brand, - cast(cover as {{ dbt_utils.type_string() }}) as cover, - cast(price as {{ dbt_utils.type_string() }}) as price, - {{ cast_to_boolean('active') }} as active, - cast(author as {{ dbt_utils.type_string() }}) as author, - cast({{ adapter.quote('source') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('source') }}, - {{ cast_to_boolean('display') }} as display, - cast(picture as {{ dbt_utils.type_string() }}) as picture, - cast(product as {{ dbt_utils.type_string() }}) as product, - cast({{ adapter.quote('version') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('version') }}, - cast(groupsku as {{ dbt_utils.type_string() }}) as groupsku, - cast(unitcode as {{ dbt_utils.type_string() }}) as unitcode, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(restockat as {{ dbt_utils.type_string() }}) as restockat, - cast(statistic as {{ dbt_utils.type_string() }}) as statistic, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(couponinfo as {{ dbt_utils.type_string() }}) as couponinfo, - properties, - {{ cast_to_boolean('canpreorder') }} as canpreorder, - cast(suppliersku as {{ dbt_utils.type_string() }}) as suppliersku, - {{ cast_to_boolean('isoutofstock') }} as isoutofstock, - cast(pricepercent as {{ dbt_utils.type_string() }}) as pricepercent, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - {{ cast_to_boolean('displayinventory') }} as displayinventory, - {{ cast_to_boolean('showremainingquantity') }} as showremainingquantity, - cast(quantity as {{ dbt_utils.type_string() }}) as quantity, - cast(quantity_aibyte_transform as {{ dbt_utils.type_string() }}) as quantity_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_ab1') }} --- product_sku -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_ab3.sql deleted file mode 100644 index 9323cba..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_ab3.sql +++ /dev/null @@ -1,48 +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('product_sku_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'sku', - 'info', - adapter.quote('name'), - adapter.quote('type'), - 'brand', - 'cover', - 'price', - boolean_to_string('active'), - 'author', - adapter.quote('source'), - boolean_to_string('display'), - 'picture', - 'product', - adapter.quote('version'), - 'groupsku', - 'unitcode', - 'createdat', - 'restockat', - 'statistic', - 'updatedat', - 'couponinfo', - array_to_string('properties'), - boolean_to_string('canpreorder'), - 'suppliersku', - boolean_to_string('isoutofstock'), - 'pricepercent', - 'searchstring', - 'quantity', - boolean_to_string('displayinventory'), - boolean_to_string('showremainingquantity'), - 'quantity_aibyte_transform', - ]) }} as _airbyte_product_sku_hashid, - tmp.* -from {{ ref('product_sku_ab2') }} tmp --- product_sku -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_ab1.sql deleted file mode 100644 index 5cbd21e..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_ab1.sql +++ /dev/null @@ -1,30 +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_product_sku_versions') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['sku'], ['sku']) }} as sku, - {{ json_extract_scalar('_airbyte_data', ['info'], ['info']) }} as info, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['price'], ['price']) }} as price, - {{ json_extract_scalar('_airbyte_data', ['source'], ['source']) }} as {{ adapter.quote('source') }}, - {{ json_extract_scalar('_airbyte_data', ['codeSku'], ['codeSku']) }} as codesku, - {{ json_extract_scalar('_airbyte_data', ['picture'], ['picture']) }} as picture, - {{ json_extract_scalar('_airbyte_data', ['product'], ['product']) }} as product, - {{ json_extract_scalar('_airbyte_data', ['statistic'], ['statistic']) }} as statistic, - {{ json_extract_scalar('_airbyte_data', ['version'], ['version']) }} as {{ adapter.quote('version') }}, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_array('_airbyte_data', ['properties'], ['properties']) }} as properties, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_product_sku_versions') }} as table_alias --- product_sku_versions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_ab2.sql deleted file mode 100644 index f30d961..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_ab2.sql +++ /dev/null @@ -1,30 +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('product_sku_versions_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(sku as {{ dbt_utils.type_string() }}) as sku, - cast(info as {{ dbt_utils.type_string() }}) as info, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(price as {{ dbt_utils.type_string() }}) as price, - cast({{ adapter.quote('source') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('source') }}, - cast(codesku as {{ dbt_utils.type_string() }}) as codesku, - cast(picture as {{ dbt_utils.type_string() }}) as picture, - cast(product as {{ dbt_utils.type_string() }}) as product, - cast({{ adapter.quote('version') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('version') }}, - cast(statistic as {{ dbt_utils.type_string() }}) as statistic, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - properties, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_versions_ab1') }} --- product_sku_versions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_ab3.sql deleted file mode 100644 index 5582374..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_ab3.sql +++ /dev/null @@ -1,30 +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('product_sku_versions_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'sku', - 'info', - adapter.quote('name'), - 'price', - adapter.quote('source'), - 'codesku', - 'picture', - 'product', - 'statistic', - adapter.quote('version'), - 'createdat', - 'updatedat', - array_to_string('properties'), - ]) }} as _airbyte_product_sku_versions_hashid, - tmp.* -from {{ ref('product_sku_versions_ab2') }} tmp --- product_sku_versions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sub_categories_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sub_categories_ab1.sql deleted file mode 100644 index 68d02ac..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sub_categories_ab1.sql +++ /dev/null @@ -1,25 +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_product_sub_categories') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['order'], ['order']) }} as {{ adapter.quote('order') }}, - {{ json_extract_scalar('_airbyte_data', ['active'], ['active']) }} as active, - {{ json_extract_scalar('_airbyte_data', ['parent'], ['parent']) }} as parent, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - {{ json_extract_scalar('_airbyte_data', ['totalProduct'], ['totalProduct']) }} as totalproduct, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_product_sub_categories') }} as table_alias --- product_sub_categories -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sub_categories_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sub_categories_ab2.sql deleted file mode 100644 index df6937b..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sub_categories_ab2.sql +++ /dev/null @@ -1,25 +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('product_sub_categories_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast({{ adapter.quote('order') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('order') }}, - {{ cast_to_boolean('active') }} as active, - cast(parent as {{ dbt_utils.type_string() }}) as parent, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - cast(totalproduct as {{ dbt_utils.type_float() }}) as totalproduct, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sub_categories_ab1') }} --- product_sub_categories -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sub_categories_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sub_categories_ab3.sql deleted file mode 100644 index b001ca0..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sub_categories_ab3.sql +++ /dev/null @@ -1,25 +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('product_sub_categories_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - adapter.quote('name'), - adapter.quote('order'), - boolean_to_string('active'), - 'parent', - 'createdat', - 'updatedat', - 'searchstring', - 'totalproduct', - ]) }} as _airbyte_product_sub_categories_hashid, - tmp.* -from {{ ref('product_sub_categories_ab2') }} tmp --- product_sub_categories -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_ab1.sql b/models/generated/airbyte_ctes/unibag/products_ab1.sql deleted file mode 100644 index c09bfa8..0000000 --- a/models/generated/airbyte_ctes/unibag/products_ab1.sql +++ /dev/null @@ -1,52 +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_products') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['desc'], ['desc']) }} as {{ adapter.quote('desc') }}, - {{ json_extract_scalar('_airbyte_data', ['info'], ['info']) }} as info, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['temp'], ['temp']) }} as {{ adapter.quote('temp') }}, - {{ json_extract_scalar('_airbyte_data', ['brand'], ['brand']) }} as brand, - {{ json_extract_scalar('_airbyte_data', ['order'], ['order']) }} as {{ adapter.quote('order') }}, - {{ json_extract_scalar('_airbyte_data', ['price'], ['price']) }} as price, - {{ json_extract_scalar('_airbyte_data', ['score'], ['score']) }} as score, - {{ json_extract_scalar('_airbyte_data', ['active'], ['active']) }} as active, - {{ json_extract_scalar('_airbyte_data', ['author'], ['author']) }} as author, - {{ json_extract_array('_airbyte_data', ['guides'], ['guides']) }} as guides, - {{ json_extract_array('_airbyte_data', ['photos'], ['photos']) }} as photos, - {{ json_extract_array('_airbyte_data', ['videos'], ['videos']) }} as videos, - {{ json_extract_scalar('_airbyte_data', ['quantity'], ['quantity']) }} as quantity, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_array('_airbyte_data', ['documents'], ['documents']) }} as documents, - {{ json_extract_scalar('_airbyte_data', ['shareDesc'], ['shareDesc']) }} as sharedesc, - {{ json_extract_scalar('_airbyte_data', ['statistic'], ['statistic']) }} as statistic, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_array('_airbyte_data', ['categories'], ['categories']) }} as categories, - {{ json_extract_array('_airbyte_data', ['properties'], ['properties']) }} as properties, - {{ json_extract_scalar('_airbyte_data', ['reActiveAt'], ['reActiveAt']) }} as reactiveat, - {{ json_extract_array('_airbyte_data', ['inventories'], ['inventories']) }} as inventories, - {{ json_extract_scalar('_airbyte_data', ['isOutOfStock'], ['isOutOfStock']) }} as isoutofstock, - {{ json_extract_scalar('_airbyte_data', ['pricePercent'], ['pricePercent']) }} as pricepercent, - {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - {{ json_extract_array('_airbyte_data', ['subCategories'], ['subCategories']) }} as subcategories, - {{ json_extract_scalar('_airbyte_data', ['inactiveReason'], ['inactiveReason']) }} as inactivereason, - {{ json_extract_scalar('_airbyte_data', ['propertiesMain'], ['propertiesMain']) }} as propertiesmain, - {{ json_extract_scalar('_airbyte_data', ['shareStatistic'], ['shareStatistic']) }} as sharestatistic, - {{ json_extract_scalar('_airbyte_data', ['canIssueInvoice'], ['canIssueInvoice']) }} as canissueinvoice, - {{ json_extract_scalar('_airbyte_data', ['pendingInactive'], ['pendingInactive']) }} as pendinginactive, - {{ json_extract_scalar('_airbyte_data', ['reviewStatistic'], ['reviewStatistic']) }} as reviewstatistic, - {{ json_extract_scalar('_airbyte_data', ['pendingInactiveAt'], ['pendingInactiveAt']) }} as pendinginactiveat, - {{ json_extract_array('_airbyte_data', ['highlightProperties'], ['highlightProperties']) }} as highlightproperties, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_products') }} as table_alias --- products -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_ab2.sql b/models/generated/airbyte_ctes/unibag/products_ab2.sql deleted file mode 100644 index f0402a6..0000000 --- a/models/generated/airbyte_ctes/unibag/products_ab2.sql +++ /dev/null @@ -1,52 +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('products_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('desc') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('desc') }}, - cast(info as {{ dbt_utils.type_string() }}) as info, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast({{ adapter.quote('temp') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('temp') }}, - cast(brand as {{ dbt_utils.type_string() }}) as brand, - cast({{ adapter.quote('order') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('order') }}, - cast(price as {{ dbt_utils.type_string() }}) as price, - cast(score as {{ dbt_utils.type_string() }}) as score, - {{ cast_to_boolean('active') }} as active, - cast(author as {{ dbt_utils.type_string() }}) as author, - guides, - photos, - videos, - cast(quantity as {{ dbt_utils.type_float() }}) as quantity, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - documents, - cast(sharedesc as {{ dbt_utils.type_string() }}) as sharedesc, - cast(statistic as {{ dbt_utils.type_string() }}) as statistic, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - categories, - properties, - cast(reactiveat as {{ dbt_utils.type_string() }}) as reactiveat, - inventories, - {{ cast_to_boolean('isoutofstock') }} as isoutofstock, - cast(pricepercent as {{ dbt_utils.type_string() }}) as pricepercent, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - subcategories, - cast(inactivereason as {{ dbt_utils.type_string() }}) as inactivereason, - cast(propertiesmain as {{ dbt_utils.type_string() }}) as propertiesmain, - cast(sharestatistic as {{ dbt_utils.type_string() }}) as sharestatistic, - {{ cast_to_boolean('canissueinvoice') }} as canissueinvoice, - {{ cast_to_boolean('pendinginactive') }} as pendinginactive, - cast(reviewstatistic as {{ dbt_utils.type_string() }}) as reviewstatistic, - cast(pendinginactiveat as {{ dbt_utils.type_string() }}) as pendinginactiveat, - highlightproperties, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_ab1') }} --- products -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_ab3.sql b/models/generated/airbyte_ctes/unibag/products_ab3.sql deleted file mode 100644 index 1f52628..0000000 --- a/models/generated/airbyte_ctes/unibag/products_ab3.sql +++ /dev/null @@ -1,52 +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('products_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - adapter.quote('desc'), - 'info', - adapter.quote('name'), - adapter.quote('temp'), - 'brand', - adapter.quote('order'), - 'price', - 'score', - boolean_to_string('active'), - 'author', - array_to_string('guides'), - array_to_string('photos'), - array_to_string('videos'), - 'quantity', - 'createdat', - array_to_string('documents'), - 'sharedesc', - 'statistic', - 'updatedat', - array_to_string('categories'), - array_to_string('properties'), - 'reactiveat', - array_to_string('inventories'), - boolean_to_string('isoutofstock'), - 'pricepercent', - 'searchstring', - array_to_string('subcategories'), - 'inactivereason', - 'propertiesmain', - 'sharestatistic', - boolean_to_string('canissueinvoice'), - boolean_to_string('pendinginactive'), - 'reviewstatistic', - 'pendinginactiveat', - array_to_string('highlightproperties'), - ]) }} as _airbyte_products_hashid, - tmp.* -from {{ ref('products_ab2') }} tmp --- products -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotion_orders_ab1.sql b/models/generated/airbyte_ctes/unibag/promotion_orders_ab1.sql deleted file mode 100644 index b4a9c1d..0000000 --- a/models/generated/airbyte_ctes/unibag/promotion_orders_ab1.sql +++ /dev/null @@ -1,31 +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_promotion_orders') }} -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', ['order'], ['order']) }} as {{ adapter.quote('order') }}, - {{ json_extract_scalar('_airbyte_data', ['title'], ['title']) }} as title, - {{ json_extract_scalar('_airbyte_data', ['status'], ['status']) }} as status, - {{ json_extract_scalar('_airbyte_data', ['supplier'], ['supplier']) }} as supplier, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['promotion'], ['promotion']) }} as promotion, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['cashbackAt'], ['cashbackAt']) }} as cashbackat, - {{ json_extract_scalar('_airbyte_data', ['commission'], ['commission']) }} as commission, - {{ json_extract_scalar('_airbyte_data', ['isRejected'], ['isRejected']) }} as isrejected, - {{ json_extract_scalar('_airbyte_data', ['quantityPromotion'], ['quantityPromotion']) }} as quantitypromotion, - {{ json_extract_scalar('_airbyte_data', ['supplierCommission'], ['supplierCommission']) }} as suppliercommission, - {{ json_extract_scalar('_airbyte_data', ['supplierCommissionTotal'], ['supplierCommissionTotal']) }} as suppliercommissiontotal, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_promotion_orders') }} as table_alias --- promotion_orders -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotion_orders_ab2.sql b/models/generated/airbyte_ctes/unibag/promotion_orders_ab2.sql deleted file mode 100644 index 0dff1ec..0000000 --- a/models/generated/airbyte_ctes/unibag/promotion_orders_ab2.sql +++ /dev/null @@ -1,31 +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('promotion_orders_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('order') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('order') }}, - cast(title as {{ dbt_utils.type_string() }}) as title, - cast(status as {{ dbt_utils.type_string() }}) as status, - cast(supplier as {{ dbt_utils.type_string() }}) as supplier, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(promotion as {{ dbt_utils.type_string() }}) as promotion, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(cashbackat as {{ dbt_utils.type_string() }}) as cashbackat, - cast(commission as {{ dbt_utils.type_float() }}) as commission, - {{ cast_to_boolean('isrejected') }} as isrejected, - cast(quantitypromotion as {{ dbt_utils.type_float() }}) as quantitypromotion, - cast(supplierCommission as {{ dbt_utils.type_string() }}) as supplierCommission, - cast(supplierCommissionTotal as {{ dbt_utils.type_float() }}) as supplierCommissionTotal, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('promotion_orders_ab1') }} --- promotion_orders -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotion_orders_ab3.sql b/models/generated/airbyte_ctes/unibag/promotion_orders_ab3.sql deleted file mode 100644 index 1f7b933..0000000 --- a/models/generated/airbyte_ctes/unibag/promotion_orders_ab3.sql +++ /dev/null @@ -1,31 +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('promotion_orders_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - adapter.quote('user'), - adapter.quote('order'), - 'title', - 'status', - 'supplier', - 'createdat', - 'promotion', - 'updatedat', - 'cashbackat', - 'commission', - boolean_to_string('isrejected'), - 'quantitypromotion', - 'supplierCommission', - 'supplierCommissionTotal', - ]) }} as _airbyte_promotion_orders_hashid, - tmp.* -from {{ ref('promotion_orders_ab2') }} tmp --- promotion_orders -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotions_ab1.sql b/models/generated/airbyte_ctes/unibag/promotions_ab1.sql deleted file mode 100644 index 7d95d4e..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_ab1.sql +++ /dev/null @@ -1,35 +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_promotions') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['rest'], ['rest']) }} as rest, - {{ json_extract_scalar('_airbyte_data', ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_scalar('_airbyte_data', ['endAt'], ['endAt']) }} as endat, - {{ json_extract_scalar('_airbyte_data', ['title'], ['title']) }} as title, - {{ json_extract_scalar('_airbyte_data', ['active'], ['active']) }} as active, - {{ json_extract_scalar('_airbyte_data', ['options'], ['options']) }} as {{ adapter.quote('options') }}, - {{ json_extract_scalar('_airbyte_data', ['startAt'], ['startAt']) }} as startat, - {{ json_extract_scalar('_airbyte_data', ['applyFor'], ['applyFor']) }} as applyfor, - {{ json_extract_scalar('_airbyte_data', ['quantity'], ['quantity']) }} as quantity, - {{ json_extract_scalar('_airbyte_data', ['articleID'], ['articleID']) }} as articleid, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - {{ json_extract_scalar('_airbyte_data', ['sharePercent'], ['sharePercent']) }} as sharepercent, - {{ json_extract_scalar('_airbyte_data', ['conditionForUser'], ['conditionForUser']) }} as conditionforuser, - {{ json_extract_scalar('_airbyte_data', ['isUnlimitedQuantity'], ['isUnlimitedQuantity']) }} as isunlimitedquantity, - {{ json_extract_scalar('_airbyte_data', ['isApplyForOrderWholesale'], ['isApplyForOrderWholesale']) }} as isapplyfororderwholesale, - {{ json_extract_scalar('_airbyte_data', ['supplierCommission'], ['supplierCommission']) }} as suppliercommission, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_promotions') }} as table_alias --- promotions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotions_ab2.sql b/models/generated/airbyte_ctes/unibag/promotions_ab2.sql deleted file mode 100644 index 16eaeb6..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_ab2.sql +++ /dev/null @@ -1,35 +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('promotions_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(rest as {{ dbt_utils.type_float() }}) as rest, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - cast(endat as {{ dbt_utils.type_string() }}) as endat, - cast(title as {{ dbt_utils.type_string() }}) as title, - {{ cast_to_boolean('active') }} as active, - cast({{ adapter.quote('options') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('options') }}, - cast(startat as {{ dbt_utils.type_string() }}) as startat, - cast(applyfor as {{ dbt_utils.type_string() }}) as applyfor, - cast(quantity as {{ dbt_utils.type_float() }}) as quantity, - cast(articleid as {{ dbt_utils.type_string() }}) as articleid, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - cast(sharepercent as {{ dbt_utils.type_string() }}) as sharepercent, - cast(conditionforuser as {{ dbt_utils.type_string() }}) as conditionforuser, - {{ cast_to_boolean('isunlimitedquantity') }} as isunlimitedquantity, - {{ cast_to_boolean('isapplyfororderwholesale') }} as isapplyfororderwholesale, - cast(supplierCommission as {{ dbt_utils.type_string() }}) as supplierCommission, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('promotions_ab1') }} --- promotions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotions_ab3.sql b/models/generated/airbyte_ctes/unibag/promotions_ab3.sql deleted file mode 100644 index 068abef..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_ab3.sql +++ /dev/null @@ -1,35 +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('promotions_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'rest', - adapter.quote('type'), - 'endat', - 'title', - boolean_to_string('active'), - adapter.quote('options'), - 'startat', - 'applyfor', - 'quantity', - 'articleid', - 'createdat', - 'updatedat', - 'searchstring', - 'sharepercent', - 'conditionforuser', - boolean_to_string('isunlimitedquantity'), - boolean_to_string('isapplyfororderwholesale'), - 'supplierCommission', - ]) }} as _airbyte_promotions_hashid, - tmp.* -from {{ ref('promotions_ab2') }} tmp --- promotions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/referrals_ab1.sql b/models/generated/airbyte_ctes/unibag/referrals_ab1.sql deleted file mode 100644 index e89545d..0000000 --- a/models/generated/airbyte_ctes/unibag/referrals_ab1.sql +++ /dev/null @@ -1,21 +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_referrals') }} -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', ['invitee'], ['invitee']) }} as invitee, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['fromSystem'], ['fromSystem']) }} as fromsystem, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_referrals') }} as table_alias --- referrals -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/referrals_ab2.sql b/models/generated/airbyte_ctes/unibag/referrals_ab2.sql deleted file mode 100644 index 88155db..0000000 --- a/models/generated/airbyte_ctes/unibag/referrals_ab2.sql +++ /dev/null @@ -1,21 +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('referrals_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(invitee as {{ dbt_utils.type_string() }}) as invitee, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - {{ cast_to_boolean('fromsystem') }} as fromsystem, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('referrals_ab1') }} --- referrals -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/referrals_ab3.sql b/models/generated/airbyte_ctes/unibag/referrals_ab3.sql deleted file mode 100644 index cbb62b1..0000000 --- a/models/generated/airbyte_ctes/unibag/referrals_ab3.sql +++ /dev/null @@ -1,21 +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('referrals_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - adapter.quote('user'), - 'invitee', - 'createdat', - boolean_to_string('fromsystem'), - ]) }} as _airbyte_referrals_hashid, - tmp.* -from {{ ref('referrals_ab2') }} tmp --- referrals -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/social_post_views_ab1.sql b/models/generated/airbyte_ctes/unibag/social_post_views_ab1.sql deleted file mode 100644 index aa99e8b..0000000 --- a/models/generated/airbyte_ctes/unibag/social_post_views_ab1.sql +++ /dev/null @@ -1,21 +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_social_post_views') }} -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', ['clientIP'], ['clientIP']) }} as clientip, - {{ json_extract_scalar('_airbyte_data', ['lastViewAt'], ['lastViewAt']) }} as lastviewat, - {{ json_extract_scalar('_airbyte_data', ['socialPost'], ['socialPost']) }} as socialpost, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_social_post_views') }} as table_alias --- social_post_views -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/social_post_views_ab2.sql b/models/generated/airbyte_ctes/unibag/social_post_views_ab2.sql deleted file mode 100644 index 8e2cf21..0000000 --- a/models/generated/airbyte_ctes/unibag/social_post_views_ab2.sql +++ /dev/null @@ -1,21 +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('social_post_views_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(clientip as {{ dbt_utils.type_string() }}) as clientip, - cast(lastviewat as {{ dbt_utils.type_string() }}) as lastviewat, - cast(socialpost as {{ dbt_utils.type_string() }}) as socialpost, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('social_post_views_ab1') }} --- social_post_views -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/social_post_views_ab3.sql b/models/generated/airbyte_ctes/unibag/social_post_views_ab3.sql deleted file mode 100644 index a714392..0000000 --- a/models/generated/airbyte_ctes/unibag/social_post_views_ab3.sql +++ /dev/null @@ -1,21 +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('social_post_views_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - adapter.quote('user'), - 'clientip', - 'lastviewat', - 'socialpost', - ]) }} as _airbyte_social_post_views_hashid, - tmp.* -from {{ ref('social_post_views_ab2') }} tmp --- social_post_views -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/social_posts_ab1.sql b/models/generated/airbyte_ctes/unibag/social_posts_ab1.sql deleted file mode 100644 index 9aad28d..0000000 --- a/models/generated/airbyte_ctes/unibag/social_posts_ab1.sql +++ /dev/null @@ -1,43 +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_social_posts') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_array('_airbyte_data', ['tags'], ['tags']) }} as tags, - {{ json_extract_scalar('_airbyte_data', ['isPin'], ['isPin']) }} as ispin, - {{ json_extract_scalar('_airbyte_data', ['order'], ['order']) }} as {{ adapter.quote('order') }}, - {{ json_extract_scalar('_airbyte_data', ['title'], ['title']) }} as title, - {{ json_extract_scalar('_airbyte_data', ['author'], ['author']) }} as author, - {{ json_extract_array('_airbyte_data', ['cities'], ['cities']) }} as cities, - {{ json_extract_array('_airbyte_data', ['photos'], ['photos']) }} as photos, - {{ json_extract_scalar('_airbyte_data', ['reason'], ['reason']) }} as reason, - {{ json_extract_scalar('_airbyte_data', ['status'], ['status']) }} as status, - {{ json_extract_array('_airbyte_data', ['videos'], ['videos']) }} as videos, - {{ json_extract_scalar('_airbyte_data', ['content'], ['content']) }} as {{ adapter.quote('content') }}, - {{ json_extract_scalar('_airbyte_data', ['isTimer'], ['isTimer']) }} as istimer, - {{ json_extract_scalar('_airbyte_data', ['startAt'], ['startAt']) }} as startat, - {{ json_extract_array('_airbyte_data', ['products'], ['products']) }} as products, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['hasUpdate'], ['hasUpdate']) }} as hasupdate, - {{ json_extract_scalar('_airbyte_data', ['statistic'], ['statistic']) }} as statistic, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_array('_airbyte_data', ['categories'], ['categories']) }} as categories, - {{ json_extract_scalar('_airbyte_data', ['fromSystem'], ['fromSystem']) }} as fromsystem, - {{ json_extract_scalar('_airbyte_data', ['contributor'], ['contributor']) }} as contributor, - {{ json_extract_scalar('_airbyte_data', ['publishedAt'], ['publishedAt']) }} as publishedat, - {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - {{ json_extract_scalar('_airbyte_data', ['updatedCount'], ['updatedCount']) }} as updatedcount, - {{ json_extract_scalar('_airbyte_data', ['shareStatistic'], ['shareStatistic']) }} as sharestatistic, - {{ json_extract_scalar('_airbyte_data', ['enableNotificationForContributor'], ['enableNotificationForContributor']) }} as enablenotificationforcontributor, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_social_posts') }} as table_alias --- social_posts -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/social_posts_ab2.sql b/models/generated/airbyte_ctes/unibag/social_posts_ab2.sql deleted file mode 100644 index 7300f1b..0000000 --- a/models/generated/airbyte_ctes/unibag/social_posts_ab2.sql +++ /dev/null @@ -1,43 +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('social_posts_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - tags, - {{ cast_to_boolean('ispin') }} as ispin, - cast({{ adapter.quote('order') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('order') }}, - cast(title as {{ dbt_utils.type_string() }}) as title, - cast(author as {{ dbt_utils.type_string() }}) as author, - cities, - photos, - cast(reason as {{ dbt_utils.type_string() }}) as reason, - cast(status as {{ dbt_utils.type_string() }}) as status, - videos, - cast({{ adapter.quote('content') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('content') }}, - {{ cast_to_boolean('istimer') }} as istimer, - cast(startat as {{ dbt_utils.type_string() }}) as startat, - products, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - {{ cast_to_boolean('hasupdate') }} as hasupdate, - cast(statistic as {{ dbt_utils.type_string() }}) as statistic, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - categories, - {{ cast_to_boolean('fromsystem') }} as fromsystem, - cast(contributor as {{ dbt_utils.type_string() }}) as contributor, - cast(publishedat as {{ dbt_utils.type_string() }}) as publishedat, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - cast(updatedcount as {{ dbt_utils.type_float() }}) as updatedcount, - cast(sharestatistic as {{ dbt_utils.type_string() }}) as sharestatistic, - {{ cast_to_boolean('enablenotificationforcontributor') }} as enablenotificationforcontributor, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('social_posts_ab1') }} --- social_posts -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/social_posts_ab3.sql b/models/generated/airbyte_ctes/unibag/social_posts_ab3.sql deleted file mode 100644 index 5b932f4..0000000 --- a/models/generated/airbyte_ctes/unibag/social_posts_ab3.sql +++ /dev/null @@ -1,43 +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('social_posts_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - array_to_string('tags'), - boolean_to_string('ispin'), - adapter.quote('order'), - 'title', - 'author', - array_to_string('cities'), - array_to_string('photos'), - 'reason', - 'status', - array_to_string('videos'), - adapter.quote('content'), - boolean_to_string('istimer'), - 'startat', - array_to_string('products'), - 'createdat', - boolean_to_string('hasupdate'), - 'statistic', - 'updatedat', - array_to_string('categories'), - boolean_to_string('fromsystem'), - 'contributor', - 'publishedat', - 'searchstring', - 'updatedcount', - 'sharestatistic', - boolean_to_string('enablenotificationforcontributor'), - ]) }} as _airbyte_social_posts_hashid, - tmp.* -from {{ ref('social_posts_ab2') }} tmp --- social_posts -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_ab1.sql b/models/generated/airbyte_ctes/unibag/suppliers_ab1.sql deleted file mode 100644 index eea9006..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_ab1.sql +++ /dev/null @@ -1,40 +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_suppliers') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['tax'], ['tax']) }} as tax, - {{ json_extract_scalar('_airbyte_data', ['bank'], ['bank']) }} as bank, - {{ json_extract_scalar('_airbyte_data', ['logo'], ['logo']) }} as logo, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['active'], ['active']) }} as active, - {{ json_extract_scalar('_airbyte_data', ['checkSum'], ['checkSum']) }} as checksum, - {{ json_extract_scalar('_airbyte_data', ['checksum'], ['checksum']) }} as checksum_1, - {{ json_extract_scalar('_airbyte_data', ['location'], ['location']) }} as {{ adapter.quote('location') }}, - {{ json_extract_array('_airbyte_data', ['contracts'], ['contracts']) }} as contracts, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_array('_airbyte_data', ['documents'], ['documents']) }} as documents, - {{ json_extract_scalar('_airbyte_data', ['statistic'], ['statistic']) }} as statistic, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_array('_airbyte_data', ['categories'], ['categories']) }} as categories, - {{ json_extract_array('_airbyte_data', ['inventories'], ['inventories']) }} as inventories, - {{ json_extract_scalar('_airbyte_data', ['identifyCode'], ['identifyCode']) }} as identifycode, - {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - {{ json_extract_scalar('_airbyte_data', ['contractNumber'], ['contractNumber']) }} as contractnumber, - {{ json_extract_scalar('_airbyte_data', ['reviewStatistic'], ['reviewStatistic']) }} as reviewstatistic, - {{ json_extract_scalar('_airbyte_data', ['contractSignedAt'], ['contractSignedAt']) }} as contractsignedat, - {{ json_extract_array('_airbyte_data', ['emailForInvoices'], ['emailForInvoices']) }} as emailforinvoices, - {{ json_extract_scalar('_airbyte_data', ['contractExpiredAt'], ['contractExpiredAt']) }} as contractexpiredat, - {{ json_extract_scalar('_airbyte_data', ['sendInvoiceRequestEveryDay'], ['sendInvoiceRequestEveryDay']) }} as sendinvoicerequesteveryday, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_suppliers') }} as table_alias --- suppliers -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_ab2.sql b/models/generated/airbyte_ctes/unibag/suppliers_ab2.sql deleted file mode 100644 index 59199cb..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_ab2.sql +++ /dev/null @@ -1,40 +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('suppliers_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(tax as {{ dbt_utils.type_string() }}) as tax, - cast(bank as {{ dbt_utils.type_string() }}) as bank, - cast(logo as {{ dbt_utils.type_string() }}) as logo, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - {{ cast_to_boolean('active') }} as active, - cast(checksum as {{ dbt_utils.type_string() }}) as checksum, - cast(checksum_1 as {{ dbt_utils.type_string() }}) as checksum_1, - cast({{ adapter.quote('location') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('location') }}, - contracts, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - documents, - cast(statistic as {{ dbt_utils.type_string() }}) as statistic, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - categories, - inventories, - cast(identifycode as {{ dbt_utils.type_float() }}) as identifycode, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - cast(contractnumber as {{ dbt_utils.type_string() }}) as contractnumber, - cast(reviewstatistic as {{ dbt_utils.type_string() }}) as reviewstatistic, - cast(contractsignedat as {{ dbt_utils.type_string() }}) as contractsignedat, - emailforinvoices, - cast(contractexpiredat as {{ dbt_utils.type_string() }}) as contractexpiredat, - {{ cast_to_boolean('sendinvoicerequesteveryday') }} as sendinvoicerequesteveryday, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers_ab1') }} --- suppliers -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_ab3.sql b/models/generated/airbyte_ctes/unibag/suppliers_ab3.sql deleted file mode 100644 index 76f1c42..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_ab3.sql +++ /dev/null @@ -1,40 +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('suppliers_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'tax', - 'bank', - 'logo', - adapter.quote('name'), - boolean_to_string('active'), - 'checksum', - 'checksum_1', - adapter.quote('location'), - array_to_string('contracts'), - 'createdat', - array_to_string('documents'), - 'statistic', - 'updatedat', - array_to_string('categories'), - array_to_string('inventories'), - 'identifycode', - 'searchstring', - 'contractnumber', - 'reviewstatistic', - 'contractsignedat', - array_to_string('emailforinvoices'), - 'contractexpiredat', - boolean_to_string('sendinvoicerequesteveryday'), - ]) }} as _airbyte_suppliers_hashid, - tmp.* -from {{ ref('suppliers_ab2') }} tmp --- suppliers -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/team_activities_ab1.sql b/models/generated/airbyte_ctes/unibag/team_activities_ab1.sql deleted file mode 100644 index 9929ea2..0000000 --- a/models/generated/airbyte_ctes/unibag/team_activities_ab1.sql +++ /dev/null @@ -1,23 +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_team_activities') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['team'], ['team']) }} as team, - {{ json_extract_scalar('_airbyte_data', ['action'], ['action']) }} as {{ adapter.quote('action') }}, - {{ json_extract_scalar('_airbyte_data', ['options'], ['options']) }} as {{ adapter.quote('options') }}, - {{ json_extract_scalar('_airbyte_data', ['targetId'], ['targetId']) }} as targetid, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['createdBy'], ['createdBy']) }} as createdby, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_team_activities') }} as table_alias --- team_activities -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/team_activities_ab2.sql b/models/generated/airbyte_ctes/unibag/team_activities_ab2.sql deleted file mode 100644 index cf0a002..0000000 --- a/models/generated/airbyte_ctes/unibag/team_activities_ab2.sql +++ /dev/null @@ -1,23 +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('team_activities_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(team as {{ dbt_utils.type_string() }}) as team, - cast({{ adapter.quote('action') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('action') }}, - cast({{ adapter.quote('options') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('options') }}, - cast(targetid as {{ dbt_utils.type_string() }}) as targetid, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(createdby as {{ dbt_utils.type_string() }}) as createdby, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('team_activities_ab1') }} --- team_activities -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/team_activities_ab3.sql b/models/generated/airbyte_ctes/unibag/team_activities_ab3.sql deleted file mode 100644 index 107bd5a..0000000 --- a/models/generated/airbyte_ctes/unibag/team_activities_ab3.sql +++ /dev/null @@ -1,23 +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('team_activities_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'team', - adapter.quote('action'), - adapter.quote('options'), - 'targetid', - 'createdat', - 'createdby', - ]) }} as _airbyte_team_activities_hashid, - tmp.* -from {{ ref('team_activities_ab2') }} tmp --- team_activities -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/team_bonus_ab1.sql b/models/generated/airbyte_ctes/unibag/team_bonus_ab1.sql deleted file mode 100644 index 87ebed5..0000000 --- a/models/generated/airbyte_ctes/unibag/team_bonus_ab1.sql +++ /dev/null @@ -1,29 +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_team_bonus') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['team'], ['team']) }} as team, - {{ json_extract_scalar('_airbyte_data', ['user'], ['user']) }} as {{ adapter.quote('user') }}, - {{ json_extract_scalar('_airbyte_data', ['status'], ['status']) }} as status, - {{ json_extract_scalar('_airbyte_data', ['percent'], ['percent']) }} as {{ adapter.quote('percent') }}, - {{ json_extract_scalar('_airbyte_data', ['targetId'], ['targetId']) }} as targetid, - {{ json_extract_scalar('_airbyte_data', ['teamName'], ['teamName']) }} as teamname, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['teamLevel'], ['teamLevel']) }} as teamlevel, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['commission'], ['commission']) }} as commission, - {{ json_extract_scalar('_airbyte_data', ['teamMember'], ['teamMember']) }} as teammember, - {{ json_extract_scalar('_airbyte_data', ['teamPromotion'], ['teamPromotion']) }} as teampromotion, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_team_bonus') }} as table_alias --- team_bonus -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/team_bonus_ab2.sql b/models/generated/airbyte_ctes/unibag/team_bonus_ab2.sql deleted file mode 100644 index 3ff5a1e..0000000 --- a/models/generated/airbyte_ctes/unibag/team_bonus_ab2.sql +++ /dev/null @@ -1,29 +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('team_bonus_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(team as {{ dbt_utils.type_string() }}) as team, - cast({{ adapter.quote('user') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('user') }}, - cast(status as {{ dbt_utils.type_string() }}) as status, - cast({{ adapter.quote('percent') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('percent') }}, - cast(targetid as {{ dbt_utils.type_string() }}) as targetid, - cast(teamname as {{ dbt_utils.type_string() }}) as teamname, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(teamlevel as {{ dbt_utils.type_float() }}) as teamlevel, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(commission as {{ dbt_utils.type_float() }}) as commission, - cast(teammember as {{ dbt_utils.type_string() }}) as teammember, - cast(teampromotion as {{ dbt_utils.type_string() }}) as teampromotion, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('team_bonus_ab1') }} --- team_bonus -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/team_bonus_ab3.sql b/models/generated/airbyte_ctes/unibag/team_bonus_ab3.sql deleted file mode 100644 index 555a774..0000000 --- a/models/generated/airbyte_ctes/unibag/team_bonus_ab3.sql +++ /dev/null @@ -1,29 +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('team_bonus_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'team', - adapter.quote('user'), - 'status', - adapter.quote('percent'), - 'targetid', - 'teamname', - 'createdat', - 'teamlevel', - 'updatedat', - 'commission', - 'teammember', - 'teampromotion', - ]) }} as _airbyte_team_bonus_hashid, - tmp.* -from {{ ref('team_bonus_ab2') }} tmp --- team_bonus -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/team_members_ab1.sql b/models/generated/airbyte_ctes/unibag/team_members_ab1.sql deleted file mode 100644 index 55f902c..0000000 --- a/models/generated/airbyte_ctes/unibag/team_members_ab1.sql +++ /dev/null @@ -1,31 +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_team_members') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['role'], ['role']) }} as {{ adapter.quote('role') }}, - {{ json_extract_scalar('_airbyte_data', ['team'], ['team']) }} as team, - {{ json_extract_scalar('_airbyte_data', ['user'], ['user']) }} as {{ adapter.quote('user') }}, - {{ json_extract_scalar('_airbyte_data', ['isLeft'], ['isLeft']) }} as isleft, - {{ json_extract_scalar('_airbyte_data', ['leftAt'], ['leftAt']) }} as leftat, - {{ json_extract_scalar('_airbyte_data', ['joinedAt'], ['joinedAt']) }} as joinedat, - {{ json_extract_scalar('_airbyte_data', ['roleCode'], ['roleCode']) }} as rolecode, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['statistic'], ['statistic']) }} as statistic, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['isRemovedBy'], ['isRemovedBy']) }} as isremovedby, - {{ json_extract_scalar('_airbyte_data', ['firstOrderAt'], ['firstOrderAt']) }} as firstorderat, - {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - {{ json_extract_scalar('_airbyte_data', ['isMemberHomegrown'], ['isMemberHomegrown']) }} as ismemberhomegrown, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_team_members') }} as table_alias --- team_members -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/team_members_ab2.sql b/models/generated/airbyte_ctes/unibag/team_members_ab2.sql deleted file mode 100644 index ca29b11..0000000 --- a/models/generated/airbyte_ctes/unibag/team_members_ab2.sql +++ /dev/null @@ -1,31 +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('team_members_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('role') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('role') }}, - cast(team as {{ dbt_utils.type_string() }}) as team, - cast({{ adapter.quote('user') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('user') }}, - {{ cast_to_boolean('isleft') }} as isleft, - cast(leftat as {{ dbt_utils.type_string() }}) as leftat, - cast(joinedat as {{ dbt_utils.type_string() }}) as joinedat, - cast(rolecode as {{ dbt_utils.type_float() }}) as rolecode, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(statistic as {{ dbt_utils.type_string() }}) as statistic, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(isremovedby as {{ dbt_utils.type_string() }}) as isremovedby, - cast(firstorderat as {{ dbt_utils.type_string() }}) as firstorderat, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - {{ cast_to_boolean('ismemberhomegrown') }} as ismemberhomegrown, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('team_members_ab1') }} --- team_members -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/team_members_ab3.sql b/models/generated/airbyte_ctes/unibag/team_members_ab3.sql deleted file mode 100644 index cb2a11b..0000000 --- a/models/generated/airbyte_ctes/unibag/team_members_ab3.sql +++ /dev/null @@ -1,31 +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('team_members_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - adapter.quote('role'), - 'team', - adapter.quote('user'), - boolean_to_string('isleft'), - 'leftat', - 'joinedat', - 'rolecode', - 'createdat', - 'statistic', - 'updatedat', - 'isremovedby', - 'firstorderat', - 'searchstring', - boolean_to_string('ismemberhomegrown'), - ]) }} as _airbyte_team_members_hashid, - tmp.* -from {{ ref('team_members_ab2') }} tmp --- team_members -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/teams_ab1.sql b/models/generated/airbyte_ctes/unibag/teams_ab1.sql deleted file mode 100644 index 1d59bba..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_ab1.sql +++ /dev/null @@ -1,34 +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_teams') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['code'], ['code']) }} as code, - {{ json_extract_scalar('_airbyte_data', ['desc'], ['desc']) }} as {{ adapter.quote('desc') }}, - {{ json_extract_scalar('_airbyte_data', ['logo'], ['logo']) }} as logo, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['level'], ['level']) }} as {{ adapter.quote('level') }}, - {{ json_extract_scalar('_airbyte_data', ['active'], ['active']) }} as active, - {{ json_extract_scalar('_airbyte_data', ['isFull'], ['isFull']) }} as isfull, - {{ json_extract_scalar('_airbyte_data', ['cityCode'], ['cityCode']) }} as citycode, - {{ json_extract_scalar('_airbyte_data', ['adminUser'], ['adminUser']) }} as adminuser, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['statistic'], ['statistic']) }} as statistic, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['inviteLink'], ['inviteLink']) }} as invitelink, - {{ json_extract_scalar('_airbyte_data', ['information'], ['information']) }} as information, - {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - {{ json_extract_scalar('_airbyte_data', ['inactiveReason'], ['inactiveReason']) }} as inactivereason, - {{ json_extract_scalar('_airbyte_data', ['changingNameCount'], ['changingNameCount']) }} as changingnamecount, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_teams') }} as table_alias --- teams -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/teams_ab2.sql b/models/generated/airbyte_ctes/unibag/teams_ab2.sql deleted file mode 100644 index bb0193c..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_ab2.sql +++ /dev/null @@ -1,34 +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('teams_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(code as {{ dbt_utils.type_string() }}) as code, - cast({{ adapter.quote('desc') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('desc') }}, - cast(logo as {{ dbt_utils.type_string() }}) as logo, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast({{ adapter.quote('level') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('level') }}, - {{ cast_to_boolean('active') }} as active, - {{ cast_to_boolean('isfull') }} as isfull, - cast(citycode as {{ dbt_utils.type_float() }}) as citycode, - cast(adminuser as {{ dbt_utils.type_string() }}) as adminuser, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(statistic as {{ dbt_utils.type_string() }}) as statistic, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(invitelink as {{ dbt_utils.type_string() }}) as invitelink, - cast(information as {{ dbt_utils.type_string() }}) as information, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - cast(inactivereason as {{ dbt_utils.type_string() }}) as inactivereason, - cast(changingnamecount as {{ dbt_utils.type_float() }}) as changingnamecount, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('teams_ab1') }} --- teams -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/teams_ab3.sql b/models/generated/airbyte_ctes/unibag/teams_ab3.sql deleted file mode 100644 index 36dc595..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_ab3.sql +++ /dev/null @@ -1,34 +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('teams_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'code', - adapter.quote('desc'), - 'logo', - adapter.quote('name'), - adapter.quote('level'), - boolean_to_string('active'), - boolean_to_string('isfull'), - 'citycode', - 'adminuser', - 'createdat', - 'statistic', - 'updatedat', - 'invitelink', - 'information', - 'searchstring', - 'inactivereason', - 'changingnamecount', - ]) }} as _airbyte_teams_hashid, - tmp.* -from {{ ref('teams_ab2') }} tmp --- teams -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_ab1.sql b/models/generated/airbyte_ctes/unibag/user_identifications_ab1.sql deleted file mode 100644 index 54c9bb1..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_ab1.sql +++ /dev/null @@ -1,38 +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_user_identifications') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['dob'], ['dob']) }} as dob, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['note'], ['note']) }} as note, - {{ json_extract_scalar('_airbyte_data', ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_scalar('_airbyte_data', ['user'], ['user']) }} as {{ adapter.quote('user') }}, - {{ json_extract_scalar('_airbyte_data', ['gender'], ['gender']) }} as gender, - {{ json_extract_scalar('_airbyte_data', ['nation'], ['nation']) }} as nation, - {{ json_extract_scalar('_airbyte_data', ['number'], ['number']) }} as {{ adapter.quote('number') }}, - {{ json_extract_scalar('_airbyte_data', ['status'], ['status']) }} as status, - {{ json_extract_scalar('_airbyte_data', ['address'], ['address']) }} as address, - {{ json_extract_scalar('_airbyte_data', ['dobDate'], ['dobDate']) }} as dobdate, - {{ json_extract_scalar('_airbyte_data', ['backSide'], ['backSide']) }} as backside, - {{ json_extract_scalar('_airbyte_data', ['birthday'], ['birthday']) }} as birthday, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['frontSide'], ['frontSide']) }} as frontside, - {{ json_extract_scalar('_airbyte_data', ['issueDate'], ['issueDate']) }} as issuedate, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['expiryDate'], ['expiryDate']) }} as expirydate, - {{ json_extract_scalar('_airbyte_data', ['issuePlace'], ['issuePlace']) }} as issueplace, - {{ json_extract_scalar('_airbyte_data', ['timeUpdate'], ['timeUpdate']) }} as timeupdate, - {{ json_extract_scalar('_airbyte_data', ['detectInformation'], ['detectInformation']) }} as detectinformation, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_user_identifications') }} as table_alias --- user_identifications -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_ab2.sql b/models/generated/airbyte_ctes/unibag/user_identifications_ab2.sql deleted file mode 100644 index 1fcdceb..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_ab2.sql +++ /dev/null @@ -1,38 +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('user_identifications_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(dob as {{ dbt_utils.type_string() }}) as dob, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(note as {{ dbt_utils.type_string() }}) as note, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - cast({{ adapter.quote('user') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('user') }}, - cast(gender as {{ dbt_utils.type_string() }}) as gender, - cast(nation as {{ dbt_utils.type_string() }}) as nation, - cast({{ adapter.quote('number') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('number') }}, - cast(status as {{ dbt_utils.type_string() }}) as status, - cast(address as {{ dbt_utils.type_string() }}) as address, - cast(dobdate as {{ dbt_utils.type_string() }}) as dobdate, - cast(backside as {{ dbt_utils.type_string() }}) as backside, - cast(birthday as {{ dbt_utils.type_string() }}) as birthday, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(frontside as {{ dbt_utils.type_string() }}) as frontside, - cast(issuedate as {{ dbt_utils.type_string() }}) as issuedate, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(expirydate as {{ dbt_utils.type_string() }}) as expirydate, - cast(issueplace as {{ dbt_utils.type_string() }}) as issueplace, - cast(timeupdate as {{ dbt_utils.type_float() }}) as timeupdate, - cast(detectinformation as {{ dbt_utils.type_string() }}) as detectinformation, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications_ab1') }} --- user_identifications -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_ab3.sql b/models/generated/airbyte_ctes/unibag/user_identifications_ab3.sql deleted file mode 100644 index e406266..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_ab3.sql +++ /dev/null @@ -1,38 +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('user_identifications_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'dob', - adapter.quote('name'), - 'note', - adapter.quote('type'), - adapter.quote('user'), - 'gender', - 'nation', - adapter.quote('number'), - 'status', - 'address', - 'dobdate', - 'backside', - 'birthday', - 'createdat', - 'frontside', - 'issuedate', - 'updatedat', - 'expirydate', - 'issueplace', - 'timeupdate', - 'detectinformation', - ]) }} as _airbyte_user_identifications_hashid, - tmp.* -from {{ ref('user_identifications_ab2') }} tmp --- user_identifications -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_ab1.sql b/models/generated/airbyte_ctes/unibag/users_ab1.sql deleted file mode 100644 index 8327097..0000000 --- a/models/generated/airbyte_ctes/unibag/users_ab1.sql +++ /dev/null @@ -1,44 +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_users') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['code'], ['code']) }} as code, - {{ json_extract_scalar('_airbyte_data', ['info'], ['info']) }} as info, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['team'], ['team']) }} as team, - {{ json_extract_scalar('_airbyte_data', ['zalo'], ['zalo']) }} as zalo, - {{ json_extract_scalar('_airbyte_data', ['email'], ['email']) }} as email, - {{ json_extract_scalar('_airbyte_data', ['phone'], ['phone']) }} as phone, - {{ json_extract_scalar('_airbyte_data', ['avatar'], ['avatar']) }} as avatar, - {{ json_extract_scalar('_airbyte_data', ['banned'], ['banned']) }} as banned, - {{ json_extract_scalar('_airbyte_data', ['segment'], ['segment']) }} as segment, - {{ json_extract_scalar('_airbyte_data', ['facebook'], ['facebook']) }} as facebook, - {{ json_extract_scalar('_airbyte_data', ['hasOrder'], ['hasOrder']) }} as hasorder, - {{ json_extract_scalar('_airbyte_data', ['referral'], ['referral']) }} as referral, - {{ json_extract_array('_airbyte_data', ['segments'], ['segments']) }} as segments, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract_scalar('_airbyte_data', ['statistic'], ['statistic']) }} as statistic, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['membership'], ['membership']) }} as membership, - {{ json_extract_scalar('_airbyte_data', ['lastOrderAt'], ['lastOrderAt']) }} as lastorderat, - {{ json_extract_scalar('_airbyte_data', ['firstOrderAt'], ['firstOrderAt']) }} as firstorderat, - {{ json_extract_scalar('_airbyte_data', ['registerFrom'], ['registerFrom']) }} as registerfrom, - {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - {{ json_extract_scalar('_airbyte_data', ['adjustTracker'], ['adjustTracker']) }} as adjusttracker, - {{ json_extract_scalar('_airbyte_data', ['isUpdatedInfo'], ['isUpdatedInfo']) }} as isupdatedinfo, - {{ json_extract_scalar('_airbyte_data', ['identification'], ['identification']) }} as identification, - {{ json_extract_scalar('_airbyte_data', ['lastActivatedAt'], ['lastActivatedAt']) }} as lastactivatedat, - {{ json_extract_scalar('_airbyte_data', ['lastViewNotificationAt'], ['lastViewNotificationAt']) }} as lastviewnotificationat, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_users') }} as table_alias --- users -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_ab2.sql b/models/generated/airbyte_ctes/unibag/users_ab2.sql deleted file mode 100644 index b3e92a0..0000000 --- a/models/generated/airbyte_ctes/unibag/users_ab2.sql +++ /dev/null @@ -1,44 +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('users_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(code as {{ dbt_utils.type_string() }}) as code, - cast(info as {{ dbt_utils.type_string() }}) as info, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(team as {{ dbt_utils.type_string() }}) as team, - cast(zalo as {{ dbt_utils.type_string() }}) as zalo, - cast(email as {{ dbt_utils.type_string() }}) as email, - cast(phone as {{ dbt_utils.type_string() }}) as phone, - cast(avatar as {{ dbt_utils.type_string() }}) as avatar, - {{ cast_to_boolean('banned') }} as banned, - cast(segment as {{ dbt_utils.type_string() }}) as segment, - cast(facebook as {{ dbt_utils.type_string() }}) as facebook, - {{ cast_to_boolean('hasorder') }} as hasorder, - cast(referral as {{ dbt_utils.type_string() }}) as referral, - segments, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(statistic as {{ dbt_utils.type_string() }}) as statistic, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(membership as {{ dbt_utils.type_string() }}) as membership, - cast(lastorderat as {{ dbt_utils.type_string() }}) as lastorderat, - cast(firstorderat as {{ dbt_utils.type_string() }}) as firstorderat, - cast(registerfrom as {{ dbt_utils.type_string() }}) as registerfrom, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - cast(adjusttracker as {{ dbt_utils.type_string() }}) as adjusttracker, - {{ cast_to_boolean('isupdatedinfo') }} as isupdatedinfo, - cast(identification as {{ dbt_utils.type_string() }}) as identification, - cast(lastactivatedat as {{ dbt_utils.type_string() }}) as lastactivatedat, - cast(lastviewnotificationat as {{ dbt_utils.type_string() }}) as lastviewnotificationat, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_ab1') }} --- users -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_ab3.sql b/models/generated/airbyte_ctes/unibag/users_ab3.sql deleted file mode 100644 index 1f54025..0000000 --- a/models/generated/airbyte_ctes/unibag/users_ab3.sql +++ /dev/null @@ -1,44 +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('users_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'code', - 'info', - adapter.quote('name'), - 'team', - 'zalo', - 'email', - 'phone', - 'avatar', - boolean_to_string('banned'), - 'segment', - 'facebook', - boolean_to_string('hasorder'), - 'referral', - array_to_string('segments'), - 'createdat', - 'statistic', - 'updatedat', - 'membership', - 'lastorderat', - 'firstorderat', - 'registerfrom', - 'searchstring', - 'adjusttracker', - boolean_to_string('isupdatedinfo'), - 'identification', - 'lastactivatedat', - 'lastviewnotificationat', - ]) }} as _airbyte_users_hashid, - tmp.* -from {{ ref('users_ab2') }} tmp --- users -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/wards_ab1.sql b/models/generated/airbyte_ctes/unibag/wards_ab1.sql deleted file mode 100644 index e595ee4..0000000 --- a/models/generated/airbyte_ctes/unibag/wards_ab1.sql +++ /dev/null @@ -1,32 +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_wards') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['city'], ['city']) }} as city, - {{ json_extract_scalar('_airbyte_data', ['code'], ['code']) }} as code, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['slug'], ['slug']) }} as slug, - {{ json_extract_scalar('_airbyte_data', ['tncId'], ['tncId']) }} as tncid, - {{ json_extract_scalar('_airbyte_data', ['cityId'], ['cityId']) }} as cityid, - {{ json_extract_scalar('_airbyte_data', ['source'], ['source']) }} as {{ adapter.quote('source') }}, - {{ json_extract_scalar('_airbyte_data', ['tncCode'], ['tncCode']) }} as tnccode, - {{ json_extract_scalar('_airbyte_data', ['district'], ['district']) }} as district, - {{ json_extract_scalar('_airbyte_data', ['gidoCode'], ['gidoCode']) }} as gidocode, - {{ json_extract_scalar('_airbyte_data', ['osirisId'], ['osirisId']) }} as osirisid, - {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract_scalar('_airbyte_data', ['districtId'], ['districtId']) }} as districtid, - {{ json_extract_scalar('_airbyte_data', ['provinceId'], ['provinceId']) }} as provinceid, - {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_wards') }} as table_alias --- wards -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/wards_ab2.sql b/models/generated/airbyte_ctes/unibag/wards_ab2.sql deleted file mode 100644 index ba138c1..0000000 --- a/models/generated/airbyte_ctes/unibag/wards_ab2.sql +++ /dev/null @@ -1,32 +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('wards_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(city as {{ dbt_utils.type_string() }}) as city, - cast(code as {{ dbt_utils.type_float() }}) as code, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(slug as {{ dbt_utils.type_string() }}) as slug, - cast(tncid as {{ dbt_utils.type_float() }}) as tncid, - cast(cityid as {{ dbt_utils.type_float() }}) as cityid, - cast({{ adapter.quote('source') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('source') }}, - cast(tnccode as {{ dbt_utils.type_string() }}) as tnccode, - cast(district as {{ dbt_utils.type_string() }}) as district, - cast(gidocode as {{ dbt_utils.type_float() }}) as gidocode, - cast(osirisid as {{ dbt_utils.type_float() }}) as osirisid, - cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(districtid as {{ dbt_utils.type_float() }}) as districtid, - cast(provinceid as {{ dbt_utils.type_float() }}) as provinceid, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('wards_ab1') }} --- wards -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/wards_ab3.sql b/models/generated/airbyte_ctes/unibag/wards_ab3.sql deleted file mode 100644 index 0c5b6a3..0000000 --- a/models/generated/airbyte_ctes/unibag/wards_ab3.sql +++ /dev/null @@ -1,32 +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('wards_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'city', - 'code', - adapter.quote('name'), - 'slug', - 'tncid', - 'cityid', - adapter.quote('source'), - 'tnccode', - 'district', - 'gidocode', - 'osirisid', - 'updatedat', - 'districtid', - 'provinceid', - 'searchstring', - ]) }} as _airbyte_wards_hashid, - tmp.* -from {{ ref('wards_ab2') }} tmp --- wards -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/admin_tags.sql b/models/generated/airbyte_tables/unibag/admin_tags.sql deleted file mode 100644 index ccede46..0000000 --- a/models/generated/airbyte_tables/unibag/admin_tags.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('admin_tags_ab3') }} -select - _id AS id, - {{ adapter.quote('name') }}, - {{ adapter.quote('type') }}, - color, - active, - createdat::timestamp AS created_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_admin_tags_hashid -from {{ ref('admin_tags_ab3') }} --- admin_tags from {{ source('unibag', '_airbyte_raw_admin_tags') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/cash_flows.sql b/models/generated/airbyte_tables/unibag/cash_flows.sql deleted file mode 100644 index 4ced7f0..0000000 --- a/models/generated/airbyte_tables/unibag/cash_flows.sql +++ /dev/null @@ -1,25 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('cash_flows_ab3') }} -select - _id AS id, - {{ adapter.quote('value') }}, - {{ adapter.quote('action') }}, - newbalance AS new_balance, - oldbalance AS old_balance, - targetid AS target_id, - targettype AS target_type, - {{ adapter.quote('user') }} AS seller_id, - createdat::timestamp AS created_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_cash_flows_hashid -from {{ ref('cash_flows_ab3') }} --- cash_flows from {{ source('unibag', '_airbyte_raw_cash_flows') }} -where 1 = 1 diff --git a/models/generated/airbyte_tables/unibag/cities.sql b/models/generated/airbyte_tables/unibag/cities.sql deleted file mode 100644 index e3ae178..0000000 --- a/models/generated/airbyte_tables/unibag/cities.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('cities_ab3') }} -select - _id AS id, - code, - {{ adapter.quote('name') }}, - slug, - region, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_cities_hashid -from {{ ref('cities_ab3') }} --- cities from {{ source('unibag', '_airbyte_raw_cities') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/customers.sql b/models/generated/airbyte_tables/unibag/customers.sql deleted file mode 100644 index 266e813..0000000 --- a/models/generated/airbyte_tables/unibag/customers.sql +++ /dev/null @@ -1,28 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('customers_ab3') }} -select - _id AS id, - {{ adapter.quote('name') }}, - phone, - cast({{ adapter.quote('statistic') }}::json->>'expenseTotal' AS numeric) AS stats_expense_total, - cast({{ adapter.quote('statistic') }}::json->>'transactionTotal' AS numeric) AS stats_order_total, - cast({{ adapter.quote('statistic') }}::json->>'transactionPending' AS numeric) AS stats_order_pending, - cast({{ adapter.quote('statistic') }}::json->>'transactionSuccess' AS numeric) AS stats_order_success, - cast({{ adapter.quote('statistic') }}::json->>'transactionRejected' AS numeric) AS stats_order_rejected, - {{ adapter.quote('user') }} AS seller_id, - {{ adapter.quote('location') }}::jsonb, - createdat::timestamp AS created_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_customers_hashid -from {{ ref('customers_ab3') }} --- customers from {{ source('unibag', '_airbyte_raw_customers') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/districts.sql b/models/generated/airbyte_tables/unibag/districts.sql deleted file mode 100644 index 8738b76..0000000 --- a/models/generated/airbyte_tables/unibag/districts.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('districts_ab3') }} -select - _id AS id, - code, - {{ adapter.quote('name') }}, - slug, - cityid AS province_code, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_districts_hashid -from {{ ref('districts_ab3') }} --- districts from {{ source('unibag', '_airbyte_raw_districts') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/event_rewards.sql b/models/generated/airbyte_tables/unibag/event_rewards.sql deleted file mode 100644 index e4ab8df..0000000 --- a/models/generated/airbyte_tables/unibag/event_rewards.sql +++ /dev/null @@ -1,32 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('event_rewards_ab3') }} -select - _id AS id, - cash, - {{ adapter.quote('type') }}, - status, - {{ adapter.quote('options') }}::json->>'referral' AS option_referral, - {{ adapter.quote('options') }}::json->>'invitee' AS option_invitee, - {{ adapter.quote('options') }}::json->>'order' AS option_order, - cast({{ adapter.quote('options') }}::json->>'percent' AS numeric) AS option_percent, - cast({{ adapter.quote('options') }}::json->>'minOrderToClaim' AS integer) AS option_min_order_to_claim, - cast({{ adapter.quote('options') }}::json->>'minOrderValue' AS numeric) AS option_min_order_value, - {{ adapter.quote('options') }}::json->>'userEventQuest' AS option_event_quest, - {{ adapter.quote('user') }} AS seller_id, - {{ adapter.quote('event') }} AS event_id, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_event_rewards_hashid -from {{ ref('event_rewards_ab3') }} --- event_rewards from {{ source('unibag', '_airbyte_raw_event_rewards') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/events.sql b/models/generated/airbyte_tables/unibag/events.sql deleted file mode 100644 index a897958..0000000 --- a/models/generated/airbyte_tables/unibag/events.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('events_ab3') }} -select - _id AS id, - {{ adapter.quote('name') }}, - {{ adapter.quote('type') }}, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_events_hashid -from {{ ref('events_ab3') }} --- events from {{ source('unibag', '_airbyte_raw_events') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/inventories.sql b/models/generated/airbyte_tables/unibag/inventories.sql deleted file mode 100644 index 9730ebe..0000000 --- a/models/generated/airbyte_tables/unibag/inventories.sql +++ /dev/null @@ -1,29 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('inventories_ab3') }} -select - _id AS id, - {{ adapter.quote('name') }}, - code, - active, - {{ adapter.quote('location') }}::json->>'address' AS location_address, - {{ adapter.quote('location') }}::json->>'province' AS location_province, - {{ adapter.quote('location') }}::json->>'district' AS location_district, - {{ adapter.quote('location') }}::json->>'ward' AS location_ward, - {{ adapter.quote('supplier') }}::json->>'_id' AS supplier_id, - {{ adapter.quote('supplier') }}::json->>'name' AS supplier_name, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_inventories_hashid -from {{ ref('inventories_ab3') }} --- inventories from {{ source('unibag', '_airbyte_raw_inventories') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/membership.sql b/models/generated/airbyte_tables/unibag/membership.sql deleted file mode 100644 index 8a3ed91..0000000 --- a/models/generated/airbyte_tables/unibag/membership.sql +++ /dev/null @@ -1,26 +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('membership_ab3') }} -select - _id AS id, - {{ adapter.quote('name') }}, - {{ adapter.quote('level') }}, - active, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - {{ adapter.quote('transaction') }} AS order, - bonuspercent AS bonus_percent, - transactionminvalue AS order_min_value, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_membership_hashid -from {{ ref('membership_ab3') }} --- membership from {{ source('unibag', '_airbyte_raw_membership') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/membership_histories.sql b/models/generated/airbyte_tables/unibag/membership_histories.sql deleted file mode 100644 index aecd34e..0000000 --- a/models/generated/airbyte_tables/unibag/membership_histories.sql +++ /dev/null @@ -1,25 +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('membership_histories_ab3') }} -select - _id AS id, - cast({{ adapter.quote('old') }}::json->>'level' AS numeric) AS old_membership_level, - {{ adapter.quote('old') }}::json->>'name' AS old_membership_name, - cast({{ adapter.quote('new') }}::json->>'level' AS numeric) AS new_membership_level, - {{ adapter.quote('new') }}::json->>'name' AS new_membership_name, - {{ adapter.quote('type') }}, - {{ adapter.quote('user') }} AS seller_id, - createdat::timestamp AS created_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_membership_histories_hashid -from {{ ref('membership_histories_ab3') }} --- membership_histories from {{ source('unibag', '_airbyte_raw_membership_histories') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/membership_orders.sql b/models/generated/airbyte_tables/unibag/membership_orders.sql deleted file mode 100644 index a28eae4..0000000 --- a/models/generated/airbyte_tables/unibag/membership_orders.sql +++ /dev/null @@ -1,29 +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('membership_orders_ab3') }} -select - _id, - {{ adapter.quote('user') }} AS seller_id, - targetid AS target_id, - membershipPromotion AS membership_promotion, - membershipname AS membership_name, - cast(membershiplevel AS integer) AS membership_level, - cast(commission AS numeric) AS commission, - status, - cast({{ adapter.quote('percent') }} AS numeric) AS percent, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - isrejected AS is_rejected, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_membership_orders_hashid -from {{ ref('membership_orders_ab3') }} --- membership_orders from {{ source('unibag', '_airbyte_raw_membership_orders') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/order_deliveries.sql b/models/generated/airbyte_tables/unibag/order_deliveries.sql deleted file mode 100644 index dbdfa55..0000000 --- a/models/generated/airbyte_tables/unibag/order_deliveries.sql +++ /dev/null @@ -1,50 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('order_deliveries_ab3') }} -select - _id AS id, - title, - status, - cast(promotion::json->>'discount' AS numeric) AS discount_value, - COALESCE(cast({{ adapter.quote('delivery') }}::json->>'fee' AS numeric), 0) AS fee, - {{ adapter.quote('delivery') }}::json->>'note' AS note, - {{ adapter.quote('delivery') }}::json->>'courierName' AS courier_name, - {{ adapter.quote('delivery') }}::json->>'serviceName' AS service_name, - {{ adapter.quote('delivery') }}::json->>'serviceCode' AS service_code, - {{ adapter.quote('delivery') }}::json->>'currency' AS currency, - COALESCE(cast({{ adapter.quote('delivery') }}::json->'feeShip'->>'currency' AS numeric), 0) AS feeship_cod, - COALESCE(cast({{ adapter.quote('delivery') }}::json->'feeShip'->>'insurance' AS numeric), 0) AS feeship_insurance, - COALESCE(cast({{ adapter.quote('delivery') }}::json->'feeShip'->>'shipping' AS numeric), 0) AS feeship_shipping, - COALESCE(cast({{ adapter.quote('delivery') }}::json->'feeShip'->>'total' AS numeric), 0) AS feeship_total, - COALESCE(cast({{ adapter.quote('delivery') }}::json->>'minDeliveryDay' AS numeric), 0) AS min_delivery_day, - COALESCE(cast({{ adapter.quote('delivery') }}::json->>'maxDeliveryDay' AS numeric), 0) AS max_delivery_day, - {{ adapter.quote('delivery') }}::json->>'estimateTimeDelivery' AS estimate_time_delivery, - service AS service_delivery, - COALESCE(cast({{ adapter.quote('location') }}::json->>'province' AS integer), 0) AS location_province, - COALESCE(cast({{ adapter.quote('location') }}::json->>'district' AS integer), 0) AS location_district, - COALESCE(cast({{ adapter.quote('location') }}::json->>'ward' AS integer), 0) AS location_ward, - {{ adapter.quote('location') }}::json->>'address' AS location_address, - {{ adapter.quote('location') }}::json->>'fullAddress' AS location_full_address, - {{ adapter.quote('customer') }}::json->>'name' AS customer_name, - {{ adapter.quote('customer') }}::json->>'phone' AS customer_phone, - COALESCE(cast({{ adapter.quote('weight') }}::json->>'converted' AS numeric), 0) AS weight_converted, - COALESCE(cast({{ adapter.quote('weight') }}::json->>'convertedWithMultiplier' AS numeric), 0) AS weight_converted_with_multiplier, - COALESCE(cast({{ adapter.quote('weight') }}::json->>'multiplier' AS numeric), 0) AS weight_multiplier, - COALESCE(cast({{ adapter.quote('weight') }}::json->>'real' AS numeric), 0) AS weight_real, - COALESCE(cast({{ adapter.quote('weight') }}::json->>'sent' AS numeric), 0) AS weight_sent, - {{ adapter.quote('order') }} AS order_id, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_order_deliveries_hashid -from {{ ref('order_deliveries_ab3') }} --- order_deliveries from {{ source('unibag', '_airbyte_raw_order_deliveries') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/order_histories.sql b/models/generated/airbyte_tables/unibag/order_histories.sql deleted file mode 100644 index 382492f..0000000 --- a/models/generated/airbyte_tables/unibag/order_histories.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('order_histories_ab3') }} -select - _id AS id, - status, - {{ adapter.quote('order') }} AS order_id, - createdat::timestamp AS created_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_order_histories_hashid -from {{ ref('order_histories_ab3') }} --- order_histories from {{ source('unibag', '_airbyte_raw_order_histories') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/order_items.sql b/models/generated/airbyte_tables/unibag/order_items.sql deleted file mode 100644 index bd4e192..0000000 --- a/models/generated/airbyte_tables/unibag/order_items.sql +++ /dev/null @@ -1,38 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('order_items_ab3') }} -select - _id AS id, - status, - quantity, - cast({{ adapter.quote('price') }}::json->>'base' AS numeric) AS price_base, - cast({{ adapter.quote('price') }}::json->>'sell' AS numeric) AS price_sell, - cast({{ adapter.quote('price') }}::json->>'profit' AS numeric) AS price_profit, - cast({{ adapter.quote('price') }}::json->>'profitUni' AS numeric) AS price_profit_of_selly, - cast({{ adapter.quote('price') }}::json->>'wholesaleBonus' AS numeric) AS price_wholesale_bonus, - cast({{ adapter.quote('price') }}::json->>'sellyWholesaleBonus' AS numeric) AS price_selly_wholesale_bonus, - cast({{ adapter.quote('price') }}::json->>'minimum' AS numeric) AS price_min, - cast({{ adapter.quote('price') }}::json->>'maximum' AS numeric) AS price_max, - cast({{ adapter.quote('price') }}::json->>'market' AS numeric) AS price_market, - cast({{ adapter.quote('price') }}::json->>'supplierPrice' AS numeric) AS price_of_supplier, - cast({{ adapter.quote('price') }}::json->>'weight' AS numeric) AS weight, - {{ adapter.quote('sku') }}::json->>'_id' AS sku_id, - {{ adapter.quote('sku') }}::json->'version' AS sku_version, - {{ adapter.quote('sku') }}::json->'unitCode' AS sku_unit_code, - {{ adapter.quote('user') }} AS seller_id, - {{ adapter.quote('order') }} AS order_id, - {{ adapter.quote('product') }} AS product_id, - cast({{ adapter.quote('promotions') }} AS jsonb) AS promotions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_order_items_hashid -from {{ ref('order_items_ab3') }} --- order_items from {{ source('unibag', '_airbyte_raw_order_items') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/orders.sql b/models/generated/airbyte_tables/unibag/orders.sql deleted file mode 100644 index 751203c..0000000 --- a/models/generated/airbyte_tables/unibag/orders.sql +++ /dev/null @@ -1,56 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('orders_ab3') }} -select - _id AS id, - code, - trackingcode AS tracking_code, - status, - banned, - string_to_array(REPLACE(REPLACE(REPLACE(tags::text, '[', ''), ']', ''), '"', ''), ',') AS tags, - isdeleted AS is_deleted, - cast({{ adapter.quote('promotion') }}::json->>'isApplied' AS boolean) AS promotion_is_applied, - cast({{ adapter.quote('promotion') }}::json->>'discount' AS numeric) AS promotion_discount_value, - cast({{ adapter.quote('promotion') }}::json->>'minOrderValue' AS numeric) AS promotion_min_order_value, - {{ adapter.quote('inventory') }}::json->>'_id' AS inventory_id, - {{ adapter.quote('inventory') }}::json->>'name' AS inventory_name, - {{ adapter.quote('payment') }}::json->>'method' AS payment_method, - {{ adapter.quote('payment') }}::json->>'status' AS payment_status, - cast({{ adapter.quote('price') }}::json->>'base' AS numeric) AS price_base, - cast({{ adapter.quote('price') }}::json->>'sell' AS numeric) AS price_sell, - cast({{ adapter.quote('price') }}::json->>'profit' AS numeric) AS price_profit, - cast({{ adapter.quote('price') }}::json->>'profitUni' AS numeric) AS price_profit_of_selly, - cast({{ adapter.quote('price') }}::json->>'minimum' AS numeric) AS price_min, - cast({{ adapter.quote('price') }}::json->>'maximum' AS numeric) AS price_max, - cast({{ adapter.quote('price') }}::json->>'total' AS numeric) AS price_total, - cast({{ adapter.quote('price') }}::json->>'weight' AS numeric) AS weight, - {{ adapter.quote('delivery') }}::json->>'_id' AS delivery_id, - cast({{ adapter.quote('delivery') }}::json->>'discountValue' AS numeric) AS delivery_discount_value, - COALESCE(cast({{ adapter.quote('delivery') }}::json->'weight'->>'converted' AS numeric), 0) AS delivery_weight_converted, - COALESCE(cast({{ adapter.quote('delivery') }}::json->'weight'->>'convertedWithMultiplier' AS numeric), 0) AS delivery_weight_converted_with_multiplier, - COALESCE(cast({{ adapter.quote('delivery') }}::json->'weight'->>'multiplier' AS numeric), 0) AS delivery_weight_multiplier, - COALESCE(cast({{ adapter.quote('delivery') }}::json->'weight'->>'real' AS numeric), 0) AS delivery_weight_real, - COALESCE(cast({{ adapter.quote('delivery') }}::json->'weight'->>'sent' AS numeric), 0) AS delivery_weight_sent, - approvedat::timestamp AS approved_at, - rejectedat::timestamp AS rejected_at, - pickupat::timestamp AS pickup_at, - deliveredat::timestamp AS delivered_at, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - {{ adapter.quote('user') }} AS seller_id, - customer AS customer_id, - delivery::json->>'status' AS delivery_status, - iswaitingcancelled AS is_waiting_cancelled, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_orders_hashid -from {{ ref('orders_ab3') }} --- orders from {{ source('unibag', '_airbyte_raw_orders') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/product_categories.sql b/models/generated/airbyte_tables/unibag/product_categories.sql deleted file mode 100644 index a779b7e..0000000 --- a/models/generated/airbyte_tables/unibag/product_categories.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('product_categories_ab3') }} -select - _id AS id, - {{ adapter.quote('name') }}, - active, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_product_categories_hashid -from {{ ref('product_categories_ab3') }} --- product_categories from {{ source('unibag', '_airbyte_raw_product_categories') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/product_sku.sql b/models/generated/airbyte_tables/unibag/product_sku.sql deleted file mode 100644 index b62ba82..0000000 --- a/models/generated/airbyte_tables/unibag/product_sku.sql +++ /dev/null @@ -1,43 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('product_sku_ab3') }} -select - _id AS id, - sku, - {{ adapter.quote('name') }}, - active, - -- quantity, - picture AS photo, - cast({{ adapter.quote('price') }}::json->>'base' AS numeric) AS price_base, - cast({{ adapter.quote('price') }}::json->>'market' AS numeric) AS price_market, - cast({{ adapter.quote('price') }}::json->>'minimum' AS numeric) AS price_min, - cast({{ adapter.quote('price') }}::json->>'maximum' AS numeric) AS price_max, - cast({{ adapter.quote('price') }}::json->>'supplier' AS numeric) AS price_of_supplier, - cast({{ adapter.quote('info') }}::json->'inventory'->>'id' AS integer) AS inventory_code, - {{ adapter.quote('info') }}::json->'inventory'->>'name' AS inventory_name, - {{ adapter.quote('info') }}::json->'supplier'->>'_id' AS supplier_id, - {{ adapter.quote('info') }}::json->'supplier'->>'name' AS supplier_name, - {{ adapter.quote('info') }}::json->>'dimension' AS info_dimension, - unitCode AS info_unit_code, - cast({{ adapter.quote('info') }}::json->>'weight' AS numeric) AS info_weight, - cast({{ adapter.quote('statistic') }}::json->>'saleTotal' AS numeric) AS stats_sale_total, - cast({{ adapter.quote('statistic') }}::json->>'salePending' AS numeric) AS stats_sale_pending, - cast({{ adapter.quote('statistic') }}::json->>'saleDelivered' AS numeric) AS stats_sale_delivered, - cast({{ adapter.quote('statistic') }}::json->>'saleCancelled' AS numeric) AS stats_sale_cancelled, - cast({{ adapter.quote('statistic') }}::json->>'saleCashback' AS numeric) AS stats_sale_cashback, - product AS product_id, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_product_sku_hashid -from {{ ref('product_sku_ab3') }} --- product_sku from {{ source('unibag', '_airbyte_raw_product_sku') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/product_sku_versions.sql b/models/generated/airbyte_tables/unibag/product_sku_versions.sql deleted file mode 100644 index dd19234..0000000 --- a/models/generated/airbyte_tables/unibag/product_sku_versions.sql +++ /dev/null @@ -1,41 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('product_sku_versions_ab3') }} -select - _id AS id, - sku AS sku_id, - {{ adapter.quote('name') }}, - cast({{ adapter.quote('price') }}::json->>'base' AS numeric) AS price_base, - cast({{ adapter.quote('price') }}::json->>'market' AS numeric) AS price_market, - cast({{ adapter.quote('price') }}::json->>'minimum' AS numeric) AS price_min, - cast({{ adapter.quote('price') }}::json->>'maximum' AS numeric) AS price_max, - cast({{ adapter.quote('price') }}::json->>'supplier' AS numeric) AS price_of_supplier, - {{ adapter.quote('info') }}::json->'inventory'->>'_id' AS inventory_id, - cast({{ adapter.quote('info') }}::json->'inventory'->>'id' AS integer) AS inventory_code, - {{ adapter.quote('info') }}::json->'inventory'->>'name' AS inventory_name, - {{ adapter.quote('info') }}::json->'supplier'->>'_id' AS supplier_id, - {{ adapter.quote('info') }}::json->'supplier'->>'name' AS supplier_name, - {{ adapter.quote('info') }}::json->>'dimension' AS info_dimension, - cast({{ adapter.quote('info') }}::json->>'weight' AS numeric) AS info_weight, - cast({{ adapter.quote('statistic') }}::json->>'saleTotal' AS numeric) AS stats_sale_total, - cast({{ adapter.quote('statistic') }}::json->>'salePending' AS numeric) AS stats_sale_pending, - cast({{ adapter.quote('statistic') }}::json->>'saleDelivered' AS numeric) AS stats_sale_delivered, - cast({{ adapter.quote('statistic') }}::json->>'saleCancelled' AS numeric) AS stats_sale_cancelled, - cast({{ adapter.quote('statistic') }}::json->>'saleCashback' AS numeric) AS stats_sale_cashback, - product AS product_id, - version, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_product_sku_versions_hashid -from {{ ref('product_sku_versions_ab3') }} --- product_sku_versions from {{ source('unibag', '_airbyte_raw_product_sku_versions') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/product_sub_categories.sql b/models/generated/airbyte_tables/unibag/product_sub_categories.sql deleted file mode 100644 index 59b9799..0000000 --- a/models/generated/airbyte_tables/unibag/product_sub_categories.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('product_sub_categories_ab3') }} -select - _id AS id, - {{ adapter.quote('name') }}, - active, - parent AS parent_id, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_product_sub_categories_hashid -from {{ ref('product_sub_categories_ab3') }} --- product_sub_categories from {{ source('unibag', '_airbyte_raw_product_sub_categories') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/products.sql b/models/generated/airbyte_tables/unibag/products.sql deleted file mode 100644 index 3d9cd7d..0000000 --- a/models/generated/airbyte_tables/unibag/products.sql +++ /dev/null @@ -1,28 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('products_ab3') }} -select - _id AS id, - {{ adapter.quote('name') }}, - active, - string_to_array(REPLACE(REPLACE(REPLACE(categories::text, '[', ''), ']', ''), '"', ''), ',') AS categories, - string_to_array(REPLACE(REPLACE(REPLACE(subcategories::text, '[', ''), ']', ''), '"', ''), ',') AS sub_categories, - cast({{ adapter.quote('price') }}::json->>'base' AS numeric) AS price_base, - cast({{ adapter.quote('price') }}::json->>'market' AS numeric) AS price_market, - cast({{ adapter.quote('price') }}::json->>'minimum' AS numeric) AS price_min, - cast({{ adapter.quote('price') }}::json->>'maximum' AS numeric) AS price_max, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_products_hashid -from {{ ref('products_ab3') }} --- products from {{ source('unibag', '_airbyte_raw_products') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/promotion_orders.sql b/models/generated/airbyte_tables/unibag/promotion_orders.sql deleted file mode 100644 index 775fb9d..0000000 --- a/models/generated/airbyte_tables/unibag/promotion_orders.sql +++ /dev/null @@ -1,34 +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('promotion_orders_ab3') }} -select - _id, - {{ adapter.quote('user') }} AS seller_id, - {{ adapter.quote('order') }} AS order_id, - promotion AS promotion_id, - commission, - status, - title, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - -- cast({{ adapter.quote('sharepercent') }}::json->>'supplier' AS numeric) AS share_percent_supplier, - -- cast({{ adapter.quote('sharepercent') }}::json->>'selly' AS numeric) AS share_percent_selly, - {{ adapter.quote('supplier') }}::json->>'_id' AS supplier_id, - {{ adapter.quote('supplier') }}::json->>'name' AS supplier_name, - {{ adapter.quote('suppliercommission') }}::json->>'type' AS supplier_commission_type, - cast({{ adapter.quote('suppliercommission') }}::json->>'value' AS numeric) AS supplier_commission_value, - cast({{ adapter.quote('suppliercommissiontotal') }} AS numeric) AS supplier_commission_total, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_promotion_orders_hashid -from {{ ref('promotion_orders_ab3') }} --- promotion_orders from {{ source('unibag', '_airbyte_raw_promotion_orders') }} -where 1 = 1 - - diff --git a/models/generated/airbyte_tables/unibag/promotions.sql b/models/generated/airbyte_tables/unibag/promotions.sql deleted file mode 100644 index 9aceae2..0000000 --- a/models/generated/airbyte_tables/unibag/promotions.sql +++ /dev/null @@ -1,38 +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('promotions_ab3') }} -select - _id, - title, - type, - endat::timestamp AS end_at, - startat::timestamp AS start_at, - isunlimitedquantity AS is_unlimited_quantity, - quantity, - rest, - {{ adapter.quote('applyfor') }}::json->>'type' AS apply_for_type, - cast({{ adapter.quote('options') }}::json->>'transactionMinValue' AS numeric) AS options_transaction_min_value, - cast({{ adapter.quote('options') }}::json->>'milestones' AS jsonb) AS options_milestones, - {{ adapter.quote('options') }}::json->'bonus'->>'type' AS options_bonus_type, - cast({{ adapter.quote('options') }}::json->'bonus'->>'value' AS numeric) AS options_bonus_value, - {{ adapter.quote('conditionforuser') }}::json->>'applyFor' AS condition_for_user_apply_for, - {{ adapter.quote('conditionforuser') }}::json->>'gender' AS condition_for_user_gender, - {{ adapter.quote('suppliercommission') }}::json->>'type' AS supplier_commission_type, - cast({{ adapter.quote('suppliercommission') }}::json->>'value' AS numeric) AS supplier_commission_value, - articleid AS article_id, - isapplyfororderwholesale AS is_apply_for_order_wholesale, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_promotions_hashid -from {{ ref('promotions_ab3') }} --- promotions from {{ source('unibag', '_airbyte_raw_promotions') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/referrals.sql b/models/generated/airbyte_tables/unibag/referrals.sql deleted file mode 100644 index 3dd3593..0000000 --- a/models/generated/airbyte_tables/unibag/referrals.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('referrals_ab3') }} -select - _id AS id, - {{ adapter.quote('user') }} AS seller_id, - invitee AS invitee_id, - createdat::timestamp AS created_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_referrals_hashid -from {{ ref('referrals_ab3') }} --- referrals from {{ source('unibag', '_airbyte_raw_referrals') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/social_post_views.sql b/models/generated/airbyte_tables/unibag/social_post_views.sql deleted file mode 100644 index 3810988..0000000 --- a/models/generated/airbyte_tables/unibag/social_post_views.sql +++ /dev/null @@ -1,20 +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('social_post_views_ab3') }} -select - _id, - {{ adapter.quote('user') }} AS seller_id, - socialpost AS social_post_id, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_social_post_views_hashid -from {{ ref('social_post_views_ab3') }} --- social_post_views from {{ source('unibag', '_airbyte_raw_social_post_views') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/social_posts.sql b/models/generated/airbyte_tables/unibag/social_posts.sql deleted file mode 100644 index ee8c4b4..0000000 --- a/models/generated/airbyte_tables/unibag/social_posts.sql +++ /dev/null @@ -1,38 +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('social_posts_ab3') }} -select - _id, - title, - author AS author_id, - {{ adapter.quote('content') }}, - status, - cast({{ adapter.quote('photos') }} AS jsonb) AS photos, - cast({{ adapter.quote('videos') }} AS jsonb) AS videos, - string_to_array(REPLACE(REPLACE(REPLACE(tags::text, '[', ''), ']', ''), '"', ''), ',') AS tags, - COALESCE(cast({{ adapter.quote('statistic') }}::json->>'views' AS integer), 0) AS statistic_views, - COALESCE(cast({{ adapter.quote('statistic') }}::json->>'uniqueViews' AS integer), 0) AS statistic_unique_views, - COALESCE(cast({{ adapter.quote('statistic') }}::json->>'likes' AS integer), 0) AS statistic_likes, - COALESCE(cast({{ adapter.quote('statistic') }}::json->>'shares' AS integer), 0) AS statistic_shares, - COALESCE(cast({{ adapter.quote('statistic') }}::json->>'comments' AS integer), 0) AS statistic_comments, - string_to_array(REPLACE(REPLACE(REPLACE(products::text, '[', ''), ']', ''), '"', ''), ',') AS products, - string_to_array(REPLACE(REPLACE(REPLACE(categories::text, '[', ''), ']', ''), '"', ''), ',') AS categories, - string_to_array(REPLACE(REPLACE(REPLACE(cities::text, '[', ''), ']', ''), '"', ''), ',') AS cities, - {{ adapter.quote('order') }}, - contributor AS contributor_id, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - publishedat::timestamp AS published_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_social_posts_hashid -from {{ ref('social_posts_ab3') }} --- social_posts from {{ source('unibag', '_airbyte_raw_social_posts') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/suppliers.sql b/models/generated/airbyte_tables/unibag/suppliers.sql deleted file mode 100644 index 5d0980b..0000000 --- a/models/generated/airbyte_tables/unibag/suppliers.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('suppliers_ab3') }} -select - _id AS id, - {{ adapter.quote('name') }}, - identifycode AS identify_code, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_suppliers_hashid -from {{ ref('suppliers_ab3') }} --- suppliers from {{ source('unibag', '_airbyte_raw_suppliers') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/team_activities.sql b/models/generated/airbyte_tables/unibag/team_activities.sql deleted file mode 100644 index 96ce4a0..0000000 --- a/models/generated/airbyte_tables/unibag/team_activities.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('team_activities_ab3') }} -select - _id AS id, - {{ adapter.quote('action') }}, - team AS team_id, - targetid AS team_member_id, - createdat::timestamp AS created_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_team_activities_hashid -from {{ ref('team_activities_ab3') }} --- team_activities from {{ source('unibag', '_airbyte_raw_team_activities') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/team_bonus.sql b/models/generated/airbyte_tables/unibag/team_bonus.sql deleted file mode 100644 index 552198c..0000000 --- a/models/generated/airbyte_tables/unibag/team_bonus.sql +++ /dev/null @@ -1,30 +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('team_bonus_ab3') }} -select - _id, - team AS team_id, - {{ adapter.quote('user') }} AS seller_id, - status, - cast({{ adapter.quote('percent') }} AS numeric) AS percent, - cast({{ adapter.quote('commission') }} AS numeric) AS commission, - teammember AS team_member, - teampromotion AS team_promotion, - targetid AS target_id, - teamname AS team_name, - cast(teamlevel AS integer) AS team_level, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_team_bonus_hashid -from {{ ref('team_bonus_ab3') }} --- team_bonus from {{ source('unibag', '_airbyte_raw_team_bonus') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/team_members.sql b/models/generated/airbyte_tables/unibag/team_members.sql deleted file mode 100644 index a0a6009..0000000 --- a/models/generated/airbyte_tables/unibag/team_members.sql +++ /dev/null @@ -1,26 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('team_members_ab3') }} -select - _id AS id, - {{ adapter.quote('role') }}, - team AS team_id, - {{ adapter.quote('user') }} AS seller_id, - isleft AS is_left, - leftat AS left_at, - joinedat::timestamp AS joined_at, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_team_members_hashid -from {{ ref('team_members_ab3') }} --- team_members from {{ source('unibag', '_airbyte_raw_team_members') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/teams.sql b/models/generated/airbyte_tables/unibag/teams.sql deleted file mode 100644 index 43b1545..0000000 --- a/models/generated/airbyte_tables/unibag/teams.sql +++ /dev/null @@ -1,30 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('teams_ab3') }} -select - _id AS id, - {{ adapter.quote('name') }}, - active, - adminuser AS admin_id, - citycode AS province_code, - cast({{ adapter.quote('level') }}::json->>'level' AS numeric) AS current_level_value, - {{ adapter.quote('level') }}::json->>'name' AS current_level_name, - cast(level::json->>'expiredAt' AS timestamp) AS current_level_expired_at, - cast({{ adapter.quote('level') }}::json->>'bonusPercent' AS numeric) AS bonus_percent, - cast({{ adapter.quote('level') }}::json->>'maximumNumberMember' AS numeric) AS stats_max_member, - cast({{ adapter.quote('statistic') }}::json->>'memberTotal' AS numeric) AS stats_current_member, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_teams_hashid -from {{ ref('teams_ab3') }} --- teams from {{ source('unibag', '_airbyte_raw_teams') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/user_identifications.sql b/models/generated/airbyte_tables/unibag/user_identifications.sql deleted file mode 100644 index 5af3c20..0000000 --- a/models/generated/airbyte_tables/unibag/user_identifications.sql +++ /dev/null @@ -1,27 +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('user_identifications_ab3') }} -select - _id, - dob, - {{ adapter.quote('name') }}, - {{ adapter.quote('type') }}, - {{ adapter.quote('user') }} AS seller_id, - gender, - nation, - status, - address, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_user_identifications_hashid -from {{ ref('user_identifications_ab3') }} --- user_identifications from {{ source('unibag', '_airbyte_raw_user_identifications') }} -where 1 = 1 diff --git a/models/generated/airbyte_tables/unibag/users.sql b/models/generated/airbyte_tables/unibag/users.sql deleted file mode 100644 index 92c51df..0000000 --- a/models/generated/airbyte_tables/unibag/users.sql +++ /dev/null @@ -1,36 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('users_ab3') }} -select - _id AS id, - {{ adapter.quote('name') }}, - banned, - {{ adapter.quote('phone') }}::json->>'full' AS phone_number, - {{ adapter.quote('phone') }}::json->>'verified' AS phone_verified, - cast(phone::json->>'verifiedAt' AS date) AS phone_verified_at, - {{ adapter.quote('info') }}::json->>'email' AS info_email, - cast({{ adapter.quote('info') }}::json->>'cityCode' AS integer) AS info_province_code, - {{ adapter.quote('info') }}::json->>'gender' AS info_gender, - {{ adapter.quote('referral') }}::json->>'code' AS referral_code, - cast({{ adapter.quote('identification') }}::json->>'completedAt' AS timestamp) AS identification_completed_at, - {{ adapter.quote('identification') }}::json->>'status' AS identification_status, - cast({{ adapter.quote('identification') }}::json->>'timeUpdate' AS integer) AS identification_times_update, - registerfrom AS register_from, - cast({{ adapter.quote('membership') }}::json->>'currentLevel' AS numeric) AS membership_current_level, - cast({{ adapter.quote('membership') }}::json->>'expireAt' AS timestamp) AS membership_expire_at, - createdat::timestamp AS created_at, - updatedat::timestamp AS updated_at, - lastactivatedat::timestamp AS last_activated_at, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_users_hashid -from {{ ref('users_ab3') }} --- users from {{ source('unibag', '_airbyte_raw_users') }} -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/wards.sql b/models/generated/airbyte_tables/unibag/wards.sql deleted file mode 100644 index 62cf38e..0000000 --- a/models/generated/airbyte_tables/unibag/wards.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], - unique_key = '_airbyte_ab_id', - schema = "unibag", - tags = [ "top-level" ] -) }} --- Final base SQL model --- depends_on: {{ ref('wards_ab3') }} -select - _id AS id, - code, - {{ adapter.quote('name') }}, - slug, - cityid AS province_code, - districtid AS district_code, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at, - _airbyte_wards_hashid -from {{ ref('wards_ab3') }} --- wards from {{ source('unibag', '_airbyte_raw_wards') }} -where 1 = 1 - diff --git a/models/generated/sources.yml b/models/generated/sources.yml index f424af8..91ad5a9 100644 --- a/models/generated/sources.yml +++ b/models/generated/sources.yml @@ -6,37 +6,4 @@ sources: schema: false identifier: false tables: - - name: _airbyte_raw_admin_tags - - name: _airbyte_raw_cash_flows - - name: _airbyte_raw_cities - - name: _airbyte_raw_customers - - name: _airbyte_raw_districts - - name: _airbyte_raw_event_rewards - - name: _airbyte_raw_events - - name: _airbyte_raw_inventories - - name: _airbyte_raw_membership - - name: _airbyte_raw_membership_histories - - name: _airbyte_raw_membership_orders - - name: _airbyte_raw_order_deliveries - - name: _airbyte_raw_order_histories - - name: _airbyte_raw_order_items - - name: _airbyte_raw_orders - - name: _airbyte_raw_product_categories - - name: _airbyte_raw_product_sku - - name: _airbyte_raw_product_sku_versions - - name: _airbyte_raw_product_sub_categories - - name: _airbyte_raw_products - - name: _airbyte_raw_promotion_orders - - name: _airbyte_raw_promotions - - name: _airbyte_raw_referrals - - name: _airbyte_raw_social_post_views - - name: _airbyte_raw_social_posts - - name: _airbyte_raw_suppliers - - name: _airbyte_raw_team_activities - - name: _airbyte_raw_team_bonus - - name: _airbyte_raw_team_members - - name: _airbyte_raw_teams - name: _airbyte_raw_tracking_product_shares - - name: _airbyte_raw_user_identifications - - name: _airbyte_raw_users - - name: _airbyte_raw_wards