From a2286f77736b7fb8d2bd8f23d03f3cded79d8f51 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 11 May 2022 11:21:03 +0700 Subject: [PATCH] update --- .../airbyte_ctes/unibag/cash_flows_ab1.sql | 2 +- .../airbyte_ctes/unibag/cash_flows_ab2.sql | 2 +- .../airbyte_ctes/unibag/cash_flows_ab3.sql | 2 +- .../unibag/cash_flows_options_ab1.sql | 22 ------ .../unibag/cash_flows_options_ab2.sql | 21 ------ .../unibag/cash_flows_options_ab3.sql | 21 ------ .../airbyte_ctes/unibag/customers_ab1.sql | 5 +- .../airbyte_ctes/unibag/customers_ab2.sql | 5 +- .../airbyte_ctes/unibag/customers_ab3.sql | 5 +- .../unibag/customers_info_ab1.sql | 22 ------ .../unibag/customers_info_ab2.sql | 21 ------ .../unibag/customers_info_ab3.sql | 21 ------ .../unibag/customers_statistic_ab1.sql | 22 ------ .../unibag/customers_statistic_ab2.sql | 21 ------ .../unibag/customers_statistic_ab3.sql | 21 ------ .../airbyte_ctes/unibag/event_rewards_ab1.sql | 2 +- .../airbyte_ctes/unibag/event_rewards_ab2.sql | 2 +- .../airbyte_ctes/unibag/event_rewards_ab3.sql | 2 +- .../unibag/event_rewards_options_ab1.sql | 23 ------ .../unibag/event_rewards_options_ab2.sql | 22 ------ .../unibag/event_rewards_options_ab3.sql | 22 ------ .../airbyte_ctes/unibag/events_ab1.sql | 13 ++-- .../airbyte_ctes/unibag/events_ab2.sql | 13 ++-- .../airbyte_ctes/unibag/events_ab3.sql | 13 ++-- .../airbyte_ctes/unibag/events_cover_ab1.sql | 20 ----- .../airbyte_ctes/unibag/events_cover_ab2.sql | 19 ----- .../airbyte_ctes/unibag/events_cover_ab3.sql | 19 ----- .../unibag/events_cover_dimensions_ab1.sql | 19 ----- .../unibag/events_cover_dimensions_ab2.sql | 18 ----- .../unibag/events_cover_dimensions_ab3.sql | 18 ----- .../unibag/events_cover_dimensions_md_ab1.sql | 20 ----- .../unibag/events_cover_dimensions_md_ab2.sql | 19 ----- .../unibag/events_cover_dimensions_md_ab3.sql | 19 ----- .../unibag/events_cover_dimensions_sm_ab1.sql | 20 ----- .../unibag/events_cover_dimensions_sm_ab2.sql | 19 ----- .../unibag/events_cover_dimensions_sm_ab3.sql | 19 ----- .../airbyte_ctes/unibag/events_icon_ab1.sql | 20 ----- .../airbyte_ctes/unibag/events_icon_ab2.sql | 19 ----- .../airbyte_ctes/unibag/events_icon_ab3.sql | 19 ----- .../unibag/events_icon_dimensions_ab1.sql | 19 ----- .../unibag/events_icon_dimensions_ab2.sql | 18 ----- .../unibag/events_icon_dimensions_ab3.sql | 18 ----- .../unibag/events_icon_dimensions_md_ab1.sql | 20 ----- .../unibag/events_icon_dimensions_md_ab2.sql | 19 ----- .../unibag/events_icon_dimensions_md_ab3.sql | 19 ----- .../unibag/events_icon_dimensions_sm_ab1.sql | 20 ----- .../unibag/events_icon_dimensions_sm_ab2.sql | 19 ----- .../unibag/events_icon_dimensions_sm_ab3.sql | 19 ----- .../airbyte_ctes/unibag/events_notice_ab1.sql | 19 ----- .../airbyte_ctes/unibag/events_notice_ab2.sql | 18 ----- .../airbyte_ctes/unibag/events_notice_ab3.sql | 18 ----- .../unibag/events_options_ab1.sql | 23 ------ .../unibag/events_options_ab2.sql | 22 ------ .../unibag/events_options_ab3.sql | 22 ------ .../unibag/events_segments_ab1.sql | 21 ------ .../unibag/events_segments_ab2.sql | 20 ----- .../unibag/events_segments_ab3.sql | 20 ----- ...vents_segments_highestmonthlysales_ab1.sql | 20 ----- ...vents_segments_highestmonthlysales_ab2.sql | 19 ----- ...vents_segments_highestmonthlysales_ab3.sql | 19 ----- .../events_segments_lastmonthsales_ab1.sql | 20 ----- .../events_segments_lastmonthsales_ab2.sql | 19 ----- .../events_segments_lastmonthsales_ab3.sql | 19 ----- .../airbyte_ctes/unibag/inventories_ab1.sql | 11 +-- .../airbyte_ctes/unibag/inventories_ab2.sql | 11 +-- .../airbyte_ctes/unibag/inventories_ab3.sql | 11 +-- .../unibag/inventories_contact_ab1.sql | 21 ------ .../unibag/inventories_contact_ab2.sql | 20 ----- .../unibag/inventories_contact_ab3.sql | 20 ----- .../unibag/inventories_location_ab1.sql | 22 ------ .../unibag/inventories_location_ab2.sql | 21 ------ .../unibag/inventories_location_ab3.sql | 21 ------ .../inventories_location_location_ab1.sql | 19 ----- .../inventories_location_location_ab2.sql | 18 ----- .../inventories_location_location_ab3.sql | 18 ----- .../unibag/inventories_partner_ab1.sql | 19 ----- .../unibag/inventories_partner_ab2.sql | 18 ----- .../unibag/inventories_partner_ab3.sql | 18 ----- .../unibag/inventories_paymentmethods_ab1.sql | 19 ----- .../unibag/inventories_paymentmethods_ab2.sql | 18 ----- .../unibag/inventories_paymentmethods_ab3.sql | 18 ----- .../unibag/inventories_supplier_ab1.sql | 20 ----- .../unibag/inventories_supplier_ab2.sql | 19 ----- .../unibag/inventories_supplier_ab3.sql | 19 ----- .../airbyte_ctes/unibag/membership_ab1.sql | 2 + .../airbyte_ctes/unibag/membership_ab2.sql | 2 + .../airbyte_ctes/unibag/membership_ab3.sql | 2 + .../unibag/membership_histories_ab1.sql | 4 +- .../unibag/membership_histories_ab2.sql | 4 +- .../unibag/membership_histories_ab3.sql | 4 +- .../unibag/membership_histories_new_ab1.sql | 24 ------ .../unibag/membership_histories_new_ab2.sql | 23 ------ .../unibag/membership_histories_new_ab3.sql | 23 ------ ...membership_histories_new_condition_ab1.sql | 22 ------ ...membership_histories_new_condition_ab2.sql | 21 ------ ...membership_histories_new_condition_ab3.sql | 21 ------ .../unibag/membership_histories_old_ab1.sql | 24 ------ .../unibag/membership_histories_old_ab2.sql | 23 ------ .../unibag/membership_histories_old_ab3.sql | 23 ------ ...membership_histories_old_condition_ab1.sql | 22 ------ ...membership_histories_old_condition_ab2.sql | 21 ------ ...membership_histories_old_condition_ab3.sql | 21 ------ ...membership_histories_old_statistic_ab1.sql | 19 ----- ...membership_histories_old_statistic_ab2.sql | 18 ----- ...membership_histories_old_statistic_ab3.sql | 18 ----- .../unibag/membership_orders_ab1.sql | 1 + .../unibag/membership_orders_ab2.sql | 1 + .../unibag/membership_orders_ab3.sql | 1 + .../unibag/order_deliveries_ab1.sql | 12 +-- .../unibag/order_deliveries_ab2.sql | 12 +-- .../unibag/order_deliveries_ab3.sql | 12 +-- .../unibag/order_deliveries_customer_ab1.sql | 20 ----- .../unibag/order_deliveries_customer_ab2.sql | 19 ----- .../unibag/order_deliveries_customer_ab3.sql | 19 ----- .../unibag/order_deliveries_delivery_ab1.sql | 30 -------- .../unibag/order_deliveries_delivery_ab2.sql | 29 -------- .../unibag/order_deliveries_delivery_ab3.sql | 29 -------- .../order_deliveries_delivery_feeship_ab1.sql | 21 ------ .../order_deliveries_delivery_feeship_ab2.sql | 20 ----- .../order_deliveries_delivery_feeship_ab3.sql | 20 ----- .../unibag/order_deliveries_location_ab1.sql | 23 ------ .../unibag/order_deliveries_location_ab2.sql | 22 ------ .../unibag/order_deliveries_location_ab3.sql | 22 ------ .../unibag/order_deliveries_promotion_ab1.sql | 21 ------ .../unibag/order_deliveries_promotion_ab2.sql | 20 ----- .../unibag/order_deliveries_promotion_ab3.sql | 20 ----- .../order_deliveries_trackingtime_ab1.sql | 20 ----- .../order_deliveries_trackingtime_ab2.sql | 19 ----- .../order_deliveries_trackingtime_ab3.sql | 19 ----- .../unibag/order_deliveries_weight_ab1.sql | 22 ------ .../unibag/order_deliveries_weight_ab2.sql | 21 ------ .../unibag/order_deliveries_weight_ab3.sql | 21 ------ .../unibag/order_histories_ab1.sql | 2 +- .../unibag/order_histories_ab2.sql | 2 +- .../unibag/order_histories_ab3.sql | 2 +- .../airbyte_ctes/unibag/order_items_ab1.sql | 17 ++++- .../airbyte_ctes/unibag/order_items_ab2.sql | 17 ++++- .../airbyte_ctes/unibag/order_items_ab3.sql | 17 ++++- .../unibag/order_items_price_ab1.sql | 29 -------- .../unibag/order_items_price_ab2.sql | 28 ------- .../unibag/order_items_price_ab3.sql | 28 ------- .../unibag/order_items_sku_ab1.sql | 25 ------- .../unibag/order_items_sku_ab2.sql | 24 ------ .../unibag/order_items_sku_ab3.sql | 24 ------ .../airbyte_ctes/unibag/orders_ab1.sql | 39 +++++----- .../airbyte_ctes/unibag/orders_ab2.sql | 39 +++++----- .../airbyte_ctes/unibag/orders_ab3.sql | 39 +++++----- .../unibag/orders_delivery_ab1.sql | 40 ---------- .../unibag/orders_delivery_ab2.sql | 39 ---------- .../unibag/orders_delivery_ab3.sql | 39 ---------- .../unibag/orders_delivery_feeship_ab1.sql | 21 ------ .../unibag/orders_delivery_feeship_ab2.sql | 20 ----- .../unibag/orders_delivery_feeship_ab3.sql | 20 ----- .../unibag/orders_delivery_location_ab1.sql | 23 ------ .../unibag/orders_delivery_location_ab2.sql | 22 ------ .../unibag/orders_delivery_location_ab3.sql | 22 ------ .../unibag/orders_delivery_weight_ab1.sql | 22 ------ .../unibag/orders_delivery_weight_ab2.sql | 21 ------ .../unibag/orders_delivery_weight_ab3.sql | 21 ------ .../unibag/orders_inventory_ab1.sql | 21 ------ .../unibag/orders_inventory_ab2.sql | 20 ----- .../unibag/orders_inventory_ab3.sql | 20 ----- .../unibag/orders_payment_ab1.sql | 20 ----- .../unibag/orders_payment_ab2.sql | 19 ----- .../unibag/orders_payment_ab3.sql | 19 ----- .../airbyte_ctes/unibag/orders_price_ab1.sql | 31 -------- .../airbyte_ctes/unibag/orders_price_ab2.sql | 30 -------- .../airbyte_ctes/unibag/orders_price_ab3.sql | 30 -------- .../unibag/orders_promotion_ab1.sql | 21 ------ .../unibag/orders_promotion_ab2.sql | 20 ----- .../unibag/orders_promotion_ab3.sql | 20 ----- .../unibag/orders_sendemail_ab1.sql | 18 ----- .../unibag/orders_sendemail_ab2.sql | 17 ----- .../unibag/orders_sendemail_ab3.sql | 17 ----- .../unibag/orders_supplier_ab1.sql | 20 ----- .../unibag/orders_supplier_ab2.sql | 19 ----- .../unibag/orders_supplier_ab3.sql | 19 ----- .../unibag/orders_useragent_ab1.sql | 20 ----- .../unibag/orders_useragent_ab2.sql | 19 ----- .../unibag/orders_useragent_ab3.sql | 19 ----- .../unibag/product_categories_ab1.sql | 3 +- .../unibag/product_categories_ab2.sql | 3 +- .../unibag/product_categories_ab3.sql | 3 +- .../unibag/product_categories_icon_ab1.sql | 20 ----- .../unibag/product_categories_icon_ab2.sql | 19 ----- .../unibag/product_categories_icon_ab3.sql | 19 ----- ...product_categories_icon_dimensions_ab1.sql | 19 ----- ...product_categories_icon_dimensions_ab2.sql | 18 ----- ...product_categories_icon_dimensions_ab3.sql | 18 ----- ...duct_categories_icon_dimensions_md_ab1.sql | 20 ----- ...duct_categories_icon_dimensions_md_ab2.sql | 19 ----- ...duct_categories_icon_dimensions_md_ab3.sql | 19 ----- ...duct_categories_icon_dimensions_sm_ab1.sql | 20 ----- ...duct_categories_icon_dimensions_sm_ab2.sql | 19 ----- ...duct_categories_icon_dimensions_sm_ab3.sql | 19 ----- .../product_categories_statistic_ab1.sql | 23 ------ .../product_categories_statistic_ab2.sql | 22 ------ .../product_categories_statistic_ab3.sql | 22 ------ .../airbyte_ctes/unibag/product_sku_ab1.sql | 13 ++-- .../airbyte_ctes/unibag/product_sku_ab2.sql | 13 ++-- .../airbyte_ctes/unibag/product_sku_ab3.sql | 13 ++-- .../unibag/product_sku_info_ab1.sql | 22 ------ .../unibag/product_sku_info_ab2.sql | 21 ------ .../unibag/product_sku_info_ab3.sql | 21 ------ .../unibag/product_sku_info_category_ab1.sql | 21 ------ .../unibag/product_sku_info_category_ab2.sql | 20 ----- .../unibag/product_sku_info_category_ab3.sql | 20 ----- ...ku_info_inv__ory_location_location_ab1.sql | 19 ----- ...ku_info_inv__ory_location_location_ab2.sql | 18 ----- ...ku_info_inv__ory_location_location_ab3.sql | 18 ----- .../unibag/product_sku_info_inventory_ab1.sql | 22 ------ .../unibag/product_sku_info_inventory_ab2.sql | 21 ------ .../unibag/product_sku_info_inventory_ab3.sql | 21 ------ ...roduct_sku_info_inventory_location_ab1.sql | 22 ------ ...roduct_sku_info_inventory_location_ab2.sql | 21 ------ ...roduct_sku_info_inventory_location_ab3.sql | 21 ------ .../unibag/product_sku_info_supplier_ab1.sql | 21 ------ .../unibag/product_sku_info_supplier_ab2.sql | 20 ----- .../unibag/product_sku_info_supplier_ab3.sql | 20 ----- .../unibag/product_sku_price_ab1.sql | 24 ------ .../unibag/product_sku_price_ab2.sql | 23 ------ .../unibag/product_sku_price_ab3.sql | 23 ------ .../unibag/product_sku_pricepercent_ab1.sql | 19 ----- .../unibag/product_sku_pricepercent_ab2.sql | 18 ----- .../unibag/product_sku_pricepercent_ab3.sql | 18 ----- .../unibag/product_sku_statistic_ab1.sql | 25 ------- .../unibag/product_sku_statistic_ab2.sql | 24 ------ .../unibag/product_sku_statistic_ab3.sql | 24 ------ .../unibag/product_sku_versions_ab1.sql | 6 +- .../unibag/product_sku_versions_ab2.sql | 6 +- .../unibag/product_sku_versions_ab3.sql | 6 +- .../unibag/product_sku_versions_info_ab1.sql | 22 ------ .../unibag/product_sku_versions_info_ab2.sql | 21 ------ .../unibag/product_sku_versions_info_ab3.sql | 21 ------ ...product_sku_versions_info_category_ab1.sql | 20 ----- ...product_sku_versions_info_category_ab2.sql | 19 ----- ...product_sku_versions_info_category_ab3.sql | 19 ----- ...roduct_sku_versions_info_inventory_ab1.sql | 21 ------ ...roduct_sku_versions_info_inventory_ab2.sql | 20 ----- ...roduct_sku_versions_info_inventory_ab3.sql | 20 ----- ...product_sku_versions_info_supplier_ab1.sql | 20 ----- ...product_sku_versions_info_supplier_ab2.sql | 19 ----- ...product_sku_versions_info_supplier_ab3.sql | 19 ----- .../unibag/product_sku_versions_price_ab1.sql | 22 ------ .../unibag/product_sku_versions_price_ab2.sql | 21 ------ .../unibag/product_sku_versions_price_ab3.sql | 21 ------ .../product_sku_versions_statistic_ab1.sql | 25 ------- .../product_sku_versions_statistic_ab2.sql | 24 ------ .../product_sku_versions_statistic_ab3.sql | 24 ------ .../airbyte_ctes/unibag/products_ab1.sql | 20 +++-- .../airbyte_ctes/unibag/products_ab2.sql | 20 +++-- .../airbyte_ctes/unibag/products_ab3.sql | 20 +++-- .../airbyte_ctes/unibag/products_info_ab1.sql | 21 ------ .../airbyte_ctes/unibag/products_info_ab2.sql | 20 ----- .../airbyte_ctes/unibag/products_info_ab3.sql | 20 ----- .../unibag/products_info_category_ab1.sql | 21 ------ .../unibag/products_info_category_ab2.sql | 20 ----- .../unibag/products_info_category_ab3.sql | 20 ----- .../unibag/products_info_inventory_ab1.sql | 22 ------ .../unibag/products_info_inventory_ab2.sql | 21 ------ .../unibag/products_info_inventory_ab3.sql | 21 ------ .../products_info_inventory_location_ab1.sql | 23 ------ .../products_info_inventory_location_ab2.sql | 22 ------ .../products_info_inventory_location_ab3.sql | 22 ------ ...s_info_inventory_location_location_ab1.sql | 19 ----- ...s_info_inventory_location_location_ab2.sql | 18 ----- ...s_info_inventory_location_location_ab3.sql | 18 ----- .../unibag/products_info_supplier_ab1.sql | 21 ------ .../unibag/products_info_supplier_ab2.sql | 20 ----- .../unibag/products_info_supplier_ab3.sql | 20 ----- .../unibag/products_order_ab1.sql | 22 ------ .../unibag/products_order_ab2.sql | 21 ------ .../unibag/products_order_ab3.sql | 21 ------ .../unibag/products_price_ab1.sql | 24 ------ .../unibag/products_price_ab2.sql | 23 ------ .../unibag/products_price_ab3.sql | 23 ------ .../unibag/products_pricepercent_ab1.sql | 24 ------ .../unibag/products_pricepercent_ab2.sql | 23 ------ .../unibag/products_pricepercent_ab3.sql | 23 ------ .../unibag/products_reviewstatistic_ab1.sql | 31 -------- .../unibag/products_reviewstatistic_ab2.sql | 30 -------- .../unibag/products_reviewstatistic_ab3.sql | 30 -------- .../unibag/products_score_ab1.sql | 21 ------ .../unibag/products_score_ab2.sql | 20 ----- .../unibag/products_score_ab3.sql | 20 ----- .../unibag/products_sharestatistic_ab1.sql | 22 ------ .../unibag/products_sharestatistic_ab2.sql | 21 ------ .../unibag/products_sharestatistic_ab3.sql | 21 ------ .../unibag/products_statistic_ab1.sql | 39 ---------- .../unibag/products_statistic_ab2.sql | 38 ---------- .../unibag/products_statistic_ab3.sql | 38 ---------- .../unibag/promotion_orders_ab1.sql | 5 +- .../unibag/promotion_orders_ab2.sql | 5 +- .../unibag/promotion_orders_ab3.sql | 5 +- .../unibag/promotion_orders_supplier_ab1.sql | 20 ----- .../unibag/promotion_orders_supplier_ab2.sql | 19 ----- .../unibag/promotion_orders_supplier_ab3.sql | 19 ----- .../airbyte_ctes/unibag/promotions_ab1.sql | 13 ++-- .../airbyte_ctes/unibag/promotions_ab2.sql | 13 ++-- .../airbyte_ctes/unibag/promotions_ab3.sql | 13 ++-- .../unibag/promotions_applyfor_ab1.sql | 21 ------ .../unibag/promotions_applyfor_ab2.sql | 20 ----- .../unibag/promotions_applyfor_ab3.sql | 20 ----- .../promotions_conditionforuser_ab1.sql | 20 ----- .../promotions_conditionforuser_ab2.sql | 19 ----- .../promotions_conditionforuser_ab3.sql | 19 ----- .../unibag/promotions_options_ab1.sql | 21 ------ .../unibag/promotions_options_ab2.sql | 20 ----- .../unibag/promotions_options_ab3.sql | 20 ----- .../unibag/promotions_options_bonus_ab1.sql | 19 ----- .../unibag/promotions_options_bonus_ab2.sql | 18 ----- .../unibag/promotions_options_bonus_ab3.sql | 18 ----- .../unibag/promotions_statistic_ab1.sql | 30 -------- .../unibag/promotions_statistic_ab2.sql | 29 -------- .../unibag/promotions_statistic_ab3.sql | 29 -------- .../promotions_suppliercommission_ab1.sql | 19 ----- .../promotions_suppliercommission_ab2.sql | 18 ----- .../promotions_suppliercommission_ab3.sql | 18 ----- .../unibag/session_deliveries_ab1.sql | 31 -------- .../unibag/session_deliveries_ab2.sql | 31 -------- .../unibag/session_deliveries_ab3.sql | 31 -------- .../session_deliveries_customer_ab1.sql | 20 ----- .../session_deliveries_customer_ab2.sql | 19 ----- .../session_deliveries_customer_ab3.sql | 19 ----- .../session_deliveries_delivery_ab1.sql | 33 --------- .../session_deliveries_delivery_ab2.sql | 32 -------- .../session_deliveries_delivery_ab3.sql | 32 -------- ...ession_deliveries_delivery_feeship_ab1.sql | 21 ------ ...ession_deliveries_delivery_feeship_ab2.sql | 20 ----- ...ession_deliveries_delivery_feeship_ab3.sql | 20 ----- .../session_deliveries_location_ab1.sql | 23 ------ .../session_deliveries_location_ab2.sql | 22 ------ .../session_deliveries_location_ab3.sql | 22 ------ .../session_deliveries_promotion_ab1.sql | 21 ------ .../session_deliveries_promotion_ab2.sql | 20 ----- .../session_deliveries_promotion_ab3.sql | 20 ----- .../unibag/session_deliveries_request_ab1.sql | 27 ------- .../unibag/session_deliveries_request_ab2.sql | 26 ------- .../unibag/session_deliveries_request_ab3.sql | 26 ------- .../session_deliveries_request_from_ab1.sql | 19 ----- .../session_deliveries_request_from_ab2.sql | 18 ----- .../session_deliveries_request_from_ab3.sql | 18 ----- .../session_deliveries_request_to_ab1.sql | 20 ----- .../session_deliveries_request_to_ab2.sql | 19 ----- .../session_deliveries_request_to_ab3.sql | 19 ----- ...ion_deliveries_request_to_location_ab1.sql | 21 ------ ...ion_deliveries_request_to_location_ab2.sql | 20 ----- ...ion_deliveries_request_to_location_ab3.sql | 20 ----- .../airbyte_ctes/unibag/social_posts_ab1.sql | 4 +- .../airbyte_ctes/unibag/social_posts_ab2.sql | 4 +- .../airbyte_ctes/unibag/social_posts_ab3.sql | 4 +- .../social_posts_sharestatistic_ab1.sql | 22 ------ .../social_posts_sharestatistic_ab2.sql | 21 ------ .../social_posts_sharestatistic_ab3.sql | 21 ------ .../unibag/social_posts_statistic_ab1.sql | 23 ------ .../unibag/social_posts_statistic_ab2.sql | 22 ------ .../unibag/social_posts_statistic_ab3.sql | 22 ------ .../airbyte_ctes/unibag/suppliers_ab1.sql | 12 ++- .../airbyte_ctes/unibag/suppliers_ab2.sql | 12 ++- .../airbyte_ctes/unibag/suppliers_ab3.sql | 12 ++- .../unibag/suppliers_balance_ab1.sql | 26 ------- .../unibag/suppliers_balance_ab2.sql | 25 ------- .../unibag/suppliers_balance_ab3.sql | 25 ------- .../unibag/suppliers_bank_ab1.sql | 21 ------ .../unibag/suppliers_bank_ab2.sql | 20 ----- .../unibag/suppliers_bank_ab3.sql | 20 ----- .../unibag/suppliers_location_ab1.sql | 23 ------ .../unibag/suppliers_location_ab2.sql | 22 ------ .../unibag/suppliers_location_ab3.sql | 22 ------ .../unibag/suppliers_logo_ab1.sql | 20 ----- .../unibag/suppliers_logo_ab2.sql | 19 ----- .../unibag/suppliers_logo_ab3.sql | 19 ----- .../unibag/suppliers_logo_dimensions_ab1.sql | 19 ----- .../unibag/suppliers_logo_dimensions_ab2.sql | 18 ----- .../unibag/suppliers_logo_dimensions_ab3.sql | 18 ----- .../suppliers_logo_dimensions_md_ab1.sql | 20 ----- .../suppliers_logo_dimensions_md_ab2.sql | 19 ----- .../suppliers_logo_dimensions_md_ab3.sql | 19 ----- .../suppliers_logo_dimensions_sm_ab1.sql | 20 ----- .../suppliers_logo_dimensions_sm_ab2.sql | 19 ----- .../suppliers_logo_dimensions_sm_ab3.sql | 19 ----- .../unibag/suppliers_reviewstatistic_ab1.sql | 31 -------- .../unibag/suppliers_reviewstatistic_ab2.sql | 30 -------- .../unibag/suppliers_reviewstatistic_ab3.sql | 30 -------- .../unibag/suppliers_statistic_ab1.sql | 29 -------- .../unibag/suppliers_statistic_ab2.sql | 28 ------- .../unibag/suppliers_statistic_ab3.sql | 28 ------- .../unibag/team_activities_ab1.sql | 2 +- .../unibag/team_activities_ab2.sql | 2 +- .../unibag/team_activities_ab3.sql | 2 +- .../unibag/team_activities_options_ab1.sql | 19 ----- .../unibag/team_activities_options_ab2.sql | 18 ----- .../unibag/team_activities_options_ab3.sql | 18 ----- .../airbyte_ctes/unibag/team_members_ab1.sql | 5 +- .../airbyte_ctes/unibag/team_members_ab2.sql | 5 +- .../airbyte_ctes/unibag/team_members_ab3.sql | 5 +- .../unibag/team_members_statistic_ab1.sql | 37 ---------- .../unibag/team_members_statistic_ab2.sql | 36 --------- .../unibag/team_members_statistic_ab3.sql | 36 --------- .../team_members_statisticmonth_ab1.sql | 35 --------- .../team_members_statisticmonth_ab2.sql | 34 --------- .../team_members_statisticmonth_ab3.sql | 34 --------- .../airbyte_ctes/unibag/teams_ab1.sql | 9 +-- .../airbyte_ctes/unibag/teams_ab2.sql | 9 +-- .../airbyte_ctes/unibag/teams_ab3.sql | 9 +-- .../unibag/teams_information_ab1.sql | 18 ----- .../unibag/teams_information_ab2.sql | 17 ----- .../unibag/teams_information_ab3.sql | 17 ----- .../airbyte_ctes/unibag/teams_level_ab1.sql | 27 ------- .../airbyte_ctes/unibag/teams_level_ab2.sql | 26 ------- .../airbyte_ctes/unibag/teams_level_ab3.sql | 26 ------- .../airbyte_ctes/unibag/teams_logo_ab1.sql | 20 ----- .../airbyte_ctes/unibag/teams_logo_ab2.sql | 19 ----- .../airbyte_ctes/unibag/teams_logo_ab3.sql | 19 ----- .../unibag/teams_logo_dimensions_ab1.sql | 19 ----- .../unibag/teams_logo_dimensions_ab2.sql | 18 ----- .../unibag/teams_logo_dimensions_ab3.sql | 18 ----- .../unibag/teams_logo_dimensions_md_ab1.sql | 20 ----- .../unibag/teams_logo_dimensions_md_ab2.sql | 19 ----- .../unibag/teams_logo_dimensions_md_ab3.sql | 19 ----- .../unibag/teams_logo_dimensions_sm_ab1.sql | 20 ----- .../unibag/teams_logo_dimensions_sm_ab2.sql | 19 ----- .../unibag/teams_logo_dimensions_sm_ab3.sql | 19 ----- .../unibag/teams_statistic_ab1.sql | 41 ----------- .../unibag/teams_statistic_ab2.sql | 40 ---------- .../unibag/teams_statistic_ab3.sql | 40 ---------- ...tifications__ation_addressentities_ab1.sql | 21 ------ ...tifications__ation_addressentities_ab2.sql | 20 ----- ...tifications__ation_addressentities_ab3.sql | 20 ----- ...tifications__ontside_dimensions_md_ab1.sql | 20 ----- ...tifications__ontside_dimensions_md_ab2.sql | 19 ----- ...tifications__ontside_dimensions_md_ab3.sql | 19 ----- ...tifications__ontside_dimensions_sm_ab1.sql | 20 ----- ...tifications__ontside_dimensions_sm_ab2.sql | 19 ----- ...tifications__ontside_dimensions_sm_ab3.sql | 19 ----- .../unibag/user_identifications_ab1.sql | 7 +- .../unibag/user_identifications_ab2.sql | 7 +- .../unibag/user_identifications_ab3.sql | 7 +- .../user_identifications_backside_ab1.sql | 20 ----- .../user_identifications_backside_ab2.sql | 19 ----- .../user_identifications_backside_ab3.sql | 19 ----- ...dentifications_backside_dimensions_ab1.sql | 19 ----- ...dentifications_backside_dimensions_ab2.sql | 18 ----- ...dentifications_backside_dimensions_ab3.sql | 18 ----- ...tifications_backside_dimensions_md_ab1.sql | 20 ----- ...tifications_backside_dimensions_md_ab2.sql | 19 ----- ...tifications_backside_dimensions_md_ab3.sql | 19 ----- ...tifications_backside_dimensions_sm_ab1.sql | 20 ----- ...tifications_backside_dimensions_sm_ab2.sql | 19 ----- ...tifications_backside_dimensions_sm_ab3.sql | 19 ----- ..._identifications_detectinformation_ab1.sql | 37 ---------- ..._identifications_detectinformation_ab2.sql | 36 --------- ..._identifications_detectinformation_ab3.sql | 36 --------- .../user_identifications_frontside_ab1.sql | 20 ----- .../user_identifications_frontside_ab2.sql | 19 ----- .../user_identifications_frontside_ab3.sql | 19 ----- ...entifications_frontside_dimensions_ab1.sql | 19 ----- ...entifications_frontside_dimensions_ab2.sql | 18 ----- ...entifications_frontside_dimensions_ab3.sql | 18 ----- .../airbyte_ctes/unibag/users_ab1.sql | 25 ++++--- .../airbyte_ctes/unibag/users_ab2.sql | 25 ++++--- .../airbyte_ctes/unibag/users_ab3.sql | 25 ++++--- .../airbyte_ctes/unibag/users_avatar_ab1.sql | 20 ----- .../airbyte_ctes/unibag/users_avatar_ab2.sql | 19 ----- .../airbyte_ctes/unibag/users_avatar_ab3.sql | 19 ----- .../unibag/users_avatar_dimensions_ab1.sql | 19 ----- .../unibag/users_avatar_dimensions_ab2.sql | 18 ----- .../unibag/users_avatar_dimensions_ab3.sql | 18 ----- .../unibag/users_avatar_dimensions_md_ab1.sql | 20 ----- .../unibag/users_avatar_dimensions_md_ab2.sql | 19 ----- .../unibag/users_avatar_dimensions_md_ab3.sql | 19 ----- .../unibag/users_avatar_dimensions_sm_ab1.sql | 20 ----- .../unibag/users_avatar_dimensions_sm_ab2.sql | 19 ----- .../unibag/users_avatar_dimensions_sm_ab3.sql | 19 ----- .../airbyte_ctes/unibag/users_email_ab1.sql | 20 ----- .../airbyte_ctes/unibag/users_email_ab2.sql | 19 ----- .../airbyte_ctes/unibag/users_email_ab3.sql | 19 ----- .../unibag/users_facebook_ab1.sql | 23 ------ .../unibag/users_facebook_ab2.sql | 22 ------ .../unibag/users_facebook_ab3.sql | 22 ------ .../unibag/users_identification_ab1.sql | 22 ------ .../unibag/users_identification_ab2.sql | 21 ------ .../unibag/users_identification_ab3.sql | 21 ------ .../airbyte_ctes/unibag/users_info_ab1.sql | 20 ----- .../airbyte_ctes/unibag/users_info_ab2.sql | 19 ----- .../airbyte_ctes/unibag/users_info_ab3.sql | 19 ----- .../unibag/users_membership_ab1.sql | 22 ------ .../unibag/users_membership_ab2.sql | 21 ------ .../unibag/users_membership_ab3.sql | 21 ------ .../airbyte_ctes/unibag/users_phone_ab1.sql | 22 ------ .../airbyte_ctes/unibag/users_phone_ab2.sql | 21 ------ .../airbyte_ctes/unibag/users_phone_ab3.sql | 21 ------ .../unibag/users_referral_ab1.sql | 21 ------ .../unibag/users_referral_ab2.sql | 20 ----- .../unibag/users_referral_ab3.sql | 20 ----- .../unibag/users_statistic_ab1.sql | 73 ------------------- .../unibag/users_statistic_ab2.sql | 72 ------------------ .../unibag/users_statistic_ab3.sql | 72 ------------------ .../airbyte_ctes/unibag/users_team_ab1.sql | 20 ----- .../airbyte_ctes/unibag/users_team_ab2.sql | 19 ----- .../airbyte_ctes/unibag/users_team_ab3.sql | 19 ----- .../airbyte_ctes/unibag/users_zalo_ab1.sql | 21 ------ .../airbyte_ctes/unibag/users_zalo_ab2.sql | 20 ----- .../airbyte_ctes/unibag/users_zalo_ab3.sql | 20 ----- .../airbyte_ctes/unibag/vouchers_ab1.sql | 6 +- .../airbyte_ctes/unibag/vouchers_ab2.sql | 6 +- .../airbyte_ctes/unibag/vouchers_ab3.sql | 6 +- .../unibag/vouchers_applyfor_ab1.sql | 21 ------ .../unibag/vouchers_applyfor_ab2.sql | 20 ----- .../unibag/vouchers_applyfor_ab3.sql | 20 ----- .../airbyte_ctes/unibag/vouchers_logo_ab1.sql | 20 ----- .../airbyte_ctes/unibag/vouchers_logo_ab2.sql | 19 ----- .../airbyte_ctes/unibag/vouchers_logo_ab3.sql | 19 ----- .../unibag/vouchers_logo_dimensions_ab1.sql | 19 ----- .../unibag/vouchers_logo_dimensions_ab2.sql | 18 ----- .../unibag/vouchers_logo_dimensions_ab3.sql | 18 ----- .../vouchers_logo_dimensions_md_ab1.sql | 20 ----- .../vouchers_logo_dimensions_md_ab2.sql | 19 ----- .../vouchers_logo_dimensions_md_ab3.sql | 19 ----- .../vouchers_logo_dimensions_sm_ab1.sql | 20 ----- .../vouchers_logo_dimensions_sm_ab2.sql | 19 ----- .../vouchers_logo_dimensions_sm_ab3.sql | 19 ----- .../unibag/vouchers_options_ab1.sql | 20 ----- .../unibag/vouchers_options_ab2.sql | 19 ----- .../unibag/vouchers_options_ab3.sql | 19 ----- .../unibag/vouchers_options_bonus_ab1.sql | 19 ----- .../unibag/vouchers_options_bonus_ab2.sql | 18 ----- .../unibag/vouchers_options_bonus_ab3.sql | 18 ----- .../airbyte_tables/unibag/product_sku.sql | 1 - .../airbyte_tables/unibag/team_activities.sql | 1 + models/generated/sources.yml | 1 - 531 files changed, 391 insertions(+), 10174 deletions(-) delete mode 100644 models/generated/airbyte_ctes/unibag/cash_flows_options_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/cash_flows_options_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/cash_flows_options_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/customers_info_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/customers_info_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/customers_info_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/customers_statistic_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/customers_statistic_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/customers_statistic_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/event_rewards_options_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/event_rewards_options_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/event_rewards_options_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_cover_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_cover_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_cover_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_cover_dimensions_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_cover_dimensions_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_cover_dimensions_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_cover_dimensions_md_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_cover_dimensions_md_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_cover_dimensions_md_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_cover_dimensions_sm_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_cover_dimensions_sm_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_cover_dimensions_sm_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_icon_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_icon_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_icon_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_icon_dimensions_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_icon_dimensions_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_icon_dimensions_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_icon_dimensions_md_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_icon_dimensions_md_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_icon_dimensions_md_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_icon_dimensions_sm_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_icon_dimensions_sm_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_icon_dimensions_sm_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_notice_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_notice_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_notice_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_options_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_options_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_options_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_segments_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_segments_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_segments_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_segments_highestmonthlysales_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_segments_highestmonthlysales_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_segments_highestmonthlysales_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_segments_lastmonthsales_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_segments_lastmonthsales_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/events_segments_lastmonthsales_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_contact_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_contact_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_contact_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_location_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_location_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_location_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_location_location_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_location_location_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_location_location_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_partner_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_partner_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_partner_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_paymentmethods_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_paymentmethods_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_paymentmethods_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_supplier_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_supplier_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/inventories_supplier_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_new_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_new_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_new_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_new_condition_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_new_condition_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_new_condition_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_old_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_old_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_old_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_old_condition_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_old_condition_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_old_condition_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_old_statistic_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_old_statistic_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/membership_histories_old_statistic_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_customer_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_customer_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_customer_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_delivery_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_delivery_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_delivery_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_delivery_feeship_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_delivery_feeship_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_delivery_feeship_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_location_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_location_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_location_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_promotion_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_promotion_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_promotion_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_trackingtime_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_trackingtime_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_trackingtime_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_weight_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_weight_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_deliveries_weight_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_items_price_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_items_price_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_items_price_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_items_sku_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_items_sku_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/order_items_sku_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_delivery_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_delivery_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_delivery_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_delivery_feeship_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_delivery_feeship_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_delivery_feeship_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_delivery_location_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_delivery_location_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_delivery_location_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_delivery_weight_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_delivery_weight_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_delivery_weight_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_inventory_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_inventory_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_inventory_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_payment_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_payment_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_payment_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_price_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_price_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_price_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_promotion_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_promotion_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_promotion_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_sendemail_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_sendemail_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_sendemail_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_supplier_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_supplier_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_supplier_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_useragent_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_useragent_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/orders_useragent_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_icon_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_icon_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_icon_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_md_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_md_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_md_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_sm_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_sm_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_sm_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_statistic_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_statistic_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_categories_statistic_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_category_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_category_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_category_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_inv__ory_location_location_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_inv__ory_location_location_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_inv__ory_location_location_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_inventory_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_inventory_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_inventory_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_inventory_location_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_inventory_location_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_inventory_location_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_supplier_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_supplier_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_info_supplier_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_price_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_price_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_price_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_pricepercent_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_pricepercent_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_pricepercent_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_statistic_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_statistic_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_statistic_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_info_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_info_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_info_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_info_category_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_info_category_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_info_category_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_info_inventory_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_info_inventory_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_info_inventory_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_info_supplier_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_info_supplier_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_info_supplier_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_price_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_price_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_price_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_statistic_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_statistic_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/product_sku_versions_statistic_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_category_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_category_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_category_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_inventory_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_inventory_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_inventory_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_inventory_location_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_inventory_location_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_inventory_location_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_inventory_location_location_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_inventory_location_location_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_inventory_location_location_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_supplier_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_supplier_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_info_supplier_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_order_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_order_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_order_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_price_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_price_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_price_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_pricepercent_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_pricepercent_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_pricepercent_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_reviewstatistic_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_reviewstatistic_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_reviewstatistic_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_score_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_score_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_score_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_sharestatistic_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_sharestatistic_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_sharestatistic_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_statistic_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_statistic_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/products_statistic_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotion_orders_supplier_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotion_orders_supplier_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotion_orders_supplier_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_applyfor_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_applyfor_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_applyfor_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_conditionforuser_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_conditionforuser_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_conditionforuser_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_options_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_options_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_options_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_options_bonus_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_options_bonus_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_options_bonus_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_statistic_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_statistic_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_statistic_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_suppliercommission_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_suppliercommission_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/promotions_suppliercommission_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_customer_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_customer_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_customer_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_delivery_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_delivery_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_delivery_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_delivery_feeship_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_delivery_feeship_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_delivery_feeship_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_location_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_location_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_location_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_promotion_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_promotion_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_promotion_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_request_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_request_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_request_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_request_from_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_request_from_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_request_from_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_request_to_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_request_to_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_request_to_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_request_to_location_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_request_to_location_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/session_deliveries_request_to_location_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/social_posts_sharestatistic_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/social_posts_sharestatistic_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/social_posts_sharestatistic_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/social_posts_statistic_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/social_posts_statistic_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/social_posts_statistic_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_balance_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_balance_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_balance_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_bank_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_bank_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_bank_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_location_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_location_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_location_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_logo_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_logo_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_logo_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_md_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_md_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_md_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_sm_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_sm_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_sm_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_reviewstatistic_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_reviewstatistic_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_reviewstatistic_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_statistic_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_statistic_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/suppliers_statistic_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_activities_options_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_activities_options_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_activities_options_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_members_statistic_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_members_statistic_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_members_statistic_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_members_statisticmonth_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_members_statisticmonth_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/team_members_statisticmonth_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_information_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_information_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_information_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_level_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_level_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_level_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_logo_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_logo_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_logo_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_logo_dimensions_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_logo_dimensions_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_logo_dimensions_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_logo_dimensions_md_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_logo_dimensions_md_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_logo_dimensions_md_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_logo_dimensions_sm_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_logo_dimensions_sm_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_logo_dimensions_sm_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_statistic_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_statistic_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/teams_statistic_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications__ation_addressentities_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications__ation_addressentities_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications__ation_addressentities_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_md_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_md_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_md_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_sm_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_sm_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_sm_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_backside_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_backside_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_backside_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_md_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_md_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_md_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_sm_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_sm_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_sm_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_detectinformation_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_detectinformation_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_detectinformation_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_frontside_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_frontside_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_frontside_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_frontside_dimensions_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_frontside_dimensions_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/user_identifications_frontside_dimensions_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_avatar_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_avatar_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_avatar_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_avatar_dimensions_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_avatar_dimensions_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_avatar_dimensions_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_avatar_dimensions_md_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_avatar_dimensions_md_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_avatar_dimensions_md_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_avatar_dimensions_sm_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_avatar_dimensions_sm_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_avatar_dimensions_sm_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_email_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_email_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_email_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_facebook_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_facebook_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_facebook_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_identification_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_identification_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_identification_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_info_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_info_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_info_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_membership_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_membership_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_membership_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_phone_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_phone_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_phone_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_referral_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_referral_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_referral_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_statistic_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_statistic_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_statistic_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_team_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_team_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_team_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_zalo_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_zalo_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/users_zalo_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_applyfor_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_applyfor_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_applyfor_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_logo_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_logo_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_logo_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_md_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_md_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_md_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_sm_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_sm_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_sm_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_options_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_options_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_options_ab3.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_options_bonus_ab1.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_options_bonus_ab2.sql delete mode 100644 models/generated/airbyte_ctes/unibag/vouchers_options_bonus_ab3.sql diff --git a/models/generated/airbyte_ctes/unibag/cash_flows_ab1.sql b/models/generated/airbyte_ctes/unibag/cash_flows_ab1.sql index f34eb81..0bd7698 100644 --- a/models/generated/airbyte_ctes/unibag/cash_flows_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/cash_flows_ab1.sql @@ -12,7 +12,7 @@ select {{ 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('table_alias', '_airbyte_data', ['options'], ['options']) }} as {{ adapter.quote('options') }}, + {{ 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, diff --git a/models/generated/airbyte_ctes/unibag/cash_flows_ab2.sql b/models/generated/airbyte_ctes/unibag/cash_flows_ab2.sql index a2aeaf4..25e9b92 100644 --- a/models/generated/airbyte_ctes/unibag/cash_flows_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/cash_flows_ab2.sql @@ -12,7 +12,7 @@ select 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 {{ type_json() }}) as {{ adapter.quote('options') }}, + 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, diff --git a/models/generated/airbyte_ctes/unibag/cash_flows_ab3.sql b/models/generated/airbyte_ctes/unibag/cash_flows_ab3.sql index 9cad6df..c4f4b73 100644 --- a/models/generated/airbyte_ctes/unibag/cash_flows_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/cash_flows_ab3.sql @@ -13,7 +13,7 @@ select adapter.quote('user'), adapter.quote('value'), adapter.quote('action'), - object_to_string(adapter.quote('options')), + adapter.quote('options'), 'category', 'targetid', 'createdat', diff --git a/models/generated/airbyte_ctes/unibag/cash_flows_options_ab1.sql b/models/generated/airbyte_ctes/unibag/cash_flows_options_ab1.sql deleted file mode 100644 index 3c013d9..0000000 --- a/models/generated/airbyte_ctes/unibag/cash_flows_options_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('cash_flows') }} -select - _airbyte_cash_flows_hashid, - {{ json_extract_scalar(adapter.quote('options'), ['orderId'], ['orderId']) }} as orderid, - {{ json_extract_scalar(adapter.quote('options'), ['orderCode'], ['orderCode']) }} as ordercode, - {{ json_extract_scalar(adapter.quote('options'), ['giveGiftId'], ['giveGiftId']) }} as givegiftid, - {{ json_extract_scalar(adapter.quote('options'), ['giveGiftTitle'], ['giveGiftTitle']) }} as givegifttitle, - {{ json_extract_scalar(adapter.quote('options'), ['userGiveGiftId'], ['userGiveGiftId']) }} as usergivegiftid, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('cash_flows') }} as table_alias --- options at cash-flows/options -where 1 = 1 -and {{ adapter.quote('options') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/cash_flows_options_ab2.sql b/models/generated/airbyte_ctes/unibag/cash_flows_options_ab2.sql deleted file mode 100644 index 88fa715..0000000 --- a/models/generated/airbyte_ctes/unibag/cash_flows_options_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('cash_flows_options_ab1') }} -select - _airbyte_cash_flows_hashid, - cast(orderid as {{ dbt_utils.type_string() }}) as orderid, - cast(ordercode as {{ dbt_utils.type_string() }}) as ordercode, - cast(givegiftid as {{ dbt_utils.type_string() }}) as givegiftid, - cast(givegifttitle as {{ dbt_utils.type_string() }}) as givegifttitle, - cast(usergivegiftid as {{ dbt_utils.type_string() }}) as usergivegiftid, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('cash_flows_options_ab1') }} --- options at cash-flows/options -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/cash_flows_options_ab3.sql b/models/generated/airbyte_ctes/unibag/cash_flows_options_ab3.sql deleted file mode 100644 index 5030208..0000000 --- a/models/generated/airbyte_ctes/unibag/cash_flows_options_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('cash_flows_options_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_cash_flows_hashid', - 'orderid', - 'ordercode', - 'givegiftid', - 'givegifttitle', - 'usergivegiftid', - ]) }} as _airbyte_options_hashid, - tmp.* -from {{ ref('cash_flows_options_ab2') }} tmp --- options at cash-flows/options -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/customers_ab1.sql b/models/generated/airbyte_ctes/unibag/customers_ab1.sql index 57df4a8..977ea06 100644 --- a/models/generated/airbyte_ctes/unibag/customers_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/customers_ab1.sql @@ -8,15 +8,16 @@ -- depends_on: {{ source('unibag', '_airbyte_raw_customers') }} select {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract('table_alias', '_airbyte_data', ['info'], ['info']) }} as info, + {{ 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('table_alias', '_airbyte_data', ['statistic'], ['statistic']) }} as statistic, + {{ 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, diff --git a/models/generated/airbyte_ctes/unibag/customers_ab2.sql b/models/generated/airbyte_ctes/unibag/customers_ab2.sql index 2a64dae..c4ca101 100644 --- a/models/generated/airbyte_ctes/unibag/customers_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/customers_ab2.sql @@ -8,15 +8,16 @@ -- depends_on: {{ ref('customers_ab1') }} select cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(info as {{ type_json() }}) as info, + 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 {{ type_json() }}) as statistic, + 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, diff --git a/models/generated/airbyte_ctes/unibag/customers_ab3.sql b/models/generated/airbyte_ctes/unibag/customers_ab3.sql index ca9f1fb..c980251 100644 --- a/models/generated/airbyte_ctes/unibag/customers_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/customers_ab3.sql @@ -9,15 +9,16 @@ select {{ dbt_utils.surrogate_key([ '_id', - object_to_string('info'), + 'info', adapter.quote('name'), adapter.quote('user'), + 'email', 'phone', adapter.quote('source'), array_to_string(adapter.quote('location')), 'createdat', boolean_to_string('isdeleted'), - object_to_string('statistic'), + 'statistic', 'updatedat', 'searchstring', ]) }} as _airbyte_customers_hashid, diff --git a/models/generated/airbyte_ctes/unibag/customers_info_ab1.sql b/models/generated/airbyte_ctes/unibag/customers_info_ab1.sql deleted file mode 100644 index e91f2d5..0000000 --- a/models/generated/airbyte_ctes/unibag/customers_info_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('customers') }} -select - _airbyte_customers_hashid, - {{ json_extract_scalar('info', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('info', ['email'], ['email']) }} as email, - {{ json_extract_scalar('info', ['address'], ['address']) }} as address, - {{ json_extract_scalar('info', ['companyName'], ['companyName']) }} as companyname, - {{ json_extract_scalar('info', ['taxIdentificationNumber'], ['taxIdentificationNumber']) }} as taxidentificationnumber, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('customers') }} as table_alias --- info at customers/info -where 1 = 1 -and info is not null - diff --git a/models/generated/airbyte_ctes/unibag/customers_info_ab2.sql b/models/generated/airbyte_ctes/unibag/customers_info_ab2.sql deleted file mode 100644 index 53eb2d7..0000000 --- a/models/generated/airbyte_ctes/unibag/customers_info_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('customers_info_ab1') }} -select - _airbyte_customers_hashid, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(email as {{ dbt_utils.type_string() }}) as email, - cast(address as {{ dbt_utils.type_string() }}) as address, - cast(companyname as {{ dbt_utils.type_string() }}) as companyname, - cast(taxidentificationnumber as {{ dbt_utils.type_string() }}) as taxidentificationnumber, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('customers_info_ab1') }} --- info at customers/info -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/customers_info_ab3.sql b/models/generated/airbyte_ctes/unibag/customers_info_ab3.sql deleted file mode 100644 index a92f980..0000000 --- a/models/generated/airbyte_ctes/unibag/customers_info_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('customers_info_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_customers_hashid', - adapter.quote('name'), - 'email', - 'address', - 'companyname', - 'taxidentificationnumber', - ]) }} as _airbyte_info_hashid, - tmp.* -from {{ ref('customers_info_ab2') }} tmp --- info at customers/info -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/customers_statistic_ab1.sql b/models/generated/airbyte_ctes/unibag/customers_statistic_ab1.sql deleted file mode 100644 index 75e9329..0000000 --- a/models/generated/airbyte_ctes/unibag/customers_statistic_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('customers') }} -select - _airbyte_customers_hashid, - {{ json_extract_scalar('statistic', ['expenseTotal'], ['expenseTotal']) }} as expensetotal, - {{ json_extract_scalar('statistic', ['transactionTotal_aibyte_transform'], ['transactionTotal_aibyte_transform']) }} as transactiontotal_aibyte_transform, - {{ json_extract_scalar('statistic', ['transactionPending_aibyte_transform'], ['transactionPending_aibyte_transform']) }} as transactionpending_aibyte_transform, - {{ json_extract_scalar('statistic', ['transactionSuccess_aibyte_transform'], ['transactionSuccess_aibyte_transform']) }} as transactionsuccess_aibyte_transform, - {{ json_extract_scalar('statistic', ['transactionRejected_aibyte_transform'], ['transactionRejected_aibyte_transform']) }} as transactionrejected_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('customers') }} as table_alias --- statistic at customers/statistic -where 1 = 1 -and statistic is not null - diff --git a/models/generated/airbyte_ctes/unibag/customers_statistic_ab2.sql b/models/generated/airbyte_ctes/unibag/customers_statistic_ab2.sql deleted file mode 100644 index aa46106..0000000 --- a/models/generated/airbyte_ctes/unibag/customers_statistic_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('customers_statistic_ab1') }} -select - _airbyte_customers_hashid, - cast(expensetotal as {{ dbt_utils.type_float() }}) as expensetotal, - cast(transactiontotal_aibyte_transform as {{ dbt_utils.type_string() }}) as transactiontotal_aibyte_transform, - cast(transactionpending_aibyte_transform as {{ dbt_utils.type_string() }}) as transactionpending_aibyte_transform, - cast(transactionsuccess_aibyte_transform as {{ dbt_utils.type_string() }}) as transactionsuccess_aibyte_transform, - cast(transactionrejected_aibyte_transform as {{ dbt_utils.type_string() }}) as transactionrejected_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('customers_statistic_ab1') }} --- statistic at customers/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/customers_statistic_ab3.sql b/models/generated/airbyte_ctes/unibag/customers_statistic_ab3.sql deleted file mode 100644 index 821b13d..0000000 --- a/models/generated/airbyte_ctes/unibag/customers_statistic_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('customers_statistic_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_customers_hashid', - 'expensetotal', - 'transactiontotal_aibyte_transform', - 'transactionpending_aibyte_transform', - 'transactionsuccess_aibyte_transform', - 'transactionrejected_aibyte_transform', - ]) }} as _airbyte_statistic_hashid, - tmp.* -from {{ ref('customers_statistic_ab2') }} tmp --- statistic at customers/statistic -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 index a3339f7..fa06cec 100644 --- a/models/generated/airbyte_ctes/unibag/event_rewards_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/event_rewards_ab1.sql @@ -13,7 +13,7 @@ select {{ 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('table_alias', '_airbyte_data', ['options'], ['options']) }} as {{ adapter.quote('options') }}, + {{ 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, diff --git a/models/generated/airbyte_ctes/unibag/event_rewards_ab2.sql b/models/generated/airbyte_ctes/unibag/event_rewards_ab2.sql index 3cacd54..bfcdc1a 100644 --- a/models/generated/airbyte_ctes/unibag/event_rewards_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/event_rewards_ab2.sql @@ -13,7 +13,7 @@ select 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 {{ type_json() }}) as {{ adapter.quote('options') }}, + 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, diff --git a/models/generated/airbyte_ctes/unibag/event_rewards_ab3.sql b/models/generated/airbyte_ctes/unibag/event_rewards_ab3.sql index 8b45880..95be1f6 100644 --- a/models/generated/airbyte_ctes/unibag/event_rewards_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/event_rewards_ab3.sql @@ -14,7 +14,7 @@ select adapter.quote('user'), adapter.quote('event'), 'status', - object_to_string(adapter.quote('options')), + adapter.quote('options'), 'createdat', 'updatedat', ]) }} as _airbyte_event_rewards_hashid, diff --git a/models/generated/airbyte_ctes/unibag/event_rewards_options_ab1.sql b/models/generated/airbyte_ctes/unibag/event_rewards_options_ab1.sql deleted file mode 100644 index 452e880..0000000 --- a/models/generated/airbyte_ctes/unibag/event_rewards_options_ab1.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('event_rewards') }} -select - _airbyte_event_rewards_hashid, - {{ json_extract_scalar(adapter.quote('options'), ['order'], ['order']) }} as {{ adapter.quote('order') }}, - {{ json_extract_scalar(adapter.quote('options'), ['invitee'], ['invitee']) }} as invitee, - {{ json_extract_scalar(adapter.quote('options'), ['percent'], ['percent']) }} as {{ adapter.quote('percent') }}, - {{ json_extract_scalar(adapter.quote('options'), ['referral'], ['referral']) }} as referral, - {{ json_extract_scalar(adapter.quote('options'), ['minOrderValue'], ['minOrderValue']) }} as minordervalue, - {{ json_extract_scalar(adapter.quote('options'), ['minOrderToClaim'], ['minOrderToClaim']) }} as minordertoclaim, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('event_rewards') }} as table_alias --- options at event-rewards/options -where 1 = 1 -and {{ adapter.quote('options') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/event_rewards_options_ab2.sql b/models/generated/airbyte_ctes/unibag/event_rewards_options_ab2.sql deleted file mode 100644 index 531999b..0000000 --- a/models/generated/airbyte_ctes/unibag/event_rewards_options_ab2.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('event_rewards_options_ab1') }} -select - _airbyte_event_rewards_hashid, - cast({{ adapter.quote('order') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('order') }}, - cast(invitee as {{ dbt_utils.type_string() }}) as invitee, - cast({{ adapter.quote('percent') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('percent') }}, - cast(referral as {{ dbt_utils.type_string() }}) as referral, - cast(minordervalue as {{ dbt_utils.type_float() }}) as minordervalue, - cast(minordertoclaim as {{ dbt_utils.type_float() }}) as minordertoclaim, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('event_rewards_options_ab1') }} --- options at event-rewards/options -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/event_rewards_options_ab3.sql b/models/generated/airbyte_ctes/unibag/event_rewards_options_ab3.sql deleted file mode 100644 index 9de8ca8..0000000 --- a/models/generated/airbyte_ctes/unibag/event_rewards_options_ab3.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('event_rewards_options_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_event_rewards_hashid', - adapter.quote('order'), - 'invitee', - adapter.quote('percent'), - 'referral', - 'minordervalue', - 'minordertoclaim', - ]) }} as _airbyte_options_hashid, - tmp.* -from {{ ref('event_rewards_options_ab2') }} tmp --- options at event-rewards/options -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_ab1.sql b/models/generated/airbyte_ctes/unibag/events_ab1.sql index eeb8789..3966a3a 100644 --- a/models/generated/airbyte_ctes/unibag/events_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/events_ab1.sql @@ -8,20 +8,21 @@ -- depends_on: {{ source('unibag', '_airbyte_raw_events') }} 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('table_alias', '_airbyte_data', ['icon'], ['icon']) }} as icon, + {{ 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('table_alias', '_airbyte_data', ['cover'], ['cover']) }} as cover, + {{ 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('table_alias', '_airbyte_data', ['notice'], ['notice']) }} as notice, + {{ 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('table_alias', '_airbyte_data', ['options'], ['options']) }} as {{ adapter.quote('options') }}, + {{ json_extract_scalar('_airbyte_data', ['options'], ['options']) }} as {{ adapter.quote('options') }}, {{ json_extract_scalar('_airbyte_data', ['startAt'], ['startAt']) }} as startat, - {{ json_extract('table_alias', '_airbyte_data', ['segments'], ['segments']) }} as segments, + {{ 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, diff --git a/models/generated/airbyte_ctes/unibag/events_ab2.sql b/models/generated/airbyte_ctes/unibag/events_ab2.sql index a9447e2..3a43ded 100644 --- a/models/generated/airbyte_ctes/unibag/events_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/events_ab2.sql @@ -8,20 +8,21 @@ -- depends_on: {{ ref('events_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(icon as {{ type_json() }}) as icon, + 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 {{ type_json() }}) as cover, + 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 {{ type_json() }}) as notice, + 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 {{ type_json() }}) as {{ adapter.quote('options') }}, + 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 {{ type_json() }}) as segments, + 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, diff --git a/models/generated/airbyte_ctes/unibag/events_ab3.sql b/models/generated/airbyte_ctes/unibag/events_ab3.sql index 441f568..d7029d7 100644 --- a/models/generated/airbyte_ctes/unibag/events_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/events_ab3.sql @@ -9,20 +9,21 @@ select {{ dbt_utils.surrogate_key([ '_id', - 'code', adapter.quote('desc'), - object_to_string('icon'), + 'icon', adapter.quote('name'), adapter.quote('type'), - object_to_string('cover'), + 'cover', 'endat', boolean_to_string('active'), - object_to_string('notice'), + 'notice', + 'screen', 'article', - object_to_string(adapter.quote('options')), + adapter.quote('options'), 'startat', - object_to_string('segments'), + 'segments', 'createdat', + 'grouptype', array_to_string('suppliers'), 'updatedat', array_to_string('information'), diff --git a/models/generated/airbyte_ctes/unibag/events_cover_ab1.sql b/models/generated/airbyte_ctes/unibag/events_cover_ab1.sql deleted file mode 100644 index 03e056a..0000000 --- a/models/generated/airbyte_ctes/unibag/events_cover_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('events') }} -select - _airbyte_events_hashid, - {{ json_extract_scalar('cover', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('cover', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract('table_alias', 'cover', ['dimensions'], ['dimensions']) }} as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events') }} as table_alias --- cover at events/cover -where 1 = 1 -and cover is not null - diff --git a/models/generated/airbyte_ctes/unibag/events_cover_ab2.sql b/models/generated/airbyte_ctes/unibag/events_cover_ab2.sql deleted file mode 100644 index c9565fe..0000000 --- a/models/generated/airbyte_ctes/unibag/events_cover_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('events_cover_ab1') }} -select - _airbyte_events_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(dimensions as {{ type_json() }}) as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_cover_ab1') }} --- cover at events/cover -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_cover_ab3.sql b/models/generated/airbyte_ctes/unibag/events_cover_ab3.sql deleted file mode 100644 index 380b3c4..0000000 --- a/models/generated/airbyte_ctes/unibag/events_cover_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('events_cover_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_events_hashid', - '_id', - adapter.quote('name'), - object_to_string('dimensions'), - ]) }} as _airbyte_cover_hashid, - tmp.* -from {{ ref('events_cover_ab2') }} tmp --- cover at events/cover -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_ab1.sql b/models/generated/airbyte_ctes/unibag/events_cover_dimensions_ab1.sql deleted file mode 100644 index a2135f0..0000000 --- a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('events_cover') }} -select - _airbyte_cover_hashid, - {{ json_extract('table_alias', 'dimensions', ['md'], ['md']) }} as md, - {{ json_extract('table_alias', 'dimensions', ['sm'], ['sm']) }} as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_cover') }} as table_alias --- dimensions at events/cover/dimensions -where 1 = 1 -and dimensions is not null - diff --git a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_ab2.sql b/models/generated/airbyte_ctes/unibag/events_cover_dimensions_ab2.sql deleted file mode 100644 index b143fd9..0000000 --- a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('events_cover_dimensions_ab1') }} -select - _airbyte_cover_hashid, - cast(md as {{ type_json() }}) as md, - cast(sm as {{ type_json() }}) as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_cover_dimensions_ab1') }} --- dimensions at events/cover/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_ab3.sql b/models/generated/airbyte_ctes/unibag/events_cover_dimensions_ab3.sql deleted file mode 100644 index 896e403..0000000 --- a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('events_cover_dimensions_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_cover_hashid', - object_to_string('md'), - object_to_string('sm'), - ]) }} as _airbyte_dimensions_hashid, - tmp.* -from {{ ref('events_cover_dimensions_ab2') }} tmp --- dimensions at events/cover/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_md_ab1.sql b/models/generated/airbyte_ctes/unibag/events_cover_dimensions_md_ab1.sql deleted file mode 100644 index aa9052f..0000000 --- a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_md_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('events_cover_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('md', ['url'], ['url']) }} as url, - {{ json_extract_scalar('md', ['width'], ['width']) }} as width, - {{ json_extract_scalar('md', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_cover_dimensions') }} as table_alias --- md at events/cover/dimensions/md -where 1 = 1 -and md is not null - diff --git a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_md_ab2.sql b/models/generated/airbyte_ctes/unibag/events_cover_dimensions_md_ab2.sql deleted file mode 100644 index 2cba577..0000000 --- a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_md_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('events_cover_dimensions_md_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_cover_dimensions_md_ab1') }} --- md at events/cover/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_md_ab3.sql b/models/generated/airbyte_ctes/unibag/events_cover_dimensions_md_ab3.sql deleted file mode 100644 index f54ae0c..0000000 --- a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_md_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('events_cover_dimensions_md_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_md_hashid, - tmp.* -from {{ ref('events_cover_dimensions_md_ab2') }} tmp --- md at events/cover/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_sm_ab1.sql b/models/generated/airbyte_ctes/unibag/events_cover_dimensions_sm_ab1.sql deleted file mode 100644 index 3b4c0ee..0000000 --- a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_sm_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('events_cover_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('sm', ['url'], ['url']) }} as url, - {{ json_extract_scalar('sm', ['width'], ['width']) }} as width, - {{ json_extract_scalar('sm', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_cover_dimensions') }} as table_alias --- sm at events/cover/dimensions/sm -where 1 = 1 -and sm is not null - diff --git a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_sm_ab2.sql b/models/generated/airbyte_ctes/unibag/events_cover_dimensions_sm_ab2.sql deleted file mode 100644 index e9026d9..0000000 --- a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_sm_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('events_cover_dimensions_sm_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_cover_dimensions_sm_ab1') }} --- sm at events/cover/dimensions/sm -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_sm_ab3.sql b/models/generated/airbyte_ctes/unibag/events_cover_dimensions_sm_ab3.sql deleted file mode 100644 index c8089c5..0000000 --- a/models/generated/airbyte_ctes/unibag/events_cover_dimensions_sm_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('events_cover_dimensions_sm_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_sm_hashid, - tmp.* -from {{ ref('events_cover_dimensions_sm_ab2') }} tmp --- sm at events/cover/dimensions/sm -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_icon_ab1.sql b/models/generated/airbyte_ctes/unibag/events_icon_ab1.sql deleted file mode 100644 index 18af009..0000000 --- a/models/generated/airbyte_ctes/unibag/events_icon_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('events') }} -select - _airbyte_events_hashid, - {{ json_extract_scalar('icon', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('icon', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract('table_alias', 'icon', ['dimensions'], ['dimensions']) }} as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events') }} as table_alias --- icon at events/icon -where 1 = 1 -and icon is not null - diff --git a/models/generated/airbyte_ctes/unibag/events_icon_ab2.sql b/models/generated/airbyte_ctes/unibag/events_icon_ab2.sql deleted file mode 100644 index a77e79c..0000000 --- a/models/generated/airbyte_ctes/unibag/events_icon_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('events_icon_ab1') }} -select - _airbyte_events_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(dimensions as {{ type_json() }}) as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_icon_ab1') }} --- icon at events/icon -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_icon_ab3.sql b/models/generated/airbyte_ctes/unibag/events_icon_ab3.sql deleted file mode 100644 index 2e2fb46..0000000 --- a/models/generated/airbyte_ctes/unibag/events_icon_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('events_icon_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_events_hashid', - '_id', - adapter.quote('name'), - object_to_string('dimensions'), - ]) }} as _airbyte_icon_hashid, - tmp.* -from {{ ref('events_icon_ab2') }} tmp --- icon at events/icon -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_ab1.sql b/models/generated/airbyte_ctes/unibag/events_icon_dimensions_ab1.sql deleted file mode 100644 index 345eeae..0000000 --- a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('events_icon') }} -select - _airbyte_icon_hashid, - {{ json_extract('table_alias', 'dimensions', ['md'], ['md']) }} as md, - {{ json_extract('table_alias', 'dimensions', ['sm'], ['sm']) }} as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_icon') }} as table_alias --- dimensions at events/icon/dimensions -where 1 = 1 -and dimensions is not null - diff --git a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_ab2.sql b/models/generated/airbyte_ctes/unibag/events_icon_dimensions_ab2.sql deleted file mode 100644 index 2ce1ad9..0000000 --- a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('events_icon_dimensions_ab1') }} -select - _airbyte_icon_hashid, - cast(md as {{ type_json() }}) as md, - cast(sm as {{ type_json() }}) as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_icon_dimensions_ab1') }} --- dimensions at events/icon/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_ab3.sql b/models/generated/airbyte_ctes/unibag/events_icon_dimensions_ab3.sql deleted file mode 100644 index 987b78c..0000000 --- a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('events_icon_dimensions_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_icon_hashid', - object_to_string('md'), - object_to_string('sm'), - ]) }} as _airbyte_dimensions_hashid, - tmp.* -from {{ ref('events_icon_dimensions_ab2') }} tmp --- dimensions at events/icon/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_md_ab1.sql b/models/generated/airbyte_ctes/unibag/events_icon_dimensions_md_ab1.sql deleted file mode 100644 index 2365eaf..0000000 --- a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_md_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('events_icon_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('md', ['url'], ['url']) }} as url, - {{ json_extract_scalar('md', ['width'], ['width']) }} as width, - {{ json_extract_scalar('md', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_icon_dimensions') }} as table_alias --- md at events/icon/dimensions/md -where 1 = 1 -and md is not null - diff --git a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_md_ab2.sql b/models/generated/airbyte_ctes/unibag/events_icon_dimensions_md_ab2.sql deleted file mode 100644 index 27ff870..0000000 --- a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_md_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('events_icon_dimensions_md_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_icon_dimensions_md_ab1') }} --- md at events/icon/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_md_ab3.sql b/models/generated/airbyte_ctes/unibag/events_icon_dimensions_md_ab3.sql deleted file mode 100644 index a11535f..0000000 --- a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_md_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('events_icon_dimensions_md_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_md_hashid, - tmp.* -from {{ ref('events_icon_dimensions_md_ab2') }} tmp --- md at events/icon/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_sm_ab1.sql b/models/generated/airbyte_ctes/unibag/events_icon_dimensions_sm_ab1.sql deleted file mode 100644 index 111ce53..0000000 --- a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_sm_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('events_icon_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('sm', ['url'], ['url']) }} as url, - {{ json_extract_scalar('sm', ['width'], ['width']) }} as width, - {{ json_extract_scalar('sm', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_icon_dimensions') }} as table_alias --- sm at events/icon/dimensions/sm -where 1 = 1 -and sm is not null - diff --git a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_sm_ab2.sql b/models/generated/airbyte_ctes/unibag/events_icon_dimensions_sm_ab2.sql deleted file mode 100644 index 23656ae..0000000 --- a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_sm_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('events_icon_dimensions_sm_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_icon_dimensions_sm_ab1') }} --- sm at events/icon/dimensions/sm -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_sm_ab3.sql b/models/generated/airbyte_ctes/unibag/events_icon_dimensions_sm_ab3.sql deleted file mode 100644 index 63ee724..0000000 --- a/models/generated/airbyte_ctes/unibag/events_icon_dimensions_sm_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('events_icon_dimensions_sm_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_sm_hashid, - tmp.* -from {{ ref('events_icon_dimensions_sm_ab2') }} tmp --- sm at events/icon/dimensions/sm -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_notice_ab1.sql b/models/generated/airbyte_ctes/unibag/events_notice_ab1.sql deleted file mode 100644 index 3ab46da..0000000 --- a/models/generated/airbyte_ctes/unibag/events_notice_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('events') }} -select - _airbyte_events_hashid, - {{ json_extract_scalar('notice', ['label'], ['label']) }} as {{ adapter.quote('label') }}, - {{ json_extract_scalar('notice', ['value'], ['value']) }} as {{ adapter.quote('value') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events') }} as table_alias --- notice at events/notice -where 1 = 1 -and notice is not null - diff --git a/models/generated/airbyte_ctes/unibag/events_notice_ab2.sql b/models/generated/airbyte_ctes/unibag/events_notice_ab2.sql deleted file mode 100644 index 8f5b505..0000000 --- a/models/generated/airbyte_ctes/unibag/events_notice_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('events_notice_ab1') }} -select - _airbyte_events_hashid, - cast({{ adapter.quote('label') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('label') }}, - cast({{ adapter.quote('value') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('value') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_notice_ab1') }} --- notice at events/notice -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_notice_ab3.sql b/models/generated/airbyte_ctes/unibag/events_notice_ab3.sql deleted file mode 100644 index b04e613..0000000 --- a/models/generated/airbyte_ctes/unibag/events_notice_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('events_notice_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_events_hashid', - adapter.quote('label'), - adapter.quote('value'), - ]) }} as _airbyte_notice_hashid, - tmp.* -from {{ ref('events_notice_ab2') }} tmp --- notice at events/notice -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_options_ab1.sql b/models/generated/airbyte_ctes/unibag/events_options_ab1.sql deleted file mode 100644 index 24da485..0000000 --- a/models/generated/airbyte_ctes/unibag/events_options_ab1.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('events') }} -select - _airbyte_events_hashid, - {{ json_extract_scalar(adapter.quote('options'), ['cash'], ['cash']) }} as cash, - {{ json_extract_scalar(adapter.quote('options'), ['percent'], ['percent']) }} as {{ adapter.quote('percent') }}, - {{ json_extract_scalar(adapter.quote('options'), ['validInDays'], ['validInDays']) }} as validindays, - {{ json_extract_scalar(adapter.quote('options'), ['minOrderValue'], ['minOrderValue']) }} as minordervalue, - {{ json_extract_scalar(adapter.quote('options'), ['minOrderToClaim'], ['minOrderToClaim']) }} as minordertoclaim, - {{ json_extract_scalar(adapter.quote('options'), ['userCreatedBeforeDate'], ['userCreatedBeforeDate']) }} as usercreatedbeforedate, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events') }} as table_alias --- options at events/options -where 1 = 1 -and {{ adapter.quote('options') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/events_options_ab2.sql b/models/generated/airbyte_ctes/unibag/events_options_ab2.sql deleted file mode 100644 index 51dd1ef..0000000 --- a/models/generated/airbyte_ctes/unibag/events_options_ab2.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('events_options_ab1') }} -select - _airbyte_events_hashid, - cast(cash as {{ dbt_utils.type_float() }}) as cash, - cast({{ adapter.quote('percent') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('percent') }}, - cast(validindays as {{ dbt_utils.type_float() }}) as validindays, - cast(minordervalue as {{ dbt_utils.type_float() }}) as minordervalue, - cast(minordertoclaim as {{ dbt_utils.type_float() }}) as minordertoclaim, - cast(usercreatedbeforedate as {{ dbt_utils.type_string() }}) as usercreatedbeforedate, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_options_ab1') }} --- options at events/options -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_options_ab3.sql b/models/generated/airbyte_ctes/unibag/events_options_ab3.sql deleted file mode 100644 index 4505b41..0000000 --- a/models/generated/airbyte_ctes/unibag/events_options_ab3.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('events_options_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_events_hashid', - 'cash', - adapter.quote('percent'), - 'validindays', - 'minordervalue', - 'minordertoclaim', - 'usercreatedbeforedate', - ]) }} as _airbyte_options_hashid, - tmp.* -from {{ ref('events_options_ab2') }} tmp --- options at events/options -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_segments_ab1.sql b/models/generated/airbyte_ctes/unibag/events_segments_ab1.sql deleted file mode 100644 index 8ce10f9..0000000 --- a/models/generated/airbyte_ctes/unibag/events_segments_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('events') }} -select - _airbyte_events_hashid, - {{ json_extract_array('segments', ['segments'], ['segments']) }} as segments, - {{ json_extract_scalar('segments', ['userSegment'], ['userSegment']) }} as usersegment, - {{ json_extract('table_alias', 'segments', ['lastMonthSales'], ['lastMonthSales']) }} as lastmonthsales, - {{ json_extract('table_alias', 'segments', ['highestMonthlySales'], ['highestMonthlySales']) }} as highestmonthlysales, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events') }} as table_alias --- segments at events/segments -where 1 = 1 -and segments is not null - diff --git a/models/generated/airbyte_ctes/unibag/events_segments_ab2.sql b/models/generated/airbyte_ctes/unibag/events_segments_ab2.sql deleted file mode 100644 index 476f25d..0000000 --- a/models/generated/airbyte_ctes/unibag/events_segments_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('events_segments_ab1') }} -select - _airbyte_events_hashid, - segments, - cast(usersegment as {{ dbt_utils.type_string() }}) as usersegment, - cast(lastmonthsales as {{ type_json() }}) as lastmonthsales, - cast(highestmonthlysales as {{ type_json() }}) as highestmonthlysales, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_segments_ab1') }} --- segments at events/segments -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_segments_ab3.sql b/models/generated/airbyte_ctes/unibag/events_segments_ab3.sql deleted file mode 100644 index 9a2c306..0000000 --- a/models/generated/airbyte_ctes/unibag/events_segments_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('events_segments_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_events_hashid', - array_to_string('segments'), - 'usersegment', - object_to_string('lastmonthsales'), - object_to_string('highestmonthlysales'), - ]) }} as _airbyte_segments_hashid, - tmp.* -from {{ ref('events_segments_ab2') }} tmp --- segments at events/segments -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_segments_highestmonthlysales_ab1.sql b/models/generated/airbyte_ctes/unibag/events_segments_highestmonthlysales_ab1.sql deleted file mode 100644 index 4907802..0000000 --- a/models/generated/airbyte_ctes/unibag/events_segments_highestmonthlysales_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('events_segments') }} -select - _airbyte_segments_hashid, - {{ json_extract_scalar('highestmonthlysales', ['to'], ['to']) }} as {{ adapter.quote('to') }}, - {{ json_extract_scalar('highestmonthlysales', ['from'], ['from']) }} as {{ adapter.quote('from') }}, - {{ json_extract_scalar('highestmonthlysales', ['active'], ['active']) }} as active, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_segments') }} as table_alias --- highestmonthlysales at events/segments/highestMonthlySales -where 1 = 1 -and highestmonthlysales is not null - diff --git a/models/generated/airbyte_ctes/unibag/events_segments_highestmonthlysales_ab2.sql b/models/generated/airbyte_ctes/unibag/events_segments_highestmonthlysales_ab2.sql deleted file mode 100644 index 9694438..0000000 --- a/models/generated/airbyte_ctes/unibag/events_segments_highestmonthlysales_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('events_segments_highestmonthlysales_ab1') }} -select - _airbyte_segments_hashid, - cast({{ adapter.quote('to') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('to') }}, - cast({{ adapter.quote('from') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('from') }}, - {{ cast_to_boolean('active') }} as active, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_segments_highestmonthlysales_ab1') }} --- highestmonthlysales at events/segments/highestMonthlySales -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_segments_highestmonthlysales_ab3.sql b/models/generated/airbyte_ctes/unibag/events_segments_highestmonthlysales_ab3.sql deleted file mode 100644 index 8864501..0000000 --- a/models/generated/airbyte_ctes/unibag/events_segments_highestmonthlysales_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('events_segments_highestmonthlysales_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_segments_hashid', - adapter.quote('to'), - adapter.quote('from'), - boolean_to_string('active'), - ]) }} as _airbyte_highestmonthlysales_hashid, - tmp.* -from {{ ref('events_segments_highestmonthlysales_ab2') }} tmp --- highestmonthlysales at events/segments/highestMonthlySales -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_segments_lastmonthsales_ab1.sql b/models/generated/airbyte_ctes/unibag/events_segments_lastmonthsales_ab1.sql deleted file mode 100644 index ea23485..0000000 --- a/models/generated/airbyte_ctes/unibag/events_segments_lastmonthsales_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('events_segments') }} -select - _airbyte_segments_hashid, - {{ json_extract_scalar('lastmonthsales', ['to'], ['to']) }} as {{ adapter.quote('to') }}, - {{ json_extract_scalar('lastmonthsales', ['from'], ['from']) }} as {{ adapter.quote('from') }}, - {{ json_extract_scalar('lastmonthsales', ['active'], ['active']) }} as active, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_segments') }} as table_alias --- lastmonthsales at events/segments/lastMonthSales -where 1 = 1 -and lastmonthsales is not null - diff --git a/models/generated/airbyte_ctes/unibag/events_segments_lastmonthsales_ab2.sql b/models/generated/airbyte_ctes/unibag/events_segments_lastmonthsales_ab2.sql deleted file mode 100644 index 112d1e0..0000000 --- a/models/generated/airbyte_ctes/unibag/events_segments_lastmonthsales_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('events_segments_lastmonthsales_ab1') }} -select - _airbyte_segments_hashid, - cast({{ adapter.quote('to') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('to') }}, - cast({{ adapter.quote('from') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('from') }}, - {{ cast_to_boolean('active') }} as active, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('events_segments_lastmonthsales_ab1') }} --- lastmonthsales at events/segments/lastMonthSales -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/events_segments_lastmonthsales_ab3.sql b/models/generated/airbyte_ctes/unibag/events_segments_lastmonthsales_ab3.sql deleted file mode 100644 index 5a5f590..0000000 --- a/models/generated/airbyte_ctes/unibag/events_segments_lastmonthsales_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('events_segments_lastmonthsales_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_segments_hashid', - adapter.quote('to'), - adapter.quote('from'), - boolean_to_string('active'), - ]) }} as _airbyte_lastmonthsales_hashid, - tmp.* -from {{ ref('events_segments_lastmonthsales_ab2') }} tmp --- lastmonthsales at events/segments/lastMonthSales -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/inventories_ab1.sql b/models/generated/airbyte_ctes/unibag/inventories_ab1.sql index 599b106..e064db0 100644 --- a/models/generated/airbyte_ctes/unibag/inventories_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/inventories_ab1.sql @@ -7,21 +7,22 @@ -- 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('table_alias', '_airbyte_data', ['contact'], ['contact']) }} as contact, - {{ json_extract('table_alias', '_airbyte_data', ['partner'], ['partner']) }} as partner, + {{ 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('table_alias', '_airbyte_data', ['location'], ['location']) }} as {{ adapter.quote('location') }}, - {{ json_extract('table_alias', '_airbyte_data', ['supplier'], ['supplier']) }} as supplier, + {{ 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('table_alias', '_airbyte_data', ['paymentMethods'], ['paymentMethods']) }} as paymentmethods, + {{ 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, diff --git a/models/generated/airbyte_ctes/unibag/inventories_ab2.sql b/models/generated/airbyte_ctes/unibag/inventories_ab2.sql index 1dd2309..b8968d3 100644 --- a/models/generated/airbyte_ctes/unibag/inventories_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/inventories_ab2.sql @@ -7,21 +7,22 @@ -- 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 {{ type_json() }}) as contact, - cast(partner as {{ type_json() }}) as partner, + 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 {{ type_json() }}) as {{ adapter.quote('location') }}, - cast(supplier as {{ type_json() }}) as supplier, + 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 {{ type_json() }}) as paymentmethods, + cast(paymentmethods as {{ dbt_utils.type_string() }}) as paymentmethods, {{ cast_to_boolean('canissueinvoice') }} as canissueinvoice, deliverymethods, {{ cast_to_boolean('canautosendemail') }} as canautosendemail, diff --git a/models/generated/airbyte_ctes/unibag/inventories_ab3.sql b/models/generated/airbyte_ctes/unibag/inventories_ab3.sql index 02d85a4..c0e65e2 100644 --- a/models/generated/airbyte_ctes/unibag/inventories_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/inventories_ab3.sql @@ -8,21 +8,22 @@ -- depends_on: {{ ref('inventories_ab2') }} select {{ dbt_utils.surrogate_key([ + adapter.quote('id'), '_id', 'code', adapter.quote('name'), 'slug', boolean_to_string('active'), - object_to_string('contact'), - object_to_string('partner'), + 'contact', + 'partner', 'checksum', - object_to_string(adapter.quote('location')), - object_to_string('supplier'), + adapter.quote('location'), + 'supplier', 'createdat', 'updatedat', 'minimumvalue', 'searchstring', - object_to_string('paymentmethods'), + 'paymentmethods', boolean_to_string('canissueinvoice'), array_to_string('deliverymethods'), boolean_to_string('canautosendemail'), diff --git a/models/generated/airbyte_ctes/unibag/inventories_contact_ab1.sql b/models/generated/airbyte_ctes/unibag/inventories_contact_ab1.sql deleted file mode 100644 index 712460d..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_contact_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('inventories') }} -select - _airbyte_inventories_hashid, - {{ json_extract_scalar('contact', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('contact', ['email'], ['email']) }} as email, - {{ json_extract_scalar('contact', ['phone'], ['phone']) }} as phone, - {{ json_extract_scalar('contact', ['address'], ['address']) }} as address, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('inventories') }} as table_alias --- contact at inventories/contact -where 1 = 1 -and contact is not null - diff --git a/models/generated/airbyte_ctes/unibag/inventories_contact_ab2.sql b/models/generated/airbyte_ctes/unibag/inventories_contact_ab2.sql deleted file mode 100644 index ef58581..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_contact_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('inventories_contact_ab1') }} -select - _airbyte_inventories_hashid, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(email as {{ dbt_utils.type_string() }}) as email, - cast(phone as {{ dbt_utils.type_string() }}) as phone, - cast(address as {{ dbt_utils.type_string() }}) as address, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('inventories_contact_ab1') }} --- contact at inventories/contact -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/inventories_contact_ab3.sql b/models/generated/airbyte_ctes/unibag/inventories_contact_ab3.sql deleted file mode 100644 index c0bd3fd..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_contact_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('inventories_contact_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_inventories_hashid', - adapter.quote('name'), - 'email', - 'phone', - 'address', - ]) }} as _airbyte_contact_hashid, - tmp.* -from {{ ref('inventories_contact_ab2') }} tmp --- contact at inventories/contact -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/inventories_location_ab1.sql b/models/generated/airbyte_ctes/unibag/inventories_location_ab1.sql deleted file mode 100644 index 8d39f10..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_location_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('inventories') }} -select - _airbyte_inventories_hashid, - {{ json_extract_scalar(adapter.quote('location'), ['ward'], ['ward']) }} as ward, - {{ json_extract_scalar(adapter.quote('location'), ['address'], ['address']) }} as address, - {{ json_extract_scalar(adapter.quote('location'), ['district'], ['district']) }} as district, - {{ json_extract('table_alias', adapter.quote('location'), ['location'], ['location']) }} as {{ adapter.quote('location') }}, - {{ json_extract_scalar(adapter.quote('location'), ['province'], ['province']) }} as province, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('inventories') }} as table_alias --- location at inventories/location -where 1 = 1 -and {{ adapter.quote('location') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/inventories_location_ab2.sql b/models/generated/airbyte_ctes/unibag/inventories_location_ab2.sql deleted file mode 100644 index 098af26..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_location_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('inventories_location_ab1') }} -select - _airbyte_inventories_hashid, - cast(ward as {{ dbt_utils.type_string() }}) as ward, - cast(address as {{ dbt_utils.type_string() }}) as address, - cast(district as {{ dbt_utils.type_string() }}) as district, - cast({{ adapter.quote('location') }} as {{ type_json() }}) as {{ adapter.quote('location') }}, - cast(province as {{ dbt_utils.type_string() }}) as province, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('inventories_location_ab1') }} --- location at inventories/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/inventories_location_ab3.sql b/models/generated/airbyte_ctes/unibag/inventories_location_ab3.sql deleted file mode 100644 index a2780d9..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_location_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('inventories_location_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_inventories_hashid', - 'ward', - 'address', - 'district', - object_to_string(adapter.quote('location')), - 'province', - ]) }} as _airbyte_location_hashid, - tmp.* -from {{ ref('inventories_location_ab2') }} tmp --- location at inventories/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/inventories_location_location_ab1.sql b/models/generated/airbyte_ctes/unibag/inventories_location_location_ab1.sql deleted file mode 100644 index 8765b55..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_location_location_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('inventories_location') }} -select - _airbyte_location_hashid, - {{ json_extract_scalar(adapter.quote('location'), ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_array(adapter.quote('location'), ['coordinates'], ['coordinates']) }} as coordinates, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('inventories_location') }} as table_alias --- location at inventories/location/location -where 1 = 1 -and {{ adapter.quote('location') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/inventories_location_location_ab2.sql b/models/generated/airbyte_ctes/unibag/inventories_location_location_ab2.sql deleted file mode 100644 index 84b4e66..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_location_location_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('inventories_location_location_ab1') }} -select - _airbyte_location_hashid, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - coordinates, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('inventories_location_location_ab1') }} --- location at inventories/location/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/inventories_location_location_ab3.sql b/models/generated/airbyte_ctes/unibag/inventories_location_location_ab3.sql deleted file mode 100644 index 1c725fd..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_location_location_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('inventories_location_location_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_location_hashid', - adapter.quote('type'), - array_to_string('coordinates'), - ]) }} as _airbyte_location_3_hashid, - tmp.* -from {{ ref('inventories_location_location_ab2') }} tmp --- location at inventories/location/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/inventories_partner_ab1.sql b/models/generated/airbyte_ctes/unibag/inventories_partner_ab1.sql deleted file mode 100644 index cad39ce..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_partner_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('inventories') }} -select - _airbyte_inventories_hashid, - {{ json_extract_scalar('partner', ['code'], ['code']) }} as code, - {{ json_extract_scalar('partner', ['identityCode'], ['identityCode']) }} as identitycode, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('inventories') }} as table_alias --- partner at inventories/partner -where 1 = 1 -and partner is not null - diff --git a/models/generated/airbyte_ctes/unibag/inventories_partner_ab2.sql b/models/generated/airbyte_ctes/unibag/inventories_partner_ab2.sql deleted file mode 100644 index 46abaf1..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_partner_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('inventories_partner_ab1') }} -select - _airbyte_inventories_hashid, - cast(code as {{ dbt_utils.type_string() }}) as code, - cast(identitycode as {{ dbt_utils.type_string() }}) as identitycode, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('inventories_partner_ab1') }} --- partner at inventories/partner -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/inventories_partner_ab3.sql b/models/generated/airbyte_ctes/unibag/inventories_partner_ab3.sql deleted file mode 100644 index 44bf88c..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_partner_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('inventories_partner_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_inventories_hashid', - 'code', - 'identitycode', - ]) }} as _airbyte_partner_hashid, - tmp.* -from {{ ref('inventories_partner_ab2') }} tmp --- partner at inventories/partner -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/inventories_paymentmethods_ab1.sql b/models/generated/airbyte_ctes/unibag/inventories_paymentmethods_ab1.sql deleted file mode 100644 index 3fab4cb..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_paymentmethods_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('inventories') }} -select - _airbyte_inventories_hashid, - {{ json_extract_scalar('paymentmethods', ['cod'], ['cod']) }} as cod, - {{ json_extract_scalar('paymentmethods', ['bankTransfer'], ['bankTransfer']) }} as banktransfer, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('inventories') }} as table_alias --- paymentmethods at inventories/paymentMethods -where 1 = 1 -and paymentmethods is not null - diff --git a/models/generated/airbyte_ctes/unibag/inventories_paymentmethods_ab2.sql b/models/generated/airbyte_ctes/unibag/inventories_paymentmethods_ab2.sql deleted file mode 100644 index ca4ecaa..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_paymentmethods_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('inventories_paymentmethods_ab1') }} -select - _airbyte_inventories_hashid, - {{ cast_to_boolean('cod') }} as cod, - {{ cast_to_boolean('banktransfer') }} as banktransfer, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('inventories_paymentmethods_ab1') }} --- paymentmethods at inventories/paymentMethods -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/inventories_paymentmethods_ab3.sql b/models/generated/airbyte_ctes/unibag/inventories_paymentmethods_ab3.sql deleted file mode 100644 index 9f41dce..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_paymentmethods_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('inventories_paymentmethods_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_inventories_hashid', - boolean_to_string('cod'), - boolean_to_string('banktransfer'), - ]) }} as _airbyte_paymentmethods_hashid, - tmp.* -from {{ ref('inventories_paymentmethods_ab2') }} tmp --- paymentmethods at inventories/paymentMethods -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/inventories_supplier_ab1.sql b/models/generated/airbyte_ctes/unibag/inventories_supplier_ab1.sql deleted file mode 100644 index d9e3844..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_supplier_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('inventories') }} -select - _airbyte_inventories_hashid, - {{ json_extract_scalar('supplier', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('supplier', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('supplier', ['searchString'], ['searchString']) }} as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('inventories') }} as table_alias --- supplier at inventories/supplier -where 1 = 1 -and supplier is not null - diff --git a/models/generated/airbyte_ctes/unibag/inventories_supplier_ab2.sql b/models/generated/airbyte_ctes/unibag/inventories_supplier_ab2.sql deleted file mode 100644 index 384390d..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_supplier_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('inventories_supplier_ab1') }} -select - _airbyte_inventories_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('inventories_supplier_ab1') }} --- supplier at inventories/supplier -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/inventories_supplier_ab3.sql b/models/generated/airbyte_ctes/unibag/inventories_supplier_ab3.sql deleted file mode 100644 index e30e872..0000000 --- a/models/generated/airbyte_ctes/unibag/inventories_supplier_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('inventories_supplier_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_inventories_hashid', - '_id', - adapter.quote('name'), - 'searchstring', - ]) }} as _airbyte_supplier_hashid, - tmp.* -from {{ ref('inventories_supplier_ab2') }} tmp --- supplier at inventories/supplier -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_ab1.sql b/models/generated/airbyte_ctes/unibag/membership_ab1.sql index 8d189b2..ce7d6ce 100644 --- a/models/generated/airbyte_ctes/unibag/membership_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/membership_ab1.sql @@ -16,8 +16,10 @@ select {{ 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, diff --git a/models/generated/airbyte_ctes/unibag/membership_ab2.sql b/models/generated/airbyte_ctes/unibag/membership_ab2.sql index 0bf0a3e..60c1e91 100644 --- a/models/generated/airbyte_ctes/unibag/membership_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/membership_ab2.sql @@ -16,8 +16,10 @@ select {{ 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, diff --git a/models/generated/airbyte_ctes/unibag/membership_ab3.sql b/models/generated/airbyte_ctes/unibag/membership_ab3.sql index 7d0a7f7..44e9ab5 100644 --- a/models/generated/airbyte_ctes/unibag/membership_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/membership_ab3.sql @@ -17,8 +17,10 @@ select boolean_to_string('active'), 'createdat', 'updatedat', + 'updatedat_1', adapter.quote('transaction'), 'bonuspercent', + 'bonuspercent_1', 'transactionminvalue', ]) }} as _airbyte_membership_hashid, tmp.* diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_ab1.sql b/models/generated/airbyte_ctes/unibag/membership_histories_ab1.sql index 3b39e41..c920079 100644 --- a/models/generated/airbyte_ctes/unibag/membership_histories_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/membership_histories_ab1.sql @@ -8,8 +8,8 @@ -- depends_on: {{ source('unibag', '_airbyte_raw_membership_histories') }} select {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract('table_alias', '_airbyte_data', ['new'], ['new']) }} as {{ adapter.quote('new') }}, - {{ json_extract('table_alias', '_airbyte_data', ['old'], ['old']) }} as {{ adapter.quote('old') }}, + {{ 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, diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_ab2.sql b/models/generated/airbyte_ctes/unibag/membership_histories_ab2.sql index a63c6d6..2453c8d 100644 --- a/models/generated/airbyte_ctes/unibag/membership_histories_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/membership_histories_ab2.sql @@ -8,8 +8,8 @@ -- depends_on: {{ ref('membership_histories_ab1') }} select cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('new') }} as {{ type_json() }}) as {{ adapter.quote('new') }}, - cast({{ adapter.quote('old') }} as {{ type_json() }}) as {{ adapter.quote('old') }}, + 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, diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_ab3.sql b/models/generated/airbyte_ctes/unibag/membership_histories_ab3.sql index b52156c..49f6c05 100644 --- a/models/generated/airbyte_ctes/unibag/membership_histories_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/membership_histories_ab3.sql @@ -9,8 +9,8 @@ select {{ dbt_utils.surrogate_key([ '_id', - object_to_string(adapter.quote('new')), - object_to_string(adapter.quote('old')), + adapter.quote('new'), + adapter.quote('old'), adapter.quote('type'), adapter.quote('user'), 'createdat', diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_new_ab1.sql b/models/generated/airbyte_ctes/unibag/membership_histories_new_ab1.sql deleted file mode 100644 index cbdf08a..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_new_ab1.sql +++ /dev/null @@ -1,24 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('membership_histories') }} -select - _airbyte_membership_histories_hashid, - {{ json_extract_scalar(adapter.quote('new'), ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar(adapter.quote('new'), ['level'], ['level']) }} as {{ adapter.quote('level') }}, - {{ json_extract('table_alias', adapter.quote('new'), ['condition'], ['condition']) }} as {{ adapter.quote('condition') }}, - {{ json_extract_scalar(adapter.quote('new'), ['statistic'], ['statistic']) }} as statistic, - {{ json_extract_scalar(adapter.quote('new'), ['transaction'], ['transaction']) }} as {{ adapter.quote('transaction') }}, - {{ json_extract_scalar(adapter.quote('new'), ['bonusPercent'], ['bonusPercent']) }} as bonuspercent, - {{ json_extract_scalar(adapter.quote('new'), ['transactionMinValue'], ['transactionMinValue']) }} as transactionminvalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('membership_histories') }} as table_alias --- new at membership-histories/new -where 1 = 1 -and {{ adapter.quote('new') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_new_ab2.sql b/models/generated/airbyte_ctes/unibag/membership_histories_new_ab2.sql deleted file mode 100644 index 02c4c25..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_new_ab2.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('membership_histories_new_ab1') }} -select - _airbyte_membership_histories_hashid, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast({{ adapter.quote('level') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('level') }}, - cast({{ adapter.quote('condition') }} as {{ type_json() }}) as {{ adapter.quote('condition') }}, - cast(statistic as {{ dbt_utils.type_string() }}) as statistic, - cast({{ adapter.quote('transaction') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('transaction') }}, - cast(bonuspercent as {{ dbt_utils.type_float() }}) as bonuspercent, - cast(transactionminvalue as {{ dbt_utils.type_float() }}) as transactionminvalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('membership_histories_new_ab1') }} --- new at membership-histories/new -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_new_ab3.sql b/models/generated/airbyte_ctes/unibag/membership_histories_new_ab3.sql deleted file mode 100644 index bf21d95..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_new_ab3.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('membership_histories_new_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_membership_histories_hashid', - adapter.quote('name'), - adapter.quote('level'), - object_to_string(adapter.quote('condition')), - 'statistic', - adapter.quote('transaction'), - 'bonuspercent', - 'transactionminvalue', - ]) }} as _airbyte_new_hashid, - tmp.* -from {{ ref('membership_histories_new_ab2') }} tmp --- new at membership-histories/new -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_new_condition_ab1.sql b/models/generated/airbyte_ctes/unibag/membership_histories_new_condition_ab1.sql deleted file mode 100644 index a23046a..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_new_condition_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('membership_histories_new') }} -select - _airbyte_new_hashid, - {{ json_extract_scalar(adapter.quote('condition'), ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar(adapter.quote('condition'), ['sales'], ['sales']) }} as sales, - {{ json_extract_scalar(adapter.quote('condition'), ['transaction'], ['transaction']) }} as {{ adapter.quote('transaction') }}, - {{ json_extract_scalar(adapter.quote('condition'), ['bonusPercent'], ['bonusPercent']) }} as bonuspercent, - {{ json_extract_scalar(adapter.quote('condition'), ['transactionMinValue'], ['transactionMinValue']) }} as transactionminvalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('membership_histories_new') }} as table_alias --- condition at membership-histories/new/condition -where 1 = 1 -and {{ adapter.quote('condition') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_new_condition_ab2.sql b/models/generated/airbyte_ctes/unibag/membership_histories_new_condition_ab2.sql deleted file mode 100644 index b704a36..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_new_condition_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('membership_histories_new_condition_ab1') }} -select - _airbyte_new_hashid, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(sales as {{ dbt_utils.type_float() }}) as sales, - cast({{ adapter.quote('transaction') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('transaction') }}, - cast(bonuspercent as {{ dbt_utils.type_float() }}) as bonuspercent, - cast(transactionminvalue as {{ dbt_utils.type_float() }}) as transactionminvalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('membership_histories_new_condition_ab1') }} --- condition at membership-histories/new/condition -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_new_condition_ab3.sql b/models/generated/airbyte_ctes/unibag/membership_histories_new_condition_ab3.sql deleted file mode 100644 index 6c7146d..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_new_condition_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('membership_histories_new_condition_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_new_hashid', - adapter.quote('name'), - 'sales', - adapter.quote('transaction'), - 'bonuspercent', - 'transactionminvalue', - ]) }} as _airbyte_condition_hashid, - tmp.* -from {{ ref('membership_histories_new_condition_ab2') }} tmp --- condition at membership-histories/new/condition -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_old_ab1.sql b/models/generated/airbyte_ctes/unibag/membership_histories_old_ab1.sql deleted file mode 100644 index d478077..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_old_ab1.sql +++ /dev/null @@ -1,24 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('membership_histories') }} -select - _airbyte_membership_histories_hashid, - {{ json_extract_scalar(adapter.quote('old'), ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar(adapter.quote('old'), ['level'], ['level']) }} as {{ adapter.quote('level') }}, - {{ json_extract('table_alias', adapter.quote('old'), ['condition'], ['condition']) }} as {{ adapter.quote('condition') }}, - {{ json_extract('table_alias', adapter.quote('old'), ['statistic'], ['statistic']) }} as statistic, - {{ json_extract_scalar(adapter.quote('old'), ['transaction'], ['transaction']) }} as {{ adapter.quote('transaction') }}, - {{ json_extract_scalar(adapter.quote('old'), ['bonusPercent'], ['bonusPercent']) }} as bonuspercent, - {{ json_extract_scalar(adapter.quote('old'), ['transactionMinValue'], ['transactionMinValue']) }} as transactionminvalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('membership_histories') }} as table_alias --- old at membership-histories/old -where 1 = 1 -and {{ adapter.quote('old') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_old_ab2.sql b/models/generated/airbyte_ctes/unibag/membership_histories_old_ab2.sql deleted file mode 100644 index f867a5f..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_old_ab2.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('membership_histories_old_ab1') }} -select - _airbyte_membership_histories_hashid, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast({{ adapter.quote('level') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('level') }}, - cast({{ adapter.quote('condition') }} as {{ type_json() }}) as {{ adapter.quote('condition') }}, - cast(statistic as {{ type_json() }}) as statistic, - cast({{ adapter.quote('transaction') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('transaction') }}, - cast(bonuspercent as {{ dbt_utils.type_float() }}) as bonuspercent, - cast(transactionminvalue as {{ dbt_utils.type_float() }}) as transactionminvalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('membership_histories_old_ab1') }} --- old at membership-histories/old -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_old_ab3.sql b/models/generated/airbyte_ctes/unibag/membership_histories_old_ab3.sql deleted file mode 100644 index a0ebf7c..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_old_ab3.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('membership_histories_old_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_membership_histories_hashid', - adapter.quote('name'), - adapter.quote('level'), - object_to_string(adapter.quote('condition')), - object_to_string('statistic'), - adapter.quote('transaction'), - 'bonuspercent', - 'transactionminvalue', - ]) }} as _airbyte_old_hashid, - tmp.* -from {{ ref('membership_histories_old_ab2') }} tmp --- old at membership-histories/old -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_old_condition_ab1.sql b/models/generated/airbyte_ctes/unibag/membership_histories_old_condition_ab1.sql deleted file mode 100644 index 040f975..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_old_condition_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('membership_histories_old') }} -select - _airbyte_old_hashid, - {{ json_extract_scalar(adapter.quote('condition'), ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar(adapter.quote('condition'), ['sales'], ['sales']) }} as sales, - {{ json_extract_scalar(adapter.quote('condition'), ['transaction'], ['transaction']) }} as {{ adapter.quote('transaction') }}, - {{ json_extract_scalar(adapter.quote('condition'), ['bonusPercent'], ['bonusPercent']) }} as bonuspercent, - {{ json_extract_scalar(adapter.quote('condition'), ['transactionMinValue'], ['transactionMinValue']) }} as transactionminvalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('membership_histories_old') }} as table_alias --- condition at membership-histories/old/condition -where 1 = 1 -and {{ adapter.quote('condition') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_old_condition_ab2.sql b/models/generated/airbyte_ctes/unibag/membership_histories_old_condition_ab2.sql deleted file mode 100644 index 2ec45f6..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_old_condition_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('membership_histories_old_condition_ab1') }} -select - _airbyte_old_hashid, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(sales as {{ dbt_utils.type_float() }}) as sales, - cast({{ adapter.quote('transaction') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('transaction') }}, - cast(bonuspercent as {{ dbt_utils.type_float() }}) as bonuspercent, - cast(transactionminvalue as {{ dbt_utils.type_float() }}) as transactionminvalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('membership_histories_old_condition_ab1') }} --- condition at membership-histories/old/condition -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_old_condition_ab3.sql b/models/generated/airbyte_ctes/unibag/membership_histories_old_condition_ab3.sql deleted file mode 100644 index c876afc..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_old_condition_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('membership_histories_old_condition_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_old_hashid', - adapter.quote('name'), - 'sales', - adapter.quote('transaction'), - 'bonuspercent', - 'transactionminvalue', - ]) }} as _airbyte_condition_hashid, - tmp.* -from {{ ref('membership_histories_old_condition_ab2') }} tmp --- condition at membership-histories/old/condition -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_old_statistic_ab1.sql b/models/generated/airbyte_ctes/unibag/membership_histories_old_statistic_ab1.sql deleted file mode 100644 index 061f020..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_old_statistic_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('membership_histories_old') }} -select - _airbyte_old_hashid, - {{ json_extract_scalar('statistic', ['sales'], ['sales']) }} as sales, - {{ json_extract_scalar('statistic', ['transaction'], ['transaction']) }} as {{ adapter.quote('transaction') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('membership_histories_old') }} as table_alias --- statistic at membership-histories/old/statistic -where 1 = 1 -and statistic is not null - diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_old_statistic_ab2.sql b/models/generated/airbyte_ctes/unibag/membership_histories_old_statistic_ab2.sql deleted file mode 100644 index 9541651..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_old_statistic_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('membership_histories_old_statistic_ab1') }} -select - _airbyte_old_hashid, - cast(sales as {{ dbt_utils.type_float() }}) as sales, - cast({{ adapter.quote('transaction') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('transaction') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('membership_histories_old_statistic_ab1') }} --- statistic at membership-histories/old/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/membership_histories_old_statistic_ab3.sql b/models/generated/airbyte_ctes/unibag/membership_histories_old_statistic_ab3.sql deleted file mode 100644 index 9aec091..0000000 --- a/models/generated/airbyte_ctes/unibag/membership_histories_old_statistic_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('membership_histories_old_statistic_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_old_hashid', - 'sales', - adapter.quote('transaction'), - ]) }} as _airbyte_statistic_hashid, - tmp.* -from {{ ref('membership_histories_old_statistic_ab2') }} tmp --- statistic at membership-histories/old/statistic -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 index 80c8290..1f7b78c 100644 --- a/models/generated/airbyte_ctes/unibag/membership_orders_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/membership_orders_ab1.sql @@ -18,6 +18,7 @@ select {{ 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 diff --git a/models/generated/airbyte_ctes/unibag/membership_orders_ab2.sql b/models/generated/airbyte_ctes/unibag/membership_orders_ab2.sql index 9f30b26..9235cee 100644 --- a/models/generated/airbyte_ctes/unibag/membership_orders_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/membership_orders_ab2.sql @@ -18,6 +18,7 @@ select {{ 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 diff --git a/models/generated/airbyte_ctes/unibag/membership_orders_ab3.sql b/models/generated/airbyte_ctes/unibag/membership_orders_ab3.sql index c7932e7..23d74cf 100644 --- a/models/generated/airbyte_ctes/unibag/membership_orders_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/membership_orders_ab3.sql @@ -19,6 +19,7 @@ select boolean_to_string('isrejected'), 'membershipname', 'membershiplevel', + 'membershippromotion' ]) }} as _airbyte_membership_orders_hashid, tmp.* from {{ ref('membership_orders_ab2') }} tmp diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_ab1.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_ab1.sql index c3abf6a..e08806f 100644 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/order_deliveries_ab1.sql @@ -12,18 +12,18 @@ select {{ 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('table_alias', '_airbyte_data', ['weight'], ['weight']) }} as weight, {{ json_extract_scalar('_airbyte_data', ['service'], ['service']) }} as service, - {{ json_extract('table_alias', '_airbyte_data', ['customer'], ['customer']) }} as customer, - {{ json_extract('table_alias', '_airbyte_data', ['delivery'], ['delivery']) }} as delivery, - {{ json_extract('table_alias', '_airbyte_data', ['location'], ['location']) }} as {{ adapter.quote('location') }}, + {{ 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('table_alias', '_airbyte_data', ['promotion'], ['promotion']) }} as promotion, + {{ 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('table_alias', '_airbyte_data', ['trackingTime'], ['trackingTime']) }} as trackingtime, + {{ 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 diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_ab2.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_ab2.sql index 75187ba..bd88883 100644 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/order_deliveries_ab2.sql @@ -12,18 +12,18 @@ select 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(weight as {{ type_json() }}) as weight, cast(service as {{ dbt_utils.type_string() }}) as service, - cast(customer as {{ type_json() }}) as customer, - cast(delivery as {{ type_json() }}) as delivery, - cast({{ adapter.quote('location') }} as {{ type_json() }}) as {{ adapter.quote('location') }}, + 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 {{ type_json() }}) as promotion, + 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 {{ type_json() }}) as trackingtime, + 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 diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_ab3.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_ab3.sql index 33e01a2..68b2c60 100644 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/order_deliveries_ab3.sql @@ -13,18 +13,18 @@ select adapter.quote('order'), 'title', 'status', - object_to_string('weight'), 'service', - object_to_string('customer'), - object_to_string('delivery'), - object_to_string(adapter.quote('location')), + 'customer', + 'delivery', + adapter.quote('location'), 'createdat', - object_to_string('promotion'), + 'promotion', 'updatedat', 'trackingcode', - object_to_string('trackingtime'), + 'trackingtime', boolean_to_string('isadminchange'), 'trackingordercode', + 'weight', ]) }} as _airbyte_order_deliveries_hashid, tmp.* from {{ ref('order_deliveries_ab2') }} tmp diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_customer_ab1.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_customer_ab1.sql deleted file mode 100644 index d21ef9f..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_customer_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('order_deliveries') }} -select - _airbyte_order_deliveries_hashid, - {{ json_extract_scalar('customer', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('customer', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('customer', ['phone'], ['phone']) }} as phone, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_deliveries') }} as table_alias --- customer at order-deliveries/customer -where 1 = 1 -and customer is not null - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_customer_ab2.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_customer_ab2.sql deleted file mode 100644 index 87ef67d..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_customer_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('order_deliveries_customer_ab1') }} -select - _airbyte_order_deliveries_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(phone as {{ dbt_utils.type_string() }}) as phone, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_deliveries_customer_ab1') }} --- customer at order-deliveries/customer -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_customer_ab3.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_customer_ab3.sql deleted file mode 100644 index 0381deb..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_customer_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('order_deliveries_customer_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_order_deliveries_hashid', - '_id', - adapter.quote('name'), - 'phone', - ]) }} as _airbyte_customer_hashid, - tmp.* -from {{ ref('order_deliveries_customer_ab2') }} tmp --- customer at order-deliveries/customer -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_ab1.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_ab1.sql deleted file mode 100644 index 388e39a..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_ab1.sql +++ /dev/null @@ -1,30 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('order_deliveries') }} -select - _airbyte_order_deliveries_hashid, - {{ json_extract_scalar('delivery', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('delivery', ['fee'], ['fee']) }} as fee, - {{ json_extract_scalar('delivery', ['desc'], ['desc']) }} as {{ adapter.quote('desc') }}, - {{ json_extract_scalar('delivery', ['note'], ['note']) }} as note, - {{ json_extract('table_alias', 'delivery', ['feeShip'], ['feeShip']) }} as feeship, - {{ json_extract_scalar('delivery', ['currency'], ['currency']) }} as currency, - {{ json_extract_scalar('delivery', ['courierName'], ['courierName']) }} as couriername, - {{ json_extract_scalar('delivery', ['serviceCode'], ['serviceCode']) }} as servicecode, - {{ json_extract_scalar('delivery', ['serviceName'], ['serviceName']) }} as servicename, - {{ json_extract_scalar('delivery', ['deliveryCode'], ['deliveryCode']) }} as deliverycode, - {{ json_extract_scalar('delivery', ['maxDeliveryDays'], ['maxDeliveryDays']) }} as maxdeliverydays, - {{ json_extract_scalar('delivery', ['minDeliveryDays'], ['minDeliveryDays']) }} as mindeliverydays, - {{ json_extract_scalar('delivery', ['estimateTimeDelivery'], ['estimateTimeDelivery']) }} as estimatetimedelivery, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_deliveries') }} as table_alias --- delivery at order-deliveries/delivery -where 1 = 1 -and delivery is not null - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_ab2.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_ab2.sql deleted file mode 100644 index 8713e30..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_ab2.sql +++ /dev/null @@ -1,29 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('order_deliveries_delivery_ab1') }} -select - _airbyte_order_deliveries_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(fee as {{ dbt_utils.type_float() }}) as fee, - cast({{ adapter.quote('desc') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('desc') }}, - cast(note as {{ dbt_utils.type_string() }}) as note, - cast(feeship as {{ type_json() }}) as feeship, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - cast(couriername as {{ dbt_utils.type_string() }}) as couriername, - cast(servicecode as {{ dbt_utils.type_string() }}) as servicecode, - cast(servicename as {{ dbt_utils.type_string() }}) as servicename, - cast(deliverycode as {{ dbt_utils.type_string() }}) as deliverycode, - cast(maxdeliverydays as {{ dbt_utils.type_float() }}) as maxdeliverydays, - cast(mindeliverydays as {{ dbt_utils.type_float() }}) as mindeliverydays, - cast(estimatetimedelivery as {{ dbt_utils.type_string() }}) as estimatetimedelivery, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_deliveries_delivery_ab1') }} --- delivery at order-deliveries/delivery -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_ab3.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_ab3.sql deleted file mode 100644 index 456914c..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_ab3.sql +++ /dev/null @@ -1,29 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('order_deliveries_delivery_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_order_deliveries_hashid', - '_id', - 'fee', - adapter.quote('desc'), - 'note', - object_to_string('feeship'), - 'currency', - 'couriername', - 'servicecode', - 'servicename', - 'deliverycode', - 'maxdeliverydays', - 'mindeliverydays', - 'estimatetimedelivery', - ]) }} as _airbyte_delivery_hashid, - tmp.* -from {{ ref('order_deliveries_delivery_ab2') }} tmp --- delivery at order-deliveries/delivery -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_feeship_ab1.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_feeship_ab1.sql deleted file mode 100644 index 2aab24c..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_feeship_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('order_deliveries_delivery') }} -select - _airbyte_delivery_hashid, - {{ json_extract_scalar('feeship', ['cod'], ['cod']) }} as cod, - {{ json_extract_scalar('feeship', ['total'], ['total']) }} as total, - {{ json_extract_scalar('feeship', ['shipping'], ['shipping']) }} as shipping, - {{ json_extract_scalar('feeship', ['insurance'], ['insurance']) }} as insurance, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_deliveries_delivery') }} as table_alias --- feeship at order-deliveries/delivery/feeShip -where 1 = 1 -and feeship is not null - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_feeship_ab2.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_feeship_ab2.sql deleted file mode 100644 index 8d12697..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_feeship_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('order_deliveries_delivery_feeship_ab1') }} -select - _airbyte_delivery_hashid, - cast(cod as {{ dbt_utils.type_float() }}) as cod, - cast(total as {{ dbt_utils.type_float() }}) as total, - cast(shipping as {{ dbt_utils.type_float() }}) as shipping, - cast(insurance as {{ dbt_utils.type_float() }}) as insurance, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_deliveries_delivery_feeship_ab1') }} --- feeship at order-deliveries/delivery/feeShip -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_feeship_ab3.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_feeship_ab3.sql deleted file mode 100644 index 2decc78..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_delivery_feeship_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('order_deliveries_delivery_feeship_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_delivery_hashid', - 'cod', - 'total', - 'shipping', - 'insurance', - ]) }} as _airbyte_feeship_hashid, - tmp.* -from {{ ref('order_deliveries_delivery_feeship_ab2') }} tmp --- feeship at order-deliveries/delivery/feeShip -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_location_ab1.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_location_ab1.sql deleted file mode 100644 index 788bd8d..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_location_ab1.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('order_deliveries') }} -select - _airbyte_order_deliveries_hashid, - {{ json_extract_scalar(adapter.quote('location'), ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar(adapter.quote('location'), ['ward'], ['ward']) }} as ward, - {{ json_extract_scalar(adapter.quote('location'), ['address'], ['address']) }} as address, - {{ json_extract_scalar(adapter.quote('location'), ['district'], ['district']) }} as district, - {{ json_extract_scalar(adapter.quote('location'), ['province'], ['province']) }} as province, - {{ json_extract_scalar(adapter.quote('location'), ['fullAddress'], ['fullAddress']) }} as fulladdress, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_deliveries') }} as table_alias --- location at order-deliveries/location -where 1 = 1 -and {{ adapter.quote('location') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_location_ab2.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_location_ab2.sql deleted file mode 100644 index 88b2abe..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_location_ab2.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('order_deliveries_location_ab1') }} -select - _airbyte_order_deliveries_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(ward as {{ dbt_utils.type_float() }}) as ward, - cast(address as {{ dbt_utils.type_string() }}) as address, - cast(district as {{ dbt_utils.type_float() }}) as district, - cast(province as {{ dbt_utils.type_float() }}) as province, - cast(fulladdress as {{ dbt_utils.type_string() }}) as fulladdress, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_deliveries_location_ab1') }} --- location at order-deliveries/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_location_ab3.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_location_ab3.sql deleted file mode 100644 index 66fa515..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_location_ab3.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('order_deliveries_location_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_order_deliveries_hashid', - '_id', - 'ward', - 'address', - 'district', - 'province', - 'fulladdress', - ]) }} as _airbyte_location_hashid, - tmp.* -from {{ ref('order_deliveries_location_ab2') }} tmp --- location at order-deliveries/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_promotion_ab1.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_promotion_ab1.sql deleted file mode 100644 index f9d295d..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_promotion_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('order_deliveries') }} -select - _airbyte_order_deliveries_hashid, - {{ json_extract_scalar('promotion', ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_scalar('promotion', ['discount'], ['discount']) }} as discount, - {{ json_extract_scalar('promotion', ['isApplied'], ['isApplied']) }} as isapplied, - {{ json_extract_scalar('promotion', ['minOrderValue'], ['minOrderValue']) }} as minordervalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_deliveries') }} as table_alias --- promotion at order-deliveries/promotion -where 1 = 1 -and promotion is not null - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_promotion_ab2.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_promotion_ab2.sql deleted file mode 100644 index 5c52fc2..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_promotion_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('order_deliveries_promotion_ab1') }} -select - _airbyte_order_deliveries_hashid, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - cast(discount as {{ dbt_utils.type_float() }}) as discount, - {{ cast_to_boolean('isapplied') }} as isapplied, - cast(minordervalue as {{ dbt_utils.type_float() }}) as minordervalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_deliveries_promotion_ab1') }} --- promotion at order-deliveries/promotion -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_promotion_ab3.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_promotion_ab3.sql deleted file mode 100644 index a43ed0a..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_promotion_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('order_deliveries_promotion_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_order_deliveries_hashid', - adapter.quote('type'), - 'discount', - boolean_to_string('isapplied'), - 'minordervalue', - ]) }} as _airbyte_promotion_hashid, - tmp.* -from {{ ref('order_deliveries_promotion_ab2') }} tmp --- promotion at order-deliveries/promotion -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_trackingtime_ab1.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_trackingtime_ab1.sql deleted file mode 100644 index ff13473..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_trackingtime_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('order_deliveries') }} -select - _airbyte_order_deliveries_hashid, - {{ json_extract_scalar('trackingtime', ['pickedAt'], ['pickedAt']) }} as pickedat, - {{ json_extract_scalar('trackingtime', ['completedAt'], ['completedAt']) }} as completedat, - {{ json_extract_scalar('trackingtime', ['deliveringAt'], ['deliveringAt']) }} as deliveringat, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_deliveries') }} as table_alias --- trackingtime at order-deliveries/trackingTime -where 1 = 1 -and trackingtime is not null - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_trackingtime_ab2.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_trackingtime_ab2.sql deleted file mode 100644 index 3c4fd27..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_trackingtime_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('order_deliveries_trackingtime_ab1') }} -select - _airbyte_order_deliveries_hashid, - cast(pickedat as {{ dbt_utils.type_string() }}) as pickedat, - cast(completedat as {{ dbt_utils.type_string() }}) as completedat, - cast(deliveringat as {{ dbt_utils.type_string() }}) as deliveringat, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_deliveries_trackingtime_ab1') }} --- trackingtime at order-deliveries/trackingTime -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_trackingtime_ab3.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_trackingtime_ab3.sql deleted file mode 100644 index a19abe2..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_trackingtime_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('order_deliveries_trackingtime_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_order_deliveries_hashid', - 'pickedat', - 'completedat', - 'deliveringat', - ]) }} as _airbyte_trackingtime_hashid, - tmp.* -from {{ ref('order_deliveries_trackingtime_ab2') }} tmp --- trackingtime at order-deliveries/trackingTime -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_weight_ab1.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_weight_ab1.sql deleted file mode 100644 index 9549913..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_weight_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('order_deliveries') }} -select - _airbyte_order_deliveries_hashid, - {{ json_extract_scalar('weight', ['real'], ['real']) }} as {{ adapter.quote('real') }}, - {{ json_extract_scalar('weight', ['sent'], ['sent']) }} as sent, - {{ json_extract_scalar('weight', ['converted'], ['converted']) }} as converted, - {{ json_extract_scalar('weight', ['multiplier'], ['multiplier']) }} as multiplier, - {{ json_extract_scalar('weight', ['convertedWithMultiplier'], ['convertedWithMultiplier']) }} as convertedwithmultiplier, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_deliveries') }} as table_alias --- weight at order-deliveries/weight -where 1 = 1 -and weight is not null - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_weight_ab2.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_weight_ab2.sql deleted file mode 100644 index 6d895f8..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_weight_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('order_deliveries_weight_ab1') }} -select - _airbyte_order_deliveries_hashid, - cast({{ adapter.quote('real') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('real') }}, - cast(sent as {{ dbt_utils.type_float() }}) as sent, - cast(converted as {{ dbt_utils.type_float() }}) as converted, - cast(multiplier as {{ dbt_utils.type_float() }}) as multiplier, - cast(convertedwithmultiplier as {{ dbt_utils.type_float() }}) as convertedwithmultiplier, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_deliveries_weight_ab1') }} --- weight at order-deliveries/weight -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_deliveries_weight_ab3.sql b/models/generated/airbyte_ctes/unibag/order_deliveries_weight_ab3.sql deleted file mode 100644 index 1e88585..0000000 --- a/models/generated/airbyte_ctes/unibag/order_deliveries_weight_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('order_deliveries_weight_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_order_deliveries_hashid', - adapter.quote('real'), - 'sent', - 'converted', - 'multiplier', - 'convertedwithmultiplier', - ]) }} as _airbyte_weight_hashid, - tmp.* -from {{ ref('order_deliveries_weight_ab2') }} tmp --- weight at order-deliveries/weight -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 index 551977b..a29935e 100644 --- a/models/generated/airbyte_ctes/unibag/order_histories_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/order_histories_ab1.sql @@ -11,7 +11,7 @@ select {{ 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', ['timestamp'], ['timestamp']) }} as {{ adapter.quote('timestamp') }}, {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, _airbyte_ab_id, _airbyte_emitted_at, diff --git a/models/generated/airbyte_ctes/unibag/order_histories_ab2.sql b/models/generated/airbyte_ctes/unibag/order_histories_ab2.sql index 0910e61..6829844 100644 --- a/models/generated/airbyte_ctes/unibag/order_histories_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/order_histories_ab2.sql @@ -11,7 +11,7 @@ select 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({{ 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, diff --git a/models/generated/airbyte_ctes/unibag/order_histories_ab3.sql b/models/generated/airbyte_ctes/unibag/order_histories_ab3.sql index 417d252..1f63e99 100644 --- a/models/generated/airbyte_ctes/unibag/order_histories_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/order_histories_ab3.sql @@ -12,7 +12,7 @@ select adapter.quote('order'), 'status', 'createdat', - adapter.quote('timeStamp'), + adapter.quote('timestamp'), 'updatedat', ]) }} as _airbyte_order_histories_hashid, tmp.* diff --git a/models/generated/airbyte_ctes/unibag/order_items_ab1.sql b/models/generated/airbyte_ctes/unibag/order_items_ab1.sql index ff5774f..bc10213 100644 --- a/models/generated/airbyte_ctes/unibag/order_items_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/order_items_ab1.sql @@ -8,21 +8,34 @@ -- depends_on: {{ source('unibag', '_airbyte_raw_order_items') }} select {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract('table_alias', '_airbyte_data', ['sku'], ['sku']) }} as sku, + {{ 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('table_alias', '_airbyte_data', ['price'], ['price']) }} as price, + {{ 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 diff --git a/models/generated/airbyte_ctes/unibag/order_items_ab2.sql b/models/generated/airbyte_ctes/unibag/order_items_ab2.sql index a6a1415..441ca5c 100644 --- a/models/generated/airbyte_ctes/unibag/order_items_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/order_items_ab2.sql @@ -8,21 +8,34 @@ -- depends_on: {{ ref('order_items_ab1') }} select cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(sku as {{ type_json() }}) as sku, + 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 {{ type_json() }}) as price, + 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 diff --git a/models/generated/airbyte_ctes/unibag/order_items_ab3.sql b/models/generated/airbyte_ctes/unibag/order_items_ab3.sql index b1e5ac3..2f34c0b 100644 --- a/models/generated/airbyte_ctes/unibag/order_items_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/order_items_ab3.sql @@ -9,21 +9,34 @@ select {{ dbt_utils.surrogate_key([ '_id', - object_to_string('sku'), + 'sku', adapter.quote('date'), adapter.quote('user'), + 'brand', adapter.quote('order'), - object_to_string('price'), + '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 diff --git a/models/generated/airbyte_ctes/unibag/order_items_price_ab1.sql b/models/generated/airbyte_ctes/unibag/order_items_price_ab1.sql deleted file mode 100644 index ef704b0..0000000 --- a/models/generated/airbyte_ctes/unibag/order_items_price_ab1.sql +++ /dev/null @@ -1,29 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('order_items') }} -select - _airbyte_order_items_hashid, - {{ json_extract_scalar('price', ['base'], ['base']) }} as base, - {{ json_extract_scalar('price', ['sell'], ['sell']) }} as sell, - {{ json_extract_scalar('price', ['market'], ['market']) }} as market, - {{ json_extract_scalar('price', ['profit'], ['profit']) }} as profit, - {{ json_extract_scalar('price', ['volume'], ['volume']) }} as volume, - {{ json_extract_scalar('price', ['weight'], ['weight']) }} as weight, - {{ json_extract_scalar('price', ['maximum'], ['maximum']) }} as maximum, - {{ json_extract_scalar('price', ['minimum'], ['minimum']) }} as minimum, - {{ json_extract_scalar('price', ['profitUni'], ['profitUni']) }} as profituni, - {{ json_extract_scalar('price', ['supplierPrice'], ['supplierPrice']) }} as supplierprice, - {{ json_extract_scalar('price', ['membershipPercent'], ['membershipPercent']) }} as membershippercent, - {{ json_extract_scalar('price', ['membershipCommission'], ['membershipCommission']) }} as membershipcommission, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_items') }} as table_alias --- price at order-items/price -where 1 = 1 -and price is not null - diff --git a/models/generated/airbyte_ctes/unibag/order_items_price_ab2.sql b/models/generated/airbyte_ctes/unibag/order_items_price_ab2.sql deleted file mode 100644 index 196f127..0000000 --- a/models/generated/airbyte_ctes/unibag/order_items_price_ab2.sql +++ /dev/null @@ -1,28 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('order_items_price_ab1') }} -select - _airbyte_order_items_hashid, - cast(base as {{ dbt_utils.type_float() }}) as base, - cast(sell as {{ dbt_utils.type_float() }}) as sell, - cast(market as {{ dbt_utils.type_float() }}) as market, - cast(profit as {{ dbt_utils.type_float() }}) as profit, - cast(volume as {{ dbt_utils.type_string() }}) as volume, - cast(weight as {{ dbt_utils.type_float() }}) as weight, - cast(maximum as {{ dbt_utils.type_float() }}) as maximum, - cast(minimum as {{ dbt_utils.type_float() }}) as minimum, - cast(profituni as {{ dbt_utils.type_float() }}) as profituni, - cast(supplierprice as {{ dbt_utils.type_float() }}) as supplierprice, - cast(membershippercent as {{ dbt_utils.type_float() }}) as membershippercent, - cast(membershipcommission as {{ dbt_utils.type_float() }}) as membershipcommission, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_items_price_ab1') }} --- price at order-items/price -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_items_price_ab3.sql b/models/generated/airbyte_ctes/unibag/order_items_price_ab3.sql deleted file mode 100644 index bcd93a2..0000000 --- a/models/generated/airbyte_ctes/unibag/order_items_price_ab3.sql +++ /dev/null @@ -1,28 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('order_items_price_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_order_items_hashid', - 'base', - 'sell', - 'market', - 'profit', - 'volume', - 'weight', - 'maximum', - 'minimum', - 'profituni', - 'supplierprice', - 'membershippercent', - 'membershipcommission', - ]) }} as _airbyte_price_hashid, - tmp.* -from {{ ref('order_items_price_ab2') }} tmp --- price at order-items/price -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_items_sku_ab1.sql b/models/generated/airbyte_ctes/unibag/order_items_sku_ab1.sql deleted file mode 100644 index 1b51427..0000000 --- a/models/generated/airbyte_ctes/unibag/order_items_sku_ab1.sql +++ /dev/null @@ -1,25 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('order_items') }} -select - _airbyte_order_items_hashid, - {{ json_extract_scalar('sku', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('sku', ['sku'], ['sku']) }} as sku, - {{ json_extract_scalar('sku', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('sku', ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_scalar('sku', ['source'], ['source']) }} as {{ adapter.quote('source') }}, - {{ json_extract_scalar('sku', ['picture'], ['picture']) }} as picture, - {{ json_extract_scalar('sku', ['version'], ['version']) }} as {{ adapter.quote('version') }}, - {{ json_extract_array('sku', ['properties'], ['properties']) }} as properties, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_items') }} as table_alias --- sku at order-items/sku -where 1 = 1 -and sku is not null - diff --git a/models/generated/airbyte_ctes/unibag/order_items_sku_ab2.sql b/models/generated/airbyte_ctes/unibag/order_items_sku_ab2.sql deleted file mode 100644 index 87c99d9..0000000 --- a/models/generated/airbyte_ctes/unibag/order_items_sku_ab2.sql +++ /dev/null @@ -1,24 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('order_items_sku_ab1') }} -select - _airbyte_order_items_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(sku as {{ dbt_utils.type_string() }}) as sku, - 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({{ adapter.quote('source') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('source') }}, - cast(picture as {{ dbt_utils.type_string() }}) as picture, - cast({{ adapter.quote('version') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('version') }}, - properties, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('order_items_sku_ab1') }} --- sku at order-items/sku -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/order_items_sku_ab3.sql b/models/generated/airbyte_ctes/unibag/order_items_sku_ab3.sql deleted file mode 100644 index 99ef8db..0000000 --- a/models/generated/airbyte_ctes/unibag/order_items_sku_ab3.sql +++ /dev/null @@ -1,24 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('order_items_sku_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_order_items_hashid', - '_id', - 'sku', - adapter.quote('name'), - adapter.quote('type'), - adapter.quote('source'), - 'picture', - adapter.quote('version'), - array_to_string('properties'), - ]) }} as _airbyte_sku_hashid, - tmp.* -from {{ ref('order_items_sku_ab2') }} tmp --- sku at order-items/sku -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_ab1.sql b/models/generated/airbyte_ctes/unibag/orders_ab1.sql index b44b9f8..a4896c8 100644 --- a/models/generated/airbyte_ctes/unibag/orders_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/orders_ab1.sql @@ -12,54 +12,59 @@ select {{ 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', ['skus'], ['skus']) }} as skus, {{ json_extract_array('_airbyte_data', ['tags'], ['tags']) }} as tags, {{ json_extract_scalar('_airbyte_data', ['user'], ['user']) }} as {{ adapter.quote('user') }}, - {{ json_extract('table_alias', '_airbyte_data', ['price'], ['price']) }} as price, + {{ 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', ['update'], ['update']) }} as {{ adapter.quote('update') }}, - {{ json_extract('table_alias', '_airbyte_data', ['payment'], ['payment']) }} as payment, + {{ 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('table_alias', '_airbyte_data', ['delivery'], ['delivery']) }} as delivery, + {{ 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_array('_airbyte_data', ['products'], ['products']) }} as products, - {{ json_extract('table_alias', '_airbyte_data', ['supplier'], ['supplier']) }} as supplier, - {{ json_extract_scalar('_airbyte_data', ['approveAt'], ['approveAt']) }} as approveat, + {{ json_extract_scalar('_airbyte_data', ['supplier'], ['supplier']) }} as supplier, {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract('table_alias', '_airbyte_data', ['inventory'], ['inventory']) }} as inventory, + {{ 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('table_alias', '_airbyte_data', ['promotion'], ['promotion']) }} as promotion, + {{ json_extract_scalar('_airbyte_data', ['promotion'], ['promotion']) }} as promotion, {{ json_extract_scalar('_airbyte_data', ['requestId'], ['requestId']) }} as requestid, - {{ json_extract('table_alias', '_airbyte_data', ['sendEmail'], ['sendEmail']) }} as sendemail, + {{ 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('table_alias', '_airbyte_data', ['userAgent'], ['userAgent']) }} as useragent, + {{ 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', ['codeOsiris'], ['codeOsiris']) }} as codeosiris, {{ json_extract_scalar('_airbyte_data', ['isPreorder'], ['isPreorder']) }} as ispreorder, - {{ json_extract_scalar('_airbyte_data', ['membership'], ['membership']) }} as membership, + {{ 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', ['trackingCode'], ['trackingCode']) }} as trackingcode, + {{ 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', ['approvePaymentAt'], ['approvePaymentAt']) }} as approvepaymentat, + {{ 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', ['trackingOrderCode'], ['trackingOrderCode']) }} as trackingordercode, {{ 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 diff --git a/models/generated/airbyte_ctes/unibag/orders_ab2.sql b/models/generated/airbyte_ctes/unibag/orders_ab2.sql index 3f36ad2..1435977 100644 --- a/models/generated/airbyte_ctes/unibag/orders_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/orders_ab2.sql @@ -12,54 +12,59 @@ select 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, - skus, tags, cast({{ adapter.quote('user') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('user') }}, - cast(price as {{ type_json() }}) as price, + 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({{ adapter.quote('update') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('update') }}, - cast(payment as {{ type_json() }}) as payment, + 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 {{ type_json() }}) as delivery, + 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, - products, - cast(supplier as {{ type_json() }}) as supplier, - cast(approveat as {{ dbt_utils.type_string() }}) as approveat, + cast(supplier as {{ dbt_utils.type_string() }}) as supplier, cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(inventory as {{ type_json() }}) as inventory, + 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 {{ type_json() }}) as promotion, + cast(promotion as {{ dbt_utils.type_string() }}) as promotion, cast(requestid as {{ dbt_utils.type_string() }}) as requestid, - cast(sendemail as {{ type_json() }}) as sendemail, + 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 {{ type_json() }}) as useragent, + 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(codeosiris as {{ dbt_utils.type_string() }}) as codeosiris, {{ cast_to_boolean('ispreorder') }} as ispreorder, - cast(membership as {{ dbt_utils.type_string() }}) as membership, + {{ 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(trackingcode as {{ dbt_utils.type_string() }}) as trackingcode, + 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(approvepaymentat as {{ dbt_utils.type_string() }}) as approvepaymentat, + 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(trackingordercode as {{ dbt_utils.type_string() }}) as trackingordercode, 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 diff --git a/models/generated/airbyte_ctes/unibag/orders_ab3.sql b/models/generated/airbyte_ctes/unibag/orders_ab3.sql index 1d40234..c222dbd 100644 --- a/models/generated/airbyte_ctes/unibag/orders_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/orders_ab3.sql @@ -13,54 +13,59 @@ select adapter.quote('date'), adapter.quote('hour'), 'note', - array_to_string('skus'), array_to_string('tags'), adapter.quote('user'), - object_to_string('price'), + 'price', boolean_to_string('banned'), 'reason', adapter.quote('source'), 'status', - adapter.quote('update'), - object_to_string('payment'), + 'teamid', + 'payment', 'remarks', 'customer', - object_to_string('delivery'), + 'delivery', + boolean_to_string('iscalled'), + 'merchant', 'pickupat', - array_to_string('products'), - object_to_string('supplier'), - 'approveat', + 'supplier', 'createdat', - object_to_string('inventory'), + 'inventory', + 'invoiceid', boolean_to_string('isdeleted'), - object_to_string('promotion'), + 'promotion', 'requestid', - object_to_string('sendemail'), + 'restockat', + 'sendemail', 'totalitem', 'updatedat', - object_to_string('useragent'), + 'useragent', boolean_to_string('wholesale'), 'approvedat', 'cashbackat', - 'codeosiris', boolean_to_string('ispreorder'), - 'membership', + boolean_to_string('isreviewed'), 'rejectedat', 'deliveredat', 'deliveringat', 'deliverycode', 'searchstring', 'staffapprove', - 'trackingcode', + 'teammemberid', 'processstatus', 'hooktimelastat', + boolean_to_string('isassigncoupon'), + boolean_to_string('isautoapproved'), + 'outboundrequest', 'trackingcodeurl', - 'approvepaymentat', + 'trackingcode', + 'waitingcancelby', boolean_to_string('ischangedelivery'), - 'trackingordercode', 'estimatecashbackat', + boolean_to_string('fromnewactivebuyer'), boolean_to_string('iswaitingcancelled'), boolean_to_string('fromnewactiveseller'), + 'waitingcancelreason', ]) }} as _airbyte_orders_hashid, tmp.* from {{ ref('orders_ab2') }} tmp diff --git a/models/generated/airbyte_ctes/unibag/orders_delivery_ab1.sql b/models/generated/airbyte_ctes/unibag/orders_delivery_ab1.sql deleted file mode 100644 index 3d68a4c..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_delivery_ab1.sql +++ /dev/null @@ -1,40 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('orders') }} -select - _airbyte_orders_hashid, - {{ json_extract_scalar('delivery', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('delivery', ['fee'], ['fee']) }} as fee, - {{ json_extract_scalar('delivery', ['code'], ['code']) }} as code, - {{ json_extract_scalar('delivery', ['note'], ['note']) }} as note, - {{ json_extract_scalar('delivery', ['title'], ['title']) }} as title, - {{ json_extract_scalar('delivery', ['status'], ['status']) }} as status, - {{ json_extract('table_alias', 'delivery', ['weight'], ['weight']) }} as weight, - {{ json_extract('table_alias', 'delivery', ['feeShip'], ['feeShip']) }} as feeship, - {{ json_extract_scalar('delivery', ['currency'], ['currency']) }} as currency, - {{ json_extract_scalar('delivery', ['freeShip'], ['freeShip']) }} as freeship, - {{ json_extract('table_alias', 'delivery', ['location'], ['location']) }} as {{ adapter.quote('location') }}, - {{ json_extract_scalar('delivery', ['sourceId'], ['sourceId']) }} as sourceid, - {{ json_extract_scalar('delivery', ['courierName'], ['courierName']) }} as couriername, - {{ json_extract_scalar('delivery', ['serviceCode'], ['serviceCode']) }} as servicecode, - {{ json_extract_scalar('delivery', ['serviceName'], ['serviceName']) }} as servicename, - {{ json_extract_scalar('delivery', ['customerName'], ['customerName']) }} as customername, - {{ json_extract_scalar('delivery', ['customerPhone'], ['customerPhone']) }} as customerphone, - {{ json_extract_scalar('delivery', ['discountValue'], ['discountValue']) }} as discountvalue, - {{ json_extract_scalar('delivery', ['serviceDelivery'], ['serviceDelivery']) }} as servicedelivery, - {{ json_extract_scalar('delivery', ['estimateDeliveryAt'], ['estimateDeliveryAt']) }} as estimatedeliveryat, - {{ json_extract_scalar('delivery', ['estimateTimeDelivery'], ['estimateTimeDelivery']) }} as estimatetimedelivery, - {{ json_extract_scalar('delivery', ['maxDeliveryDay_aibyte_transform'], ['maxDeliveryDay_aibyte_transform']) }} as maxdeliveryday_aibyte_transform, - {{ json_extract_scalar('delivery', ['minDeliveryDay_aibyte_transform'], ['minDeliveryDay_aibyte_transform']) }} as mindeliveryday_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders') }} as table_alias --- delivery at orders/delivery -where 1 = 1 -and delivery is not null - diff --git a/models/generated/airbyte_ctes/unibag/orders_delivery_ab2.sql b/models/generated/airbyte_ctes/unibag/orders_delivery_ab2.sql deleted file mode 100644 index ef9fea6..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_delivery_ab2.sql +++ /dev/null @@ -1,39 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('orders_delivery_ab1') }} -select - _airbyte_orders_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(fee as {{ dbt_utils.type_float() }}) as fee, - cast(code as {{ dbt_utils.type_string() }}) as code, - cast(note as {{ dbt_utils.type_string() }}) as note, - cast(title as {{ dbt_utils.type_string() }}) as title, - cast(status as {{ dbt_utils.type_string() }}) as status, - cast(weight as {{ type_json() }}) as weight, - cast(feeship as {{ type_json() }}) as feeship, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - {{ cast_to_boolean('freeship') }} as freeship, - cast({{ adapter.quote('location') }} as {{ type_json() }}) as {{ adapter.quote('location') }}, - cast(sourceid as {{ dbt_utils.type_float() }}) as sourceid, - cast(couriername as {{ dbt_utils.type_string() }}) as couriername, - cast(servicecode as {{ dbt_utils.type_string() }}) as servicecode, - cast(servicename as {{ dbt_utils.type_string() }}) as servicename, - cast(customername as {{ dbt_utils.type_string() }}) as customername, - cast(customerphone as {{ dbt_utils.type_string() }}) as customerphone, - cast(discountvalue as {{ dbt_utils.type_float() }}) as discountvalue, - cast(servicedelivery as {{ dbt_utils.type_string() }}) as servicedelivery, - cast(estimatedeliveryat as {{ dbt_utils.type_string() }}) as estimatedeliveryat, - cast(estimatetimedelivery as {{ dbt_utils.type_string() }}) as estimatetimedelivery, - cast(maxdeliveryday_aibyte_transform as {{ dbt_utils.type_string() }}) as maxdeliveryday_aibyte_transform, - cast(mindeliveryday_aibyte_transform as {{ dbt_utils.type_string() }}) as mindeliveryday_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders_delivery_ab1') }} --- delivery at orders/delivery -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_delivery_ab3.sql b/models/generated/airbyte_ctes/unibag/orders_delivery_ab3.sql deleted file mode 100644 index 2e4d9f0..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_delivery_ab3.sql +++ /dev/null @@ -1,39 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('orders_delivery_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_orders_hashid', - '_id', - 'fee', - 'code', - 'note', - 'title', - 'status', - object_to_string('weight'), - object_to_string('feeship'), - 'currency', - boolean_to_string('freeship'), - object_to_string(adapter.quote('location')), - 'sourceid', - 'couriername', - 'servicecode', - 'servicename', - 'customername', - 'customerphone', - 'discountvalue', - 'servicedelivery', - 'estimatedeliveryat', - 'estimatetimedelivery', - 'maxdeliveryday_aibyte_transform', - 'mindeliveryday_aibyte_transform', - ]) }} as _airbyte_delivery_hashid, - tmp.* -from {{ ref('orders_delivery_ab2') }} tmp --- delivery at orders/delivery -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_delivery_feeship_ab1.sql b/models/generated/airbyte_ctes/unibag/orders_delivery_feeship_ab1.sql deleted file mode 100644 index 799a1d4..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_delivery_feeship_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('orders_delivery') }} -select - _airbyte_delivery_hashid, - {{ json_extract_scalar('feeship', ['cod'], ['cod']) }} as cod, - {{ json_extract_scalar('feeship', ['total'], ['total']) }} as total, - {{ json_extract_scalar('feeship', ['shipping'], ['shipping']) }} as shipping, - {{ json_extract_scalar('feeship', ['insurance'], ['insurance']) }} as insurance, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders_delivery') }} as table_alias --- feeship at orders/delivery/feeShip -where 1 = 1 -and feeship is not null - diff --git a/models/generated/airbyte_ctes/unibag/orders_delivery_feeship_ab2.sql b/models/generated/airbyte_ctes/unibag/orders_delivery_feeship_ab2.sql deleted file mode 100644 index 0c7a645..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_delivery_feeship_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('orders_delivery_feeship_ab1') }} -select - _airbyte_delivery_hashid, - cast(cod as {{ dbt_utils.type_float() }}) as cod, - cast(total as {{ dbt_utils.type_float() }}) as total, - cast(shipping as {{ dbt_utils.type_float() }}) as shipping, - cast(insurance as {{ dbt_utils.type_float() }}) as insurance, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders_delivery_feeship_ab1') }} --- feeship at orders/delivery/feeShip -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_delivery_feeship_ab3.sql b/models/generated/airbyte_ctes/unibag/orders_delivery_feeship_ab3.sql deleted file mode 100644 index 1a36d22..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_delivery_feeship_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('orders_delivery_feeship_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_delivery_hashid', - 'cod', - 'total', - 'shipping', - 'insurance', - ]) }} as _airbyte_feeship_hashid, - tmp.* -from {{ ref('orders_delivery_feeship_ab2') }} tmp --- feeship at orders/delivery/feeShip -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_delivery_location_ab1.sql b/models/generated/airbyte_ctes/unibag/orders_delivery_location_ab1.sql deleted file mode 100644 index 5e877d7..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_delivery_location_ab1.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('orders_delivery') }} -select - _airbyte_delivery_hashid, - {{ json_extract_scalar(adapter.quote('location'), ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar(adapter.quote('location'), ['ward'], ['ward']) }} as ward, - {{ json_extract_scalar(adapter.quote('location'), ['address'], ['address']) }} as address, - {{ json_extract_scalar(adapter.quote('location'), ['district'], ['district']) }} as district, - {{ json_extract_scalar(adapter.quote('location'), ['province'], ['province']) }} as province, - {{ json_extract_scalar(adapter.quote('location'), ['fullAddress'], ['fullAddress']) }} as fulladdress, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders_delivery') }} as table_alias --- location at orders/delivery/location -where 1 = 1 -and {{ adapter.quote('location') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/orders_delivery_location_ab2.sql b/models/generated/airbyte_ctes/unibag/orders_delivery_location_ab2.sql deleted file mode 100644 index b9475c1..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_delivery_location_ab2.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('orders_delivery_location_ab1') }} -select - _airbyte_delivery_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(ward as {{ dbt_utils.type_float() }}) as ward, - cast(address as {{ dbt_utils.type_string() }}) as address, - cast(district as {{ dbt_utils.type_float() }}) as district, - cast(province as {{ dbt_utils.type_float() }}) as province, - cast(fulladdress as {{ dbt_utils.type_string() }}) as fulladdress, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders_delivery_location_ab1') }} --- location at orders/delivery/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_delivery_location_ab3.sql b/models/generated/airbyte_ctes/unibag/orders_delivery_location_ab3.sql deleted file mode 100644 index 5ff7a3f..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_delivery_location_ab3.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('orders_delivery_location_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_delivery_hashid', - '_id', - 'ward', - 'address', - 'district', - 'province', - 'fulladdress', - ]) }} as _airbyte_location_hashid, - tmp.* -from {{ ref('orders_delivery_location_ab2') }} tmp --- location at orders/delivery/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_delivery_weight_ab1.sql b/models/generated/airbyte_ctes/unibag/orders_delivery_weight_ab1.sql deleted file mode 100644 index 06ed5cf..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_delivery_weight_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('orders_delivery') }} -select - _airbyte_delivery_hashid, - {{ json_extract_scalar('weight', ['real'], ['real']) }} as {{ adapter.quote('real') }}, - {{ json_extract_scalar('weight', ['sent'], ['sent']) }} as sent, - {{ json_extract_scalar('weight', ['converted'], ['converted']) }} as converted, - {{ json_extract_scalar('weight', ['multiplier'], ['multiplier']) }} as multiplier, - {{ json_extract_scalar('weight', ['convertedWithMultiplier'], ['convertedWithMultiplier']) }} as convertedwithmultiplier, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders_delivery') }} as table_alias --- weight at orders/delivery/weight -where 1 = 1 -and weight is not null - diff --git a/models/generated/airbyte_ctes/unibag/orders_delivery_weight_ab2.sql b/models/generated/airbyte_ctes/unibag/orders_delivery_weight_ab2.sql deleted file mode 100644 index 7e993da..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_delivery_weight_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('orders_delivery_weight_ab1') }} -select - _airbyte_delivery_hashid, - cast({{ adapter.quote('real') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('real') }}, - cast(sent as {{ dbt_utils.type_float() }}) as sent, - cast(converted as {{ dbt_utils.type_float() }}) as converted, - cast(multiplier as {{ dbt_utils.type_float() }}) as multiplier, - cast(convertedwithmultiplier as {{ dbt_utils.type_float() }}) as convertedwithmultiplier, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders_delivery_weight_ab1') }} --- weight at orders/delivery/weight -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_delivery_weight_ab3.sql b/models/generated/airbyte_ctes/unibag/orders_delivery_weight_ab3.sql deleted file mode 100644 index 4cae173..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_delivery_weight_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('orders_delivery_weight_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_delivery_hashid', - adapter.quote('real'), - 'sent', - 'converted', - 'multiplier', - 'convertedwithmultiplier', - ]) }} as _airbyte_weight_hashid, - tmp.* -from {{ ref('orders_delivery_weight_ab2') }} tmp --- weight at orders/delivery/weight -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_inventory_ab1.sql b/models/generated/airbyte_ctes/unibag/orders_inventory_ab1.sql deleted file mode 100644 index 4656824..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_inventory_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('orders') }} -select - _airbyte_orders_hashid, - {{ json_extract_scalar('inventory', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('inventory', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('inventory', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('inventory', ['canIssueInvoice'], ['canIssueInvoice']) }} as canissueinvoice, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders') }} as table_alias --- inventory at orders/inventory -where 1 = 1 -and inventory is not null - diff --git a/models/generated/airbyte_ctes/unibag/orders_inventory_ab2.sql b/models/generated/airbyte_ctes/unibag/orders_inventory_ab2.sql deleted file mode 100644 index d75f00f..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_inventory_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('orders_inventory_ab1') }} -select - _airbyte_orders_hashid, - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('id') }}, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - {{ cast_to_boolean('canissueinvoice') }} as canissueinvoice, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders_inventory_ab1') }} --- inventory at orders/inventory -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_inventory_ab3.sql b/models/generated/airbyte_ctes/unibag/orders_inventory_ab3.sql deleted file mode 100644 index 22bb404..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_inventory_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('orders_inventory_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_orders_hashid', - adapter.quote('id'), - '_id', - adapter.quote('name'), - boolean_to_string('canissueinvoice'), - ]) }} as _airbyte_inventory_hashid, - tmp.* -from {{ ref('orders_inventory_ab2') }} tmp --- inventory at orders/inventory -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_payment_ab1.sql b/models/generated/airbyte_ctes/unibag/orders_payment_ab1.sql deleted file mode 100644 index ab82277..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_payment_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('orders') }} -select - _airbyte_orders_hashid, - {{ json_extract_scalar('payment', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('payment', ['method'], ['method']) }} as {{ adapter.quote('method') }}, - {{ json_extract_scalar('payment', ['status'], ['status']) }} as status, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders') }} as table_alias --- payment at orders/payment -where 1 = 1 -and payment is not null - diff --git a/models/generated/airbyte_ctes/unibag/orders_payment_ab2.sql b/models/generated/airbyte_ctes/unibag/orders_payment_ab2.sql deleted file mode 100644 index 0f69d3b..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_payment_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('orders_payment_ab1') }} -select - _airbyte_orders_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('method') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('method') }}, - cast(status as {{ dbt_utils.type_string() }}) as status, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders_payment_ab1') }} --- payment at orders/payment -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_payment_ab3.sql b/models/generated/airbyte_ctes/unibag/orders_payment_ab3.sql deleted file mode 100644 index 57e0452..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_payment_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('orders_payment_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_orders_hashid', - '_id', - adapter.quote('method'), - 'status', - ]) }} as _airbyte_payment_hashid, - tmp.* -from {{ ref('orders_payment_ab2') }} tmp --- payment at orders/payment -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_price_ab1.sql b/models/generated/airbyte_ctes/unibag/orders_price_ab1.sql deleted file mode 100644 index 8120d52..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_price_ab1.sql +++ /dev/null @@ -1,31 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('orders') }} -select - _airbyte_orders_hashid, - {{ json_extract_scalar('price', ['sell'], ['sell']) }} as sell, - {{ json_extract_scalar('price', ['total'], ['total']) }} as total, - {{ json_extract_scalar('price', ['market'], ['market']) }} as market, - {{ json_extract_scalar('price', ['weight'], ['weight']) }} as weight, - {{ json_extract_scalar('price', ['maximum'], ['maximum']) }} as maximum, - {{ json_extract_scalar('price', ['minimum'], ['minimum']) }} as minimum, - {{ json_extract_scalar('price', ['profitUni'], ['profitUni']) }} as profituni, - {{ json_extract_scalar('price', ['promotion'], ['promotion']) }} as promotion, - {{ json_extract_scalar('price', ['supplierPrice'], ['supplierPrice']) }} as supplierprice, - {{ json_extract_scalar('price', ['wholesaleBonus'], ['wholesaleBonus']) }} as wholesalebonus, - {{ json_extract_scalar('price', ['membershipPercent'], ['membershipPercent']) }} as membershippercent, - {{ json_extract_scalar('price', ['membershipCommission'], ['membershipCommission']) }} as membershipcommission, - {{ json_extract_scalar('price', ['base_aibyte_transform'], ['base_aibyte_transform']) }} as base_aibyte_transform, - {{ json_extract_scalar('price', ['profit_aibyte_transform'], ['profit_aibyte_transform']) }} as profit_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders') }} as table_alias --- price at orders/price -where 1 = 1 -and price is not null - diff --git a/models/generated/airbyte_ctes/unibag/orders_price_ab2.sql b/models/generated/airbyte_ctes/unibag/orders_price_ab2.sql deleted file mode 100644 index ba0500d..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_price_ab2.sql +++ /dev/null @@ -1,30 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('orders_price_ab1') }} -select - _airbyte_orders_hashid, - cast(sell as {{ dbt_utils.type_float() }}) as sell, - cast(total as {{ dbt_utils.type_float() }}) as total, - cast(market as {{ dbt_utils.type_float() }}) as market, - cast(weight as {{ dbt_utils.type_float() }}) as weight, - cast(maximum as {{ dbt_utils.type_float() }}) as maximum, - cast(minimum as {{ dbt_utils.type_float() }}) as minimum, - cast(profituni as {{ dbt_utils.type_float() }}) as profituni, - cast(promotion as {{ dbt_utils.type_float() }}) as promotion, - cast(supplierprice as {{ dbt_utils.type_float() }}) as supplierprice, - cast(wholesalebonus as {{ dbt_utils.type_float() }}) as wholesalebonus, - cast(membershippercent as {{ dbt_utils.type_float() }}) as membershippercent, - cast(membershipcommission as {{ dbt_utils.type_float() }}) as membershipcommission, - cast(base_aibyte_transform as {{ dbt_utils.type_string() }}) as base_aibyte_transform, - cast(profit_aibyte_transform as {{ dbt_utils.type_string() }}) as profit_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders_price_ab1') }} --- price at orders/price -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_price_ab3.sql b/models/generated/airbyte_ctes/unibag/orders_price_ab3.sql deleted file mode 100644 index 5225393..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_price_ab3.sql +++ /dev/null @@ -1,30 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('orders_price_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_orders_hashid', - 'sell', - 'total', - 'market', - 'weight', - 'maximum', - 'minimum', - 'profituni', - 'promotion', - 'supplierprice', - 'wholesalebonus', - 'membershippercent', - 'membershipcommission', - 'base_aibyte_transform', - 'profit_aibyte_transform', - ]) }} as _airbyte_price_hashid, - tmp.* -from {{ ref('orders_price_ab2') }} tmp --- price at orders/price -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_promotion_ab1.sql b/models/generated/airbyte_ctes/unibag/orders_promotion_ab1.sql deleted file mode 100644 index 303b17a..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_promotion_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('orders') }} -select - _airbyte_orders_hashid, - {{ json_extract_scalar('promotion', ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_scalar('promotion', ['discount'], ['discount']) }} as discount, - {{ json_extract_scalar('promotion', ['isApplied'], ['isApplied']) }} as isapplied, - {{ json_extract_scalar('promotion', ['minOrderValue'], ['minOrderValue']) }} as minordervalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders') }} as table_alias --- promotion at orders/promotion -where 1 = 1 -and promotion is not null - diff --git a/models/generated/airbyte_ctes/unibag/orders_promotion_ab2.sql b/models/generated/airbyte_ctes/unibag/orders_promotion_ab2.sql deleted file mode 100644 index 6836493..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_promotion_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('orders_promotion_ab1') }} -select - _airbyte_orders_hashid, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - cast(discount as {{ dbt_utils.type_float() }}) as discount, - {{ cast_to_boolean('isapplied') }} as isapplied, - cast(minordervalue as {{ dbt_utils.type_float() }}) as minordervalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders_promotion_ab1') }} --- promotion at orders/promotion -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_promotion_ab3.sql b/models/generated/airbyte_ctes/unibag/orders_promotion_ab3.sql deleted file mode 100644 index 80d8732..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_promotion_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('orders_promotion_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_orders_hashid', - adapter.quote('type'), - 'discount', - boolean_to_string('isapplied'), - 'minordervalue', - ]) }} as _airbyte_promotion_hashid, - tmp.* -from {{ ref('orders_promotion_ab2') }} tmp --- promotion at orders/promotion -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_sendemail_ab1.sql b/models/generated/airbyte_ctes/unibag/orders_sendemail_ab1.sql deleted file mode 100644 index d4cbe0a..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_sendemail_ab1.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('orders') }} -select - _airbyte_orders_hashid, - {{ json_extract_scalar('sendemail', ['status'], ['status']) }} as status, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders') }} as table_alias --- sendemail at orders/sendEmail -where 1 = 1 -and sendemail is not null - diff --git a/models/generated/airbyte_ctes/unibag/orders_sendemail_ab2.sql b/models/generated/airbyte_ctes/unibag/orders_sendemail_ab2.sql deleted file mode 100644 index dd99b65..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_sendemail_ab2.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('orders_sendemail_ab1') }} -select - _airbyte_orders_hashid, - cast(status as {{ dbt_utils.type_string() }}) as status, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders_sendemail_ab1') }} --- sendemail at orders/sendEmail -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_sendemail_ab3.sql b/models/generated/airbyte_ctes/unibag/orders_sendemail_ab3.sql deleted file mode 100644 index 97600ae..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_sendemail_ab3.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('orders_sendemail_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_orders_hashid', - 'status', - ]) }} as _airbyte_sendemail_hashid, - tmp.* -from {{ ref('orders_sendemail_ab2') }} tmp --- sendemail at orders/sendEmail -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_supplier_ab1.sql b/models/generated/airbyte_ctes/unibag/orders_supplier_ab1.sql deleted file mode 100644 index e251015..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_supplier_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('orders') }} -select - _airbyte_orders_hashid, - {{ json_extract_scalar('supplier', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('supplier', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('supplier', ['searchString'], ['searchString']) }} as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders') }} as table_alias --- supplier at orders/supplier -where 1 = 1 -and supplier is not null - diff --git a/models/generated/airbyte_ctes/unibag/orders_supplier_ab2.sql b/models/generated/airbyte_ctes/unibag/orders_supplier_ab2.sql deleted file mode 100644 index 49bde74..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_supplier_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('orders_supplier_ab1') }} -select - _airbyte_orders_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders_supplier_ab1') }} --- supplier at orders/supplier -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_supplier_ab3.sql b/models/generated/airbyte_ctes/unibag/orders_supplier_ab3.sql deleted file mode 100644 index 13f427c..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_supplier_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('orders_supplier_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_orders_hashid', - '_id', - adapter.quote('name'), - 'searchstring', - ]) }} as _airbyte_supplier_hashid, - tmp.* -from {{ ref('orders_supplier_ab2') }} tmp --- supplier at orders/supplier -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_useragent_ab1.sql b/models/generated/airbyte_ctes/unibag/orders_useragent_ab1.sql deleted file mode 100644 index 5371696..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_useragent_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('orders') }} -select - _airbyte_orders_hashid, - {{ json_extract_scalar('useragent', ['ip'], ['ip']) }} as ip, - {{ json_extract_scalar('useragent', ['version'], ['version']) }} as {{ adapter.quote('version') }}, - {{ json_extract_scalar('useragent', ['platform'], ['platform']) }} as platform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders') }} as table_alias --- useragent at orders/userAgent -where 1 = 1 -and useragent is not null - diff --git a/models/generated/airbyte_ctes/unibag/orders_useragent_ab2.sql b/models/generated/airbyte_ctes/unibag/orders_useragent_ab2.sql deleted file mode 100644 index 4db6224..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_useragent_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('orders_useragent_ab1') }} -select - _airbyte_orders_hashid, - cast(ip as {{ dbt_utils.type_string() }}) as ip, - cast({{ adapter.quote('version') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('version') }}, - cast(platform as {{ dbt_utils.type_string() }}) as platform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('orders_useragent_ab1') }} --- useragent at orders/userAgent -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/orders_useragent_ab3.sql b/models/generated/airbyte_ctes/unibag/orders_useragent_ab3.sql deleted file mode 100644 index 7f8f71a..0000000 --- a/models/generated/airbyte_ctes/unibag/orders_useragent_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('orders_useragent_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_orders_hashid', - 'ip', - adapter.quote('version'), - 'platform', - ]) }} as _airbyte_useragent_hashid, - tmp.* -from {{ ref('orders_useragent_ab2') }} tmp --- useragent at orders/userAgent -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 index 6fd50c8..3b71d62 100644 --- a/models/generated/airbyte_ctes/unibag/product_categories_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/product_categories_ab1.sql @@ -8,7 +8,7 @@ -- depends_on: {{ source('unibag', '_airbyte_raw_product_categories') }} select {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract('table_alias', '_airbyte_data', ['icon'], ['icon']) }} as icon, + {{ 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') }}, @@ -16,7 +16,6 @@ select {{ 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('table_alias', '_airbyte_data', ['statistic'], ['statistic']) }} as statistic, {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, {{ json_extract_scalar('_airbyte_data', ['totalProduct'], ['totalProduct']) }} as totalproduct, _airbyte_ab_id, diff --git a/models/generated/airbyte_ctes/unibag/product_categories_ab2.sql b/models/generated/airbyte_ctes/unibag/product_categories_ab2.sql index 372cd94..ccdf80e 100644 --- a/models/generated/airbyte_ctes/unibag/product_categories_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/product_categories_ab2.sql @@ -8,7 +8,7 @@ -- depends_on: {{ ref('product_categories_ab1') }} select cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(icon as {{ type_json() }}) as icon, + 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') }}, @@ -16,7 +16,6 @@ select covers, {{ cast_to_boolean('featured') }} as featured, cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(statistic as {{ type_json() }}) as statistic, cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, cast(totalproduct as {{ dbt_utils.type_float() }}) as totalproduct, _airbyte_ab_id, diff --git a/models/generated/airbyte_ctes/unibag/product_categories_ab3.sql b/models/generated/airbyte_ctes/unibag/product_categories_ab3.sql index 054708f..4efd8d0 100644 --- a/models/generated/airbyte_ctes/unibag/product_categories_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/product_categories_ab3.sql @@ -9,7 +9,7 @@ select {{ dbt_utils.surrogate_key([ '_id', - object_to_string('icon'), + 'icon', adapter.quote('name'), 'color', adapter.quote('order'), @@ -17,7 +17,6 @@ select array_to_string('covers'), boolean_to_string('featured'), 'createdat', - object_to_string('statistic'), 'updatedat', 'totalproduct', ]) }} as _airbyte_product_categories_hashid, diff --git a/models/generated/airbyte_ctes/unibag/product_categories_icon_ab1.sql b/models/generated/airbyte_ctes/unibag/product_categories_icon_ab1.sql deleted file mode 100644 index 0eb2ff9..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_icon_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_categories') }} -select - _airbyte_product_categories_hashid, - {{ json_extract_scalar('icon', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('icon', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract('table_alias', 'icon', ['dimensions'], ['dimensions']) }} as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_categories') }} as table_alias --- icon at product-categories/icon -where 1 = 1 -and icon is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_categories_icon_ab2.sql b/models/generated/airbyte_ctes/unibag/product_categories_icon_ab2.sql deleted file mode 100644 index e737558..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_icon_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_categories_icon_ab1') }} -select - _airbyte_product_categories_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(dimensions as {{ type_json() }}) as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_categories_icon_ab1') }} --- icon at product-categories/icon -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_categories_icon_ab3.sql b/models/generated/airbyte_ctes/unibag/product_categories_icon_ab3.sql deleted file mode 100644 index 63d59ba..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_icon_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_categories_icon_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_product_categories_hashid', - '_id', - adapter.quote('name'), - object_to_string('dimensions'), - ]) }} as _airbyte_icon_hashid, - tmp.* -from {{ ref('product_categories_icon_ab2') }} tmp --- icon at product-categories/icon -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_ab1.sql b/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_ab1.sql deleted file mode 100644 index de3b9b2..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_categories_icon') }} -select - _airbyte_icon_hashid, - {{ json_extract('table_alias', 'dimensions', ['md'], ['md']) }} as md, - {{ json_extract('table_alias', 'dimensions', ['sm'], ['sm']) }} as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_categories_icon') }} as table_alias --- dimensions at product-categories/icon/dimensions -where 1 = 1 -and dimensions is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_ab2.sql b/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_ab2.sql deleted file mode 100644 index aaf15de..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_categories_icon_dimensions_ab1') }} -select - _airbyte_icon_hashid, - cast(md as {{ type_json() }}) as md, - cast(sm as {{ type_json() }}) as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_categories_icon_dimensions_ab1') }} --- dimensions at product-categories/icon/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_ab3.sql b/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_ab3.sql deleted file mode 100644 index ba255cd..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_categories_icon_dimensions_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_icon_hashid', - object_to_string('md'), - object_to_string('sm'), - ]) }} as _airbyte_dimensions_hashid, - tmp.* -from {{ ref('product_categories_icon_dimensions_ab2') }} tmp --- dimensions at product-categories/icon/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_md_ab1.sql b/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_md_ab1.sql deleted file mode 100644 index c7535f3..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_md_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_categories_icon_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('md', ['url'], ['url']) }} as url, - {{ json_extract_scalar('md', ['width'], ['width']) }} as width, - {{ json_extract_scalar('md', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_categories_icon_dimensions') }} as table_alias --- md at product-categories/icon/dimensions/md -where 1 = 1 -and md is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_md_ab2.sql b/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_md_ab2.sql deleted file mode 100644 index f2a27c6..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_md_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_categories_icon_dimensions_md_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_categories_icon_dimensions_md_ab1') }} --- md at product-categories/icon/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_md_ab3.sql b/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_md_ab3.sql deleted file mode 100644 index f813dc5..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_md_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_categories_icon_dimensions_md_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_md_hashid, - tmp.* -from {{ ref('product_categories_icon_dimensions_md_ab2') }} tmp --- md at product-categories/icon/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_sm_ab1.sql b/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_sm_ab1.sql deleted file mode 100644 index 66c656a..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_sm_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_categories_icon_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('sm', ['url'], ['url']) }} as url, - {{ json_extract_scalar('sm', ['width'], ['width']) }} as width, - {{ json_extract_scalar('sm', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_categories_icon_dimensions') }} as table_alias --- sm at product-categories/icon/dimensions/sm -where 1 = 1 -and sm is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_sm_ab2.sql b/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_sm_ab2.sql deleted file mode 100644 index 5657222..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_sm_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_categories_icon_dimensions_sm_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_categories_icon_dimensions_sm_ab1') }} --- sm at product-categories/icon/dimensions/sm -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_sm_ab3.sql b/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_sm_ab3.sql deleted file mode 100644 index 577dfd1..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_icon_dimensions_sm_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_categories_icon_dimensions_sm_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_sm_hashid, - tmp.* -from {{ ref('product_categories_icon_dimensions_sm_ab2') }} tmp --- sm at product-categories/icon/dimensions/sm -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_categories_statistic_ab1.sql b/models/generated/airbyte_ctes/unibag/product_categories_statistic_ab1.sql deleted file mode 100644 index 41b942a..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_statistic_ab1.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_categories') }} -select - _airbyte_product_categories_hashid, - {{ json_extract_scalar('statistic', ['salesTotal'], ['salesTotal']) }} as salestotal, - {{ json_extract_scalar('statistic', ['totalShare'], ['totalShare']) }} as totalshare, - {{ json_extract_scalar('statistic', ['salesWeekTotal'], ['salesWeekTotal']) }} as salesweektotal, - {{ json_extract_scalar('statistic', ['salesYearTotal'], ['salesYearTotal']) }} as salesyeartotal, - {{ json_extract_scalar('statistic', ['salesMonthTotal'], ['salesMonthTotal']) }} as salesmonthtotal, - {{ json_extract_scalar('statistic', ['salesTwoMonthTotal'], ['salesTwoMonthTotal']) }} as salestwomonthtotal, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_categories') }} as table_alias --- statistic at product-categories/statistic -where 1 = 1 -and statistic is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_categories_statistic_ab2.sql b/models/generated/airbyte_ctes/unibag/product_categories_statistic_ab2.sql deleted file mode 100644 index d89987d..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_statistic_ab2.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_categories_statistic_ab1') }} -select - _airbyte_product_categories_hashid, - cast(salestotal as {{ dbt_utils.type_float() }}) as salestotal, - cast(totalshare as {{ dbt_utils.type_float() }}) as totalshare, - cast(salesweektotal as {{ dbt_utils.type_float() }}) as salesweektotal, - cast(salesyeartotal as {{ dbt_utils.type_float() }}) as salesyeartotal, - cast(salesmonthtotal as {{ dbt_utils.type_float() }}) as salesmonthtotal, - cast(salestwomonthtotal as {{ dbt_utils.type_float() }}) as salestwomonthtotal, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_categories_statistic_ab1') }} --- statistic at product-categories/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_categories_statistic_ab3.sql b/models/generated/airbyte_ctes/unibag/product_categories_statistic_ab3.sql deleted file mode 100644 index 444c227..0000000 --- a/models/generated/airbyte_ctes/unibag/product_categories_statistic_ab3.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_categories_statistic_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_product_categories_hashid', - 'salestotal', - 'totalshare', - 'salesweektotal', - 'salesyeartotal', - 'salesmonthtotal', - 'salestwomonthtotal', - ]) }} as _airbyte_statistic_hashid, - tmp.* -from {{ ref('product_categories_statistic_ab2') }} tmp --- statistic at product-categories/statistic -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 index 0fc77fb..9a8e52a 100644 --- a/models/generated/airbyte_ctes/unibag/product_sku_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/product_sku_ab1.sql @@ -9,15 +9,14 @@ select {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, {{ json_extract_scalar('_airbyte_data', ['sku'], ['sku']) }} as sku, - {{ json_extract('table_alias', '_airbyte_data', ['info'], ['info']) }} as info, + {{ 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('table_alias', '_airbyte_data', ['price'], ['price']) }} as price, + {{ 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', ['manual'], ['manual']) }} as manual, {{ 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, @@ -27,16 +26,16 @@ select {{ 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('table_alias', '_airbyte_data', ['statistic'], ['statistic']) }} as statistic, + {{ 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('table_alias', '_airbyte_data', ['pricePercent'], ['pricePercent']) }} as pricepercent, + {{ json_extract_scalar('_airbyte_data', ['pricePercent'], ['pricePercent']) }} as pricepercent, {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - {{ json_extract_scalar('_airbyte_data', ['updateReason'], ['updateReason']) }} as updatereason, - {{ json_extract_scalar('_airbyte_data', ['updateActiveId'], ['updateActiveId']) }} as updateactiveid, + {{ 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, diff --git a/models/generated/airbyte_ctes/unibag/product_sku_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_ab2.sql index 8a11d7a..4a1fb08 100644 --- a/models/generated/airbyte_ctes/unibag/product_sku_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/product_sku_ab2.sql @@ -9,15 +9,14 @@ select cast(_id as {{ dbt_utils.type_string() }}) as _id, cast(sku as {{ dbt_utils.type_string() }}) as sku, - cast(info as {{ type_json() }}) as info, + 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 {{ type_json() }}) as price, + 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_to_boolean('manual') }} as manual, 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, @@ -27,18 +26,18 @@ select 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 {{ type_json() }}) as statistic, + 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 {{ type_json() }}) as pricepercent, + cast(pricepercent as {{ dbt_utils.type_string() }}) as pricepercent, cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - cast(updatereason as {{ dbt_utils.type_string() }}) as updatereason, - cast(updateactiveid as {{ dbt_utils.type_string() }}) as updateactiveid, {{ 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, diff --git a/models/generated/airbyte_ctes/unibag/product_sku_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_ab3.sql index 9edcc72..9323cba 100644 --- a/models/generated/airbyte_ctes/unibag/product_sku_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/product_sku_ab3.sql @@ -10,15 +10,14 @@ select {{ dbt_utils.surrogate_key([ '_id', 'sku', - object_to_string('info'), + 'info', adapter.quote('name'), adapter.quote('type'), 'brand', 'cover', - object_to_string('price'), + 'price', boolean_to_string('active'), 'author', - boolean_to_string('manual'), adapter.quote('source'), boolean_to_string('display'), 'picture', @@ -28,16 +27,16 @@ select 'unitcode', 'createdat', 'restockat', - object_to_string('statistic'), + 'statistic', 'updatedat', + 'couponinfo', array_to_string('properties'), boolean_to_string('canpreorder'), 'suppliersku', boolean_to_string('isoutofstock'), - object_to_string('pricepercent'), + 'pricepercent', 'searchstring', - 'updatereason', - 'updateactiveid', + 'quantity', boolean_to_string('displayinventory'), boolean_to_string('showremainingquantity'), 'quantity_aibyte_transform', diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_ab1.sql deleted file mode 100644 index f9224d4..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_sku') }} -select - _airbyte_product_sku_hashid, - {{ json_extract_scalar('info', ['weight'], ['weight']) }} as weight, - {{ json_extract('table_alias', 'info', ['category'], ['category']) }} as category, - {{ json_extract('table_alias', 'info', ['supplier'], ['supplier']) }} as supplier, - {{ json_extract_scalar('info', ['dimension'], ['dimension']) }} as dimension, - {{ json_extract('table_alias', 'info', ['inventory'], ['inventory']) }} as inventory, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku') }} as table_alias --- info at product-sku/info -where 1 = 1 -and info is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_ab2.sql deleted file mode 100644 index 297347b..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_sku_info_ab1') }} -select - _airbyte_product_sku_hashid, - cast(weight as {{ dbt_utils.type_float() }}) as weight, - cast(category as {{ type_json() }}) as category, - cast(supplier as {{ type_json() }}) as supplier, - cast(dimension as {{ dbt_utils.type_string() }}) as dimension, - cast(inventory as {{ type_json() }}) as inventory, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_info_ab1') }} --- info at product-sku/info -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_ab3.sql deleted file mode 100644 index e2a30e1..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_sku_info_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_product_sku_hashid', - 'weight', - object_to_string('category'), - object_to_string('supplier'), - 'dimension', - object_to_string('inventory'), - ]) }} as _airbyte_info_hashid, - tmp.* -from {{ ref('product_sku_info_ab2') }} tmp --- info at product-sku/info -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_category_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_category_ab1.sql deleted file mode 100644 index 670aea2..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_category_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_sku_info') }} -select - _airbyte_info_hashid, - {{ json_extract_scalar('category', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('category', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('category', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('category', ['searchString'], ['searchString']) }} as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_info') }} as table_alias --- category at product-sku/info/category -where 1 = 1 -and category is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_category_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_category_ab2.sql deleted file mode 100644 index b8187ac..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_category_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_sku_info_category_ab1') }} -select - _airbyte_info_hashid, - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('id') }}, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_info_category_ab1') }} --- category at product-sku/info/category -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_category_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_category_ab3.sql deleted file mode 100644 index b1012eb..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_category_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_sku_info_category_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_info_hashid', - adapter.quote('id'), - '_id', - adapter.quote('name'), - 'searchstring', - ]) }} as _airbyte_category_hashid, - tmp.* -from {{ ref('product_sku_info_category_ab2') }} tmp --- category at product-sku/info/category -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_inv__ory_location_location_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_inv__ory_location_location_ab1.sql deleted file mode 100644 index e7902d9..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_inv__ory_location_location_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_sku_info_inventory_location') }} -select - _airbyte_location_hashid, - {{ json_extract_scalar(adapter.quote('location'), ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_array(adapter.quote('location'), ['coordinates'], ['coordinates']) }} as coordinates, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_info_inventory_location') }} as table_alias --- location at product-sku/info/inventory/location/location -where 1 = 1 -and {{ adapter.quote('location') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_inv__ory_location_location_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_inv__ory_location_location_ab2.sql deleted file mode 100644 index 2b41134..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_inv__ory_location_location_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_sku_info_inv__ory_location_location_ab1') }} -select - _airbyte_location_hashid, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - coordinates, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_info_inv__ory_location_location_ab1') }} --- location at product-sku/info/inventory/location/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_inv__ory_location_location_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_inv__ory_location_location_ab3.sql deleted file mode 100644 index e6608f2..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_inv__ory_location_location_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_sku_info_inv__ory_location_location_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_location_hashid', - adapter.quote('type'), - array_to_string('coordinates'), - ]) }} as _airbyte_location_5_hashid, - tmp.* -from {{ ref('product_sku_info_inv__ory_location_location_ab2') }} tmp --- location at product-sku/info/inventory/location/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_ab1.sql deleted file mode 100644 index 5bf7389..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_sku_info') }} -select - _airbyte_info_hashid, - {{ json_extract_scalar('inventory', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('inventory', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('inventory', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract('table_alias', 'inventory', ['location'], ['location']) }} as {{ adapter.quote('location') }}, - {{ json_extract_scalar('inventory', ['searchString'], ['searchString']) }} as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_info') }} as table_alias --- inventory at product-sku/info/inventory -where 1 = 1 -and inventory is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_ab2.sql deleted file mode 100644 index 671aa7d..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_sku_info_inventory_ab1') }} -select - _airbyte_info_hashid, - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('id') }}, - 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('location') }} as {{ type_json() }}) as {{ adapter.quote('location') }}, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_info_inventory_ab1') }} --- inventory at product-sku/info/inventory -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_ab3.sql deleted file mode 100644 index fe12a68..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_sku_info_inventory_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_info_hashid', - adapter.quote('id'), - '_id', - adapter.quote('name'), - object_to_string(adapter.quote('location')), - 'searchstring', - ]) }} as _airbyte_inventory_hashid, - tmp.* -from {{ ref('product_sku_info_inventory_ab2') }} tmp --- inventory at product-sku/info/inventory -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_location_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_location_ab1.sql deleted file mode 100644 index 72aa508..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_location_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_sku_info_inventory') }} -select - _airbyte_inventory_hashid, - {{ json_extract_scalar(adapter.quote('location'), ['ward'], ['ward']) }} as ward, - {{ json_extract_scalar(adapter.quote('location'), ['address'], ['address']) }} as address, - {{ json_extract_scalar(adapter.quote('location'), ['district'], ['district']) }} as district, - {{ json_extract('table_alias', adapter.quote('location'), ['location'], ['location']) }} as {{ adapter.quote('location') }}, - {{ json_extract_scalar(adapter.quote('location'), ['province'], ['province']) }} as province, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_info_inventory') }} as table_alias --- location at product-sku/info/inventory/location -where 1 = 1 -and {{ adapter.quote('location') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_location_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_location_ab2.sql deleted file mode 100644 index 93b2b61..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_location_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_sku_info_inventory_location_ab1') }} -select - _airbyte_inventory_hashid, - cast(ward as {{ dbt_utils.type_string() }}) as ward, - cast(address as {{ dbt_utils.type_string() }}) as address, - cast(district as {{ dbt_utils.type_string() }}) as district, - cast({{ adapter.quote('location') }} as {{ type_json() }}) as {{ adapter.quote('location') }}, - cast(province as {{ dbt_utils.type_string() }}) as province, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_info_inventory_location_ab1') }} --- location at product-sku/info/inventory/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_location_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_location_ab3.sql deleted file mode 100644 index 7ffcd58..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_inventory_location_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_sku_info_inventory_location_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_inventory_hashid', - 'ward', - 'address', - 'district', - object_to_string(adapter.quote('location')), - 'province', - ]) }} as _airbyte_location_hashid, - tmp.* -from {{ ref('product_sku_info_inventory_location_ab2') }} tmp --- location at product-sku/info/inventory/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_supplier_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_supplier_ab1.sql deleted file mode 100644 index a08d2c2..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_supplier_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_sku_info') }} -select - _airbyte_info_hashid, - {{ json_extract_scalar('supplier', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('supplier', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('supplier', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('supplier', ['searchString'], ['searchString']) }} as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_info') }} as table_alias --- supplier at product-sku/info/supplier -where 1 = 1 -and supplier is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_supplier_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_supplier_ab2.sql deleted file mode 100644 index a1d48bd..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_supplier_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_sku_info_supplier_ab1') }} -select - _airbyte_info_hashid, - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('id') }}, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_info_supplier_ab1') }} --- supplier at product-sku/info/supplier -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_info_supplier_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_info_supplier_ab3.sql deleted file mode 100644 index 21f47e0..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_info_supplier_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_sku_info_supplier_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_info_hashid', - adapter.quote('id'), - '_id', - adapter.quote('name'), - 'searchstring', - ]) }} as _airbyte_supplier_hashid, - tmp.* -from {{ ref('product_sku_info_supplier_ab2') }} tmp --- supplier at product-sku/info/supplier -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_price_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sku_price_ab1.sql deleted file mode 100644 index d0a140b..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_price_ab1.sql +++ /dev/null @@ -1,24 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_sku') }} -select - _airbyte_product_sku_hashid, - {{ json_extract_scalar('price', ['base'], ['base']) }} as base, - {{ json_extract_scalar('price', ['market'], ['market']) }} as market, - {{ json_extract_scalar('price', ['profit'], ['profit']) }} as profit, - {{ json_extract_scalar('price', ['maximum'], ['maximum']) }} as maximum, - {{ json_extract_scalar('price', ['minimum'], ['minimum']) }} as minimum, - {{ json_extract_scalar('price', ['supplier'], ['supplier']) }} as supplier, - {{ json_extract_scalar('price', ['wholesaleBonus'], ['wholesaleBonus']) }} as wholesalebonus, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku') }} as table_alias --- price at product-sku/price -where 1 = 1 -and price is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_price_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_price_ab2.sql deleted file mode 100644 index 109962f..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_price_ab2.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_sku_price_ab1') }} -select - _airbyte_product_sku_hashid, - cast(base as {{ dbt_utils.type_float() }}) as base, - cast(market as {{ dbt_utils.type_float() }}) as market, - cast(profit as {{ dbt_utils.type_float() }}) as profit, - cast(maximum as {{ dbt_utils.type_float() }}) as maximum, - cast(minimum as {{ dbt_utils.type_float() }}) as minimum, - cast(supplier as {{ dbt_utils.type_float() }}) as supplier, - cast(wholesalebonus as {{ dbt_utils.type_float() }}) as wholesalebonus, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_price_ab1') }} --- price at product-sku/price -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_price_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_price_ab3.sql deleted file mode 100644 index d6732a1..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_price_ab3.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_sku_price_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_product_sku_hashid', - 'base', - 'market', - 'profit', - 'maximum', - 'minimum', - 'supplier', - 'wholesalebonus', - ]) }} as _airbyte_price_hashid, - tmp.* -from {{ ref('product_sku_price_ab2') }} tmp --- price at product-sku/price -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_pricepercent_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sku_pricepercent_ab1.sql deleted file mode 100644 index 290b5b8..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_pricepercent_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_sku') }} -select - _airbyte_product_sku_hashid, - {{ json_extract_scalar('pricepercent', ['supplier'], ['supplier']) }} as supplier, - {{ json_extract_scalar('pricepercent', ['minimumPriceDifferential'], ['minimumPriceDifferential']) }} as minimumpricedifferential, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku') }} as table_alias --- pricepercent at product-sku/pricePercent -where 1 = 1 -and pricepercent is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_pricepercent_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_pricepercent_ab2.sql deleted file mode 100644 index d26ac2f..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_pricepercent_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_sku_pricepercent_ab1') }} -select - _airbyte_product_sku_hashid, - cast(supplier as {{ dbt_utils.type_float() }}) as supplier, - cast(minimumpricedifferential as {{ dbt_utils.type_float() }}) as minimumpricedifferential, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_pricepercent_ab1') }} --- pricepercent at product-sku/pricePercent -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_pricepercent_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_pricepercent_ab3.sql deleted file mode 100644 index dd2d8e5..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_pricepercent_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_sku_pricepercent_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_product_sku_hashid', - 'supplier', - 'minimumpricedifferential', - ]) }} as _airbyte_pricepercent_hashid, - tmp.* -from {{ ref('product_sku_pricepercent_ab2') }} tmp --- pricepercent at product-sku/pricePercent -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_statistic_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sku_statistic_ab1.sql deleted file mode 100644 index 42ec518..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_statistic_ab1.sql +++ /dev/null @@ -1,25 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_sku') }} -select - _airbyte_product_sku_hashid, - {{ json_extract_scalar('statistic', ['saleTotal'], ['saleTotal']) }} as saletotal, - {{ json_extract_scalar('statistic', ['salePending'], ['salePending']) }} as salepending, - {{ json_extract_scalar('statistic', ['saleWaiting'], ['saleWaiting']) }} as salewaiting, - {{ json_extract_scalar('statistic', ['saleCashback'], ['saleCashback']) }} as salecashback, - {{ json_extract_scalar('statistic', ['saleCancelled'], ['saleCancelled']) }} as salecancelled, - {{ json_extract_scalar('statistic', ['saleDelivered'], ['saleDelivered']) }} as saledelivered, - {{ json_extract_scalar('statistic', ['saleDelivering'], ['saleDelivering']) }} as saledelivering, - {{ json_extract_scalar('statistic', ['salePaymentProcessing'], ['salePaymentProcessing']) }} as salepaymentprocessing, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku') }} as table_alias --- statistic at product-sku/statistic -where 1 = 1 -and statistic is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_statistic_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_statistic_ab2.sql deleted file mode 100644 index 9abd832..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_statistic_ab2.sql +++ /dev/null @@ -1,24 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_sku_statistic_ab1') }} -select - _airbyte_product_sku_hashid, - cast(saletotal as {{ dbt_utils.type_float() }}) as saletotal, - cast(salepending as {{ dbt_utils.type_float() }}) as salepending, - cast(salewaiting as {{ dbt_utils.type_float() }}) as salewaiting, - cast(salecashback as {{ dbt_utils.type_float() }}) as salecashback, - cast(salecancelled as {{ dbt_utils.type_float() }}) as salecancelled, - cast(saledelivered as {{ dbt_utils.type_float() }}) as saledelivered, - cast(saledelivering as {{ dbt_utils.type_float() }}) as saledelivering, - cast(salepaymentprocessing as {{ dbt_utils.type_float() }}) as salepaymentprocessing, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_statistic_ab1') }} --- statistic at product-sku/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_statistic_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_statistic_ab3.sql deleted file mode 100644 index 247383b..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_statistic_ab3.sql +++ /dev/null @@ -1,24 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_sku_statistic_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_product_sku_hashid', - 'saletotal', - 'salepending', - 'salewaiting', - 'salecashback', - 'salecancelled', - 'saledelivered', - 'saledelivering', - 'salepaymentprocessing', - ]) }} as _airbyte_statistic_hashid, - tmp.* -from {{ ref('product_sku_statistic_ab2') }} tmp --- statistic at product-sku/statistic -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 index 38ba6ae..5cbd21e 100644 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/product_sku_versions_ab1.sql @@ -9,16 +9,16 @@ select {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, {{ json_extract_scalar('_airbyte_data', ['sku'], ['sku']) }} as sku, - {{ json_extract('table_alias', '_airbyte_data', ['info'], ['info']) }} as info, + {{ json_extract_scalar('_airbyte_data', ['info'], ['info']) }} as info, {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract('table_alias', '_airbyte_data', ['price'], ['price']) }} as price, + {{ 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('table_alias', '_airbyte_data', ['statistic'], ['statistic']) }} as statistic, {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, {{ json_extract_array('_airbyte_data', ['properties'], ['properties']) }} as properties, _airbyte_ab_id, diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_ab2.sql index 91cb7e2..f30d961 100644 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/product_sku_versions_ab2.sql @@ -9,16 +9,16 @@ select cast(_id as {{ dbt_utils.type_string() }}) as _id, cast(sku as {{ dbt_utils.type_string() }}) as sku, - cast(info as {{ type_json() }}) as info, + 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 {{ type_json() }}) as price, + 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(statistic as {{ type_json() }}) as statistic, cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, properties, _airbyte_ab_id, diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_ab3.sql index 6e74d4b..5582374 100644 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/product_sku_versions_ab3.sql @@ -10,16 +10,16 @@ select {{ dbt_utils.surrogate_key([ '_id', 'sku', - object_to_string('info'), + 'info', adapter.quote('name'), - object_to_string('price'), + 'price', adapter.quote('source'), 'codesku', 'picture', 'product', + 'statistic', adapter.quote('version'), 'createdat', - object_to_string('statistic'), 'updatedat', array_to_string('properties'), ]) }} as _airbyte_product_sku_versions_hashid, diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_info_ab1.sql deleted file mode 100644 index 537a4ae..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_sku_versions') }} -select - _airbyte_product_sku_versions_hashid, - {{ json_extract_scalar('info', ['weight'], ['weight']) }} as weight, - {{ json_extract('table_alias', 'info', ['category'], ['category']) }} as category, - {{ json_extract('table_alias', 'info', ['supplier'], ['supplier']) }} as supplier, - {{ json_extract_scalar('info', ['dimension'], ['dimension']) }} as dimension, - {{ json_extract('table_alias', 'info', ['inventory'], ['inventory']) }} as inventory, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_versions') }} as table_alias --- info at product-sku-versions/info -where 1 = 1 -and info is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_info_ab2.sql deleted file mode 100644 index 094d452..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_sku_versions_info_ab1') }} -select - _airbyte_product_sku_versions_hashid, - cast(weight as {{ dbt_utils.type_float() }}) as weight, - cast(category as {{ type_json() }}) as category, - cast(supplier as {{ type_json() }}) as supplier, - cast(dimension as {{ dbt_utils.type_string() }}) as dimension, - cast(inventory as {{ type_json() }}) as inventory, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_versions_info_ab1') }} --- info at product-sku-versions/info -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_info_ab3.sql deleted file mode 100644 index a164eed..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_sku_versions_info_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_product_sku_versions_hashid', - 'weight', - object_to_string('category'), - object_to_string('supplier'), - 'dimension', - object_to_string('inventory'), - ]) }} as _airbyte_info_hashid, - tmp.* -from {{ ref('product_sku_versions_info_ab2') }} tmp --- info at product-sku-versions/info -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_category_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_info_category_ab1.sql deleted file mode 100644 index bca6380..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_category_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_sku_versions_info') }} -select - _airbyte_info_hashid, - {{ json_extract_scalar('category', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('category', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('category', ['searchString'], ['searchString']) }} as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_versions_info') }} as table_alias --- category at product-sku-versions/info/category -where 1 = 1 -and category is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_category_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_info_category_ab2.sql deleted file mode 100644 index 64bf306..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_category_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_sku_versions_info_category_ab1') }} -select - _airbyte_info_hashid, - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('id') }}, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_versions_info_category_ab1') }} --- category at product-sku-versions/info/category -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_category_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_info_category_ab3.sql deleted file mode 100644 index 534c109..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_category_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_sku_versions_info_category_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_info_hashid', - adapter.quote('id'), - adapter.quote('name'), - 'searchstring', - ]) }} as _airbyte_category_hashid, - tmp.* -from {{ ref('product_sku_versions_info_category_ab2') }} tmp --- category at product-sku-versions/info/category -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_inventory_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_info_inventory_ab1.sql deleted file mode 100644 index 2a4de6b..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_inventory_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_sku_versions_info') }} -select - _airbyte_info_hashid, - {{ json_extract_scalar('inventory', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('inventory', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('inventory', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('inventory', ['searchString'], ['searchString']) }} as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_versions_info') }} as table_alias --- inventory at product-sku-versions/info/inventory -where 1 = 1 -and inventory is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_inventory_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_info_inventory_ab2.sql deleted file mode 100644 index 71b0dac..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_inventory_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_sku_versions_info_inventory_ab1') }} -select - _airbyte_info_hashid, - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('id') }}, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_versions_info_inventory_ab1') }} --- inventory at product-sku-versions/info/inventory -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_inventory_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_info_inventory_ab3.sql deleted file mode 100644 index 672f9d8..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_inventory_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_sku_versions_info_inventory_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_info_hashid', - adapter.quote('id'), - '_id', - adapter.quote('name'), - 'searchstring', - ]) }} as _airbyte_inventory_hashid, - tmp.* -from {{ ref('product_sku_versions_info_inventory_ab2') }} tmp --- inventory at product-sku-versions/info/inventory -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_supplier_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_info_supplier_ab1.sql deleted file mode 100644 index 6d32f5f..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_supplier_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_sku_versions_info') }} -select - _airbyte_info_hashid, - {{ json_extract_scalar('supplier', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('supplier', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('supplier', ['searchString'], ['searchString']) }} as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_versions_info') }} as table_alias --- supplier at product-sku-versions/info/supplier -where 1 = 1 -and supplier is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_supplier_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_info_supplier_ab2.sql deleted file mode 100644 index 2100316..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_supplier_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_sku_versions_info_supplier_ab1') }} -select - _airbyte_info_hashid, - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('id') }}, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_versions_info_supplier_ab1') }} --- supplier at product-sku-versions/info/supplier -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_supplier_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_info_supplier_ab3.sql deleted file mode 100644 index 196663f..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_info_supplier_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_sku_versions_info_supplier_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_info_hashid', - adapter.quote('id'), - adapter.quote('name'), - 'searchstring', - ]) }} as _airbyte_supplier_hashid, - tmp.* -from {{ ref('product_sku_versions_info_supplier_ab2') }} tmp --- supplier at product-sku-versions/info/supplier -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_price_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_price_ab1.sql deleted file mode 100644 index ad15173..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_price_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_sku_versions') }} -select - _airbyte_product_sku_versions_hashid, - {{ json_extract_scalar('price', ['base'], ['base']) }} as base, - {{ json_extract_scalar('price', ['market'], ['market']) }} as market, - {{ json_extract_scalar('price', ['maximum'], ['maximum']) }} as maximum, - {{ json_extract_scalar('price', ['minimum'], ['minimum']) }} as minimum, - {{ json_extract_scalar('price', ['supplier'], ['supplier']) }} as supplier, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_versions') }} as table_alias --- price at product-sku-versions/price -where 1 = 1 -and price is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_price_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_price_ab2.sql deleted file mode 100644 index e9429cb..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_price_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_sku_versions_price_ab1') }} -select - _airbyte_product_sku_versions_hashid, - cast(base as {{ dbt_utils.type_float() }}) as base, - cast(market as {{ dbt_utils.type_float() }}) as market, - cast(maximum as {{ dbt_utils.type_float() }}) as maximum, - cast(minimum as {{ dbt_utils.type_float() }}) as minimum, - cast(supplier as {{ dbt_utils.type_float() }}) as supplier, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_versions_price_ab1') }} --- price at product-sku-versions/price -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_price_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_price_ab3.sql deleted file mode 100644 index bae849d..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_price_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_sku_versions_price_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_product_sku_versions_hashid', - 'base', - 'market', - 'maximum', - 'minimum', - 'supplier', - ]) }} as _airbyte_price_hashid, - tmp.* -from {{ ref('product_sku_versions_price_ab2') }} tmp --- price at product-sku-versions/price -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_statistic_ab1.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_statistic_ab1.sql deleted file mode 100644 index 83d2921..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_statistic_ab1.sql +++ /dev/null @@ -1,25 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('product_sku_versions') }} -select - _airbyte_product_sku_versions_hashid, - {{ json_extract_scalar('statistic', ['saleTotal'], ['saleTotal']) }} as saletotal, - {{ json_extract_scalar('statistic', ['salePending'], ['salePending']) }} as salepending, - {{ json_extract_scalar('statistic', ['saleWaiting'], ['saleWaiting']) }} as salewaiting, - {{ json_extract_scalar('statistic', ['saleCashback'], ['saleCashback']) }} as salecashback, - {{ json_extract_scalar('statistic', ['saleCancelled'], ['saleCancelled']) }} as salecancelled, - {{ json_extract_scalar('statistic', ['saleDelivered'], ['saleDelivered']) }} as saledelivered, - {{ json_extract_scalar('statistic', ['saleDelivering'], ['saleDelivering']) }} as saledelivering, - {{ json_extract_scalar('statistic', ['salePaymentProcessing'], ['salePaymentProcessing']) }} as salepaymentprocessing, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_versions') }} as table_alias --- statistic at product-sku-versions/statistic -where 1 = 1 -and statistic is not null - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_statistic_ab2.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_statistic_ab2.sql deleted file mode 100644 index ec2413f..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_statistic_ab2.sql +++ /dev/null @@ -1,24 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('product_sku_versions_statistic_ab1') }} -select - _airbyte_product_sku_versions_hashid, - cast(saletotal as {{ dbt_utils.type_float() }}) as saletotal, - cast(salepending as {{ dbt_utils.type_float() }}) as salepending, - cast(salewaiting as {{ dbt_utils.type_float() }}) as salewaiting, - cast(salecashback as {{ dbt_utils.type_float() }}) as salecashback, - cast(salecancelled as {{ dbt_utils.type_float() }}) as salecancelled, - cast(saledelivered as {{ dbt_utils.type_float() }}) as saledelivered, - cast(saledelivering as {{ dbt_utils.type_float() }}) as saledelivering, - cast(salepaymentprocessing as {{ dbt_utils.type_float() }}) as salepaymentprocessing, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('product_sku_versions_statistic_ab1') }} --- statistic at product-sku-versions/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/product_sku_versions_statistic_ab3.sql b/models/generated/airbyte_ctes/unibag/product_sku_versions_statistic_ab3.sql deleted file mode 100644 index a1f8294..0000000 --- a/models/generated/airbyte_ctes/unibag/product_sku_versions_statistic_ab3.sql +++ /dev/null @@ -1,24 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('product_sku_versions_statistic_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_product_sku_versions_hashid', - 'saletotal', - 'salepending', - 'salewaiting', - 'salecashback', - 'salecancelled', - 'saledelivered', - 'saledelivering', - 'salepaymentprocessing', - ]) }} as _airbyte_statistic_hashid, - tmp.* -from {{ ref('product_sku_versions_statistic_ab2') }} tmp --- statistic at product-sku-versions/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_ab1.sql b/models/generated/airbyte_ctes/unibag/products_ab1.sql index eaeab04..c09bfa8 100644 --- a/models/generated/airbyte_ctes/unibag/products_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/products_ab1.sql @@ -9,13 +9,13 @@ select {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, {{ json_extract_scalar('_airbyte_data', ['desc'], ['desc']) }} as {{ adapter.quote('desc') }}, - {{ json_extract('table_alias', '_airbyte_data', ['info'], ['info']) }} as info, + {{ 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('table_alias', '_airbyte_data', ['order'], ['order']) }} as {{ adapter.quote('order') }}, - {{ json_extract('table_alias', '_airbyte_data', ['price'], ['price']) }} as price, - {{ json_extract('table_alias', '_airbyte_data', ['score'], ['score']) }} as score, + {{ 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, @@ -25,25 +25,23 @@ select {{ 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('table_alias', '_airbyte_data', ['statistic'], ['statistic']) }} as statistic, + {{ 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', ['inactiveAt'], ['inactiveAt']) }} as inactiveat, {{ 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', ['displaySKUId'], ['displaySKUId']) }} as displayskuid, {{ json_extract_scalar('_airbyte_data', ['isOutOfStock'], ['isOutOfStock']) }} as isoutofstock, - {{ json_extract('table_alias', '_airbyte_data', ['pricePercent'], ['pricePercent']) }} as pricepercent, + {{ 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('table_alias', '_airbyte_data', ['shareStatistic'], ['shareStatistic']) }} as sharestatistic, - {{ json_extract_scalar('_airbyte_data', ['updateActiveId'], ['updateActiveId']) }} as updateactiveid, + {{ 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('table_alias', '_airbyte_data', ['reviewStatistic'], ['reviewStatistic']) }} as reviewstatistic, + {{ 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, diff --git a/models/generated/airbyte_ctes/unibag/products_ab2.sql b/models/generated/airbyte_ctes/unibag/products_ab2.sql index 512d49b..f0402a6 100644 --- a/models/generated/airbyte_ctes/unibag/products_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/products_ab2.sql @@ -9,13 +9,13 @@ 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 {{ type_json() }}) as info, + 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 {{ type_json() }}) as {{ adapter.quote('order') }}, - cast(price as {{ type_json() }}) as price, - cast(score as {{ type_json() }}) as score, + 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, @@ -25,25 +25,23 @@ select cast(createdat as {{ dbt_utils.type_string() }}) as createdat, documents, cast(sharedesc as {{ dbt_utils.type_string() }}) as sharedesc, - cast(statistic as {{ type_json() }}) as statistic, + cast(statistic as {{ dbt_utils.type_string() }}) as statistic, cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, categories, - cast(inactiveat as {{ dbt_utils.type_string() }}) as inactiveat, properties, cast(reactiveat as {{ dbt_utils.type_string() }}) as reactiveat, inventories, - cast(displayskuid as {{ dbt_utils.type_string() }}) as displayskuid, {{ cast_to_boolean('isoutofstock') }} as isoutofstock, - cast(pricepercent as {{ type_json() }}) as pricepercent, + 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 {{ type_json() }}) as sharestatistic, - cast(updateactiveid as {{ dbt_utils.type_string() }}) as updateactiveid, + cast(sharestatistic as {{ dbt_utils.type_string() }}) as sharestatistic, {{ cast_to_boolean('canissueinvoice') }} as canissueinvoice, {{ cast_to_boolean('pendinginactive') }} as pendinginactive, - cast(reviewstatistic as {{ type_json() }}) as reviewstatistic, + 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, diff --git a/models/generated/airbyte_ctes/unibag/products_ab3.sql b/models/generated/airbyte_ctes/unibag/products_ab3.sql index 73fe929..1f52628 100644 --- a/models/generated/airbyte_ctes/unibag/products_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/products_ab3.sql @@ -10,13 +10,13 @@ select {{ dbt_utils.surrogate_key([ '_id', adapter.quote('desc'), - object_to_string('info'), + 'info', adapter.quote('name'), adapter.quote('temp'), 'brand', - object_to_string(adapter.quote('order')), - object_to_string('price'), - object_to_string('score'), + adapter.quote('order'), + 'price', + 'score', boolean_to_string('active'), 'author', array_to_string('guides'), @@ -26,25 +26,23 @@ select 'createdat', array_to_string('documents'), 'sharedesc', - object_to_string('statistic'), + 'statistic', 'updatedat', array_to_string('categories'), - 'inactiveat', array_to_string('properties'), 'reactiveat', array_to_string('inventories'), - 'displayskuid', boolean_to_string('isoutofstock'), - object_to_string('pricepercent'), + 'pricepercent', 'searchstring', array_to_string('subcategories'), 'inactivereason', 'propertiesmain', - object_to_string('sharestatistic'), - 'updateactiveid', + 'sharestatistic', boolean_to_string('canissueinvoice'), boolean_to_string('pendinginactive'), - object_to_string('reviewstatistic'), + 'reviewstatistic', + 'pendinginactiveat', array_to_string('highlightproperties'), ]) }} as _airbyte_products_hashid, tmp.* diff --git a/models/generated/airbyte_ctes/unibag/products_info_ab1.sql b/models/generated/airbyte_ctes/unibag/products_info_ab1.sql deleted file mode 100644 index 1212403..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('products') }} -select - _airbyte_products_hashid, - {{ json_extract_scalar('info', ['profit'], ['profit']) }} as profit, - {{ json_extract('table_alias', 'info', ['category'], ['category']) }} as category, - {{ json_extract('table_alias', 'info', ['supplier'], ['supplier']) }} as supplier, - {{ json_extract('table_alias', 'info', ['inventory'], ['inventory']) }} as inventory, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products') }} as table_alias --- info at products/info -where 1 = 1 -and info is not null - diff --git a/models/generated/airbyte_ctes/unibag/products_info_ab2.sql b/models/generated/airbyte_ctes/unibag/products_info_ab2.sql deleted file mode 100644 index 8293cb9..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('products_info_ab1') }} -select - _airbyte_products_hashid, - cast(profit as {{ dbt_utils.type_float() }}) as profit, - cast(category as {{ type_json() }}) as category, - cast(supplier as {{ type_json() }}) as supplier, - cast(inventory as {{ type_json() }}) as inventory, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_info_ab1') }} --- info at products/info -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_info_ab3.sql b/models/generated/airbyte_ctes/unibag/products_info_ab3.sql deleted file mode 100644 index 117899f..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('products_info_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_products_hashid', - 'profit', - object_to_string('category'), - object_to_string('supplier'), - object_to_string('inventory'), - ]) }} as _airbyte_info_hashid, - tmp.* -from {{ ref('products_info_ab2') }} tmp --- info at products/info -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_info_category_ab1.sql b/models/generated/airbyte_ctes/unibag/products_info_category_ab1.sql deleted file mode 100644 index 88c5a63..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_category_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('products_info') }} -select - _airbyte_info_hashid, - {{ json_extract_scalar('category', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('category', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('category', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('category', ['searchString'], ['searchString']) }} as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_info') }} as table_alias --- category at products/info/category -where 1 = 1 -and category is not null - diff --git a/models/generated/airbyte_ctes/unibag/products_info_category_ab2.sql b/models/generated/airbyte_ctes/unibag/products_info_category_ab2.sql deleted file mode 100644 index fdaaeff..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_category_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('products_info_category_ab1') }} -select - _airbyte_info_hashid, - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('id') }}, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_info_category_ab1') }} --- category at products/info/category -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_info_category_ab3.sql b/models/generated/airbyte_ctes/unibag/products_info_category_ab3.sql deleted file mode 100644 index c8e6816..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_category_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('products_info_category_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_info_hashid', - adapter.quote('id'), - '_id', - adapter.quote('name'), - 'searchstring', - ]) }} as _airbyte_category_hashid, - tmp.* -from {{ ref('products_info_category_ab2') }} tmp --- category at products/info/category -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_info_inventory_ab1.sql b/models/generated/airbyte_ctes/unibag/products_info_inventory_ab1.sql deleted file mode 100644 index a396e34..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_inventory_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('products_info') }} -select - _airbyte_info_hashid, - {{ json_extract_scalar('inventory', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('inventory', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('inventory', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract('table_alias', 'inventory', ['location'], ['location']) }} as {{ adapter.quote('location') }}, - {{ json_extract_scalar('inventory', ['searchString'], ['searchString']) }} as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_info') }} as table_alias --- inventory at products/info/inventory -where 1 = 1 -and inventory is not null - diff --git a/models/generated/airbyte_ctes/unibag/products_info_inventory_ab2.sql b/models/generated/airbyte_ctes/unibag/products_info_inventory_ab2.sql deleted file mode 100644 index 195e377..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_inventory_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('products_info_inventory_ab1') }} -select - _airbyte_info_hashid, - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('id') }}, - 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('location') }} as {{ type_json() }}) as {{ adapter.quote('location') }}, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_info_inventory_ab1') }} --- inventory at products/info/inventory -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_info_inventory_ab3.sql b/models/generated/airbyte_ctes/unibag/products_info_inventory_ab3.sql deleted file mode 100644 index a59442d..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_inventory_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('products_info_inventory_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_info_hashid', - adapter.quote('id'), - '_id', - adapter.quote('name'), - object_to_string(adapter.quote('location')), - 'searchstring', - ]) }} as _airbyte_inventory_hashid, - tmp.* -from {{ ref('products_info_inventory_ab2') }} tmp --- inventory at products/info/inventory -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_info_inventory_location_ab1.sql b/models/generated/airbyte_ctes/unibag/products_info_inventory_location_ab1.sql deleted file mode 100644 index aa362c5..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_inventory_location_ab1.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('products_info_inventory') }} -select - _airbyte_inventory_hashid, - {{ json_extract_scalar(adapter.quote('location'), ['ward'], ['ward']) }} as ward, - {{ json_extract_scalar(adapter.quote('location'), ['address'], ['address']) }} as address, - {{ json_extract_scalar(adapter.quote('location'), ['district'], ['district']) }} as district, - {{ json_extract('table_alias', adapter.quote('location'), ['location'], ['location']) }} as {{ adapter.quote('location') }}, - {{ json_extract_scalar(adapter.quote('location'), ['province'], ['province']) }} as province, - {{ json_extract_scalar(adapter.quote('location'), ['provinceName'], ['provinceName']) }} as provincename, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_info_inventory') }} as table_alias --- location at products/info/inventory/location -where 1 = 1 -and {{ adapter.quote('location') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/products_info_inventory_location_ab2.sql b/models/generated/airbyte_ctes/unibag/products_info_inventory_location_ab2.sql deleted file mode 100644 index 38bfde7..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_inventory_location_ab2.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('products_info_inventory_location_ab1') }} -select - _airbyte_inventory_hashid, - cast(ward as {{ dbt_utils.type_string() }}) as ward, - cast(address as {{ dbt_utils.type_string() }}) as address, - cast(district as {{ dbt_utils.type_string() }}) as district, - cast({{ adapter.quote('location') }} as {{ type_json() }}) as {{ adapter.quote('location') }}, - cast(province as {{ dbt_utils.type_string() }}) as province, - cast(provincename as {{ dbt_utils.type_string() }}) as provincename, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_info_inventory_location_ab1') }} --- location at products/info/inventory/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_info_inventory_location_ab3.sql b/models/generated/airbyte_ctes/unibag/products_info_inventory_location_ab3.sql deleted file mode 100644 index 75502f4..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_inventory_location_ab3.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('products_info_inventory_location_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_inventory_hashid', - 'ward', - 'address', - 'district', - object_to_string(adapter.quote('location')), - 'province', - 'provincename', - ]) }} as _airbyte_location_hashid, - tmp.* -from {{ ref('products_info_inventory_location_ab2') }} tmp --- location at products/info/inventory/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_info_inventory_location_location_ab1.sql b/models/generated/airbyte_ctes/unibag/products_info_inventory_location_location_ab1.sql deleted file mode 100644 index ec3978d..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_inventory_location_location_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('products_info_inventory_location') }} -select - _airbyte_location_hashid, - {{ json_extract_scalar(adapter.quote('location'), ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_array(adapter.quote('location'), ['coordinates'], ['coordinates']) }} as coordinates, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_info_inventory_location') }} as table_alias --- location at products/info/inventory/location/location -where 1 = 1 -and {{ adapter.quote('location') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/products_info_inventory_location_location_ab2.sql b/models/generated/airbyte_ctes/unibag/products_info_inventory_location_location_ab2.sql deleted file mode 100644 index a4e0761..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_inventory_location_location_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('products_info_inventory_location_location_ab1') }} -select - _airbyte_location_hashid, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - coordinates, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_info_inventory_location_location_ab1') }} --- location at products/info/inventory/location/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_info_inventory_location_location_ab3.sql b/models/generated/airbyte_ctes/unibag/products_info_inventory_location_location_ab3.sql deleted file mode 100644 index 3012273..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_inventory_location_location_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('products_info_inventory_location_location_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_location_hashid', - adapter.quote('type'), - array_to_string('coordinates'), - ]) }} as _airbyte_location_5_hashid, - tmp.* -from {{ ref('products_info_inventory_location_location_ab2') }} tmp --- location at products/info/inventory/location/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_info_supplier_ab1.sql b/models/generated/airbyte_ctes/unibag/products_info_supplier_ab1.sql deleted file mode 100644 index 3979248..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_supplier_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('products_info') }} -select - _airbyte_info_hashid, - {{ json_extract_scalar('supplier', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('supplier', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('supplier', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('supplier', ['searchString'], ['searchString']) }} as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_info') }} as table_alias --- supplier at products/info/supplier -where 1 = 1 -and supplier is not null - diff --git a/models/generated/airbyte_ctes/unibag/products_info_supplier_ab2.sql b/models/generated/airbyte_ctes/unibag/products_info_supplier_ab2.sql deleted file mode 100644 index 47e2d4d..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_supplier_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('products_info_supplier_ab1') }} -select - _airbyte_info_hashid, - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('id') }}, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_info_supplier_ab1') }} --- supplier at products/info/supplier -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_info_supplier_ab3.sql b/models/generated/airbyte_ctes/unibag/products_info_supplier_ab3.sql deleted file mode 100644 index f25d173..0000000 --- a/models/generated/airbyte_ctes/unibag/products_info_supplier_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('products_info_supplier_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_info_hashid', - adapter.quote('id'), - '_id', - adapter.quote('name'), - 'searchstring', - ]) }} as _airbyte_supplier_hashid, - tmp.* -from {{ ref('products_info_supplier_ab2') }} tmp --- supplier at products/info/supplier -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_order_ab1.sql b/models/generated/airbyte_ctes/unibag/products_order_ab1.sql deleted file mode 100644 index ed35823..0000000 --- a/models/generated/airbyte_ctes/unibag/products_order_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('products') }} -select - _airbyte_products_hashid, - {{ json_extract_scalar(adapter.quote('order'), ['newest'], ['newest']) }} as newest, - {{ json_extract_scalar(adapter.quote('order'), ['profit'], ['profit']) }} as profit, - {{ json_extract_scalar(adapter.quote('order'), ['topSale'], ['topSale']) }} as topsale, - {{ json_extract_scalar(adapter.quote('order'), ['scoreYesterday'], ['scoreYesterday']) }} as scoreyesterday, - {{ json_extract_scalar(adapter.quote('order'), ['region_aibyte_transform'], ['region_aibyte_transform']) }} as region_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products') }} as table_alias --- order at products/order -where 1 = 1 -and {{ adapter.quote('order') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/products_order_ab2.sql b/models/generated/airbyte_ctes/unibag/products_order_ab2.sql deleted file mode 100644 index 35d481d..0000000 --- a/models/generated/airbyte_ctes/unibag/products_order_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('products_order_ab1') }} -select - _airbyte_products_hashid, - cast(newest as {{ dbt_utils.type_float() }}) as newest, - cast(profit as {{ dbt_utils.type_float() }}) as profit, - cast(topsale as {{ dbt_utils.type_float() }}) as topsale, - cast(scoreyesterday as {{ dbt_utils.type_float() }}) as scoreyesterday, - cast(region_aibyte_transform as {{ dbt_utils.type_string() }}) as region_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_order_ab1') }} --- order at products/order -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_order_ab3.sql b/models/generated/airbyte_ctes/unibag/products_order_ab3.sql deleted file mode 100644 index 123d245..0000000 --- a/models/generated/airbyte_ctes/unibag/products_order_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('products_order_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_products_hashid', - 'newest', - 'profit', - 'topsale', - 'scoreyesterday', - 'region_aibyte_transform', - ]) }} as _airbyte_order_hashid, - tmp.* -from {{ ref('products_order_ab2') }} tmp --- order at products/order -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_price_ab1.sql b/models/generated/airbyte_ctes/unibag/products_price_ab1.sql deleted file mode 100644 index 1af7377..0000000 --- a/models/generated/airbyte_ctes/unibag/products_price_ab1.sql +++ /dev/null @@ -1,24 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('products') }} -select - _airbyte_products_hashid, - {{ json_extract_scalar('price', ['base'], ['base']) }} as base, - {{ json_extract_scalar('price', ['market'], ['market']) }} as market, - {{ json_extract_scalar('price', ['profit'], ['profit']) }} as profit, - {{ json_extract_scalar('price', ['maximum'], ['maximum']) }} as maximum, - {{ json_extract_scalar('price', ['minimum'], ['minimum']) }} as minimum, - {{ json_extract_scalar('price', ['supplier'], ['supplier']) }} as supplier, - {{ json_extract_scalar('price', ['wholesaleBonus'], ['wholesaleBonus']) }} as wholesalebonus, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products') }} as table_alias --- price at products/price -where 1 = 1 -and price is not null - diff --git a/models/generated/airbyte_ctes/unibag/products_price_ab2.sql b/models/generated/airbyte_ctes/unibag/products_price_ab2.sql deleted file mode 100644 index 1b07ce9..0000000 --- a/models/generated/airbyte_ctes/unibag/products_price_ab2.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('products_price_ab1') }} -select - _airbyte_products_hashid, - cast(base as {{ dbt_utils.type_float() }}) as base, - cast(market as {{ dbt_utils.type_float() }}) as market, - cast(profit as {{ dbt_utils.type_float() }}) as profit, - cast(maximum as {{ dbt_utils.type_float() }}) as maximum, - cast(minimum as {{ dbt_utils.type_float() }}) as minimum, - cast(supplier as {{ dbt_utils.type_float() }}) as supplier, - cast(wholesalebonus as {{ dbt_utils.type_float() }}) as wholesalebonus, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_price_ab1') }} --- price at products/price -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_price_ab3.sql b/models/generated/airbyte_ctes/unibag/products_price_ab3.sql deleted file mode 100644 index 722fa85..0000000 --- a/models/generated/airbyte_ctes/unibag/products_price_ab3.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('products_price_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_products_hashid', - 'base', - 'market', - 'profit', - 'maximum', - 'minimum', - 'supplier', - 'wholesalebonus', - ]) }} as _airbyte_price_hashid, - tmp.* -from {{ ref('products_price_ab2') }} tmp --- price at products/price -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_pricepercent_ab1.sql b/models/generated/airbyte_ctes/unibag/products_pricepercent_ab1.sql deleted file mode 100644 index bf9474d..0000000 --- a/models/generated/airbyte_ctes/unibag/products_pricepercent_ab1.sql +++ /dev/null @@ -1,24 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('products') }} -select - _airbyte_products_hashid, - {{ json_extract_scalar('pricepercent', ['base'], ['base']) }} as base, - {{ json_extract_scalar('pricepercent', ['selly'], ['selly']) }} as selly, - {{ json_extract_scalar('pricepercent', ['market'], ['market']) }} as market, - {{ json_extract_scalar('pricepercent', ['maximum'], ['maximum']) }} as maximum, - {{ json_extract_scalar('pricepercent', ['minimum'], ['minimum']) }} as minimum, - {{ json_extract_scalar('pricepercent', ['supplier'], ['supplier']) }} as supplier, - {{ json_extract_scalar('pricepercent', ['minimumPriceDifferential'], ['minimumPriceDifferential']) }} as minimumpricedifferential, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products') }} as table_alias --- pricepercent at products/pricePercent -where 1 = 1 -and pricepercent is not null - diff --git a/models/generated/airbyte_ctes/unibag/products_pricepercent_ab2.sql b/models/generated/airbyte_ctes/unibag/products_pricepercent_ab2.sql deleted file mode 100644 index 9516caa..0000000 --- a/models/generated/airbyte_ctes/unibag/products_pricepercent_ab2.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('products_pricepercent_ab1') }} -select - _airbyte_products_hashid, - cast(base as {{ dbt_utils.type_float() }}) as base, - cast(selly as {{ dbt_utils.type_float() }}) as selly, - cast(market as {{ dbt_utils.type_float() }}) as market, - cast(maximum as {{ dbt_utils.type_float() }}) as maximum, - cast(minimum as {{ dbt_utils.type_float() }}) as minimum, - cast(supplier as {{ dbt_utils.type_float() }}) as supplier, - cast(minimumpricedifferential as {{ dbt_utils.type_float() }}) as minimumpricedifferential, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_pricepercent_ab1') }} --- pricepercent at products/pricePercent -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_pricepercent_ab3.sql b/models/generated/airbyte_ctes/unibag/products_pricepercent_ab3.sql deleted file mode 100644 index a7e53b2..0000000 --- a/models/generated/airbyte_ctes/unibag/products_pricepercent_ab3.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('products_pricepercent_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_products_hashid', - 'base', - 'selly', - 'market', - 'maximum', - 'minimum', - 'supplier', - 'minimumpricedifferential', - ]) }} as _airbyte_pricepercent_hashid, - tmp.* -from {{ ref('products_pricepercent_ab2') }} tmp --- pricepercent at products/pricePercent -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_reviewstatistic_ab1.sql b/models/generated/airbyte_ctes/unibag/products_reviewstatistic_ab1.sql deleted file mode 100644 index aaedc98..0000000 --- a/models/generated/airbyte_ctes/unibag/products_reviewstatistic_ab1.sql +++ /dev/null @@ -1,31 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('products') }} -select - _airbyte_products_hashid, - {{ json_extract_scalar('reviewstatistic', ['total'], ['total']) }} as total, - {{ json_extract_scalar('reviewstatistic', ['totalReview'], ['totalReview']) }} as totalreview, - {{ json_extract_scalar('reviewstatistic', ['totalScore1'], ['totalScore1']) }} as totalscore1, - {{ json_extract_scalar('reviewstatistic', ['totalScore2'], ['totalScore2']) }} as totalscore2, - {{ json_extract_scalar('reviewstatistic', ['totalScore3'], ['totalScore3']) }} as totalscore3, - {{ json_extract_scalar('reviewstatistic', ['totalScore4'], ['totalScore4']) }} as totalscore4, - {{ json_extract_scalar('reviewstatistic', ['totalScore5'], ['totalScore5']) }} as totalscore5, - {{ json_extract_scalar('reviewstatistic', ['scoreAverage'], ['scoreAverage']) }} as scoreaverage, - {{ json_extract_scalar('reviewstatistic', ['totalHasMedia'], ['totalHasMedia']) }} as totalhasmedia, - {{ json_extract_scalar('reviewstatistic', ['totalHasContent'], ['totalHasContent']) }} as totalhascontent, - {{ json_extract_scalar('reviewstatistic', ['scoreAverageWeekTotal'], ['scoreAverageWeekTotal']) }} as scoreaverageweektotal, - {{ json_extract_scalar('reviewstatistic', ['scoreAverageYearTotal'], ['scoreAverageYearTotal']) }} as scoreaverageyeartotal, - {{ json_extract_scalar('reviewstatistic', ['scoreAverageMonthTotal'], ['scoreAverageMonthTotal']) }} as scoreaveragemonthtotal, - {{ json_extract_scalar('reviewstatistic', ['scoreAverageTwoMonthTotal'], ['scoreAverageTwoMonthTotal']) }} as scoreaveragetwomonthtotal, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products') }} as table_alias --- reviewstatistic at products/reviewStatistic -where 1 = 1 -and reviewstatistic is not null - diff --git a/models/generated/airbyte_ctes/unibag/products_reviewstatistic_ab2.sql b/models/generated/airbyte_ctes/unibag/products_reviewstatistic_ab2.sql deleted file mode 100644 index e5f7569..0000000 --- a/models/generated/airbyte_ctes/unibag/products_reviewstatistic_ab2.sql +++ /dev/null @@ -1,30 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('products_reviewstatistic_ab1') }} -select - _airbyte_products_hashid, - cast(total as {{ dbt_utils.type_float() }}) as total, - cast(totalreview as {{ dbt_utils.type_float() }}) as totalreview, - cast(totalscore1 as {{ dbt_utils.type_float() }}) as totalscore1, - cast(totalscore2 as {{ dbt_utils.type_float() }}) as totalscore2, - cast(totalscore3 as {{ dbt_utils.type_float() }}) as totalscore3, - cast(totalscore4 as {{ dbt_utils.type_float() }}) as totalscore4, - cast(totalscore5 as {{ dbt_utils.type_float() }}) as totalscore5, - cast(scoreaverage as {{ dbt_utils.type_float() }}) as scoreaverage, - cast(totalhasmedia as {{ dbt_utils.type_float() }}) as totalhasmedia, - cast(totalhascontent as {{ dbt_utils.type_float() }}) as totalhascontent, - cast(scoreaverageweektotal as {{ dbt_utils.type_float() }}) as scoreaverageweektotal, - cast(scoreaverageyeartotal as {{ dbt_utils.type_float() }}) as scoreaverageyeartotal, - cast(scoreaveragemonthtotal as {{ dbt_utils.type_float() }}) as scoreaveragemonthtotal, - cast(scoreaveragetwomonthtotal as {{ dbt_utils.type_float() }}) as scoreaveragetwomonthtotal, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_reviewstatistic_ab1') }} --- reviewstatistic at products/reviewStatistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_reviewstatistic_ab3.sql b/models/generated/airbyte_ctes/unibag/products_reviewstatistic_ab3.sql deleted file mode 100644 index 253484d..0000000 --- a/models/generated/airbyte_ctes/unibag/products_reviewstatistic_ab3.sql +++ /dev/null @@ -1,30 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('products_reviewstatistic_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_products_hashid', - 'total', - 'totalreview', - 'totalscore1', - 'totalscore2', - 'totalscore3', - 'totalscore4', - 'totalscore5', - 'scoreaverage', - 'totalhasmedia', - 'totalhascontent', - 'scoreaverageweektotal', - 'scoreaverageyeartotal', - 'scoreaveragemonthtotal', - 'scoreaveragetwomonthtotal', - ]) }} as _airbyte_reviewstatistic_hashid, - tmp.* -from {{ ref('products_reviewstatistic_ab2') }} tmp --- reviewstatistic at products/reviewStatistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_score_ab1.sql b/models/generated/airbyte_ctes/unibag/products_score_ab1.sql deleted file mode 100644 index 384889e..0000000 --- a/models/generated/airbyte_ctes/unibag/products_score_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('products') }} -select - _airbyte_products_hashid, - {{ json_extract_scalar('score', ['view'], ['view']) }} as {{ adapter.quote('view') }}, - {{ json_extract_scalar('score', ['order'], ['order']) }} as {{ adapter.quote('order') }}, - {{ json_extract_scalar('score', ['profit'], ['profit']) }} as profit, - {{ json_extract_scalar('score', ['current'], ['current']) }} as {{ adapter.quote('current') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products') }} as table_alias --- score at products/score -where 1 = 1 -and score is not null - diff --git a/models/generated/airbyte_ctes/unibag/products_score_ab2.sql b/models/generated/airbyte_ctes/unibag/products_score_ab2.sql deleted file mode 100644 index 6d45ee1..0000000 --- a/models/generated/airbyte_ctes/unibag/products_score_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('products_score_ab1') }} -select - _airbyte_products_hashid, - cast({{ adapter.quote('view') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('view') }}, - cast({{ adapter.quote('order') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('order') }}, - cast(profit as {{ dbt_utils.type_float() }}) as profit, - cast({{ adapter.quote('current') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('current') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_score_ab1') }} --- score at products/score -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_score_ab3.sql b/models/generated/airbyte_ctes/unibag/products_score_ab3.sql deleted file mode 100644 index 9afd9b7..0000000 --- a/models/generated/airbyte_ctes/unibag/products_score_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('products_score_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_products_hashid', - adapter.quote('view'), - adapter.quote('order'), - 'profit', - adapter.quote('current'), - ]) }} as _airbyte_score_hashid, - tmp.* -from {{ ref('products_score_ab2') }} tmp --- score at products/score -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_sharestatistic_ab1.sql b/models/generated/airbyte_ctes/unibag/products_sharestatistic_ab1.sql deleted file mode 100644 index e6ee713..0000000 --- a/models/generated/airbyte_ctes/unibag/products_sharestatistic_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('products') }} -select - _airbyte_products_hashid, - {{ json_extract_scalar('sharestatistic', ['totalShare'], ['totalShare']) }} as totalshare, - {{ json_extract_scalar('sharestatistic', ['totalShareFromSocialPost'], ['totalShareFromSocialPost']) }} as totalsharefromsocialpost, - {{ json_extract_scalar('sharestatistic', ['totalShareFromProductDetail'], ['totalShareFromProductDetail']) }} as totalsharefromproductdetail, - {{ json_extract_scalar('sharestatistic', ['totalUniqueShareFromSocialPost'], ['totalUniqueShareFromSocialPost']) }} as totaluniquesharefromsocialpost, - {{ json_extract_scalar('sharestatistic', ['totalUniqueShareFromProductDetail'], ['totalUniqueShareFromProductDetail']) }} as totaluniquesharefromproductdetail, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products') }} as table_alias --- sharestatistic at products/shareStatistic -where 1 = 1 -and sharestatistic is not null - diff --git a/models/generated/airbyte_ctes/unibag/products_sharestatistic_ab2.sql b/models/generated/airbyte_ctes/unibag/products_sharestatistic_ab2.sql deleted file mode 100644 index 12214cd..0000000 --- a/models/generated/airbyte_ctes/unibag/products_sharestatistic_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('products_sharestatistic_ab1') }} -select - _airbyte_products_hashid, - cast(totalshare as {{ dbt_utils.type_float() }}) as totalshare, - cast(totalsharefromsocialpost as {{ dbt_utils.type_float() }}) as totalsharefromsocialpost, - cast(totalsharefromproductdetail as {{ dbt_utils.type_float() }}) as totalsharefromproductdetail, - cast(totaluniquesharefromsocialpost as {{ dbt_utils.type_float() }}) as totaluniquesharefromsocialpost, - cast(totaluniquesharefromproductdetail as {{ dbt_utils.type_float() }}) as totaluniquesharefromproductdetail, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_sharestatistic_ab1') }} --- sharestatistic at products/shareStatistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_sharestatistic_ab3.sql b/models/generated/airbyte_ctes/unibag/products_sharestatistic_ab3.sql deleted file mode 100644 index f4b882d..0000000 --- a/models/generated/airbyte_ctes/unibag/products_sharestatistic_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('products_sharestatistic_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_products_hashid', - 'totalshare', - 'totalsharefromsocialpost', - 'totalsharefromproductdetail', - 'totaluniquesharefromsocialpost', - 'totaluniquesharefromproductdetail', - ]) }} as _airbyte_sharestatistic_hashid, - tmp.* -from {{ ref('products_sharestatistic_ab2') }} tmp --- sharestatistic at products/shareStatistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_statistic_ab1.sql b/models/generated/airbyte_ctes/unibag/products_statistic_ab1.sql deleted file mode 100644 index 788159c..0000000 --- a/models/generated/airbyte_ctes/unibag/products_statistic_ab1.sql +++ /dev/null @@ -1,39 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('products') }} -select - _airbyte_products_hashid, - {{ json_extract_scalar('statistic', ['view'], ['view']) }} as {{ adapter.quote('view') }}, - {{ json_extract_scalar('statistic', ['skuTotal'], ['skuTotal']) }} as skutotal, - {{ json_extract_scalar('statistic', ['saleTotal'], ['saleTotal']) }} as saletotal, - {{ json_extract_scalar('statistic', ['skuActive'], ['skuActive']) }} as skuactive, - {{ json_extract_scalar('statistic', ['totalPost'], ['totalPost']) }} as totalpost, - {{ json_extract_scalar('statistic', ['salesTotal'], ['salesTotal']) }} as salestotal, - {{ json_extract_scalar('statistic', ['salePending'], ['salePending']) }} as salepending, - {{ json_extract_scalar('statistic', ['saleWaiting'], ['saleWaiting']) }} as salewaiting, - {{ json_extract_scalar('statistic', ['saleCashback'], ['saleCashback']) }} as salecashback, - {{ json_extract_scalar('statistic', ['saleCancelled'], ['saleCancelled']) }} as salecancelled, - {{ json_extract_scalar('statistic', ['saleDelivered'], ['saleDelivered']) }} as saledelivered, - {{ json_extract_scalar('statistic', ['saleWeekTotal'], ['saleWeekTotal']) }} as saleweektotal, - {{ json_extract_scalar('statistic', ['saleYearTotal'], ['saleYearTotal']) }} as saleyeartotal, - {{ json_extract_scalar('statistic', ['saleDelivering'], ['saleDelivering']) }} as saledelivering, - {{ json_extract_scalar('statistic', ['saleMonthTotal'], ['saleMonthTotal']) }} as salemonthtotal, - {{ json_extract_scalar('statistic', ['salesWeekTotal'], ['salesWeekTotal']) }} as salesweektotal, - {{ json_extract_scalar('statistic', ['salesYearTotal'], ['salesYearTotal']) }} as salesyeartotal, - {{ json_extract_scalar('statistic', ['salesMonthTotal'], ['salesMonthTotal']) }} as salesmonthtotal, - {{ json_extract_scalar('statistic', ['saleTwoMonthTotal'], ['saleTwoMonthTotal']) }} as saletwomonthtotal, - {{ json_extract_scalar('statistic', ['salesTwoMonthTotal'], ['salesTwoMonthTotal']) }} as salestwomonthtotal, - {{ json_extract_scalar('statistic', ['salePaymentProcessing'], ['salePaymentProcessing']) }} as salepaymentprocessing, - {{ json_extract_scalar('statistic', ['totalInventory_aibyte_transform'], ['totalInventory_aibyte_transform']) }} as totalinventory_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products') }} as table_alias --- statistic at products/statistic -where 1 = 1 -and statistic is not null - diff --git a/models/generated/airbyte_ctes/unibag/products_statistic_ab2.sql b/models/generated/airbyte_ctes/unibag/products_statistic_ab2.sql deleted file mode 100644 index e0cd400..0000000 --- a/models/generated/airbyte_ctes/unibag/products_statistic_ab2.sql +++ /dev/null @@ -1,38 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('products_statistic_ab1') }} -select - _airbyte_products_hashid, - cast({{ adapter.quote('view') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('view') }}, - cast(skutotal as {{ dbt_utils.type_float() }}) as skutotal, - cast(saletotal as {{ dbt_utils.type_float() }}) as saletotal, - cast(skuactive as {{ dbt_utils.type_float() }}) as skuactive, - cast(totalpost as {{ dbt_utils.type_float() }}) as totalpost, - cast(salestotal as {{ dbt_utils.type_float() }}) as salestotal, - cast(salepending as {{ dbt_utils.type_float() }}) as salepending, - cast(salewaiting as {{ dbt_utils.type_float() }}) as salewaiting, - cast(salecashback as {{ dbt_utils.type_float() }}) as salecashback, - cast(salecancelled as {{ dbt_utils.type_float() }}) as salecancelled, - cast(saledelivered as {{ dbt_utils.type_float() }}) as saledelivered, - cast(saleweektotal as {{ dbt_utils.type_float() }}) as saleweektotal, - cast(saleyeartotal as {{ dbt_utils.type_float() }}) as saleyeartotal, - cast(saledelivering as {{ dbt_utils.type_float() }}) as saledelivering, - cast(salemonthtotal as {{ dbt_utils.type_float() }}) as salemonthtotal, - cast(salesweektotal as {{ dbt_utils.type_float() }}) as salesweektotal, - cast(salesyeartotal as {{ dbt_utils.type_float() }}) as salesyeartotal, - cast(salesmonthtotal as {{ dbt_utils.type_float() }}) as salesmonthtotal, - cast(saletwomonthtotal as {{ dbt_utils.type_float() }}) as saletwomonthtotal, - cast(salestwomonthtotal as {{ dbt_utils.type_float() }}) as salestwomonthtotal, - cast(salepaymentprocessing as {{ dbt_utils.type_float() }}) as salepaymentprocessing, - cast(totalinventory_aibyte_transform as {{ dbt_utils.type_string() }}) as totalinventory_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('products_statistic_ab1') }} --- statistic at products/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/products_statistic_ab3.sql b/models/generated/airbyte_ctes/unibag/products_statistic_ab3.sql deleted file mode 100644 index 0eea7ec..0000000 --- a/models/generated/airbyte_ctes/unibag/products_statistic_ab3.sql +++ /dev/null @@ -1,38 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('products_statistic_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_products_hashid', - adapter.quote('view'), - 'skutotal', - 'saletotal', - 'skuactive', - 'totalpost', - 'salestotal', - 'salepending', - 'salewaiting', - 'salecashback', - 'salecancelled', - 'saledelivered', - 'saleweektotal', - 'saleyeartotal', - 'saledelivering', - 'salemonthtotal', - 'salesweektotal', - 'salesyeartotal', - 'salesmonthtotal', - 'saletwomonthtotal', - 'salestwomonthtotal', - 'salepaymentprocessing', - 'totalinventory_aibyte_transform', - ]) }} as _airbyte_statistic_hashid, - tmp.* -from {{ ref('products_statistic_ab2') }} tmp --- statistic at products/statistic -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 index 6062ced..b4a9c1d 100644 --- a/models/generated/airbyte_ctes/unibag/promotion_orders_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/promotion_orders_ab1.sql @@ -12,15 +12,16 @@ select {{ 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('table_alias', '_airbyte_data', ['supplier'], ['supplier']) }} as supplier, + {{ 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', ['orderPriceTotal'], ['orderPriceTotal']) }} as orderpricetotal, {{ 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 diff --git a/models/generated/airbyte_ctes/unibag/promotion_orders_ab2.sql b/models/generated/airbyte_ctes/unibag/promotion_orders_ab2.sql index 7386e50..0dff1ec 100644 --- a/models/generated/airbyte_ctes/unibag/promotion_orders_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/promotion_orders_ab2.sql @@ -12,15 +12,16 @@ select 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 {{ type_json() }}) as supplier, + 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(orderpricetotal as {{ dbt_utils.type_float() }}) as orderpricetotal, 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 diff --git a/models/generated/airbyte_ctes/unibag/promotion_orders_ab3.sql b/models/generated/airbyte_ctes/unibag/promotion_orders_ab3.sql index 3c35af3..1f7b933 100644 --- a/models/generated/airbyte_ctes/unibag/promotion_orders_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/promotion_orders_ab3.sql @@ -13,15 +13,16 @@ select adapter.quote('order'), 'title', 'status', - object_to_string('supplier'), + 'supplier', 'createdat', 'promotion', 'updatedat', 'cashbackat', 'commission', boolean_to_string('isrejected'), - 'orderpricetotal', 'quantitypromotion', + 'supplierCommission', + 'supplierCommissionTotal', ]) }} as _airbyte_promotion_orders_hashid, tmp.* from {{ ref('promotion_orders_ab2') }} tmp diff --git a/models/generated/airbyte_ctes/unibag/promotion_orders_supplier_ab1.sql b/models/generated/airbyte_ctes/unibag/promotion_orders_supplier_ab1.sql deleted file mode 100644 index 9172e9b..0000000 --- a/models/generated/airbyte_ctes/unibag/promotion_orders_supplier_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('promotion_orders') }} -select - _airbyte_promotion_orders_hashid, - {{ json_extract_scalar('supplier', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('supplier', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('supplier', ['searchString'], ['searchString']) }} as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('promotion_orders') }} as table_alias --- supplier at promotion-orders/supplier -where 1 = 1 -and supplier is not null - diff --git a/models/generated/airbyte_ctes/unibag/promotion_orders_supplier_ab2.sql b/models/generated/airbyte_ctes/unibag/promotion_orders_supplier_ab2.sql deleted file mode 100644 index b4fa0fd..0000000 --- a/models/generated/airbyte_ctes/unibag/promotion_orders_supplier_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('promotion_orders_supplier_ab1') }} -select - _airbyte_promotion_orders_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('promotion_orders_supplier_ab1') }} --- supplier at promotion-orders/supplier -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotion_orders_supplier_ab3.sql b/models/generated/airbyte_ctes/unibag/promotion_orders_supplier_ab3.sql deleted file mode 100644 index d66909d..0000000 --- a/models/generated/airbyte_ctes/unibag/promotion_orders_supplier_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('promotion_orders_supplier_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_promotion_orders_hashid', - '_id', - adapter.quote('name'), - 'searchstring', - ]) }} as _airbyte_supplier_hashid, - tmp.* -from {{ ref('promotion_orders_supplier_ab2') }} tmp --- supplier at promotion-orders/supplier -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotions_ab1.sql b/models/generated/airbyte_ctes/unibag/promotions_ab1.sql index c6c5b1b..7d95d4e 100644 --- a/models/generated/airbyte_ctes/unibag/promotions_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/promotions_ab1.sql @@ -8,27 +8,24 @@ -- depends_on: {{ source('unibag', '_airbyte_raw_promotions') }} select {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['code'], ['code']) }} as code, {{ 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('table_alias', '_airbyte_data', ['options'], ['options']) }} as {{ adapter.quote('options') }}, + {{ json_extract_scalar('_airbyte_data', ['options'], ['options']) }} as {{ adapter.quote('options') }}, {{ json_extract_scalar('_airbyte_data', ['startAt'], ['startAt']) }} as startat, - {{ json_extract('table_alias', '_airbyte_data', ['applyFor'], ['applyFor']) }} as applyfor, + {{ 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('table_alias', '_airbyte_data', ['statistic'], ['statistic']) }} as statistic, {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, {{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring, - {{ json_extract('table_alias', '_airbyte_data', ['conditionForUser'], ['conditionForUser']) }} as conditionforuser, - {{ json_extract('table_alias', '_airbyte_data', ['supplierCommission'], ['supplierCommission']) }} as suppliercommission, + {{ 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', ['maximumLimitPerUser'], ['maximumLimitPerUser']) }} as maximumlimitperuser, - {{ json_extract_array('_airbyte_data', ['milestonesStatistic'], ['milestonesStatistic']) }} as milestonesstatistic, {{ 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 diff --git a/models/generated/airbyte_ctes/unibag/promotions_ab2.sql b/models/generated/airbyte_ctes/unibag/promotions_ab2.sql index 8a6e218..16eaeb6 100644 --- a/models/generated/airbyte_ctes/unibag/promotions_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/promotions_ab2.sql @@ -8,27 +8,24 @@ -- depends_on: {{ ref('promotions_ab1') }} select cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(code as {{ dbt_utils.type_string() }}) as code, 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 {{ type_json() }}) as {{ adapter.quote('options') }}, + 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 {{ type_json() }}) as applyfor, + 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(statistic as {{ type_json() }}) as statistic, cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring, - cast(conditionforuser as {{ type_json() }}) as conditionforuser, - cast(suppliercommission as {{ type_json() }}) as suppliercommission, + 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(maximumlimitperuser as {{ dbt_utils.type_float() }}) as maximumlimitperuser, - milestonesstatistic, {{ 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 diff --git a/models/generated/airbyte_ctes/unibag/promotions_ab3.sql b/models/generated/airbyte_ctes/unibag/promotions_ab3.sql index 4d92dc8..068abef 100644 --- a/models/generated/airbyte_ctes/unibag/promotions_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/promotions_ab3.sql @@ -9,27 +9,24 @@ select {{ dbt_utils.surrogate_key([ '_id', - 'code', 'rest', adapter.quote('type'), 'endat', 'title', boolean_to_string('active'), - object_to_string(adapter.quote('options')), + adapter.quote('options'), 'startat', - object_to_string('applyfor'), + 'applyfor', 'quantity', 'articleid', 'createdat', - object_to_string('statistic'), 'updatedat', 'searchstring', - object_to_string('conditionforuser'), - object_to_string('suppliercommission'), + 'sharepercent', + 'conditionforuser', boolean_to_string('isunlimitedquantity'), - 'maximumlimitperuser', - array_to_string('milestonesstatistic'), boolean_to_string('isapplyfororderwholesale'), + 'supplierCommission', ]) }} as _airbyte_promotions_hashid, tmp.* from {{ ref('promotions_ab2') }} tmp diff --git a/models/generated/airbyte_ctes/unibag/promotions_applyfor_ab1.sql b/models/generated/airbyte_ctes/unibag/promotions_applyfor_ab1.sql deleted file mode 100644 index 8c7bf85..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_applyfor_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('promotions') }} -select - _airbyte_promotions_hashid, - {{ json_extract_array('applyfor', ['list'], ['list']) }} as list, - {{ json_extract_scalar('applyfor', ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_array('applyfor', ['provinces'], ['provinces']) }} as provinces, - {{ json_extract_scalar('applyfor', ['isApplyAllOrder'], ['isApplyAllOrder']) }} as isapplyallorder, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('promotions') }} as table_alias --- applyfor at promotions/applyFor -where 1 = 1 -and applyfor is not null - diff --git a/models/generated/airbyte_ctes/unibag/promotions_applyfor_ab2.sql b/models/generated/airbyte_ctes/unibag/promotions_applyfor_ab2.sql deleted file mode 100644 index 1e84d60..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_applyfor_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('promotions_applyfor_ab1') }} -select - _airbyte_promotions_hashid, - list, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - provinces, - {{ cast_to_boolean('isapplyallorder') }} as isapplyallorder, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('promotions_applyfor_ab1') }} --- applyfor at promotions/applyFor -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotions_applyfor_ab3.sql b/models/generated/airbyte_ctes/unibag/promotions_applyfor_ab3.sql deleted file mode 100644 index aa4baa7..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_applyfor_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('promotions_applyfor_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_promotions_hashid', - array_to_string('list'), - adapter.quote('type'), - array_to_string('provinces'), - boolean_to_string('isapplyallorder'), - ]) }} as _airbyte_applyfor_hashid, - tmp.* -from {{ ref('promotions_applyfor_ab2') }} tmp --- applyfor at promotions/applyFor -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotions_conditionforuser_ab1.sql b/models/generated/airbyte_ctes/unibag/promotions_conditionforuser_ab1.sql deleted file mode 100644 index d5b39fb..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_conditionforuser_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('promotions') }} -select - _airbyte_promotions_hashid, - {{ json_extract_scalar('conditionforuser', ['gender'], ['gender']) }} as gender, - {{ json_extract_scalar('conditionforuser', ['applyFor'], ['applyFor']) }} as applyfor, - {{ json_extract_array('conditionforuser', ['segments'], ['segments']) }} as segments, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('promotions') }} as table_alias --- conditionforuser at promotions/conditionForUser -where 1 = 1 -and conditionforuser is not null - diff --git a/models/generated/airbyte_ctes/unibag/promotions_conditionforuser_ab2.sql b/models/generated/airbyte_ctes/unibag/promotions_conditionforuser_ab2.sql deleted file mode 100644 index fe8a868..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_conditionforuser_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('promotions_conditionforuser_ab1') }} -select - _airbyte_promotions_hashid, - cast(gender as {{ dbt_utils.type_string() }}) as gender, - cast(applyfor as {{ dbt_utils.type_string() }}) as applyfor, - segments, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('promotions_conditionforuser_ab1') }} --- conditionforuser at promotions/conditionForUser -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotions_conditionforuser_ab3.sql b/models/generated/airbyte_ctes/unibag/promotions_conditionforuser_ab3.sql deleted file mode 100644 index 803db67..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_conditionforuser_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('promotions_conditionforuser_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_promotions_hashid', - 'gender', - 'applyfor', - array_to_string('segments'), - ]) }} as _airbyte_conditionforuser_hashid, - tmp.* -from {{ ref('promotions_conditionforuser_ab2') }} tmp --- conditionforuser at promotions/conditionForUser -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotions_options_ab1.sql b/models/generated/airbyte_ctes/unibag/promotions_options_ab1.sql deleted file mode 100644 index 649ea3f..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_options_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('promotions') }} -select - _airbyte_promotions_hashid, - {{ json_extract('table_alias', adapter.quote('options'), ['bonus'], ['bonus']) }} as bonus, - {{ json_extract_array(adapter.quote('options'), ['milestones'], ['milestones']) }} as milestones, - {{ json_extract_array(adapter.quote('options'), ['supplierMilestones'], ['supplierMilestones']) }} as suppliermilestones, - {{ json_extract_scalar(adapter.quote('options'), ['transactionMinValue'], ['transactionMinValue']) }} as transactionminvalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('promotions') }} as table_alias --- options at promotions/options -where 1 = 1 -and {{ adapter.quote('options') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/promotions_options_ab2.sql b/models/generated/airbyte_ctes/unibag/promotions_options_ab2.sql deleted file mode 100644 index e598e4e..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_options_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('promotions_options_ab1') }} -select - _airbyte_promotions_hashid, - cast(bonus as {{ type_json() }}) as bonus, - milestones, - suppliermilestones, - cast(transactionminvalue as {{ dbt_utils.type_float() }}) as transactionminvalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('promotions_options_ab1') }} --- options at promotions/options -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotions_options_ab3.sql b/models/generated/airbyte_ctes/unibag/promotions_options_ab3.sql deleted file mode 100644 index a8b02ca..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_options_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('promotions_options_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_promotions_hashid', - object_to_string('bonus'), - array_to_string('milestones'), - array_to_string('suppliermilestones'), - 'transactionminvalue', - ]) }} as _airbyte_options_hashid, - tmp.* -from {{ ref('promotions_options_ab2') }} tmp --- options at promotions/options -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotions_options_bonus_ab1.sql b/models/generated/airbyte_ctes/unibag/promotions_options_bonus_ab1.sql deleted file mode 100644 index a1d98e6..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_options_bonus_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('promotions_options') }} -select - _airbyte_options_hashid, - {{ json_extract_scalar('bonus', ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_scalar('bonus', ['value'], ['value']) }} as {{ adapter.quote('value') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('promotions_options') }} as table_alias --- bonus at promotions/options/bonus -where 1 = 1 -and bonus is not null - diff --git a/models/generated/airbyte_ctes/unibag/promotions_options_bonus_ab2.sql b/models/generated/airbyte_ctes/unibag/promotions_options_bonus_ab2.sql deleted file mode 100644 index d91be70..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_options_bonus_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('promotions_options_bonus_ab1') }} -select - _airbyte_options_hashid, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - cast({{ adapter.quote('value') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('value') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('promotions_options_bonus_ab1') }} --- bonus at promotions/options/bonus -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotions_options_bonus_ab3.sql b/models/generated/airbyte_ctes/unibag/promotions_options_bonus_ab3.sql deleted file mode 100644 index 0211fa6..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_options_bonus_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('promotions_options_bonus_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_options_hashid', - adapter.quote('type'), - adapter.quote('value'), - ]) }} as _airbyte_bonus_hashid, - tmp.* -from {{ ref('promotions_options_bonus_ab2') }} tmp --- bonus at promotions/options/bonus -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotions_statistic_ab1.sql b/models/generated/airbyte_ctes/unibag/promotions_statistic_ab1.sql deleted file mode 100644 index cabc49b..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_statistic_ab1.sql +++ /dev/null @@ -1,30 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('promotions') }} -select - _airbyte_promotions_hashid, - {{ json_extract_scalar('statistic', ['nmv'], ['nmv']) }} as nmv, - {{ json_extract_scalar('statistic', ['userTotal'], ['userTotal']) }} as usertotal, - {{ json_extract_scalar('statistic', ['quantityPendingTotal'], ['quantityPendingTotal']) }} as quantitypendingtotal, - {{ json_extract_scalar('statistic', ['quantitySuccessTotal'], ['quantitySuccessTotal']) }} as quantitysuccesstotal, - {{ json_extract_scalar('statistic', ['quantityRejectedTotal'], ['quantityRejectedTotal']) }} as quantityrejectedtotal, - {{ json_extract_scalar('statistic', ['commissionPendingTotal'], ['commissionPendingTotal']) }} as commissionpendingtotal, - {{ json_extract_scalar('statistic', ['commissionSuccessTotal'], ['commissionSuccessTotal']) }} as commissionsuccesstotal, - {{ json_extract_scalar('statistic', ['commissionRejectedTotal'], ['commissionRejectedTotal']) }} as commissionrejectedtotal, - {{ json_extract_scalar('statistic', ['quantityNotRejectedTotal'], ['quantityNotRejectedTotal']) }} as quantitynotrejectedtotal, - {{ json_extract_scalar('statistic', ['supplierCommissionPending'], ['supplierCommissionPending']) }} as suppliercommissionpending, - {{ json_extract_scalar('statistic', ['supplierCommissionSuccess'], ['supplierCommissionSuccess']) }} as suppliercommissionsuccess, - {{ json_extract_scalar('statistic', ['commissionNotRejectedTotal'], ['commissionNotRejectedTotal']) }} as commissionnotrejectedtotal, - {{ json_extract_scalar('statistic', ['supplierCommissionNotRejected'], ['supplierCommissionNotRejected']) }} as suppliercommissionnotrejected, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('promotions') }} as table_alias --- statistic at promotions/statistic -where 1 = 1 -and statistic is not null - diff --git a/models/generated/airbyte_ctes/unibag/promotions_statistic_ab2.sql b/models/generated/airbyte_ctes/unibag/promotions_statistic_ab2.sql deleted file mode 100644 index be72de9..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_statistic_ab2.sql +++ /dev/null @@ -1,29 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('promotions_statistic_ab1') }} -select - _airbyte_promotions_hashid, - cast(nmv as {{ dbt_utils.type_float() }}) as nmv, - cast(usertotal as {{ dbt_utils.type_float() }}) as usertotal, - cast(quantitypendingtotal as {{ dbt_utils.type_float() }}) as quantitypendingtotal, - cast(quantitysuccesstotal as {{ dbt_utils.type_float() }}) as quantitysuccesstotal, - cast(quantityrejectedtotal as {{ dbt_utils.type_float() }}) as quantityrejectedtotal, - cast(commissionpendingtotal as {{ dbt_utils.type_float() }}) as commissionpendingtotal, - cast(commissionsuccesstotal as {{ dbt_utils.type_float() }}) as commissionsuccesstotal, - cast(commissionrejectedtotal as {{ dbt_utils.type_float() }}) as commissionrejectedtotal, - cast(quantitynotrejectedtotal as {{ dbt_utils.type_float() }}) as quantitynotrejectedtotal, - cast(suppliercommissionpending as {{ dbt_utils.type_float() }}) as suppliercommissionpending, - cast(suppliercommissionsuccess as {{ dbt_utils.type_float() }}) as suppliercommissionsuccess, - cast(commissionnotrejectedtotal as {{ dbt_utils.type_float() }}) as commissionnotrejectedtotal, - cast(suppliercommissionnotrejected as {{ dbt_utils.type_float() }}) as suppliercommissionnotrejected, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('promotions_statistic_ab1') }} --- statistic at promotions/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotions_statistic_ab3.sql b/models/generated/airbyte_ctes/unibag/promotions_statistic_ab3.sql deleted file mode 100644 index b86cffe..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_statistic_ab3.sql +++ /dev/null @@ -1,29 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('promotions_statistic_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_promotions_hashid', - 'nmv', - 'usertotal', - 'quantitypendingtotal', - 'quantitysuccesstotal', - 'quantityrejectedtotal', - 'commissionpendingtotal', - 'commissionsuccesstotal', - 'commissionrejectedtotal', - 'quantitynotrejectedtotal', - 'suppliercommissionpending', - 'suppliercommissionsuccess', - 'commissionnotrejectedtotal', - 'suppliercommissionnotrejected', - ]) }} as _airbyte_statistic_hashid, - tmp.* -from {{ ref('promotions_statistic_ab2') }} tmp --- statistic at promotions/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotions_suppliercommission_ab1.sql b/models/generated/airbyte_ctes/unibag/promotions_suppliercommission_ab1.sql deleted file mode 100644 index 5be9750..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_suppliercommission_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('promotions') }} -select - _airbyte_promotions_hashid, - {{ json_extract_scalar('suppliercommission', ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_scalar('suppliercommission', ['value'], ['value']) }} as {{ adapter.quote('value') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('promotions') }} as table_alias --- suppliercommission at promotions/supplierCommission -where 1 = 1 -and suppliercommission is not null - diff --git a/models/generated/airbyte_ctes/unibag/promotions_suppliercommission_ab2.sql b/models/generated/airbyte_ctes/unibag/promotions_suppliercommission_ab2.sql deleted file mode 100644 index 7a8ab71..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_suppliercommission_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('promotions_suppliercommission_ab1') }} -select - _airbyte_promotions_hashid, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - cast({{ adapter.quote('value') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('value') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('promotions_suppliercommission_ab1') }} --- suppliercommission at promotions/supplierCommission -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/promotions_suppliercommission_ab3.sql b/models/generated/airbyte_ctes/unibag/promotions_suppliercommission_ab3.sql deleted file mode 100644 index 6cdd388..0000000 --- a/models/generated/airbyte_ctes/unibag/promotions_suppliercommission_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('promotions_suppliercommission_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_promotions_hashid', - adapter.quote('type'), - adapter.quote('value'), - ]) }} as _airbyte_suppliercommission_hashid, - tmp.* -from {{ ref('promotions_suppliercommission_ab2') }} tmp --- suppliercommission at promotions/supplierCommission -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_ab1.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_ab1.sql deleted file mode 100644 index 9f16705..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_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_session_deliveries') }} -select - {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('_airbyte_data', ['cart'], ['cart']) }} as cart, - {{ json_extract_scalar('_airbyte_data', ['note'], ['note']) }} as note, - {{ json_extract_scalar('_airbyte_data', ['title'], ['title']) }} as title, - {{ json_extract('table_alias', '_airbyte_data', ['request'], ['request']) }} as request, - {{ json_extract_scalar('_airbyte_data', ['service'], ['service']) }} as service, - {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as currency, - {{ json_extract('table_alias', '_airbyte_data', ['customer'], ['customer']) }} as customer, - {{ json_extract('table_alias', '_airbyte_data', ['delivery'], ['delivery']) }} as delivery, - {{ json_extract('table_alias', '_airbyte_data', ['location'], ['location']) }} as {{ adapter.quote('location') }}, - {{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat, - {{ json_extract('table_alias', '_airbyte_data', ['promotion'], ['promotion']) }} as promotion, - {{ json_extract_scalar('_airbyte_data', ['sessionOrder'], ['sessionOrder']) }} as sessionorder, - {{ json_extract_scalar('_airbyte_data', ['paymentMethod'], ['paymentMethod']) }} as paymentmethod, - {{ json_extract_scalar('_airbyte_data', ['estimateTimeDelivery'], ['estimateTimeDelivery']) }} as estimatetimedelivery, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ source('unibag', '_airbyte_raw_session_deliveries') }} as table_alias --- session_deliveries -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_ab2.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_ab2.sql deleted file mode 100644 index 32f8f98..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_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('session_deliveries_ab1') }} -select - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(cart as {{ dbt_utils.type_string() }}) as cart, - cast(note as {{ dbt_utils.type_string() }}) as note, - cast(title as {{ dbt_utils.type_string() }}) as title, - cast(request as {{ type_json() }}) as request, - cast(service as {{ dbt_utils.type_string() }}) as service, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - cast(customer as {{ type_json() }}) as customer, - cast(delivery as {{ type_json() }}) as delivery, - cast({{ adapter.quote('location') }} as {{ type_json() }}) as {{ adapter.quote('location') }}, - cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(promotion as {{ type_json() }}) as promotion, - cast(sessionorder as {{ dbt_utils.type_string() }}) as sessionorder, - cast(paymentmethod as {{ dbt_utils.type_string() }}) as paymentmethod, - cast(estimatetimedelivery as {{ dbt_utils.type_string() }}) as estimatetimedelivery, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries_ab1') }} --- session_deliveries -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_ab3.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_ab3.sql deleted file mode 100644 index deda432..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_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('session_deliveries_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_id', - 'cart', - 'note', - 'title', - object_to_string('request'), - 'service', - 'currency', - object_to_string('customer'), - object_to_string('delivery'), - object_to_string(adapter.quote('location')), - 'createdat', - object_to_string('promotion'), - 'sessionorder', - 'paymentmethod', - 'estimatetimedelivery', - ]) }} as _airbyte_session_deliveries_hashid, - tmp.* -from {{ ref('session_deliveries_ab2') }} tmp --- session_deliveries -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_customer_ab1.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_customer_ab1.sql deleted file mode 100644 index dff968e..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_customer_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('session_deliveries') }} -select - _airbyte_session_deliveries_hashid, - {{ json_extract_scalar('customer', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('customer', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('customer', ['phone'], ['phone']) }} as phone, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries') }} as table_alias --- customer at session-deliveries/customer -where 1 = 1 -and customer is not null - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_customer_ab2.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_customer_ab2.sql deleted file mode 100644 index bad5357..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_customer_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('session_deliveries_customer_ab1') }} -select - _airbyte_session_deliveries_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(phone as {{ dbt_utils.type_string() }}) as phone, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries_customer_ab1') }} --- customer at session-deliveries/customer -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_customer_ab3.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_customer_ab3.sql deleted file mode 100644 index dcaa602..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_customer_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('session_deliveries_customer_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_session_deliveries_hashid', - '_id', - adapter.quote('name'), - 'phone', - ]) }} as _airbyte_customer_hashid, - tmp.* -from {{ ref('session_deliveries_customer_ab2') }} tmp --- customer at session-deliveries/customer -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_ab1.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_ab1.sql deleted file mode 100644 index eac3a7e..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_ab1.sql +++ /dev/null @@ -1,33 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('session_deliveries') }} -select - _airbyte_session_deliveries_hashid, - {{ json_extract_scalar('delivery', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('delivery', ['fee'], ['fee']) }} as fee, - {{ json_extract_scalar('delivery', ['desc'], ['desc']) }} as {{ adapter.quote('desc') }}, - {{ json_extract_scalar('delivery', ['note'], ['note']) }} as note, - {{ json_extract_scalar('delivery', ['title'], ['title']) }} as title, - {{ json_extract('table_alias', 'delivery', ['feeShip'], ['feeShip']) }} as feeship, - {{ json_extract_scalar('delivery', ['currency'], ['currency']) }} as currency, - {{ json_extract_scalar('delivery', ['sourceId'], ['sourceId']) }} as sourceid, - {{ json_extract_scalar('delivery', ['courierName'], ['courierName']) }} as couriername, - {{ json_extract_scalar('delivery', ['serviceCode'], ['serviceCode']) }} as servicecode, - {{ json_extract_scalar('delivery', ['serviceName'], ['serviceName']) }} as servicename, - {{ json_extract_scalar('delivery', ['deliveryCode'], ['deliveryCode']) }} as deliverycode, - {{ json_extract_scalar('delivery', ['maxDeliveryDays'], ['maxDeliveryDays']) }} as maxdeliverydays, - {{ json_extract_scalar('delivery', ['minDeliveryDays'], ['minDeliveryDays']) }} as mindeliverydays, - {{ json_extract_scalar('delivery', ['realShippingFee'], ['realShippingFee']) }} as realshippingfee, - {{ json_extract_scalar('delivery', ['estimateTimeDelivery'], ['estimateTimeDelivery']) }} as estimatetimedelivery, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries') }} as table_alias --- delivery at session-deliveries/delivery -where 1 = 1 -and delivery is not null - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_ab2.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_ab2.sql deleted file mode 100644 index 1e615ba..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_ab2.sql +++ /dev/null @@ -1,32 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('session_deliveries_delivery_ab1') }} -select - _airbyte_session_deliveries_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(fee as {{ dbt_utils.type_float() }}) as fee, - cast({{ adapter.quote('desc') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('desc') }}, - cast(note as {{ dbt_utils.type_string() }}) as note, - cast(title as {{ dbt_utils.type_string() }}) as title, - cast(feeship as {{ type_json() }}) as feeship, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - cast(sourceid as {{ dbt_utils.type_float() }}) as sourceid, - cast(couriername as {{ dbt_utils.type_string() }}) as couriername, - cast(servicecode as {{ dbt_utils.type_string() }}) as servicecode, - cast(servicename as {{ dbt_utils.type_string() }}) as servicename, - cast(deliverycode as {{ dbt_utils.type_string() }}) as deliverycode, - cast(maxdeliverydays as {{ dbt_utils.type_float() }}) as maxdeliverydays, - cast(mindeliverydays as {{ dbt_utils.type_float() }}) as mindeliverydays, - cast(realshippingfee as {{ dbt_utils.type_float() }}) as realshippingfee, - cast(estimatetimedelivery as {{ dbt_utils.type_string() }}) as estimatetimedelivery, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries_delivery_ab1') }} --- delivery at session-deliveries/delivery -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_ab3.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_ab3.sql deleted file mode 100644 index 1a61a67..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_ab3.sql +++ /dev/null @@ -1,32 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('session_deliveries_delivery_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_session_deliveries_hashid', - '_id', - 'fee', - adapter.quote('desc'), - 'note', - 'title', - object_to_string('feeship'), - 'currency', - 'sourceid', - 'couriername', - 'servicecode', - 'servicename', - 'deliverycode', - 'maxdeliverydays', - 'mindeliverydays', - 'realshippingfee', - 'estimatetimedelivery', - ]) }} as _airbyte_delivery_hashid, - tmp.* -from {{ ref('session_deliveries_delivery_ab2') }} tmp --- delivery at session-deliveries/delivery -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_feeship_ab1.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_feeship_ab1.sql deleted file mode 100644 index 4f72d29..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_feeship_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('session_deliveries_delivery') }} -select - _airbyte_delivery_hashid, - {{ json_extract_scalar('feeship', ['cod'], ['cod']) }} as cod, - {{ json_extract_scalar('feeship', ['total'], ['total']) }} as total, - {{ json_extract_scalar('feeship', ['shipping'], ['shipping']) }} as shipping, - {{ json_extract_scalar('feeship', ['insurance'], ['insurance']) }} as insurance, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries_delivery') }} as table_alias --- feeship at session-deliveries/delivery/feeShip -where 1 = 1 -and feeship is not null - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_feeship_ab2.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_feeship_ab2.sql deleted file mode 100644 index c2dfad9..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_feeship_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('session_deliveries_delivery_feeship_ab1') }} -select - _airbyte_delivery_hashid, - cast(cod as {{ dbt_utils.type_float() }}) as cod, - cast(total as {{ dbt_utils.type_float() }}) as total, - cast(shipping as {{ dbt_utils.type_float() }}) as shipping, - cast(insurance as {{ dbt_utils.type_float() }}) as insurance, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries_delivery_feeship_ab1') }} --- feeship at session-deliveries/delivery/feeShip -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_feeship_ab3.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_feeship_ab3.sql deleted file mode 100644 index 84a537d..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_delivery_feeship_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('session_deliveries_delivery_feeship_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_delivery_hashid', - 'cod', - 'total', - 'shipping', - 'insurance', - ]) }} as _airbyte_feeship_hashid, - tmp.* -from {{ ref('session_deliveries_delivery_feeship_ab2') }} tmp --- feeship at session-deliveries/delivery/feeShip -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_location_ab1.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_location_ab1.sql deleted file mode 100644 index 02f5024..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_location_ab1.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('session_deliveries') }} -select - _airbyte_session_deliveries_hashid, - {{ json_extract_scalar(adapter.quote('location'), ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar(adapter.quote('location'), ['ward'], ['ward']) }} as ward, - {{ json_extract_scalar(adapter.quote('location'), ['address'], ['address']) }} as address, - {{ json_extract_scalar(adapter.quote('location'), ['district'], ['district']) }} as district, - {{ json_extract_scalar(adapter.quote('location'), ['province'], ['province']) }} as province, - {{ json_extract_scalar(adapter.quote('location'), ['fullAddress'], ['fullAddress']) }} as fulladdress, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries') }} as table_alias --- location at session-deliveries/location -where 1 = 1 -and {{ adapter.quote('location') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_location_ab2.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_location_ab2.sql deleted file mode 100644 index d702f19..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_location_ab2.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('session_deliveries_location_ab1') }} -select - _airbyte_session_deliveries_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(ward as {{ dbt_utils.type_float() }}) as ward, - cast(address as {{ dbt_utils.type_string() }}) as address, - cast(district as {{ dbt_utils.type_float() }}) as district, - cast(province as {{ dbt_utils.type_float() }}) as province, - cast(fulladdress as {{ dbt_utils.type_string() }}) as fulladdress, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries_location_ab1') }} --- location at session-deliveries/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_location_ab3.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_location_ab3.sql deleted file mode 100644 index a54f604..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_location_ab3.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('session_deliveries_location_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_session_deliveries_hashid', - '_id', - 'ward', - 'address', - 'district', - 'province', - 'fulladdress', - ]) }} as _airbyte_location_hashid, - tmp.* -from {{ ref('session_deliveries_location_ab2') }} tmp --- location at session-deliveries/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_promotion_ab1.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_promotion_ab1.sql deleted file mode 100644 index 8c63cee..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_promotion_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('session_deliveries') }} -select - _airbyte_session_deliveries_hashid, - {{ json_extract_scalar('promotion', ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_scalar('promotion', ['discount'], ['discount']) }} as discount, - {{ json_extract_scalar('promotion', ['isApplied'], ['isApplied']) }} as isapplied, - {{ json_extract_scalar('promotion', ['minOrderValue'], ['minOrderValue']) }} as minordervalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries') }} as table_alias --- promotion at session-deliveries/promotion -where 1 = 1 -and promotion is not null - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_promotion_ab2.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_promotion_ab2.sql deleted file mode 100644 index 4f0a8bf..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_promotion_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('session_deliveries_promotion_ab1') }} -select - _airbyte_session_deliveries_hashid, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - cast(discount as {{ dbt_utils.type_float() }}) as discount, - {{ cast_to_boolean('isapplied') }} as isapplied, - cast(minordervalue as {{ dbt_utils.type_float() }}) as minordervalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries_promotion_ab1') }} --- promotion at session-deliveries/promotion -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_promotion_ab3.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_promotion_ab3.sql deleted file mode 100644 index 9411be1..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_promotion_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('session_deliveries_promotion_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_session_deliveries_hashid', - adapter.quote('type'), - 'discount', - boolean_to_string('isapplied'), - 'minordervalue', - ]) }} as _airbyte_promotion_hashid, - tmp.* -from {{ ref('session_deliveries_promotion_ab2') }} tmp --- promotion at session-deliveries/promotion -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_request_ab1.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_request_ab1.sql deleted file mode 100644 index 7177427..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_request_ab1.sql +++ /dev/null @@ -1,27 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('session_deliveries') }} -select - _airbyte_session_deliveries_hashid, - {{ json_extract('table_alias', 'request', ['to'], ['to']) }} as {{ adapter.quote('to') }}, - {{ json_extract('table_alias', 'request', ['from'], ['from']) }} as {{ adapter.quote('from') }}, - {{ json_extract_array('request', ['items'], ['items']) }} as items, - {{ json_extract_scalar('request', ['checksum'], ['checksum']) }} as checksum, - {{ json_extract_scalar('request', ['codAmount'], ['codAmount']) }} as codamount, - {{ json_extract_scalar('request', ['orderCode'], ['orderCode']) }} as ordercode, - {{ json_extract_scalar('request', ['restockAt'], ['restockAt']) }} as restockat, - {{ json_extract_scalar('request', ['isPreorder'], ['isPreorder']) }} as ispreorder, - {{ json_extract_scalar('request', ['totalAmount'], ['totalAmount']) }} as totalamount, - {{ json_extract_scalar('request', ['paymentMethod'], ['paymentMethod']) }} as paymentmethod, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries') }} as table_alias --- request at session-deliveries/request -where 1 = 1 -and request is not null - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_request_ab2.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_request_ab2.sql deleted file mode 100644 index bc19197..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_request_ab2.sql +++ /dev/null @@ -1,26 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('session_deliveries_request_ab1') }} -select - _airbyte_session_deliveries_hashid, - cast({{ adapter.quote('to') }} as {{ type_json() }}) as {{ adapter.quote('to') }}, - cast({{ adapter.quote('from') }} as {{ type_json() }}) as {{ adapter.quote('from') }}, - items, - cast(checksum as {{ dbt_utils.type_string() }}) as checksum, - cast(codamount as {{ dbt_utils.type_float() }}) as codamount, - cast(ordercode as {{ dbt_utils.type_string() }}) as ordercode, - cast(restockat as {{ dbt_utils.type_string() }}) as restockat, - {{ cast_to_boolean('ispreorder') }} as ispreorder, - cast(totalamount as {{ dbt_utils.type_float() }}) as totalamount, - cast(paymentmethod as {{ dbt_utils.type_string() }}) as paymentmethod, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries_request_ab1') }} --- request at session-deliveries/request -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_request_ab3.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_request_ab3.sql deleted file mode 100644 index fa7ce53..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_request_ab3.sql +++ /dev/null @@ -1,26 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('session_deliveries_request_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_session_deliveries_hashid', - object_to_string(adapter.quote('to')), - object_to_string(adapter.quote('from')), - array_to_string('items'), - 'checksum', - 'codamount', - 'ordercode', - 'restockat', - boolean_to_string('ispreorder'), - 'totalamount', - 'paymentmethod', - ]) }} as _airbyte_request_hashid, - tmp.* -from {{ ref('session_deliveries_request_ab2') }} tmp --- request at session-deliveries/request -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_request_from_ab1.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_request_from_ab1.sql deleted file mode 100644 index e95b5de..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_request_from_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('session_deliveries_request') }} -select - _airbyte_request_hashid, - {{ json_extract_scalar(adapter.quote('from'), ['userId'], ['userId']) }} as userid, - {{ json_extract_scalar(adapter.quote('from'), ['warehouseId'], ['warehouseId']) }} as warehouseid, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries_request') }} as table_alias --- from at session-deliveries/request/from -where 1 = 1 -and {{ adapter.quote('from') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_request_from_ab2.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_request_from_ab2.sql deleted file mode 100644 index a99524e..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_request_from_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('session_deliveries_request_from_ab1') }} -select - _airbyte_request_hashid, - cast(userid as {{ dbt_utils.type_string() }}) as userid, - cast(warehouseid as {{ dbt_utils.type_string() }}) as warehouseid, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries_request_from_ab1') }} --- from at session-deliveries/request/from -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_request_from_ab3.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_request_from_ab3.sql deleted file mode 100644 index fcd2b83..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_request_from_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('session_deliveries_request_from_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_request_hashid', - 'userid', - 'warehouseid', - ]) }} as _airbyte_from_hashid, - tmp.* -from {{ ref('session_deliveries_request_from_ab2') }} tmp --- from at session-deliveries/request/from -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_ab1.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_ab1.sql deleted file mode 100644 index a299714..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('session_deliveries_request') }} -select - _airbyte_request_hashid, - {{ json_extract_scalar(adapter.quote('to'), ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar(adapter.quote('to'), ['phone'], ['phone']) }} as phone, - {{ json_extract('table_alias', adapter.quote('to'), ['location'], ['location']) }} as {{ adapter.quote('location') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries_request') }} as table_alias --- to at session-deliveries/request/to -where 1 = 1 -and {{ adapter.quote('to') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_ab2.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_ab2.sql deleted file mode 100644 index d1c4b09..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('session_deliveries_request_to_ab1') }} -select - _airbyte_request_hashid, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(phone as {{ dbt_utils.type_string() }}) as phone, - cast({{ adapter.quote('location') }} as {{ type_json() }}) as {{ adapter.quote('location') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries_request_to_ab1') }} --- to at session-deliveries/request/to -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_ab3.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_ab3.sql deleted file mode 100644 index 31c07b9..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('session_deliveries_request_to_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_request_hashid', - adapter.quote('name'), - 'phone', - object_to_string(adapter.quote('location')), - ]) }} as _airbyte_to_hashid, - tmp.* -from {{ ref('session_deliveries_request_to_ab2') }} tmp --- to at session-deliveries/request/to -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_location_ab1.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_location_ab1.sql deleted file mode 100644 index ae3e1c1..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_location_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('session_deliveries_request_to') }} -select - _airbyte_to_hashid, - {{ json_extract_scalar(adapter.quote('location'), ['address'], ['address']) }} as address, - {{ json_extract_scalar(adapter.quote('location'), ['wardCode'], ['wardCode']) }} as wardcode, - {{ json_extract_scalar(adapter.quote('location'), ['districtCode'], ['districtCode']) }} as districtcode, - {{ json_extract_scalar(adapter.quote('location'), ['provinceCode'], ['provinceCode']) }} as provincecode, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries_request_to') }} as table_alias --- location at session-deliveries/request/to/location -where 1 = 1 -and {{ adapter.quote('location') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_location_ab2.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_location_ab2.sql deleted file mode 100644 index 54bf1fa..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_location_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('session_deliveries_request_to_location_ab1') }} -select - _airbyte_to_hashid, - cast(address as {{ dbt_utils.type_string() }}) as address, - cast(wardcode as {{ dbt_utils.type_float() }}) as wardcode, - cast(districtcode as {{ dbt_utils.type_float() }}) as districtcode, - cast(provincecode as {{ dbt_utils.type_float() }}) as provincecode, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('session_deliveries_request_to_location_ab1') }} --- location at session-deliveries/request/to/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_location_ab3.sql b/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_location_ab3.sql deleted file mode 100644 index 8b99d10..0000000 --- a/models/generated/airbyte_ctes/unibag/session_deliveries_request_to_location_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('session_deliveries_request_to_location_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_to_hashid', - 'address', - 'wardcode', - 'districtcode', - 'provincecode', - ]) }} as _airbyte_location_hashid, - tmp.* -from {{ ref('session_deliveries_request_to_location_ab2') }} tmp --- location at session-deliveries/request/to/location -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 index e521a89..9aad28d 100644 --- a/models/generated/airbyte_ctes/unibag/social_posts_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/social_posts_ab1.sql @@ -24,7 +24,7 @@ select {{ 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('table_alias', '_airbyte_data', ['statistic'], ['statistic']) }} as statistic, + {{ 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, @@ -32,7 +32,7 @@ select {{ 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('table_alias', '_airbyte_data', ['shareStatistic'], ['shareStatistic']) }} as sharestatistic, + {{ json_extract_scalar('_airbyte_data', ['shareStatistic'], ['shareStatistic']) }} as sharestatistic, {{ json_extract_scalar('_airbyte_data', ['enableNotificationForContributor'], ['enableNotificationForContributor']) }} as enablenotificationforcontributor, _airbyte_ab_id, _airbyte_emitted_at, diff --git a/models/generated/airbyte_ctes/unibag/social_posts_ab2.sql b/models/generated/airbyte_ctes/unibag/social_posts_ab2.sql index 9b97e92..7300f1b 100644 --- a/models/generated/airbyte_ctes/unibag/social_posts_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/social_posts_ab2.sql @@ -24,7 +24,7 @@ select products, cast(createdat as {{ dbt_utils.type_string() }}) as createdat, {{ cast_to_boolean('hasupdate') }} as hasupdate, - cast(statistic as {{ type_json() }}) as statistic, + 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, @@ -32,7 +32,7 @@ select 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 {{ type_json() }}) as sharestatistic, + cast(sharestatistic as {{ dbt_utils.type_string() }}) as sharestatistic, {{ cast_to_boolean('enablenotificationforcontributor') }} as enablenotificationforcontributor, _airbyte_ab_id, _airbyte_emitted_at, diff --git a/models/generated/airbyte_ctes/unibag/social_posts_ab3.sql b/models/generated/airbyte_ctes/unibag/social_posts_ab3.sql index f887b65..5b932f4 100644 --- a/models/generated/airbyte_ctes/unibag/social_posts_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/social_posts_ab3.sql @@ -25,7 +25,7 @@ select array_to_string('products'), 'createdat', boolean_to_string('hasupdate'), - object_to_string('statistic'), + 'statistic', 'updatedat', array_to_string('categories'), boolean_to_string('fromsystem'), @@ -33,7 +33,7 @@ select 'publishedat', 'searchstring', 'updatedcount', - object_to_string('sharestatistic'), + 'sharestatistic', boolean_to_string('enablenotificationforcontributor'), ]) }} as _airbyte_social_posts_hashid, tmp.* diff --git a/models/generated/airbyte_ctes/unibag/social_posts_sharestatistic_ab1.sql b/models/generated/airbyte_ctes/unibag/social_posts_sharestatistic_ab1.sql deleted file mode 100644 index 4892f5f..0000000 --- a/models/generated/airbyte_ctes/unibag/social_posts_sharestatistic_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('social_posts') }} -select - _airbyte_social_posts_hashid, - {{ json_extract_scalar('sharestatistic', ['totalShare'], ['totalShare']) }} as totalshare, - {{ json_extract_scalar('sharestatistic', ['totalShareFromSocialPost'], ['totalShareFromSocialPost']) }} as totalsharefromsocialpost, - {{ json_extract_scalar('sharestatistic', ['totalShareFromProductDetail'], ['totalShareFromProductDetail']) }} as totalsharefromproductdetail, - {{ json_extract_scalar('sharestatistic', ['totalUniqueShareFromSocialPost'], ['totalUniqueShareFromSocialPost']) }} as totaluniquesharefromsocialpost, - {{ json_extract_scalar('sharestatistic', ['totalUniqueShareFromProductDetail'], ['totalUniqueShareFromProductDetail']) }} as totaluniquesharefromproductdetail, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('social_posts') }} as table_alias --- sharestatistic at social-posts/shareStatistic -where 1 = 1 -and sharestatistic is not null - diff --git a/models/generated/airbyte_ctes/unibag/social_posts_sharestatistic_ab2.sql b/models/generated/airbyte_ctes/unibag/social_posts_sharestatistic_ab2.sql deleted file mode 100644 index 468832b..0000000 --- a/models/generated/airbyte_ctes/unibag/social_posts_sharestatistic_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('social_posts_sharestatistic_ab1') }} -select - _airbyte_social_posts_hashid, - cast(totalshare as {{ dbt_utils.type_float() }}) as totalshare, - cast(totalsharefromsocialpost as {{ dbt_utils.type_float() }}) as totalsharefromsocialpost, - cast(totalsharefromproductdetail as {{ dbt_utils.type_float() }}) as totalsharefromproductdetail, - cast(totaluniquesharefromsocialpost as {{ dbt_utils.type_float() }}) as totaluniquesharefromsocialpost, - cast(totaluniquesharefromproductdetail as {{ dbt_utils.type_float() }}) as totaluniquesharefromproductdetail, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('social_posts_sharestatistic_ab1') }} --- sharestatistic at social-posts/shareStatistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/social_posts_sharestatistic_ab3.sql b/models/generated/airbyte_ctes/unibag/social_posts_sharestatistic_ab3.sql deleted file mode 100644 index a3da3eb..0000000 --- a/models/generated/airbyte_ctes/unibag/social_posts_sharestatistic_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('social_posts_sharestatistic_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_social_posts_hashid', - 'totalshare', - 'totalsharefromsocialpost', - 'totalsharefromproductdetail', - 'totaluniquesharefromsocialpost', - 'totaluniquesharefromproductdetail', - ]) }} as _airbyte_sharestatistic_hashid, - tmp.* -from {{ ref('social_posts_sharestatistic_ab2') }} tmp --- sharestatistic at social-posts/shareStatistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/social_posts_statistic_ab1.sql b/models/generated/airbyte_ctes/unibag/social_posts_statistic_ab1.sql deleted file mode 100644 index bbdca5c..0000000 --- a/models/generated/airbyte_ctes/unibag/social_posts_statistic_ab1.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('social_posts') }} -select - _airbyte_social_posts_hashid, - {{ json_extract_scalar('statistic', ['likes'], ['likes']) }} as likes, - {{ json_extract_scalar('statistic', ['views'], ['views']) }} as {{ adapter.quote('views') }}, - {{ json_extract_scalar('statistic', ['comments'], ['comments']) }} as {{ adapter.quote('comments') }}, - {{ json_extract_scalar('statistic', ['uniqueViews'], ['uniqueViews']) }} as uniqueviews, - {{ json_extract_scalar('statistic', ['shares_aibyte_transform'], ['shares_aibyte_transform']) }} as shares_aibyte_transform, - {{ json_extract_scalar('statistic', ['uniqueShares_aibyte_transform'], ['uniqueShares_aibyte_transform']) }} as uniqueshares_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('social_posts') }} as table_alias --- statistic at social-posts/statistic -where 1 = 1 -and statistic is not null - diff --git a/models/generated/airbyte_ctes/unibag/social_posts_statistic_ab2.sql b/models/generated/airbyte_ctes/unibag/social_posts_statistic_ab2.sql deleted file mode 100644 index cf65e47..0000000 --- a/models/generated/airbyte_ctes/unibag/social_posts_statistic_ab2.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('social_posts_statistic_ab1') }} -select - _airbyte_social_posts_hashid, - cast(likes as {{ dbt_utils.type_float() }}) as likes, - cast({{ adapter.quote('views') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('views') }}, - cast({{ adapter.quote('comments') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('comments') }}, - cast(uniqueviews as {{ dbt_utils.type_float() }}) as uniqueviews, - cast(shares_aibyte_transform as {{ dbt_utils.type_string() }}) as shares_aibyte_transform, - cast(uniqueshares_aibyte_transform as {{ dbt_utils.type_string() }}) as uniqueshares_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('social_posts_statistic_ab1') }} --- statistic at social-posts/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/social_posts_statistic_ab3.sql b/models/generated/airbyte_ctes/unibag/social_posts_statistic_ab3.sql deleted file mode 100644 index 1131762..0000000 --- a/models/generated/airbyte_ctes/unibag/social_posts_statistic_ab3.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('social_posts_statistic_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_social_posts_hashid', - 'likes', - adapter.quote('views'), - adapter.quote('comments'), - 'uniqueviews', - 'shares_aibyte_transform', - 'uniqueshares_aibyte_transform', - ]) }} as _airbyte_statistic_hashid, - tmp.* -from {{ ref('social_posts_statistic_ab2') }} tmp --- statistic at social-posts/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_ab1.sql b/models/generated/airbyte_ctes/unibag/suppliers_ab1.sql index 658d280..eea9006 100644 --- a/models/generated/airbyte_ctes/unibag/suppliers_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/suppliers_ab1.sql @@ -9,26 +9,24 @@ select {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, {{ json_extract_scalar('_airbyte_data', ['tax'], ['tax']) }} as tax, - {{ json_extract('table_alias', '_airbyte_data', ['bank'], ['bank']) }} as bank, - {{ json_extract('table_alias', '_airbyte_data', ['logo'], ['logo']) }} as logo, + {{ 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('table_alias', '_airbyte_data', ['balance'], ['balance']) }} as balance, {{ json_extract_scalar('_airbyte_data', ['checkSum'], ['checkSum']) }} as checksum, {{ json_extract_scalar('_airbyte_data', ['checksum'], ['checksum']) }} as checksum_1, - {{ json_extract('table_alias', '_airbyte_data', ['location'], ['location']) }} as {{ adapter.quote('location') }}, + {{ 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('table_alias', '_airbyte_data', ['statistic'], ['statistic']) }} as statistic, + {{ 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_array('_airbyte_data', ['reconcileDays'], ['reconcileDays']) }} as reconciledays, {{ json_extract_scalar('_airbyte_data', ['contractNumber'], ['contractNumber']) }} as contractnumber, - {{ json_extract('table_alias', '_airbyte_data', ['reviewStatistic'], ['reviewStatistic']) }} as reviewstatistic, + {{ 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, diff --git a/models/generated/airbyte_ctes/unibag/suppliers_ab2.sql b/models/generated/airbyte_ctes/unibag/suppliers_ab2.sql index 8df28c4..59199cb 100644 --- a/models/generated/airbyte_ctes/unibag/suppliers_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/suppliers_ab2.sql @@ -9,26 +9,24 @@ select cast(_id as {{ dbt_utils.type_string() }}) as _id, cast(tax as {{ dbt_utils.type_string() }}) as tax, - cast(bank as {{ type_json() }}) as bank, - cast(logo as {{ type_json() }}) as logo, + 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(balance as {{ type_json() }}) as balance, 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 {{ type_json() }}) as {{ adapter.quote('location') }}, + 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 {{ type_json() }}) as statistic, + 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, - reconciledays, cast(contractnumber as {{ dbt_utils.type_string() }}) as contractnumber, - cast(reviewstatistic as {{ type_json() }}) as reviewstatistic, + 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, diff --git a/models/generated/airbyte_ctes/unibag/suppliers_ab3.sql b/models/generated/airbyte_ctes/unibag/suppliers_ab3.sql index 63b71a9..76f1c42 100644 --- a/models/generated/airbyte_ctes/unibag/suppliers_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/suppliers_ab3.sql @@ -10,26 +10,24 @@ select {{ dbt_utils.surrogate_key([ '_id', 'tax', - object_to_string('bank'), - object_to_string('logo'), + 'bank', + 'logo', adapter.quote('name'), boolean_to_string('active'), - object_to_string('balance'), 'checksum', 'checksum_1', - object_to_string(adapter.quote('location')), + adapter.quote('location'), array_to_string('contracts'), 'createdat', array_to_string('documents'), - object_to_string('statistic'), + 'statistic', 'updatedat', array_to_string('categories'), array_to_string('inventories'), 'identifycode', 'searchstring', - array_to_string('reconciledays'), 'contractnumber', - object_to_string('reviewstatistic'), + 'reviewstatistic', 'contractsignedat', array_to_string('emailforinvoices'), 'contractexpiredat', diff --git a/models/generated/airbyte_ctes/unibag/suppliers_balance_ab1.sql b/models/generated/airbyte_ctes/unibag/suppliers_balance_ab1.sql deleted file mode 100644 index 55baaee..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_balance_ab1.sql +++ /dev/null @@ -1,26 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('suppliers') }} -select - _airbyte_suppliers_hashid, - {{ json_extract_scalar('balance', ['currentCash'], ['currentCash']) }} as currentcash, - {{ json_extract_scalar('balance', ['orderPendingCash'], ['orderPendingCash']) }} as orderpendingcash, - {{ json_extract_scalar('balance', ['totalPendingCash'], ['totalPendingCash']) }} as totalpendingcash, - {{ json_extract_scalar('balance', ['withdrawRejectCash'], ['withdrawRejectCash']) }} as withdrawrejectcash, - {{ json_extract_scalar('balance', ['orderReconciledCash'], ['orderReconciledCash']) }} as orderreconciledcash, - {{ json_extract_scalar('balance', ['withdrawPendingCash'], ['withdrawPendingCash']) }} as withdrawpendingcash, - {{ json_extract_scalar('balance', ['withdrawSuccessCash'], ['withdrawSuccessCash']) }} as withdrawsuccesscash, - {{ json_extract_scalar('balance', ['changeBalanceRequestApproved'], ['changeBalanceRequestApproved']) }} as changebalancerequestapproved, - {{ json_extract_scalar('balance', ['orderWaitingForReconcileCash'], ['orderWaitingForReconcileCash']) }} as orderwaitingforreconcilecash, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers') }} as table_alias --- balance at suppliers/balance -where 1 = 1 -and balance is not null - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_balance_ab2.sql b/models/generated/airbyte_ctes/unibag/suppliers_balance_ab2.sql deleted file mode 100644 index 69bc3d6..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_balance_ab2.sql +++ /dev/null @@ -1,25 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('suppliers_balance_ab1') }} -select - _airbyte_suppliers_hashid, - cast(currentcash as {{ dbt_utils.type_float() }}) as currentcash, - cast(orderpendingcash as {{ dbt_utils.type_float() }}) as orderpendingcash, - cast(totalpendingcash as {{ dbt_utils.type_float() }}) as totalpendingcash, - cast(withdrawrejectcash as {{ dbt_utils.type_float() }}) as withdrawrejectcash, - cast(orderreconciledcash as {{ dbt_utils.type_float() }}) as orderreconciledcash, - cast(withdrawpendingcash as {{ dbt_utils.type_float() }}) as withdrawpendingcash, - cast(withdrawsuccesscash as {{ dbt_utils.type_float() }}) as withdrawsuccesscash, - cast(changebalancerequestapproved as {{ dbt_utils.type_float() }}) as changebalancerequestapproved, - cast(orderwaitingforreconcilecash as {{ dbt_utils.type_float() }}) as orderwaitingforreconcilecash, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers_balance_ab1') }} --- balance at suppliers/balance -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_balance_ab3.sql b/models/generated/airbyte_ctes/unibag/suppliers_balance_ab3.sql deleted file mode 100644 index f7ebd9d..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_balance_ab3.sql +++ /dev/null @@ -1,25 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('suppliers_balance_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_suppliers_hashid', - 'currentcash', - 'orderpendingcash', - 'totalpendingcash', - 'withdrawrejectcash', - 'orderreconciledcash', - 'withdrawpendingcash', - 'withdrawsuccesscash', - 'changebalancerequestapproved', - 'orderwaitingforreconcilecash', - ]) }} as _airbyte_balance_hashid, - tmp.* -from {{ ref('suppliers_balance_ab2') }} tmp --- balance at suppliers/balance -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_bank_ab1.sql b/models/generated/airbyte_ctes/unibag/suppliers_bank_ab1.sql deleted file mode 100644 index d2967e5..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_bank_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('suppliers') }} -select - _airbyte_suppliers_hashid, - {{ json_extract_scalar('bank', ['bank'], ['bank']) }} as bank, - {{ json_extract_scalar('bank', ['branch'], ['branch']) }} as branch, - {{ json_extract_scalar('bank', ['cardNumber'], ['cardNumber']) }} as cardnumber, - {{ json_extract_scalar('bank', ['cardHolderName'], ['cardHolderName']) }} as cardholdername, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers') }} as table_alias --- bank at suppliers/bank -where 1 = 1 -and bank is not null - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_bank_ab2.sql b/models/generated/airbyte_ctes/unibag/suppliers_bank_ab2.sql deleted file mode 100644 index 82fc0f9..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_bank_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('suppliers_bank_ab1') }} -select - _airbyte_suppliers_hashid, - cast(bank as {{ dbt_utils.type_string() }}) as bank, - cast(branch as {{ dbt_utils.type_string() }}) as branch, - cast(cardnumber as {{ dbt_utils.type_string() }}) as cardnumber, - cast(cardholdername as {{ dbt_utils.type_string() }}) as cardholdername, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers_bank_ab1') }} --- bank at suppliers/bank -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_bank_ab3.sql b/models/generated/airbyte_ctes/unibag/suppliers_bank_ab3.sql deleted file mode 100644 index b95d98f..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_bank_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('suppliers_bank_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_suppliers_hashid', - 'bank', - 'branch', - 'cardnumber', - 'cardholdername', - ]) }} as _airbyte_bank_hashid, - tmp.* -from {{ ref('suppliers_bank_ab2') }} tmp --- bank at suppliers/bank -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_location_ab1.sql b/models/generated/airbyte_ctes/unibag/suppliers_location_ab1.sql deleted file mode 100644 index 161bc8a..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_location_ab1.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('suppliers') }} -select - _airbyte_suppliers_hashid, - {{ json_extract_scalar(adapter.quote('location'), ['ward'], ['ward']) }} as ward, - {{ json_extract_scalar(adapter.quote('location'), ['address'], ['address']) }} as address, - {{ json_extract_scalar(adapter.quote('location'), ['district'], ['district']) }} as district, - {{ json_extract_scalar(adapter.quote('location'), ['location'], ['location']) }} as {{ adapter.quote('location') }}, - {{ json_extract_scalar(adapter.quote('location'), ['province'], ['province']) }} as province, - {{ json_extract_scalar(adapter.quote('location'), ['fullAddress'], ['fullAddress']) }} as fulladdress, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers') }} as table_alias --- location at suppliers/location -where 1 = 1 -and {{ adapter.quote('location') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_location_ab2.sql b/models/generated/airbyte_ctes/unibag/suppliers_location_ab2.sql deleted file mode 100644 index db418d3..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_location_ab2.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('suppliers_location_ab1') }} -select - _airbyte_suppliers_hashid, - cast(ward as {{ dbt_utils.type_string() }}) as ward, - cast(address as {{ dbt_utils.type_string() }}) as address, - cast(district as {{ dbt_utils.type_string() }}) as district, - cast({{ adapter.quote('location') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('location') }}, - cast(province as {{ dbt_utils.type_string() }}) as province, - cast(fulladdress as {{ dbt_utils.type_string() }}) as fulladdress, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers_location_ab1') }} --- location at suppliers/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_location_ab3.sql b/models/generated/airbyte_ctes/unibag/suppliers_location_ab3.sql deleted file mode 100644 index 44e34cc..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_location_ab3.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('suppliers_location_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_suppliers_hashid', - 'ward', - 'address', - 'district', - adapter.quote('location'), - 'province', - 'fulladdress', - ]) }} as _airbyte_location_hashid, - tmp.* -from {{ ref('suppliers_location_ab2') }} tmp --- location at suppliers/location -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_logo_ab1.sql b/models/generated/airbyte_ctes/unibag/suppliers_logo_ab1.sql deleted file mode 100644 index 172d802..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_logo_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('suppliers') }} -select - _airbyte_suppliers_hashid, - {{ json_extract_scalar('logo', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('logo', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract('table_alias', 'logo', ['dimensions'], ['dimensions']) }} as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers') }} as table_alias --- logo at suppliers/logo -where 1 = 1 -and logo is not null - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_logo_ab2.sql b/models/generated/airbyte_ctes/unibag/suppliers_logo_ab2.sql deleted file mode 100644 index 3b50d30..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_logo_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('suppliers_logo_ab1') }} -select - _airbyte_suppliers_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(dimensions as {{ type_json() }}) as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers_logo_ab1') }} --- logo at suppliers/logo -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_logo_ab3.sql b/models/generated/airbyte_ctes/unibag/suppliers_logo_ab3.sql deleted file mode 100644 index 3adeec3..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_logo_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('suppliers_logo_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_suppliers_hashid', - '_id', - adapter.quote('name'), - object_to_string('dimensions'), - ]) }} as _airbyte_logo_hashid, - tmp.* -from {{ ref('suppliers_logo_ab2') }} tmp --- logo at suppliers/logo -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_ab1.sql b/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_ab1.sql deleted file mode 100644 index 95f8586..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('suppliers_logo') }} -select - _airbyte_logo_hashid, - {{ json_extract('table_alias', 'dimensions', ['md'], ['md']) }} as md, - {{ json_extract('table_alias', 'dimensions', ['sm'], ['sm']) }} as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers_logo') }} as table_alias --- dimensions at suppliers/logo/dimensions -where 1 = 1 -and dimensions is not null - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_ab2.sql b/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_ab2.sql deleted file mode 100644 index fddd178..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('suppliers_logo_dimensions_ab1') }} -select - _airbyte_logo_hashid, - cast(md as {{ type_json() }}) as md, - cast(sm as {{ type_json() }}) as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers_logo_dimensions_ab1') }} --- dimensions at suppliers/logo/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_ab3.sql b/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_ab3.sql deleted file mode 100644 index a32a588..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('suppliers_logo_dimensions_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_logo_hashid', - object_to_string('md'), - object_to_string('sm'), - ]) }} as _airbyte_dimensions_hashid, - tmp.* -from {{ ref('suppliers_logo_dimensions_ab2') }} tmp --- dimensions at suppliers/logo/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_md_ab1.sql b/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_md_ab1.sql deleted file mode 100644 index b9c2d3a..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_md_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('suppliers_logo_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('md', ['url'], ['url']) }} as url, - {{ json_extract_scalar('md', ['width'], ['width']) }} as width, - {{ json_extract_scalar('md', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers_logo_dimensions') }} as table_alias --- md at suppliers/logo/dimensions/md -where 1 = 1 -and md is not null - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_md_ab2.sql b/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_md_ab2.sql deleted file mode 100644 index 9835985..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_md_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('suppliers_logo_dimensions_md_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers_logo_dimensions_md_ab1') }} --- md at suppliers/logo/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_md_ab3.sql b/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_md_ab3.sql deleted file mode 100644 index 8cf31fa..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_md_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('suppliers_logo_dimensions_md_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_md_hashid, - tmp.* -from {{ ref('suppliers_logo_dimensions_md_ab2') }} tmp --- md at suppliers/logo/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_sm_ab1.sql b/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_sm_ab1.sql deleted file mode 100644 index 308538d..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_sm_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('suppliers_logo_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('sm', ['url'], ['url']) }} as url, - {{ json_extract_scalar('sm', ['width'], ['width']) }} as width, - {{ json_extract_scalar('sm', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers_logo_dimensions') }} as table_alias --- sm at suppliers/logo/dimensions/sm -where 1 = 1 -and sm is not null - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_sm_ab2.sql b/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_sm_ab2.sql deleted file mode 100644 index f7a3db8..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_sm_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('suppliers_logo_dimensions_sm_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers_logo_dimensions_sm_ab1') }} --- sm at suppliers/logo/dimensions/sm -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_sm_ab3.sql b/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_sm_ab3.sql deleted file mode 100644 index 3c4dc81..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_logo_dimensions_sm_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('suppliers_logo_dimensions_sm_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_sm_hashid, - tmp.* -from {{ ref('suppliers_logo_dimensions_sm_ab2') }} tmp --- sm at suppliers/logo/dimensions/sm -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_reviewstatistic_ab1.sql b/models/generated/airbyte_ctes/unibag/suppliers_reviewstatistic_ab1.sql deleted file mode 100644 index 28181b3..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_reviewstatistic_ab1.sql +++ /dev/null @@ -1,31 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('suppliers') }} -select - _airbyte_suppliers_hashid, - {{ json_extract_scalar('reviewstatistic', ['total'], ['total']) }} as total, - {{ json_extract_scalar('reviewstatistic', ['totalReview'], ['totalReview']) }} as totalreview, - {{ json_extract_scalar('reviewstatistic', ['totalScore1'], ['totalScore1']) }} as totalscore1, - {{ json_extract_scalar('reviewstatistic', ['totalScore2'], ['totalScore2']) }} as totalscore2, - {{ json_extract_scalar('reviewstatistic', ['totalScore3'], ['totalScore3']) }} as totalscore3, - {{ json_extract_scalar('reviewstatistic', ['totalScore4'], ['totalScore4']) }} as totalscore4, - {{ json_extract_scalar('reviewstatistic', ['totalScore5'], ['totalScore5']) }} as totalscore5, - {{ json_extract_scalar('reviewstatistic', ['scoreAverage'], ['scoreAverage']) }} as scoreaverage, - {{ json_extract_scalar('reviewstatistic', ['totalHasMedia'], ['totalHasMedia']) }} as totalhasmedia, - {{ json_extract_scalar('reviewstatistic', ['totalHasContent'], ['totalHasContent']) }} as totalhascontent, - {{ json_extract_scalar('reviewstatistic', ['scoreAverageWeekTotal'], ['scoreAverageWeekTotal']) }} as scoreaverageweektotal, - {{ json_extract_scalar('reviewstatistic', ['scoreAverageYearTotal'], ['scoreAverageYearTotal']) }} as scoreaverageyeartotal, - {{ json_extract_scalar('reviewstatistic', ['scoreAverageMonthTotal'], ['scoreAverageMonthTotal']) }} as scoreaveragemonthtotal, - {{ json_extract_scalar('reviewstatistic', ['scoreAverageTwoMonthTotal'], ['scoreAverageTwoMonthTotal']) }} as scoreaveragetwomonthtotal, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers') }} as table_alias --- reviewstatistic at suppliers/reviewStatistic -where 1 = 1 -and reviewstatistic is not null - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_reviewstatistic_ab2.sql b/models/generated/airbyte_ctes/unibag/suppliers_reviewstatistic_ab2.sql deleted file mode 100644 index bb68c55..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_reviewstatistic_ab2.sql +++ /dev/null @@ -1,30 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('suppliers_reviewstatistic_ab1') }} -select - _airbyte_suppliers_hashid, - cast(total as {{ dbt_utils.type_float() }}) as total, - cast(totalreview as {{ dbt_utils.type_float() }}) as totalreview, - cast(totalscore1 as {{ dbt_utils.type_float() }}) as totalscore1, - cast(totalscore2 as {{ dbt_utils.type_float() }}) as totalscore2, - cast(totalscore3 as {{ dbt_utils.type_float() }}) as totalscore3, - cast(totalscore4 as {{ dbt_utils.type_float() }}) as totalscore4, - cast(totalscore5 as {{ dbt_utils.type_float() }}) as totalscore5, - cast(scoreaverage as {{ dbt_utils.type_float() }}) as scoreaverage, - cast(totalhasmedia as {{ dbt_utils.type_float() }}) as totalhasmedia, - cast(totalhascontent as {{ dbt_utils.type_float() }}) as totalhascontent, - cast(scoreaverageweektotal as {{ dbt_utils.type_float() }}) as scoreaverageweektotal, - cast(scoreaverageyeartotal as {{ dbt_utils.type_float() }}) as scoreaverageyeartotal, - cast(scoreaveragemonthtotal as {{ dbt_utils.type_float() }}) as scoreaveragemonthtotal, - cast(scoreaveragetwomonthtotal as {{ dbt_utils.type_float() }}) as scoreaveragetwomonthtotal, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers_reviewstatistic_ab1') }} --- reviewstatistic at suppliers/reviewStatistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_reviewstatistic_ab3.sql b/models/generated/airbyte_ctes/unibag/suppliers_reviewstatistic_ab3.sql deleted file mode 100644 index e6c1076..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_reviewstatistic_ab3.sql +++ /dev/null @@ -1,30 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('suppliers_reviewstatistic_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_suppliers_hashid', - 'total', - 'totalreview', - 'totalscore1', - 'totalscore2', - 'totalscore3', - 'totalscore4', - 'totalscore5', - 'scoreaverage', - 'totalhasmedia', - 'totalhascontent', - 'scoreaverageweektotal', - 'scoreaverageyeartotal', - 'scoreaveragemonthtotal', - 'scoreaveragetwomonthtotal', - ]) }} as _airbyte_reviewstatistic_hashid, - tmp.* -from {{ ref('suppliers_reviewstatistic_ab2') }} tmp --- reviewstatistic at suppliers/reviewStatistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_statistic_ab1.sql b/models/generated/airbyte_ctes/unibag/suppliers_statistic_ab1.sql deleted file mode 100644 index cba331c..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_statistic_ab1.sql +++ /dev/null @@ -1,29 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('suppliers') }} -select - _airbyte_suppliers_hashid, - {{ json_extract_scalar('statistic', ['salesTotal'], ['salesTotal']) }} as salestotal, - {{ json_extract_scalar('statistic', ['salesPending'], ['salesPending']) }} as salespending, - {{ json_extract_scalar('statistic', ['salesSuccess'], ['salesSuccess']) }} as salessuccess, - {{ json_extract_scalar('statistic', ['totalProduct'], ['totalProduct']) }} as totalproduct, - {{ json_extract_scalar('statistic', ['salesCancelled'], ['salesCancelled']) }} as salescancelled, - {{ json_extract_scalar('statistic', ['salesWeekTotal'], ['salesWeekTotal']) }} as salesweektotal, - {{ json_extract_scalar('statistic', ['salesYearTotal'], ['salesYearTotal']) }} as salesyeartotal, - {{ json_extract_scalar('statistic', ['totalInventory'], ['totalInventory']) }} as totalinventory, - {{ json_extract_scalar('statistic', ['salesMonthTotal'], ['salesMonthTotal']) }} as salesmonthtotal, - {{ json_extract_scalar('statistic', ['totalQuantitySale'], ['totalQuantitySale']) }} as totalquantitysale, - {{ json_extract_scalar('statistic', ['salesTwoMonthTotal'], ['salesTwoMonthTotal']) }} as salestwomonthtotal, - {{ json_extract_scalar('statistic', ['totalHasOrderSeller'], ['totalHasOrderSeller']) }} as totalhasorderseller, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers') }} as table_alias --- statistic at suppliers/statistic -where 1 = 1 -and statistic is not null - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_statistic_ab2.sql b/models/generated/airbyte_ctes/unibag/suppliers_statistic_ab2.sql deleted file mode 100644 index 10e3c93..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_statistic_ab2.sql +++ /dev/null @@ -1,28 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('suppliers_statistic_ab1') }} -select - _airbyte_suppliers_hashid, - cast(salestotal as {{ dbt_utils.type_float() }}) as salestotal, - cast(salespending as {{ dbt_utils.type_float() }}) as salespending, - cast(salessuccess as {{ dbt_utils.type_float() }}) as salessuccess, - cast(totalproduct as {{ dbt_utils.type_float() }}) as totalproduct, - cast(salescancelled as {{ dbt_utils.type_float() }}) as salescancelled, - cast(salesweektotal as {{ dbt_utils.type_float() }}) as salesweektotal, - cast(salesyeartotal as {{ dbt_utils.type_float() }}) as salesyeartotal, - cast(totalinventory as {{ dbt_utils.type_float() }}) as totalinventory, - cast(salesmonthtotal as {{ dbt_utils.type_float() }}) as salesmonthtotal, - cast(totalquantitysale as {{ dbt_utils.type_float() }}) as totalquantitysale, - cast(salestwomonthtotal as {{ dbt_utils.type_float() }}) as salestwomonthtotal, - cast(totalhasorderseller as {{ dbt_utils.type_float() }}) as totalhasorderseller, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('suppliers_statistic_ab1') }} --- statistic at suppliers/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/suppliers_statistic_ab3.sql b/models/generated/airbyte_ctes/unibag/suppliers_statistic_ab3.sql deleted file mode 100644 index b869b33..0000000 --- a/models/generated/airbyte_ctes/unibag/suppliers_statistic_ab3.sql +++ /dev/null @@ -1,28 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('suppliers_statistic_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_suppliers_hashid', - 'salestotal', - 'salespending', - 'salessuccess', - 'totalproduct', - 'salescancelled', - 'salesweektotal', - 'salesyeartotal', - 'totalinventory', - 'salesmonthtotal', - 'totalquantitysale', - 'salestwomonthtotal', - 'totalhasorderseller', - ]) }} as _airbyte_statistic_hashid, - tmp.* -from {{ ref('suppliers_statistic_ab2') }} tmp --- statistic at suppliers/statistic -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 index 9f53fad..9929ea2 100644 --- a/models/generated/airbyte_ctes/unibag/team_activities_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/team_activities_ab1.sql @@ -10,7 +10,7 @@ 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('table_alias', '_airbyte_data', ['options'], ['options']) }} as {{ adapter.quote('options') }}, + {{ 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, diff --git a/models/generated/airbyte_ctes/unibag/team_activities_ab2.sql b/models/generated/airbyte_ctes/unibag/team_activities_ab2.sql index 6d9a9ed..cf0a002 100644 --- a/models/generated/airbyte_ctes/unibag/team_activities_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/team_activities_ab2.sql @@ -10,7 +10,7 @@ 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 {{ type_json() }}) as {{ adapter.quote('options') }}, + 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, diff --git a/models/generated/airbyte_ctes/unibag/team_activities_ab3.sql b/models/generated/airbyte_ctes/unibag/team_activities_ab3.sql index d172d44..107bd5a 100644 --- a/models/generated/airbyte_ctes/unibag/team_activities_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/team_activities_ab3.sql @@ -11,7 +11,7 @@ select '_id', 'team', adapter.quote('action'), - object_to_string(adapter.quote('options')), + adapter.quote('options'), 'targetid', 'createdat', 'createdby', diff --git a/models/generated/airbyte_ctes/unibag/team_activities_options_ab1.sql b/models/generated/airbyte_ctes/unibag/team_activities_options_ab1.sql deleted file mode 100644 index 0ec0212..0000000 --- a/models/generated/airbyte_ctes/unibag/team_activities_options_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('team_activities') }} -select - _airbyte_team_activities_hashid, - {{ json_extract_scalar(adapter.quote('options'), ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar(adapter.quote('options'), ['role'], ['role']) }} as {{ adapter.quote('role') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('team_activities') }} as table_alias --- options at team-activities/options -where 1 = 1 -and {{ adapter.quote('options') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/team_activities_options_ab2.sql b/models/generated/airbyte_ctes/unibag/team_activities_options_ab2.sql deleted file mode 100644 index 6a36064..0000000 --- a/models/generated/airbyte_ctes/unibag/team_activities_options_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('team_activities_options_ab1') }} -select - _airbyte_team_activities_hashid, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast({{ adapter.quote('role') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('role') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('team_activities_options_ab1') }} --- options at team-activities/options -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/team_activities_options_ab3.sql b/models/generated/airbyte_ctes/unibag/team_activities_options_ab3.sql deleted file mode 100644 index 34f903f..0000000 --- a/models/generated/airbyte_ctes/unibag/team_activities_options_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('team_activities_options_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_team_activities_hashid', - adapter.quote('name'), - adapter.quote('role'), - ]) }} as _airbyte_options_hashid, - tmp.* -from {{ ref('team_activities_options_ab2') }} tmp --- options at team-activities/options -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 index 4198b74..55f902c 100644 --- a/models/generated/airbyte_ctes/unibag/team_members_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/team_members_ab1.sql @@ -16,11 +16,12 @@ select {{ 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('table_alias', '_airbyte_data', ['statistic'], ['statistic']) }} as statistic, + {{ 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('table_alias', '_airbyte_data', ['statisticMonth'], ['statisticMonth']) }} as statisticmonth, + {{ json_extract_scalar('_airbyte_data', ['isMemberHomegrown'], ['isMemberHomegrown']) }} as ismemberhomegrown, _airbyte_ab_id, _airbyte_emitted_at, {{ current_timestamp() }} as _airbyte_normalized_at diff --git a/models/generated/airbyte_ctes/unibag/team_members_ab2.sql b/models/generated/airbyte_ctes/unibag/team_members_ab2.sql index be4d37b..ca29b11 100644 --- a/models/generated/airbyte_ctes/unibag/team_members_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/team_members_ab2.sql @@ -16,11 +16,12 @@ select 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 {{ type_json() }}) as statistic, + 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(statisticmonth as {{ type_json() }}) as statisticmonth, + {{ cast_to_boolean('ismemberhomegrown') }} as ismemberhomegrown, _airbyte_ab_id, _airbyte_emitted_at, {{ current_timestamp() }} as _airbyte_normalized_at diff --git a/models/generated/airbyte_ctes/unibag/team_members_ab3.sql b/models/generated/airbyte_ctes/unibag/team_members_ab3.sql index 5c1afff..cb2a11b 100644 --- a/models/generated/airbyte_ctes/unibag/team_members_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/team_members_ab3.sql @@ -17,11 +17,12 @@ select 'joinedat', 'rolecode', 'createdat', - object_to_string('statistic'), + 'statistic', 'updatedat', 'isremovedby', + 'firstorderat', 'searchstring', - object_to_string('statisticmonth'), + boolean_to_string('ismemberhomegrown'), ]) }} as _airbyte_team_members_hashid, tmp.* from {{ ref('team_members_ab2') }} tmp diff --git a/models/generated/airbyte_ctes/unibag/team_members_statistic_ab1.sql b/models/generated/airbyte_ctes/unibag/team_members_statistic_ab1.sql deleted file mode 100644 index dfc7a95..0000000 --- a/models/generated/airbyte_ctes/unibag/team_members_statistic_ab1.sql +++ /dev/null @@ -1,37 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('team_members') }} -select - _airbyte_team_members_hashid, - {{ json_extract_scalar('statistic', ['sales'], ['sales']) }} as sales, - {{ json_extract_scalar('statistic', ['transactionTotal'], ['transactionTotal']) }} as transactiontotal, - {{ json_extract_scalar('statistic', ['transactionPending'], ['transactionPending']) }} as transactionpending, - {{ json_extract_scalar('statistic', ['transactionSuccess'], ['transactionSuccess']) }} as transactionsuccess, - {{ json_extract_scalar('statistic', ['transactionRejected'], ['transactionRejected']) }} as transactionrejected, - {{ json_extract_scalar('statistic', ['cashTransactionTotal'], ['cashTransactionTotal']) }} as cashtransactiontotal, - {{ json_extract_scalar('statistic', ['transactionDelivered'], ['transactionDelivered']) }} as transactiondelivered, - {{ json_extract_scalar('statistic', ['transactionDelivering'], ['transactionDelivering']) }} as transactiondelivering, - {{ json_extract_scalar('statistic', ['cashTransactionPending'], ['cashTransactionPending']) }} as cashtransactionpending, - {{ json_extract_scalar('statistic', ['cashTransactionSuccess'], ['cashTransactionSuccess']) }} as cashtransactionsuccess, - {{ json_extract_scalar('statistic', ['cashTransactionRejected'], ['cashTransactionRejected']) }} as cashtransactionrejected, - {{ json_extract_scalar('statistic', ['cashTransactionDelivered'], ['cashTransactionDelivered']) }} as cashtransactiondelivered, - {{ json_extract_scalar('statistic', ['cashTransactionDelivering'], ['cashTransactionDelivering']) }} as cashtransactiondelivering, - {{ json_extract_scalar('statistic', ['transactionWaitingApprove'], ['transactionWaitingApprove']) }} as transactionwaitingapprove, - {{ json_extract_scalar('statistic', ['transactionPaymentProcessing'], ['transactionPaymentProcessing']) }} as transactionpaymentprocessing, - {{ json_extract_scalar('statistic', ['cashTransactionWaitingApprove'], ['cashTransactionWaitingApprove']) }} as cashtransactionwaitingapprove, - {{ json_extract_scalar('statistic', ['thisMonthSale_aibyte_transform'], ['thisMonthSale_aibyte_transform']) }} as thismonthsale_aibyte_transform, - {{ json_extract_scalar('statistic', ['lastMonthSales_aibyte_transform'], ['lastMonthSales_aibyte_transform']) }} as lastmonthsales_aibyte_transform, - {{ json_extract_scalar('statistic', ['thisMonthSales_aibyte_transform'], ['thisMonthSales_aibyte_transform']) }} as thismonthsales_aibyte_transform, - {{ json_extract_scalar('statistic', ['cashTransactionPaymentProcessing'], ['cashTransactionPaymentProcessing']) }} as cashtransactionpaymentprocessing, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('team_members') }} as table_alias --- statistic at team-members/statistic -where 1 = 1 -and statistic is not null - diff --git a/models/generated/airbyte_ctes/unibag/team_members_statistic_ab2.sql b/models/generated/airbyte_ctes/unibag/team_members_statistic_ab2.sql deleted file mode 100644 index ebe00b2..0000000 --- a/models/generated/airbyte_ctes/unibag/team_members_statistic_ab2.sql +++ /dev/null @@ -1,36 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('team_members_statistic_ab1') }} -select - _airbyte_team_members_hashid, - cast(sales as {{ dbt_utils.type_float() }}) as sales, - cast(transactiontotal as {{ dbt_utils.type_float() }}) as transactiontotal, - cast(transactionpending as {{ dbt_utils.type_float() }}) as transactionpending, - cast(transactionsuccess as {{ dbt_utils.type_float() }}) as transactionsuccess, - cast(transactionrejected as {{ dbt_utils.type_float() }}) as transactionrejected, - cast(cashtransactiontotal as {{ dbt_utils.type_float() }}) as cashtransactiontotal, - cast(transactiondelivered as {{ dbt_utils.type_float() }}) as transactiondelivered, - cast(transactiondelivering as {{ dbt_utils.type_float() }}) as transactiondelivering, - cast(cashtransactionpending as {{ dbt_utils.type_float() }}) as cashtransactionpending, - cast(cashtransactionsuccess as {{ dbt_utils.type_float() }}) as cashtransactionsuccess, - cast(cashtransactionrejected as {{ dbt_utils.type_float() }}) as cashtransactionrejected, - cast(cashtransactiondelivered as {{ dbt_utils.type_float() }}) as cashtransactiondelivered, - cast(cashtransactiondelivering as {{ dbt_utils.type_float() }}) as cashtransactiondelivering, - cast(transactionwaitingapprove as {{ dbt_utils.type_float() }}) as transactionwaitingapprove, - cast(transactionpaymentprocessing as {{ dbt_utils.type_float() }}) as transactionpaymentprocessing, - cast(cashtransactionwaitingapprove as {{ dbt_utils.type_float() }}) as cashtransactionwaitingapprove, - cast(thismonthsale_aibyte_transform as {{ dbt_utils.type_string() }}) as thismonthsale_aibyte_transform, - cast(lastmonthsales_aibyte_transform as {{ dbt_utils.type_string() }}) as lastmonthsales_aibyte_transform, - cast(thismonthsales_aibyte_transform as {{ dbt_utils.type_string() }}) as thismonthsales_aibyte_transform, - cast(cashtransactionpaymentprocessing as {{ dbt_utils.type_float() }}) as cashtransactionpaymentprocessing, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('team_members_statistic_ab1') }} --- statistic at team-members/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/team_members_statistic_ab3.sql b/models/generated/airbyte_ctes/unibag/team_members_statistic_ab3.sql deleted file mode 100644 index af76815..0000000 --- a/models/generated/airbyte_ctes/unibag/team_members_statistic_ab3.sql +++ /dev/null @@ -1,36 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('team_members_statistic_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_team_members_hashid', - 'sales', - 'transactiontotal', - 'transactionpending', - 'transactionsuccess', - 'transactionrejected', - 'cashtransactiontotal', - 'transactiondelivered', - 'transactiondelivering', - 'cashtransactionpending', - 'cashtransactionsuccess', - 'cashtransactionrejected', - 'cashtransactiondelivered', - 'cashtransactiondelivering', - 'transactionwaitingapprove', - 'transactionpaymentprocessing', - 'cashtransactionwaitingapprove', - 'thismonthsale_aibyte_transform', - 'lastmonthsales_aibyte_transform', - 'thismonthsales_aibyte_transform', - 'cashtransactionpaymentprocessing', - ]) }} as _airbyte_statistic_hashid, - tmp.* -from {{ ref('team_members_statistic_ab2') }} tmp --- statistic at team-members/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/team_members_statisticmonth_ab1.sql b/models/generated/airbyte_ctes/unibag/team_members_statisticmonth_ab1.sql deleted file mode 100644 index a41633b..0000000 --- a/models/generated/airbyte_ctes/unibag/team_members_statisticmonth_ab1.sql +++ /dev/null @@ -1,35 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('team_members') }} -select - _airbyte_team_members_hashid, - {{ json_extract_scalar('statisticmonth', ['sales'], ['sales']) }} as sales, - {{ json_extract_scalar('statisticmonth', ['thisMonthSale'], ['thisMonthSale']) }} as thismonthsale, - {{ json_extract_scalar('statisticmonth', ['transactionTotal'], ['transactionTotal']) }} as transactiontotal, - {{ json_extract_scalar('statisticmonth', ['transactionPending'], ['transactionPending']) }} as transactionpending, - {{ json_extract_scalar('statisticmonth', ['transactionSuccess'], ['transactionSuccess']) }} as transactionsuccess, - {{ json_extract_scalar('statisticmonth', ['transactionRejected'], ['transactionRejected']) }} as transactionrejected, - {{ json_extract_scalar('statisticmonth', ['cashTransactionTotal'], ['cashTransactionTotal']) }} as cashtransactiontotal, - {{ json_extract_scalar('statisticmonth', ['transactionDelivered'], ['transactionDelivered']) }} as transactiondelivered, - {{ json_extract_scalar('statisticmonth', ['transactionDelivering'], ['transactionDelivering']) }} as transactiondelivering, - {{ json_extract_scalar('statisticmonth', ['cashTransactionPending'], ['cashTransactionPending']) }} as cashtransactionpending, - {{ json_extract_scalar('statisticmonth', ['cashTransactionSuccess'], ['cashTransactionSuccess']) }} as cashtransactionsuccess, - {{ json_extract_scalar('statisticmonth', ['cashTransactionRejected'], ['cashTransactionRejected']) }} as cashtransactionrejected, - {{ json_extract_scalar('statisticmonth', ['cashTransactionDelivered'], ['cashTransactionDelivered']) }} as cashtransactiondelivered, - {{ json_extract_scalar('statisticmonth', ['cashTransactionDelivering'], ['cashTransactionDelivering']) }} as cashtransactiondelivering, - {{ json_extract_scalar('statisticmonth', ['transactionWaitingApprove'], ['transactionWaitingApprove']) }} as transactionwaitingapprove, - {{ json_extract_scalar('statisticmonth', ['transactionPaymentProcessing'], ['transactionPaymentProcessing']) }} as transactionpaymentprocessing, - {{ json_extract_scalar('statisticmonth', ['cashTransactionWaitingApprove'], ['cashTransactionWaitingApprove']) }} as cashtransactionwaitingapprove, - {{ json_extract_scalar('statisticmonth', ['cashTransactionPaymentProcessing'], ['cashTransactionPaymentProcessing']) }} as cashtransactionpaymentprocessing, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('team_members') }} as table_alias --- statisticmonth at team-members/statisticMonth -where 1 = 1 -and statisticmonth is not null - diff --git a/models/generated/airbyte_ctes/unibag/team_members_statisticmonth_ab2.sql b/models/generated/airbyte_ctes/unibag/team_members_statisticmonth_ab2.sql deleted file mode 100644 index a32b16e..0000000 --- a/models/generated/airbyte_ctes/unibag/team_members_statisticmonth_ab2.sql +++ /dev/null @@ -1,34 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('team_members_statisticmonth_ab1') }} -select - _airbyte_team_members_hashid, - cast(sales as {{ dbt_utils.type_float() }}) as sales, - cast(thismonthsale as {{ dbt_utils.type_float() }}) as thismonthsale, - cast(transactiontotal as {{ dbt_utils.type_float() }}) as transactiontotal, - cast(transactionpending as {{ dbt_utils.type_float() }}) as transactionpending, - cast(transactionsuccess as {{ dbt_utils.type_float() }}) as transactionsuccess, - cast(transactionrejected as {{ dbt_utils.type_float() }}) as transactionrejected, - cast(cashtransactiontotal as {{ dbt_utils.type_float() }}) as cashtransactiontotal, - cast(transactiondelivered as {{ dbt_utils.type_float() }}) as transactiondelivered, - cast(transactiondelivering as {{ dbt_utils.type_float() }}) as transactiondelivering, - cast(cashtransactionpending as {{ dbt_utils.type_float() }}) as cashtransactionpending, - cast(cashtransactionsuccess as {{ dbt_utils.type_float() }}) as cashtransactionsuccess, - cast(cashtransactionrejected as {{ dbt_utils.type_float() }}) as cashtransactionrejected, - cast(cashtransactiondelivered as {{ dbt_utils.type_float() }}) as cashtransactiondelivered, - cast(cashtransactiondelivering as {{ dbt_utils.type_float() }}) as cashtransactiondelivering, - cast(transactionwaitingapprove as {{ dbt_utils.type_float() }}) as transactionwaitingapprove, - cast(transactionpaymentprocessing as {{ dbt_utils.type_float() }}) as transactionpaymentprocessing, - cast(cashtransactionwaitingapprove as {{ dbt_utils.type_float() }}) as cashtransactionwaitingapprove, - cast(cashtransactionpaymentprocessing as {{ dbt_utils.type_float() }}) as cashtransactionpaymentprocessing, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('team_members_statisticmonth_ab1') }} --- statisticmonth at team-members/statisticMonth -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/team_members_statisticmonth_ab3.sql b/models/generated/airbyte_ctes/unibag/team_members_statisticmonth_ab3.sql deleted file mode 100644 index dd65894..0000000 --- a/models/generated/airbyte_ctes/unibag/team_members_statisticmonth_ab3.sql +++ /dev/null @@ -1,34 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('team_members_statisticmonth_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_team_members_hashid', - 'sales', - 'thismonthsale', - 'transactiontotal', - 'transactionpending', - 'transactionsuccess', - 'transactionrejected', - 'cashtransactiontotal', - 'transactiondelivered', - 'transactiondelivering', - 'cashtransactionpending', - 'cashtransactionsuccess', - 'cashtransactionrejected', - 'cashtransactiondelivered', - 'cashtransactiondelivering', - 'transactionwaitingapprove', - 'transactionpaymentprocessing', - 'cashtransactionwaitingapprove', - 'cashtransactionpaymentprocessing', - ]) }} as _airbyte_statisticmonth_hashid, - tmp.* -from {{ ref('team_members_statisticmonth_ab2') }} tmp --- statisticmonth at team-members/statisticMonth -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/teams_ab1.sql b/models/generated/airbyte_ctes/unibag/teams_ab1.sql index 76a9108..1d59bba 100644 --- a/models/generated/airbyte_ctes/unibag/teams_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/teams_ab1.sql @@ -10,19 +10,18 @@ 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('table_alias', '_airbyte_data', ['logo'], ['logo']) }} as logo, + {{ 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', ['temp'], ['temp']) }} as {{ adapter.quote('temp') }}, - {{ json_extract('table_alias', '_airbyte_data', ['level'], ['level']) }} as {{ adapter.quote('level') }}, + {{ 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('table_alias', '_airbyte_data', ['statistic'], ['statistic']) }} as statistic, + {{ 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('table_alias', '_airbyte_data', ['information'], ['information']) }} as information, + {{ 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, diff --git a/models/generated/airbyte_ctes/unibag/teams_ab2.sql b/models/generated/airbyte_ctes/unibag/teams_ab2.sql index 44d02e7..bb0193c 100644 --- a/models/generated/airbyte_ctes/unibag/teams_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/teams_ab2.sql @@ -10,19 +10,18 @@ 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 {{ type_json() }}) as logo, + 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('temp') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('temp') }}, - cast({{ adapter.quote('level') }} as {{ type_json() }}) as {{ adapter.quote('level') }}, + 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 {{ type_json() }}) as statistic, + 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 {{ type_json() }}) as information, + 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, diff --git a/models/generated/airbyte_ctes/unibag/teams_ab3.sql b/models/generated/airbyte_ctes/unibag/teams_ab3.sql index a43576b..36dc595 100644 --- a/models/generated/airbyte_ctes/unibag/teams_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/teams_ab3.sql @@ -11,19 +11,18 @@ select '_id', 'code', adapter.quote('desc'), - object_to_string('logo'), + 'logo', adapter.quote('name'), - adapter.quote('temp'), - object_to_string(adapter.quote('level')), + adapter.quote('level'), boolean_to_string('active'), boolean_to_string('isfull'), 'citycode', 'adminuser', 'createdat', - object_to_string('statistic'), + 'statistic', 'updatedat', 'invitelink', - object_to_string('information'), + 'information', 'searchstring', 'inactivereason', 'changingnamecount', diff --git a/models/generated/airbyte_ctes/unibag/teams_information_ab1.sql b/models/generated/airbyte_ctes/unibag/teams_information_ab1.sql deleted file mode 100644 index 346f367..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_information_ab1.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('teams') }} -select - _airbyte_teams_hashid, - {{ json_extract_scalar('information', ['communicationChannel'], ['communicationChannel']) }} as communicationchannel, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('teams') }} as table_alias --- information at teams/information -where 1 = 1 -and information is not null - diff --git a/models/generated/airbyte_ctes/unibag/teams_information_ab2.sql b/models/generated/airbyte_ctes/unibag/teams_information_ab2.sql deleted file mode 100644 index d16754d..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_information_ab2.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('teams_information_ab1') }} -select - _airbyte_teams_hashid, - cast(communicationchannel as {{ dbt_utils.type_string() }}) as communicationchannel, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('teams_information_ab1') }} --- information at teams/information -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/teams_information_ab3.sql b/models/generated/airbyte_ctes/unibag/teams_information_ab3.sql deleted file mode 100644 index e8e35cf..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_information_ab3.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('teams_information_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_teams_hashid', - 'communicationchannel', - ]) }} as _airbyte_information_hashid, - tmp.* -from {{ ref('teams_information_ab2') }} tmp --- information at teams/information -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/teams_level_ab1.sql b/models/generated/airbyte_ctes/unibag/teams_level_ab1.sql deleted file mode 100644 index 0a7b131..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_level_ab1.sql +++ /dev/null @@ -1,27 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('teams') }} -select - _airbyte_teams_hashid, - {{ json_extract_scalar(adapter.quote('level'), ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar(adapter.quote('level'), ['color'], ['color']) }} as color, - {{ json_extract_scalar(adapter.quote('level'), ['level'], ['level']) }} as {{ adapter.quote('level') }}, - {{ json_extract_scalar(adapter.quote('level'), ['expiredAt'], ['expiredAt']) }} as expiredat, - {{ json_extract_scalar(adapter.quote('level'), ['nextLevel'], ['nextLevel']) }} as nextlevel, - {{ json_extract_scalar(adapter.quote('level'), ['bonusPercent'], ['bonusPercent']) }} as bonuspercent, - {{ json_extract_scalar(adapter.quote('level'), ['maximumVipMember'], ['maximumVipMember']) }} as maximumvipmember, - {{ json_extract_scalar(adapter.quote('level'), ['levelAtStartOfMonth'], ['levelAtStartOfMonth']) }} as levelatstartofmonth, - {{ json_extract_scalar(adapter.quote('level'), ['maximumNumberMember'], ['maximumNumberMember']) }} as maximumnumbermember, - {{ json_extract_scalar(adapter.quote('level'), ['maximumNumberViceLeader'], ['maximumNumberViceLeader']) }} as maximumnumberviceleader, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('teams') }} as table_alias --- level at teams/level -where 1 = 1 -and {{ adapter.quote('level') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/teams_level_ab2.sql b/models/generated/airbyte_ctes/unibag/teams_level_ab2.sql deleted file mode 100644 index 71dda0b..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_level_ab2.sql +++ /dev/null @@ -1,26 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('teams_level_ab1') }} -select - _airbyte_teams_hashid, - 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('level') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('level') }}, - cast(expiredat as {{ dbt_utils.type_string() }}) as expiredat, - cast(nextlevel as {{ dbt_utils.type_float() }}) as nextlevel, - cast(bonuspercent as {{ dbt_utils.type_float() }}) as bonuspercent, - cast(maximumvipmember as {{ dbt_utils.type_float() }}) as maximumvipmember, - cast(levelatstartofmonth as {{ dbt_utils.type_float() }}) as levelatstartofmonth, - cast(maximumnumbermember as {{ dbt_utils.type_float() }}) as maximumnumbermember, - cast(maximumnumberviceleader as {{ dbt_utils.type_float() }}) as maximumnumberviceleader, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('teams_level_ab1') }} --- level at teams/level -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/teams_level_ab3.sql b/models/generated/airbyte_ctes/unibag/teams_level_ab3.sql deleted file mode 100644 index 5844225..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_level_ab3.sql +++ /dev/null @@ -1,26 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('teams_level_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_teams_hashid', - adapter.quote('name'), - 'color', - adapter.quote('level'), - 'expiredat', - 'nextlevel', - 'bonuspercent', - 'maximumvipmember', - 'levelatstartofmonth', - 'maximumnumbermember', - 'maximumnumberviceleader', - ]) }} as _airbyte_level_hashid, - tmp.* -from {{ ref('teams_level_ab2') }} tmp --- level at teams/level -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/teams_logo_ab1.sql b/models/generated/airbyte_ctes/unibag/teams_logo_ab1.sql deleted file mode 100644 index a7b67e6..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_logo_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('teams') }} -select - _airbyte_teams_hashid, - {{ json_extract_scalar('logo', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('logo', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract('table_alias', 'logo', ['dimensions'], ['dimensions']) }} as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('teams') }} as table_alias --- logo at teams/logo -where 1 = 1 -and logo is not null - diff --git a/models/generated/airbyte_ctes/unibag/teams_logo_ab2.sql b/models/generated/airbyte_ctes/unibag/teams_logo_ab2.sql deleted file mode 100644 index 9aa4c34..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_logo_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('teams_logo_ab1') }} -select - _airbyte_teams_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(dimensions as {{ type_json() }}) as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('teams_logo_ab1') }} --- logo at teams/logo -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/teams_logo_ab3.sql b/models/generated/airbyte_ctes/unibag/teams_logo_ab3.sql deleted file mode 100644 index e45a575..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_logo_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('teams_logo_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_teams_hashid', - '_id', - adapter.quote('name'), - object_to_string('dimensions'), - ]) }} as _airbyte_logo_hashid, - tmp.* -from {{ ref('teams_logo_ab2') }} tmp --- logo at teams/logo -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_ab1.sql b/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_ab1.sql deleted file mode 100644 index 80b4db4..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('teams_logo') }} -select - _airbyte_logo_hashid, - {{ json_extract('table_alias', 'dimensions', ['md'], ['md']) }} as md, - {{ json_extract('table_alias', 'dimensions', ['sm'], ['sm']) }} as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('teams_logo') }} as table_alias --- dimensions at teams/logo/dimensions -where 1 = 1 -and dimensions is not null - diff --git a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_ab2.sql b/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_ab2.sql deleted file mode 100644 index b41736b..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('teams_logo_dimensions_ab1') }} -select - _airbyte_logo_hashid, - cast(md as {{ type_json() }}) as md, - cast(sm as {{ type_json() }}) as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('teams_logo_dimensions_ab1') }} --- dimensions at teams/logo/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_ab3.sql b/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_ab3.sql deleted file mode 100644 index f9c0787..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('teams_logo_dimensions_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_logo_hashid', - object_to_string('md'), - object_to_string('sm'), - ]) }} as _airbyte_dimensions_hashid, - tmp.* -from {{ ref('teams_logo_dimensions_ab2') }} tmp --- dimensions at teams/logo/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_md_ab1.sql b/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_md_ab1.sql deleted file mode 100644 index 3cd6d94..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_md_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('teams_logo_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('md', ['url'], ['url']) }} as url, - {{ json_extract_scalar('md', ['width'], ['width']) }} as width, - {{ json_extract_scalar('md', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('teams_logo_dimensions') }} as table_alias --- md at teams/logo/dimensions/md -where 1 = 1 -and md is not null - diff --git a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_md_ab2.sql b/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_md_ab2.sql deleted file mode 100644 index 4e977d1..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_md_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('teams_logo_dimensions_md_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('teams_logo_dimensions_md_ab1') }} --- md at teams/logo/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_md_ab3.sql b/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_md_ab3.sql deleted file mode 100644 index b8f8413..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_md_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('teams_logo_dimensions_md_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_md_hashid, - tmp.* -from {{ ref('teams_logo_dimensions_md_ab2') }} tmp --- md at teams/logo/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_sm_ab1.sql b/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_sm_ab1.sql deleted file mode 100644 index d1265b7..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_sm_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('teams_logo_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('sm', ['url'], ['url']) }} as url, - {{ json_extract_scalar('sm', ['width'], ['width']) }} as width, - {{ json_extract_scalar('sm', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('teams_logo_dimensions') }} as table_alias --- sm at teams/logo/dimensions/sm -where 1 = 1 -and sm is not null - diff --git a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_sm_ab2.sql b/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_sm_ab2.sql deleted file mode 100644 index af05493..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_sm_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('teams_logo_dimensions_sm_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('teams_logo_dimensions_sm_ab1') }} --- sm at teams/logo/dimensions/sm -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_sm_ab3.sql b/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_sm_ab3.sql deleted file mode 100644 index fc3f2b1..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_logo_dimensions_sm_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('teams_logo_dimensions_sm_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_sm_hashid, - tmp.* -from {{ ref('teams_logo_dimensions_sm_ab2') }} tmp --- sm at teams/logo/dimensions/sm -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/teams_statistic_ab1.sql b/models/generated/airbyte_ctes/unibag/teams_statistic_ab1.sql deleted file mode 100644 index 9c167c6..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_statistic_ab1.sql +++ /dev/null @@ -1,41 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('teams') }} -select - _airbyte_teams_hashid, - {{ json_extract_scalar('statistic', ['sales'], ['sales']) }} as sales, - {{ json_extract_scalar('statistic', ['memberTotal'], ['memberTotal']) }} as membertotal, - {{ json_extract_scalar('statistic', ['lastMonthSales'], ['lastMonthSales']) }} as lastmonthsales, - {{ json_extract_scalar('statistic', ['thisMonthSales'], ['thisMonthSales']) }} as thismonthsales, - {{ json_extract_scalar('statistic', ['transactionTotal'], ['transactionTotal']) }} as transactiontotal, - {{ json_extract_scalar('statistic', ['transactionPending'], ['transactionPending']) }} as transactionpending, - {{ json_extract_scalar('statistic', ['transactionSuccess'], ['transactionSuccess']) }} as transactionsuccess, - {{ json_extract_scalar('statistic', ['transactionRejected'], ['transactionRejected']) }} as transactionrejected, - {{ json_extract_scalar('statistic', ['cashTransactionTotal'], ['cashTransactionTotal']) }} as cashtransactiontotal, - {{ json_extract_scalar('statistic', ['memberTotalRemaining'], ['memberTotalRemaining']) }} as membertotalremaining, - {{ json_extract_scalar('statistic', ['transactionDelivered'], ['transactionDelivered']) }} as transactiondelivered, - {{ json_extract_scalar('statistic', ['transactionDelivering'], ['transactionDelivering']) }} as transactiondelivering, - {{ json_extract_scalar('statistic', ['cashTransactionPending'], ['cashTransactionPending']) }} as cashtransactionpending, - {{ json_extract_scalar('statistic', ['cashTransactionSuccess'], ['cashTransactionSuccess']) }} as cashtransactionsuccess, - {{ json_extract_scalar('statistic', ['cashTransactionRejected'], ['cashTransactionRejected']) }} as cashtransactionrejected, - {{ json_extract_scalar('statistic', ['cashTransactionDelivered'], ['cashTransactionDelivered']) }} as cashtransactiondelivered, - {{ json_extract_scalar('statistic', ['cashTransactionDelivering'], ['cashTransactionDelivering']) }} as cashtransactiondelivering, - {{ json_extract_scalar('statistic', ['transactionWaitingApprove'], ['transactionWaitingApprove']) }} as transactionwaitingapprove, - {{ json_extract_scalar('statistic', ['transactionPaymentProcessing'], ['transactionPaymentProcessing']) }} as transactionpaymentprocessing, - {{ json_extract_scalar('statistic', ['cashTransactionWaitingApprove'], ['cashTransactionWaitingApprove']) }} as cashtransactionwaitingapprove, - {{ json_extract_scalar('statistic', ['thisMonthSale_aibyte_transform'], ['thisMonthSale_aibyte_transform']) }} as thismonthsale_aibyte_transform, - {{ json_extract_scalar('statistic', ['vipMemberTotal_aibyte_transform'], ['vipMemberTotal_aibyte_transform']) }} as vipmembertotal_aibyte_transform, - {{ json_extract_scalar('statistic', ['cashTransactionPaymentProcessing'], ['cashTransactionPaymentProcessing']) }} as cashtransactionpaymentprocessing, - {{ json_extract_scalar('statistic', ['memberRequestTotalPending_aibyte_transform'], ['memberRequestTotalPending_aibyte_transform']) }} as memberrequesttotalpending_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('teams') }} as table_alias --- statistic at teams/statistic -where 1 = 1 -and statistic is not null - diff --git a/models/generated/airbyte_ctes/unibag/teams_statistic_ab2.sql b/models/generated/airbyte_ctes/unibag/teams_statistic_ab2.sql deleted file mode 100644 index 52c853e..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_statistic_ab2.sql +++ /dev/null @@ -1,40 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('teams_statistic_ab1') }} -select - _airbyte_teams_hashid, - cast(sales as {{ dbt_utils.type_float() }}) as sales, - cast(membertotal as {{ dbt_utils.type_float() }}) as membertotal, - cast(lastmonthsales as {{ dbt_utils.type_float() }}) as lastmonthsales, - cast(thismonthsales as {{ dbt_utils.type_float() }}) as thismonthsales, - cast(transactiontotal as {{ dbt_utils.type_float() }}) as transactiontotal, - cast(transactionpending as {{ dbt_utils.type_float() }}) as transactionpending, - cast(transactionsuccess as {{ dbt_utils.type_float() }}) as transactionsuccess, - cast(transactionrejected as {{ dbt_utils.type_float() }}) as transactionrejected, - cast(cashtransactiontotal as {{ dbt_utils.type_float() }}) as cashtransactiontotal, - cast(membertotalremaining as {{ dbt_utils.type_float() }}) as membertotalremaining, - cast(transactiondelivered as {{ dbt_utils.type_float() }}) as transactiondelivered, - cast(transactiondelivering as {{ dbt_utils.type_float() }}) as transactiondelivering, - cast(cashtransactionpending as {{ dbt_utils.type_float() }}) as cashtransactionpending, - cast(cashtransactionsuccess as {{ dbt_utils.type_float() }}) as cashtransactionsuccess, - cast(cashtransactionrejected as {{ dbt_utils.type_float() }}) as cashtransactionrejected, - cast(cashtransactiondelivered as {{ dbt_utils.type_float() }}) as cashtransactiondelivered, - cast(cashtransactiondelivering as {{ dbt_utils.type_float() }}) as cashtransactiondelivering, - cast(transactionwaitingapprove as {{ dbt_utils.type_float() }}) as transactionwaitingapprove, - cast(transactionpaymentprocessing as {{ dbt_utils.type_float() }}) as transactionpaymentprocessing, - cast(cashtransactionwaitingapprove as {{ dbt_utils.type_float() }}) as cashtransactionwaitingapprove, - cast(thismonthsale_aibyte_transform as {{ dbt_utils.type_string() }}) as thismonthsale_aibyte_transform, - cast(vipmembertotal_aibyte_transform as {{ dbt_utils.type_string() }}) as vipmembertotal_aibyte_transform, - cast(cashtransactionpaymentprocessing as {{ dbt_utils.type_float() }}) as cashtransactionpaymentprocessing, - cast(memberrequesttotalpending_aibyte_transform as {{ dbt_utils.type_string() }}) as memberrequesttotalpending_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('teams_statistic_ab1') }} --- statistic at teams/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/teams_statistic_ab3.sql b/models/generated/airbyte_ctes/unibag/teams_statistic_ab3.sql deleted file mode 100644 index f4a28a3..0000000 --- a/models/generated/airbyte_ctes/unibag/teams_statistic_ab3.sql +++ /dev/null @@ -1,40 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('teams_statistic_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_teams_hashid', - 'sales', - 'membertotal', - 'lastmonthsales', - 'thismonthsales', - 'transactiontotal', - 'transactionpending', - 'transactionsuccess', - 'transactionrejected', - 'cashtransactiontotal', - 'membertotalremaining', - 'transactiondelivered', - 'transactiondelivering', - 'cashtransactionpending', - 'cashtransactionsuccess', - 'cashtransactionrejected', - 'cashtransactiondelivered', - 'cashtransactiondelivering', - 'transactionwaitingapprove', - 'transactionpaymentprocessing', - 'cashtransactionwaitingapprove', - 'thismonthsale_aibyte_transform', - 'vipmembertotal_aibyte_transform', - 'cashtransactionpaymentprocessing', - 'memberrequesttotalpending_aibyte_transform', - ]) }} as _airbyte_statistic_hashid, - tmp.* -from {{ ref('teams_statistic_ab2') }} tmp --- statistic at teams/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications__ation_addressentities_ab1.sql b/models/generated/airbyte_ctes/unibag/user_identifications__ation_addressentities_ab1.sql deleted file mode 100644 index bfe78d3..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications__ation_addressentities_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('user_identifications_detectinformation') }} -select - _airbyte_detectinformation_hashid, - {{ json_extract_scalar('addressentities', ['ward'], ['ward']) }} as ward, - {{ json_extract_scalar('addressentities', ['street'], ['street']) }} as street, - {{ json_extract_scalar('addressentities', ['district'], ['district']) }} as district, - {{ json_extract_scalar('addressentities', ['province'], ['province']) }} as province, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications_detectinformation') }} as table_alias --- addressentities at user-identifications/detectInformation/addressEntities -where 1 = 1 -and addressentities is not null - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications__ation_addressentities_ab2.sql b/models/generated/airbyte_ctes/unibag/user_identifications__ation_addressentities_ab2.sql deleted file mode 100644 index 17352c7..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications__ation_addressentities_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('user_identifications__ation_addressentities_ab1') }} -select - _airbyte_detectinformation_hashid, - cast(ward as {{ dbt_utils.type_string() }}) as ward, - cast(street as {{ dbt_utils.type_string() }}) as street, - cast(district as {{ dbt_utils.type_string() }}) as district, - cast(province as {{ dbt_utils.type_string() }}) as province, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications__ation_addressentities_ab1') }} --- addressentities at user-identifications/detectInformation/addressEntities -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications__ation_addressentities_ab3.sql b/models/generated/airbyte_ctes/unibag/user_identifications__ation_addressentities_ab3.sql deleted file mode 100644 index 2ba4967..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications__ation_addressentities_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('user_identifications__ation_addressentities_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_detectinformation_hashid', - 'ward', - 'street', - 'district', - 'province', - ]) }} as _airbyte_addressentities_hashid, - tmp.* -from {{ ref('user_identifications__ation_addressentities_ab2') }} tmp --- addressentities at user-identifications/detectInformation/addressEntities -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_md_ab1.sql b/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_md_ab1.sql deleted file mode 100644 index 28a46c2..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_md_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('user_identifications_frontside_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('md', ['url'], ['url']) }} as url, - {{ json_extract_scalar('md', ['width'], ['width']) }} as width, - {{ json_extract_scalar('md', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications_frontside_dimensions') }} as table_alias --- md at user-identifications/frontSide/dimensions/md -where 1 = 1 -and md is not null - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_md_ab2.sql b/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_md_ab2.sql deleted file mode 100644 index 3b66b4c..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_md_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('user_identifications__ontside_dimensions_md_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications__ontside_dimensions_md_ab1') }} --- md at user-identifications/frontSide/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_md_ab3.sql b/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_md_ab3.sql deleted file mode 100644 index f5b9ada..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_md_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('user_identifications__ontside_dimensions_md_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_md_hashid, - tmp.* -from {{ ref('user_identifications__ontside_dimensions_md_ab2') }} tmp --- md at user-identifications/frontSide/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_sm_ab1.sql b/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_sm_ab1.sql deleted file mode 100644 index 8faa033..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_sm_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('user_identifications_frontside_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('sm', ['url'], ['url']) }} as url, - {{ json_extract_scalar('sm', ['width'], ['width']) }} as width, - {{ json_extract_scalar('sm', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications_frontside_dimensions') }} as table_alias --- sm at user-identifications/frontSide/dimensions/sm -where 1 = 1 -and sm is not null - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_sm_ab2.sql b/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_sm_ab2.sql deleted file mode 100644 index 2f6ead9..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_sm_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('user_identifications__ontside_dimensions_sm_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications__ontside_dimensions_sm_ab1') }} --- sm at user-identifications/frontSide/dimensions/sm -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_sm_ab3.sql b/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_sm_ab3.sql deleted file mode 100644 index 8dec589..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications__ontside_dimensions_sm_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('user_identifications__ontside_dimensions_sm_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_sm_hashid, - tmp.* -from {{ ref('user_identifications__ontside_dimensions_sm_ab2') }} tmp --- sm at user-identifications/frontSide/dimensions/sm -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 index d3a6e3c..54c9bb1 100644 --- a/models/generated/airbyte_ctes/unibag/user_identifications_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/user_identifications_ab1.sql @@ -18,16 +18,17 @@ select {{ 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('table_alias', '_airbyte_data', ['backSide'], ['backSide']) }} as backside, + {{ 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('table_alias', '_airbyte_data', ['frontSide'], ['frontSide']) }} as frontside, + {{ 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('table_alias', '_airbyte_data', ['detectInformation'], ['detectInformation']) }} as detectinformation, + {{ json_extract_scalar('_airbyte_data', ['detectInformation'], ['detectInformation']) }} as detectinformation, _airbyte_ab_id, _airbyte_emitted_at, {{ current_timestamp() }} as _airbyte_normalized_at diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_ab2.sql b/models/generated/airbyte_ctes/unibag/user_identifications_ab2.sql index 6faad4f..1fcdceb 100644 --- a/models/generated/airbyte_ctes/unibag/user_identifications_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/user_identifications_ab2.sql @@ -18,16 +18,17 @@ select 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(backside as {{ type_json() }}) as backside, + 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 {{ type_json() }}) as frontside, + 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 {{ type_json() }}) as detectinformation, + cast(detectinformation as {{ dbt_utils.type_string() }}) as detectinformation, _airbyte_ab_id, _airbyte_emitted_at, {{ current_timestamp() }} as _airbyte_normalized_at diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_ab3.sql b/models/generated/airbyte_ctes/unibag/user_identifications_ab3.sql index 92f44c6..e406266 100644 --- a/models/generated/airbyte_ctes/unibag/user_identifications_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/user_identifications_ab3.sql @@ -19,16 +19,17 @@ select adapter.quote('number'), 'status', 'address', - object_to_string('backside'), + 'dobdate', + 'backside', 'birthday', 'createdat', - object_to_string('frontside'), + 'frontside', 'issuedate', 'updatedat', 'expirydate', 'issueplace', 'timeupdate', - object_to_string('detectinformation'), + 'detectinformation', ]) }} as _airbyte_user_identifications_hashid, tmp.* from {{ ref('user_identifications_ab2') }} tmp diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_backside_ab1.sql b/models/generated/airbyte_ctes/unibag/user_identifications_backside_ab1.sql deleted file mode 100644 index b1d126e..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_backside_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('user_identifications') }} -select - _airbyte_user_identifications_hashid, - {{ json_extract_scalar('backside', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('backside', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract('table_alias', 'backside', ['dimensions'], ['dimensions']) }} as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications') }} as table_alias --- backside at user-identifications/backSide -where 1 = 1 -and backside is not null - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_backside_ab2.sql b/models/generated/airbyte_ctes/unibag/user_identifications_backside_ab2.sql deleted file mode 100644 index 515d105..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_backside_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('user_identifications_backside_ab1') }} -select - _airbyte_user_identifications_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(dimensions as {{ type_json() }}) as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications_backside_ab1') }} --- backside at user-identifications/backSide -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_backside_ab3.sql b/models/generated/airbyte_ctes/unibag/user_identifications_backside_ab3.sql deleted file mode 100644 index ecf5fe3..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_backside_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('user_identifications_backside_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_user_identifications_hashid', - '_id', - adapter.quote('name'), - object_to_string('dimensions'), - ]) }} as _airbyte_backside_hashid, - tmp.* -from {{ ref('user_identifications_backside_ab2') }} tmp --- backside at user-identifications/backSide -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_ab1.sql b/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_ab1.sql deleted file mode 100644 index af80381..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('user_identifications_backside') }} -select - _airbyte_backside_hashid, - {{ json_extract('table_alias', 'dimensions', ['md'], ['md']) }} as md, - {{ json_extract('table_alias', 'dimensions', ['sm'], ['sm']) }} as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications_backside') }} as table_alias --- dimensions at user-identifications/backSide/dimensions -where 1 = 1 -and dimensions is not null - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_ab2.sql b/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_ab2.sql deleted file mode 100644 index d5d9b48..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('user_identifications_backside_dimensions_ab1') }} -select - _airbyte_backside_hashid, - cast(md as {{ type_json() }}) as md, - cast(sm as {{ type_json() }}) as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications_backside_dimensions_ab1') }} --- dimensions at user-identifications/backSide/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_ab3.sql b/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_ab3.sql deleted file mode 100644 index 560a9d0..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('user_identifications_backside_dimensions_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_backside_hashid', - object_to_string('md'), - object_to_string('sm'), - ]) }} as _airbyte_dimensions_hashid, - tmp.* -from {{ ref('user_identifications_backside_dimensions_ab2') }} tmp --- dimensions at user-identifications/backSide/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_md_ab1.sql b/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_md_ab1.sql deleted file mode 100644 index 0b4e8c8..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_md_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('user_identifications_backside_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('md', ['url'], ['url']) }} as url, - {{ json_extract_scalar('md', ['width'], ['width']) }} as width, - {{ json_extract_scalar('md', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications_backside_dimensions') }} as table_alias --- md at user-identifications/backSide/dimensions/md -where 1 = 1 -and md is not null - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_md_ab2.sql b/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_md_ab2.sql deleted file mode 100644 index 483cb0f..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_md_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('user_identifications_backside_dimensions_md_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications_backside_dimensions_md_ab1') }} --- md at user-identifications/backSide/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_md_ab3.sql b/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_md_ab3.sql deleted file mode 100644 index 63764de..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_md_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('user_identifications_backside_dimensions_md_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_md_hashid, - tmp.* -from {{ ref('user_identifications_backside_dimensions_md_ab2') }} tmp --- md at user-identifications/backSide/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_sm_ab1.sql b/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_sm_ab1.sql deleted file mode 100644 index ecdb4e0..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_sm_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('user_identifications_backside_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('sm', ['url'], ['url']) }} as url, - {{ json_extract_scalar('sm', ['width'], ['width']) }} as width, - {{ json_extract_scalar('sm', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications_backside_dimensions') }} as table_alias --- sm at user-identifications/backSide/dimensions/sm -where 1 = 1 -and sm is not null - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_sm_ab2.sql b/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_sm_ab2.sql deleted file mode 100644 index 4c51dcc..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_sm_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('user_identifications_backside_dimensions_sm_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications_backside_dimensions_sm_ab1') }} --- sm at user-identifications/backSide/dimensions/sm -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_sm_ab3.sql b/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_sm_ab3.sql deleted file mode 100644 index 3426a7e..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_backside_dimensions_sm_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('user_identifications_backside_dimensions_sm_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_sm_hashid, - tmp.* -from {{ ref('user_identifications_backside_dimensions_sm_ab2') }} tmp --- sm at user-identifications/backSide/dimensions/sm -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_detectinformation_ab1.sql b/models/generated/airbyte_ctes/unibag/user_identifications_detectinformation_ab1.sql deleted file mode 100644 index 8f5c094..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_detectinformation_ab1.sql +++ /dev/null @@ -1,37 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('user_identifications') }} -select - _airbyte_user_identifications_hashid, - {{ json_extract_scalar('detectinformation', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('detectinformation', ['dob'], ['dob']) }} as dob, - {{ json_extract_scalar('detectinformation', ['doe'], ['doe']) }} as doe, - {{ json_extract_scalar('detectinformation', ['sex'], ['sex']) }} as sex, - {{ json_extract_scalar('detectinformation', ['home'], ['home']) }} as home, - {{ json_extract_scalar('detectinformation', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('detectinformation', ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_scalar('detectinformation', ['idProb'], ['idProb']) }} as idprob, - {{ json_extract_scalar('detectinformation', ['address'], ['address']) }} as address, - {{ json_extract_scalar('detectinformation', ['dobProb'], ['dobProb']) }} as dobprob, - {{ json_extract_scalar('detectinformation', ['doeProb'], ['doeProb']) }} as doeprob, - {{ json_extract_scalar('detectinformation', ['sexProb'], ['sexProb']) }} as sexprob, - {{ json_extract_scalar('detectinformation', ['typeNew'], ['typeNew']) }} as typenew, - {{ json_extract_scalar('detectinformation', ['homeProb'], ['homeProb']) }} as homeprob, - {{ json_extract_scalar('detectinformation', ['nameProb'], ['nameProb']) }} as nameprob, - {{ json_extract_scalar('detectinformation', ['addressProb'], ['addressProb']) }} as addressprob, - {{ json_extract_scalar('detectinformation', ['nationality'], ['nationality']) }} as nationality, - {{ json_extract_scalar('detectinformation', ['overallScore'], ['overallScore']) }} as overallscore, - {{ json_extract('table_alias', 'detectinformation', ['addressEntities'], ['addressEntities']) }} as addressentities, - {{ json_extract_scalar('detectinformation', ['nationalityProb'], ['nationalityProb']) }} as nationalityprob, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications') }} as table_alias --- detectinformation at user-identifications/detectInformation -where 1 = 1 -and detectinformation is not null - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_detectinformation_ab2.sql b/models/generated/airbyte_ctes/unibag/user_identifications_detectinformation_ab2.sql deleted file mode 100644 index 3257c84..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_detectinformation_ab2.sql +++ /dev/null @@ -1,36 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('user_identifications_detectinformation_ab1') }} -select - _airbyte_user_identifications_hashid, - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('id') }}, - cast(dob as {{ dbt_utils.type_string() }}) as dob, - cast(doe as {{ dbt_utils.type_string() }}) as doe, - cast(sex as {{ dbt_utils.type_string() }}) as sex, - cast(home as {{ dbt_utils.type_string() }}) as home, - 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(idprob as {{ dbt_utils.type_string() }}) as idprob, - cast(address as {{ dbt_utils.type_string() }}) as address, - cast(dobprob as {{ dbt_utils.type_string() }}) as dobprob, - cast(doeprob as {{ dbt_utils.type_string() }}) as doeprob, - cast(sexprob as {{ dbt_utils.type_string() }}) as sexprob, - cast(typenew as {{ dbt_utils.type_string() }}) as typenew, - cast(homeprob as {{ dbt_utils.type_string() }}) as homeprob, - cast(nameprob as {{ dbt_utils.type_string() }}) as nameprob, - cast(addressprob as {{ dbt_utils.type_string() }}) as addressprob, - cast(nationality as {{ dbt_utils.type_string() }}) as nationality, - cast(overallscore as {{ dbt_utils.type_string() }}) as overallscore, - cast(addressentities as {{ type_json() }}) as addressentities, - cast(nationalityprob as {{ dbt_utils.type_string() }}) as nationalityprob, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications_detectinformation_ab1') }} --- detectinformation at user-identifications/detectInformation -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_detectinformation_ab3.sql b/models/generated/airbyte_ctes/unibag/user_identifications_detectinformation_ab3.sql deleted file mode 100644 index 2d2791f..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_detectinformation_ab3.sql +++ /dev/null @@ -1,36 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('user_identifications_detectinformation_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_user_identifications_hashid', - adapter.quote('id'), - 'dob', - 'doe', - 'sex', - 'home', - adapter.quote('name'), - adapter.quote('type'), - 'idprob', - 'address', - 'dobprob', - 'doeprob', - 'sexprob', - 'typenew', - 'homeprob', - 'nameprob', - 'addressprob', - 'nationality', - 'overallscore', - object_to_string('addressentities'), - 'nationalityprob', - ]) }} as _airbyte_detectinformation_hashid, - tmp.* -from {{ ref('user_identifications_detectinformation_ab2') }} tmp --- detectinformation at user-identifications/detectInformation -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_frontside_ab1.sql b/models/generated/airbyte_ctes/unibag/user_identifications_frontside_ab1.sql deleted file mode 100644 index 11ef103..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_frontside_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('user_identifications') }} -select - _airbyte_user_identifications_hashid, - {{ json_extract_scalar('frontside', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('frontside', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract('table_alias', 'frontside', ['dimensions'], ['dimensions']) }} as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications') }} as table_alias --- frontside at user-identifications/frontSide -where 1 = 1 -and frontside is not null - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_frontside_ab2.sql b/models/generated/airbyte_ctes/unibag/user_identifications_frontside_ab2.sql deleted file mode 100644 index aa5a4ec..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_frontside_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('user_identifications_frontside_ab1') }} -select - _airbyte_user_identifications_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(dimensions as {{ type_json() }}) as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications_frontside_ab1') }} --- frontside at user-identifications/frontSide -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_frontside_ab3.sql b/models/generated/airbyte_ctes/unibag/user_identifications_frontside_ab3.sql deleted file mode 100644 index d773420..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_frontside_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('user_identifications_frontside_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_user_identifications_hashid', - '_id', - adapter.quote('name'), - object_to_string('dimensions'), - ]) }} as _airbyte_frontside_hashid, - tmp.* -from {{ ref('user_identifications_frontside_ab2') }} tmp --- frontside at user-identifications/frontSide -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_frontside_dimensions_ab1.sql b/models/generated/airbyte_ctes/unibag/user_identifications_frontside_dimensions_ab1.sql deleted file mode 100644 index 2d6409e..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_frontside_dimensions_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('user_identifications_frontside') }} -select - _airbyte_frontside_hashid, - {{ json_extract('table_alias', 'dimensions', ['md'], ['md']) }} as md, - {{ json_extract('table_alias', 'dimensions', ['sm'], ['sm']) }} as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications_frontside') }} as table_alias --- dimensions at user-identifications/frontSide/dimensions -where 1 = 1 -and dimensions is not null - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_frontside_dimensions_ab2.sql b/models/generated/airbyte_ctes/unibag/user_identifications_frontside_dimensions_ab2.sql deleted file mode 100644 index dd3dd44..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_frontside_dimensions_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('user_identifications_frontside_dimensions_ab1') }} -select - _airbyte_frontside_hashid, - cast(md as {{ type_json() }}) as md, - cast(sm as {{ type_json() }}) as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('user_identifications_frontside_dimensions_ab1') }} --- dimensions at user-identifications/frontSide/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/user_identifications_frontside_dimensions_ab3.sql b/models/generated/airbyte_ctes/unibag/user_identifications_frontside_dimensions_ab3.sql deleted file mode 100644 index 05f3d03..0000000 --- a/models/generated/airbyte_ctes/unibag/user_identifications_frontside_dimensions_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('user_identifications_frontside_dimensions_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_frontside_hashid', - object_to_string('md'), - object_to_string('sm'), - ]) }} as _airbyte_dimensions_hashid, - tmp.* -from {{ ref('user_identifications_frontside_dimensions_ab2') }} tmp --- dimensions at user-identifications/frontSide/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_ab1.sql b/models/generated/airbyte_ctes/unibag/users_ab1.sql index 7ee4590..8327097 100644 --- a/models/generated/airbyte_ctes/unibag/users_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/users_ab1.sql @@ -9,27 +9,30 @@ select {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, {{ json_extract_scalar('_airbyte_data', ['code'], ['code']) }} as code, - {{ json_extract('table_alias', '_airbyte_data', ['info'], ['info']) }} as info, + {{ json_extract_scalar('_airbyte_data', ['info'], ['info']) }} as info, {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract('table_alias', '_airbyte_data', ['team'], ['team']) }} as team, - {{ json_extract('table_alias', '_airbyte_data', ['zalo'], ['zalo']) }} as zalo, - {{ json_extract('table_alias', '_airbyte_data', ['email'], ['email']) }} as email, - {{ json_extract('table_alias', '_airbyte_data', ['phone'], ['phone']) }} as phone, - {{ json_extract('table_alias', '_airbyte_data', ['avatar'], ['avatar']) }} as avatar, + {{ 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('table_alias', '_airbyte_data', ['facebook'], ['facebook']) }} as facebook, + {{ json_extract_scalar('_airbyte_data', ['facebook'], ['facebook']) }} as facebook, {{ json_extract_scalar('_airbyte_data', ['hasOrder'], ['hasOrder']) }} as hasorder, - {{ json_extract('table_alias', '_airbyte_data', ['referral'], ['referral']) }} as referral, + {{ 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('table_alias', '_airbyte_data', ['statistic'], ['statistic']) }} as statistic, + {{ json_extract_scalar('_airbyte_data', ['statistic'], ['statistic']) }} as statistic, {{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat, - {{ json_extract('table_alias', '_airbyte_data', ['membership'], ['membership']) }} as membership, + {{ 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('table_alias', '_airbyte_data', ['identification'], ['identification']) }} as identification, + {{ 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, diff --git a/models/generated/airbyte_ctes/unibag/users_ab2.sql b/models/generated/airbyte_ctes/unibag/users_ab2.sql index 3863189..b3e92a0 100644 --- a/models/generated/airbyte_ctes/unibag/users_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/users_ab2.sql @@ -9,27 +9,30 @@ select cast(_id as {{ dbt_utils.type_string() }}) as _id, cast(code as {{ dbt_utils.type_string() }}) as code, - cast(info as {{ type_json() }}) as info, + 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 {{ type_json() }}) as team, - cast(zalo as {{ type_json() }}) as zalo, - cast(email as {{ type_json() }}) as email, - cast(phone as {{ type_json() }}) as phone, - cast(avatar as {{ type_json() }}) as avatar, + 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 {{ type_json() }}) as facebook, + cast(facebook as {{ dbt_utils.type_string() }}) as facebook, {{ cast_to_boolean('hasorder') }} as hasorder, - cast(referral as {{ type_json() }}) as referral, + cast(referral as {{ dbt_utils.type_string() }}) as referral, segments, cast(createdat as {{ dbt_utils.type_string() }}) as createdat, - cast(statistic as {{ type_json() }}) as statistic, + cast(statistic as {{ dbt_utils.type_string() }}) as statistic, cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat, - cast(membership as {{ type_json() }}) as membership, + 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 {{ type_json() }}) as identification, + 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, diff --git a/models/generated/airbyte_ctes/unibag/users_ab3.sql b/models/generated/airbyte_ctes/unibag/users_ab3.sql index 1f9153c..1f54025 100644 --- a/models/generated/airbyte_ctes/unibag/users_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/users_ab3.sql @@ -10,27 +10,30 @@ select {{ dbt_utils.surrogate_key([ '_id', 'code', - object_to_string('info'), + 'info', adapter.quote('name'), - object_to_string('team'), - object_to_string('zalo'), - object_to_string('email'), - object_to_string('phone'), - object_to_string('avatar'), + 'team', + 'zalo', + 'email', + 'phone', + 'avatar', boolean_to_string('banned'), 'segment', - object_to_string('facebook'), + 'facebook', boolean_to_string('hasorder'), - object_to_string('referral'), + 'referral', array_to_string('segments'), 'createdat', - object_to_string('statistic'), + 'statistic', 'updatedat', - object_to_string('membership'), + 'membership', + 'lastorderat', + 'firstorderat', 'registerfrom', 'searchstring', + 'adjusttracker', boolean_to_string('isupdatedinfo'), - object_to_string('identification'), + 'identification', 'lastactivatedat', 'lastviewnotificationat', ]) }} as _airbyte_users_hashid, diff --git a/models/generated/airbyte_ctes/unibag/users_avatar_ab1.sql b/models/generated/airbyte_ctes/unibag/users_avatar_ab1.sql deleted file mode 100644 index a38c3be..0000000 --- a/models/generated/airbyte_ctes/unibag/users_avatar_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('users') }} -select - _airbyte_users_hashid, - {{ json_extract_scalar('avatar', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('avatar', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract('table_alias', 'avatar', ['dimensions'], ['dimensions']) }} as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users') }} as table_alias --- avatar at users/avatar -where 1 = 1 -and avatar is not null - diff --git a/models/generated/airbyte_ctes/unibag/users_avatar_ab2.sql b/models/generated/airbyte_ctes/unibag/users_avatar_ab2.sql deleted file mode 100644 index 6b79d73..0000000 --- a/models/generated/airbyte_ctes/unibag/users_avatar_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('users_avatar_ab1') }} -select - _airbyte_users_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(dimensions as {{ type_json() }}) as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_avatar_ab1') }} --- avatar at users/avatar -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_avatar_ab3.sql b/models/generated/airbyte_ctes/unibag/users_avatar_ab3.sql deleted file mode 100644 index 05c06f9..0000000 --- a/models/generated/airbyte_ctes/unibag/users_avatar_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('users_avatar_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_users_hashid', - '_id', - adapter.quote('name'), - object_to_string('dimensions'), - ]) }} as _airbyte_avatar_hashid, - tmp.* -from {{ ref('users_avatar_ab2') }} tmp --- avatar at users/avatar -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_ab1.sql b/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_ab1.sql deleted file mode 100644 index 3c48940..0000000 --- a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('users_avatar') }} -select - _airbyte_avatar_hashid, - {{ json_extract('table_alias', 'dimensions', ['md'], ['md']) }} as md, - {{ json_extract('table_alias', 'dimensions', ['sm'], ['sm']) }} as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_avatar') }} as table_alias --- dimensions at users/avatar/dimensions -where 1 = 1 -and dimensions is not null - diff --git a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_ab2.sql b/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_ab2.sql deleted file mode 100644 index 634715b..0000000 --- a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('users_avatar_dimensions_ab1') }} -select - _airbyte_avatar_hashid, - cast(md as {{ type_json() }}) as md, - cast(sm as {{ type_json() }}) as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_avatar_dimensions_ab1') }} --- dimensions at users/avatar/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_ab3.sql b/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_ab3.sql deleted file mode 100644 index 35fafa8..0000000 --- a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('users_avatar_dimensions_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_avatar_hashid', - object_to_string('md'), - object_to_string('sm'), - ]) }} as _airbyte_dimensions_hashid, - tmp.* -from {{ ref('users_avatar_dimensions_ab2') }} tmp --- dimensions at users/avatar/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_md_ab1.sql b/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_md_ab1.sql deleted file mode 100644 index ebebf0d..0000000 --- a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_md_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('users_avatar_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('md', ['url'], ['url']) }} as url, - {{ json_extract_scalar('md', ['width'], ['width']) }} as width, - {{ json_extract_scalar('md', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_avatar_dimensions') }} as table_alias --- md at users/avatar/dimensions/md -where 1 = 1 -and md is not null - diff --git a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_md_ab2.sql b/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_md_ab2.sql deleted file mode 100644 index 1eac474..0000000 --- a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_md_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('users_avatar_dimensions_md_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_avatar_dimensions_md_ab1') }} --- md at users/avatar/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_md_ab3.sql b/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_md_ab3.sql deleted file mode 100644 index 900bc55..0000000 --- a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_md_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('users_avatar_dimensions_md_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_md_hashid, - tmp.* -from {{ ref('users_avatar_dimensions_md_ab2') }} tmp --- md at users/avatar/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_sm_ab1.sql b/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_sm_ab1.sql deleted file mode 100644 index d2cb017..0000000 --- a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_sm_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('users_avatar_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('sm', ['url'], ['url']) }} as url, - {{ json_extract_scalar('sm', ['width'], ['width']) }} as width, - {{ json_extract_scalar('sm', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_avatar_dimensions') }} as table_alias --- sm at users/avatar/dimensions/sm -where 1 = 1 -and sm is not null - diff --git a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_sm_ab2.sql b/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_sm_ab2.sql deleted file mode 100644 index 7542b1f..0000000 --- a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_sm_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('users_avatar_dimensions_sm_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_avatar_dimensions_sm_ab1') }} --- sm at users/avatar/dimensions/sm -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_sm_ab3.sql b/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_sm_ab3.sql deleted file mode 100644 index 72708fb..0000000 --- a/models/generated/airbyte_ctes/unibag/users_avatar_dimensions_sm_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('users_avatar_dimensions_sm_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_sm_hashid, - tmp.* -from {{ ref('users_avatar_dimensions_sm_ab2') }} tmp --- sm at users/avatar/dimensions/sm -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_email_ab1.sql b/models/generated/airbyte_ctes/unibag/users_email_ab1.sql deleted file mode 100644 index 8158bee..0000000 --- a/models/generated/airbyte_ctes/unibag/users_email_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('users') }} -select - _airbyte_users_hashid, - {{ json_extract_scalar('email', ['email'], ['email']) }} as email, - {{ json_extract_scalar('email', ['verified'], ['verified']) }} as verified, - {{ json_extract_scalar('email', ['verifiedAt'], ['verifiedAt']) }} as verifiedat, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users') }} as table_alias --- email at users/email -where 1 = 1 -and email is not null - diff --git a/models/generated/airbyte_ctes/unibag/users_email_ab2.sql b/models/generated/airbyte_ctes/unibag/users_email_ab2.sql deleted file mode 100644 index 0b95c57..0000000 --- a/models/generated/airbyte_ctes/unibag/users_email_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('users_email_ab1') }} -select - _airbyte_users_hashid, - cast(email as {{ dbt_utils.type_string() }}) as email, - {{ cast_to_boolean('verified') }} as verified, - cast(verifiedat as {{ dbt_utils.type_string() }}) as verifiedat, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_email_ab1') }} --- email at users/email -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_email_ab3.sql b/models/generated/airbyte_ctes/unibag/users_email_ab3.sql deleted file mode 100644 index d56fe37..0000000 --- a/models/generated/airbyte_ctes/unibag/users_email_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('users_email_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_users_hashid', - 'email', - boolean_to_string('verified'), - 'verifiedat', - ]) }} as _airbyte_email_hashid, - tmp.* -from {{ ref('users_email_ab2') }} tmp --- email at users/email -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_facebook_ab1.sql b/models/generated/airbyte_ctes/unibag/users_facebook_ab1.sql deleted file mode 100644 index a082186..0000000 --- a/models/generated/airbyte_ctes/unibag/users_facebook_ab1.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('users') }} -select - _airbyte_users_hashid, - {{ json_extract_scalar('facebook', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('facebook', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('facebook', ['email'], ['email']) }} as email, - {{ json_extract_scalar('facebook', ['photo'], ['photo']) }} as photo, - {{ json_extract_scalar('facebook', ['token'], ['token']) }} as {{ adapter.quote('token') }}, - {{ json_extract_scalar('facebook', ['gender'], ['gender']) }} as gender, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users') }} as table_alias --- facebook at users/facebook -where 1 = 1 -and facebook is not null - diff --git a/models/generated/airbyte_ctes/unibag/users_facebook_ab2.sql b/models/generated/airbyte_ctes/unibag/users_facebook_ab2.sql deleted file mode 100644 index 431064e..0000000 --- a/models/generated/airbyte_ctes/unibag/users_facebook_ab2.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('users_facebook_ab1') }} -select - _airbyte_users_hashid, - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('id') }}, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(email as {{ dbt_utils.type_string() }}) as email, - cast(photo as {{ dbt_utils.type_string() }}) as photo, - cast({{ adapter.quote('token') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('token') }}, - cast(gender as {{ dbt_utils.type_string() }}) as gender, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_facebook_ab1') }} --- facebook at users/facebook -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_facebook_ab3.sql b/models/generated/airbyte_ctes/unibag/users_facebook_ab3.sql deleted file mode 100644 index d6f1bcb..0000000 --- a/models/generated/airbyte_ctes/unibag/users_facebook_ab3.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('users_facebook_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_users_hashid', - adapter.quote('id'), - adapter.quote('name'), - 'email', - 'photo', - adapter.quote('token'), - 'gender', - ]) }} as _airbyte_facebook_hashid, - tmp.* -from {{ ref('users_facebook_ab2') }} tmp --- facebook at users/facebook -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_identification_ab1.sql b/models/generated/airbyte_ctes/unibag/users_identification_ab1.sql deleted file mode 100644 index 60d2fd7..0000000 --- a/models/generated/airbyte_ctes/unibag/users_identification_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('users') }} -select - _airbyte_users_hashid, - {{ json_extract_scalar('identification', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('identification', ['note'], ['note']) }} as note, - {{ json_extract_scalar('identification', ['status'], ['status']) }} as status, - {{ json_extract_scalar('identification', ['timeUpdate'], ['timeUpdate']) }} as timeupdate, - {{ json_extract_scalar('identification', ['completedAt'], ['completedAt']) }} as completedat, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users') }} as table_alias --- identification at users/identification -where 1 = 1 -and identification is not null - diff --git a/models/generated/airbyte_ctes/unibag/users_identification_ab2.sql b/models/generated/airbyte_ctes/unibag/users_identification_ab2.sql deleted file mode 100644 index 3c93b54..0000000 --- a/models/generated/airbyte_ctes/unibag/users_identification_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('users_identification_ab1') }} -select - _airbyte_users_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast(note as {{ dbt_utils.type_string() }}) as note, - cast(status as {{ dbt_utils.type_string() }}) as status, - cast(timeupdate as {{ dbt_utils.type_float() }}) as timeupdate, - cast(completedat as {{ dbt_utils.type_string() }}) as completedat, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_identification_ab1') }} --- identification at users/identification -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_identification_ab3.sql b/models/generated/airbyte_ctes/unibag/users_identification_ab3.sql deleted file mode 100644 index d060da3..0000000 --- a/models/generated/airbyte_ctes/unibag/users_identification_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('users_identification_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_users_hashid', - '_id', - 'note', - 'status', - 'timeupdate', - 'completedat', - ]) }} as _airbyte_identification_hashid, - tmp.* -from {{ ref('users_identification_ab2') }} tmp --- identification at users/identification -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_info_ab1.sql b/models/generated/airbyte_ctes/unibag/users_info_ab1.sql deleted file mode 100644 index 8181cdf..0000000 --- a/models/generated/airbyte_ctes/unibag/users_info_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('users') }} -select - _airbyte_users_hashid, - {{ json_extract_scalar('info', ['email'], ['email']) }} as email, - {{ json_extract_scalar('info', ['gender'], ['gender']) }} as gender, - {{ json_extract_scalar('info', ['cityCode'], ['cityCode']) }} as citycode, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users') }} as table_alias --- info at users/info -where 1 = 1 -and info is not null - diff --git a/models/generated/airbyte_ctes/unibag/users_info_ab2.sql b/models/generated/airbyte_ctes/unibag/users_info_ab2.sql deleted file mode 100644 index 63f1b2a..0000000 --- a/models/generated/airbyte_ctes/unibag/users_info_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('users_info_ab1') }} -select - _airbyte_users_hashid, - cast(email as {{ dbt_utils.type_string() }}) as email, - cast(gender as {{ dbt_utils.type_string() }}) as gender, - cast(citycode as {{ dbt_utils.type_float() }}) as citycode, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_info_ab1') }} --- info at users/info -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_info_ab3.sql b/models/generated/airbyte_ctes/unibag/users_info_ab3.sql deleted file mode 100644 index 660d1c4..0000000 --- a/models/generated/airbyte_ctes/unibag/users_info_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('users_info_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_users_hashid', - 'email', - 'gender', - 'citycode', - ]) }} as _airbyte_info_hashid, - tmp.* -from {{ ref('users_info_ab2') }} tmp --- info at users/info -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_membership_ab1.sql b/models/generated/airbyte_ctes/unibag/users_membership_ab1.sql deleted file mode 100644 index 7d6de48..0000000 --- a/models/generated/airbyte_ctes/unibag/users_membership_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('users') }} -select - _airbyte_users_hashid, - {{ json_extract_scalar('membership', ['expireAt'], ['expireAt']) }} as expireat, - {{ json_extract_scalar('membership', ['nextLevel'], ['nextLevel']) }} as nextlevel, - {{ json_extract_scalar('membership', ['currentLevel'], ['currentLevel']) }} as currentlevel, - {{ json_extract_scalar('membership', ['currentTransactionCount'], ['currentTransactionCount']) }} as currenttransactioncount, - {{ json_extract_scalar('membership', ['currentSales_aibyte_transform'], ['currentSales_aibyte_transform']) }} as currentsales_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users') }} as table_alias --- membership at users/membership -where 1 = 1 -and membership is not null - diff --git a/models/generated/airbyte_ctes/unibag/users_membership_ab2.sql b/models/generated/airbyte_ctes/unibag/users_membership_ab2.sql deleted file mode 100644 index 50ce1ee..0000000 --- a/models/generated/airbyte_ctes/unibag/users_membership_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('users_membership_ab1') }} -select - _airbyte_users_hashid, - cast(expireat as {{ dbt_utils.type_string() }}) as expireat, - cast(nextlevel as {{ dbt_utils.type_float() }}) as nextlevel, - cast(currentlevel as {{ dbt_utils.type_float() }}) as currentlevel, - cast(currenttransactioncount as {{ dbt_utils.type_float() }}) as currenttransactioncount, - cast(currentsales_aibyte_transform as {{ dbt_utils.type_string() }}) as currentsales_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_membership_ab1') }} --- membership at users/membership -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_membership_ab3.sql b/models/generated/airbyte_ctes/unibag/users_membership_ab3.sql deleted file mode 100644 index 8223de4..0000000 --- a/models/generated/airbyte_ctes/unibag/users_membership_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('users_membership_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_users_hashid', - 'expireat', - 'nextlevel', - 'currentlevel', - 'currenttransactioncount', - 'currentsales_aibyte_transform', - ]) }} as _airbyte_membership_hashid, - tmp.* -from {{ ref('users_membership_ab2') }} tmp --- membership at users/membership -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_phone_ab1.sql b/models/generated/airbyte_ctes/unibag/users_phone_ab1.sql deleted file mode 100644 index 8702412..0000000 --- a/models/generated/airbyte_ctes/unibag/users_phone_ab1.sql +++ /dev/null @@ -1,22 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('users') }} -select - _airbyte_users_hashid, - {{ json_extract_scalar('phone', ['full'], ['full']) }} as {{ adapter.quote('full') }}, - {{ json_extract_scalar('phone', ['number'], ['number']) }} as {{ adapter.quote('number') }}, - {{ json_extract_scalar('phone', ['verified'], ['verified']) }} as verified, - {{ json_extract_scalar('phone', ['verifiedAt'], ['verifiedAt']) }} as verifiedat, - {{ json_extract_scalar('phone', ['countryCode'], ['countryCode']) }} as countrycode, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users') }} as table_alias --- phone at users/phone -where 1 = 1 -and phone is not null - diff --git a/models/generated/airbyte_ctes/unibag/users_phone_ab2.sql b/models/generated/airbyte_ctes/unibag/users_phone_ab2.sql deleted file mode 100644 index b7023b9..0000000 --- a/models/generated/airbyte_ctes/unibag/users_phone_ab2.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('users_phone_ab1') }} -select - _airbyte_users_hashid, - cast({{ adapter.quote('full') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('full') }}, - cast({{ adapter.quote('number') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('number') }}, - {{ cast_to_boolean('verified') }} as verified, - cast(verifiedat as {{ dbt_utils.type_string() }}) as verifiedat, - cast(countrycode as {{ dbt_utils.type_string() }}) as countrycode, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_phone_ab1') }} --- phone at users/phone -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_phone_ab3.sql b/models/generated/airbyte_ctes/unibag/users_phone_ab3.sql deleted file mode 100644 index bdcb9a0..0000000 --- a/models/generated/airbyte_ctes/unibag/users_phone_ab3.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('users_phone_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_users_hashid', - adapter.quote('full'), - adapter.quote('number'), - boolean_to_string('verified'), - 'verifiedat', - 'countrycode', - ]) }} as _airbyte_phone_hashid, - tmp.* -from {{ ref('users_phone_ab2') }} tmp --- phone at users/phone -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_referral_ab1.sql b/models/generated/airbyte_ctes/unibag/users_referral_ab1.sql deleted file mode 100644 index ec01d80..0000000 --- a/models/generated/airbyte_ctes/unibag/users_referral_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('users') }} -select - _airbyte_users_hashid, - {{ json_extract_scalar('referral', ['code'], ['code']) }} as code, - {{ json_extract_scalar('referral', ['enabled'], ['enabled']) }} as enabled, - {{ json_extract_scalar('referral', ['enabledAt'], ['enabledAt']) }} as enabledat, - {{ json_extract_scalar('referral', ['shareContent'], ['shareContent']) }} as sharecontent, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users') }} as table_alias --- referral at users/referral -where 1 = 1 -and referral is not null - diff --git a/models/generated/airbyte_ctes/unibag/users_referral_ab2.sql b/models/generated/airbyte_ctes/unibag/users_referral_ab2.sql deleted file mode 100644 index f593875..0000000 --- a/models/generated/airbyte_ctes/unibag/users_referral_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('users_referral_ab1') }} -select - _airbyte_users_hashid, - cast(code as {{ dbt_utils.type_string() }}) as code, - {{ cast_to_boolean('enabled') }} as enabled, - cast(enabledat as {{ dbt_utils.type_string() }}) as enabledat, - cast(sharecontent as {{ dbt_utils.type_string() }}) as sharecontent, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_referral_ab1') }} --- referral at users/referral -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_referral_ab3.sql b/models/generated/airbyte_ctes/unibag/users_referral_ab3.sql deleted file mode 100644 index 85fd276..0000000 --- a/models/generated/airbyte_ctes/unibag/users_referral_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('users_referral_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_users_hashid', - 'code', - boolean_to_string('enabled'), - 'enabledat', - 'sharecontent', - ]) }} as _airbyte_referral_hashid, - tmp.* -from {{ ref('users_referral_ab2') }} tmp --- referral at users/referral -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_statistic_ab1.sql b/models/generated/airbyte_ctes/unibag/users_statistic_ab1.sql deleted file mode 100644 index 96dd9eb..0000000 --- a/models/generated/airbyte_ctes/unibag/users_statistic_ab1.sql +++ /dev/null @@ -1,73 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('users') }} -select - _airbyte_users_hashid, - {{ json_extract_scalar('statistic', ['cashTotal'], ['cashTotal']) }} as cashtotal, - {{ json_extract_scalar('statistic', ['cashPending'], ['cashPending']) }} as cashpending, - {{ json_extract_scalar('statistic', ['cashCashback'], ['cashCashback']) }} as cashcashback, - {{ json_extract_scalar('statistic', ['cashGiveGift'], ['cashGiveGift']) }} as cashgivegift, - {{ json_extract_scalar('statistic', ['cashRejected'], ['cashRejected']) }} as cashrejected, - {{ json_extract_scalar('statistic', ['taxTotalCash'], ['taxTotalCash']) }} as taxtotalcash, - {{ json_extract_scalar('statistic', ['totalGiftBox'], ['totalGiftBox']) }} as totalgiftbox, - {{ json_extract_scalar('statistic', ['totalTickets'], ['totalTickets']) }} as totaltickets, - {{ json_extract_scalar('statistic', ['cashCancelled'], ['cashCancelled']) }} as cashcancelled, - {{ json_extract_scalar('statistic', ['cashDelivered'], ['cashDelivered']) }} as cashdelivered, - {{ json_extract_scalar('statistic', ['cashRemaining'], ['cashRemaining']) }} as cashremaining, - {{ json_extract_scalar('statistic', ['customerTotal'], ['customerTotal']) }} as customertotal, - {{ json_extract_scalar('statistic', ['totalCartItem'], ['totalCartItem']) }} as totalcartitem, - {{ json_extract_scalar('statistic', ['withdrawTotal'], ['withdrawTotal']) }} as withdrawtotal, - {{ json_extract_scalar('statistic', ['cashDelivering'], ['cashDelivering']) }} as cashdelivering, - {{ json_extract_scalar('statistic', ['taxCashPending'], ['taxCashPending']) }} as taxcashpending, - {{ json_extract_scalar('statistic', ['withdrawPending'], ['withdrawPending']) }} as withdrawpending, - {{ json_extract_scalar('statistic', ['withdrawSuccess'], ['withdrawSuccess']) }} as withdrawsuccess, - {{ json_extract_scalar('statistic', ['revenueLastMonth'], ['revenueLastMonth']) }} as revenuelastmonth, - {{ json_extract_scalar('statistic', ['totalSaleSuccess'], ['totalSaleSuccess']) }} as totalsalesuccess, - {{ json_extract_scalar('statistic', ['transactionTotal'], ['transactionTotal']) }} as transactiontotal, - {{ json_extract_scalar('statistic', ['withdrawRejected'], ['withdrawRejected']) }} as withdrawrejected, - {{ json_extract_scalar('statistic', ['cashWithdrawTotal'], ['cashWithdrawTotal']) }} as cashwithdrawtotal, - {{ json_extract_scalar('statistic', ['cashWaitingApprove'], ['cashWaitingApprove']) }} as cashwaitingapprove, - {{ json_extract_scalar('statistic', ['transactionPending'], ['transactionPending']) }} as transactionpending, - {{ json_extract_scalar('statistic', ['transactionSuccess'], ['transactionSuccess']) }} as transactionsuccess, - {{ json_extract_scalar('statistic', ['cashWithdrawPending'], ['cashWithdrawPending']) }} as cashwithdrawpending, - {{ json_extract_scalar('statistic', ['cashWithdrawSuccess'], ['cashWithdrawSuccess']) }} as cashwithdrawsuccess, - {{ json_extract_scalar('statistic', ['highestMonthlySales'], ['highestMonthlySales']) }} as highestmonthlysales, - {{ json_extract_scalar('statistic', ['transactionRejected'], ['transactionRejected']) }} as transactionrejected, - {{ json_extract_scalar('statistic', ['cashWithdrawRejected'], ['cashWithdrawRejected']) }} as cashwithdrawrejected, - {{ json_extract_scalar('statistic', ['teamBonusPendingCash'], ['teamBonusPendingCash']) }} as teambonuspendingcash, - {{ json_extract_scalar('statistic', ['teamBonusSuccessCash'], ['teamBonusSuccessCash']) }} as teambonussuccesscash, - {{ json_extract_scalar('statistic', ['transactionDelivered'], ['transactionDelivered']) }} as transactiondelivered, - {{ json_extract_scalar('statistic', ['cashPaymentProcessing'], ['cashPaymentProcessing']) }} as cashpaymentprocessing, - {{ json_extract_scalar('statistic', ['transactionDelivering'], ['transactionDelivering']) }} as transactiondelivering, - {{ json_extract_scalar('statistic', ['eventRewardPendingCash'], ['eventRewardPendingCash']) }} as eventrewardpendingcash, - {{ json_extract_scalar('statistic', ['eventRewardSuccessCash'], ['eventRewardSuccessCash']) }} as eventrewardsuccesscash, - {{ json_extract_scalar('statistic', ['transactionCashPending'], ['transactionCashPending']) }} as transactioncashpending, - {{ json_extract_scalar('statistic', ['voucherBonusPendingCash'], ['voucherBonusPendingCash']) }} as voucherbonuspendingcash, - {{ json_extract_scalar('statistic', ['voucherBonusSuccessCash'], ['voucherBonusSuccessCash']) }} as voucherbonussuccesscash, - {{ json_extract_scalar('statistic', ['eventReferralPendingCash'], ['eventReferralPendingCash']) }} as eventreferralpendingcash, - {{ json_extract_scalar('statistic', ['eventReferralSuccessCash'], ['eventReferralSuccessCash']) }} as eventreferralsuccesscash, - {{ json_extract_scalar('statistic', ['promotionBonusPendingCash'], ['promotionBonusPendingCash']) }} as promotionbonuspendingcash, - {{ json_extract_scalar('statistic', ['promotionBonusSuccessCash'], ['promotionBonusSuccessCash']) }} as promotionbonussuccesscash, - {{ json_extract_scalar('statistic', ['transactionWaitingApprove'], ['transactionWaitingApprove']) }} as transactionwaitingapprove, - {{ json_extract_scalar('statistic', ['commissionTransactionTotal'], ['commissionTransactionTotal']) }} as commissiontransactiontotal, - {{ json_extract_scalar('statistic', ['membershipBonusPendingCash'], ['membershipBonusPendingCash']) }} as membershipbonuspendingcash, - {{ json_extract_scalar('statistic', ['membershipBonusSuccessCash'], ['membershipBonusSuccessCash']) }} as membershipbonussuccesscash, - {{ json_extract_scalar('statistic', ['commissionTransactionPending'], ['commissionTransactionPending']) }} as commissiontransactionpending, - {{ json_extract_scalar('statistic', ['transactionPaymentProcessing'], ['transactionPaymentProcessing']) }} as transactionpaymentprocessing, - {{ json_extract_scalar('statistic', ['commissionTransactionCashback'], ['commissionTransactionCashback']) }} as commissiontransactioncashback, - {{ json_extract_scalar('statistic', ['commissionTransactionRejected'], ['commissionTransactionRejected']) }} as commissiontransactionrejected, - {{ json_extract_scalar('statistic', ['commissionTransactionDelivered'], ['commissionTransactionDelivered']) }} as commissiontransactiondelivered, - {{ json_extract_scalar('statistic', ['commissionTransactionDelivering'], ['commissionTransactionDelivering']) }} as commissiontransactiondelivering, - {{ json_extract_scalar('statistic', ['revenueThisMonth_aibyte_transform'], ['revenueThisMonth_aibyte_transform']) }} as revenuethismonth_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users') }} as table_alias --- statistic at users/statistic -where 1 = 1 -and statistic is not null - diff --git a/models/generated/airbyte_ctes/unibag/users_statistic_ab2.sql b/models/generated/airbyte_ctes/unibag/users_statistic_ab2.sql deleted file mode 100644 index f0dfd85..0000000 --- a/models/generated/airbyte_ctes/unibag/users_statistic_ab2.sql +++ /dev/null @@ -1,72 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('users_statistic_ab1') }} -select - _airbyte_users_hashid, - cast(cashtotal as {{ dbt_utils.type_float() }}) as cashtotal, - cast(cashpending as {{ dbt_utils.type_float() }}) as cashpending, - cast(cashcashback as {{ dbt_utils.type_float() }}) as cashcashback, - cast(cashgivegift as {{ dbt_utils.type_float() }}) as cashgivegift, - cast(cashrejected as {{ dbt_utils.type_float() }}) as cashrejected, - cast(taxtotalcash as {{ dbt_utils.type_float() }}) as taxtotalcash, - cast(totalgiftbox as {{ dbt_utils.type_float() }}) as totalgiftbox, - cast(totaltickets as {{ dbt_utils.type_float() }}) as totaltickets, - cast(cashcancelled as {{ dbt_utils.type_float() }}) as cashcancelled, - cast(cashdelivered as {{ dbt_utils.type_float() }}) as cashdelivered, - cast(cashremaining as {{ dbt_utils.type_float() }}) as cashremaining, - cast(customertotal as {{ dbt_utils.type_float() }}) as customertotal, - cast(totalcartitem as {{ dbt_utils.type_float() }}) as totalcartitem, - cast(withdrawtotal as {{ dbt_utils.type_float() }}) as withdrawtotal, - cast(cashdelivering as {{ dbt_utils.type_float() }}) as cashdelivering, - cast(taxcashpending as {{ dbt_utils.type_float() }}) as taxcashpending, - cast(withdrawpending as {{ dbt_utils.type_float() }}) as withdrawpending, - cast(withdrawsuccess as {{ dbt_utils.type_float() }}) as withdrawsuccess, - cast(revenuelastmonth as {{ dbt_utils.type_float() }}) as revenuelastmonth, - cast(totalsalesuccess as {{ dbt_utils.type_float() }}) as totalsalesuccess, - cast(transactiontotal as {{ dbt_utils.type_float() }}) as transactiontotal, - cast(withdrawrejected as {{ dbt_utils.type_float() }}) as withdrawrejected, - cast(cashwithdrawtotal as {{ dbt_utils.type_float() }}) as cashwithdrawtotal, - cast(cashwaitingapprove as {{ dbt_utils.type_float() }}) as cashwaitingapprove, - cast(transactionpending as {{ dbt_utils.type_float() }}) as transactionpending, - cast(transactionsuccess as {{ dbt_utils.type_float() }}) as transactionsuccess, - cast(cashwithdrawpending as {{ dbt_utils.type_float() }}) as cashwithdrawpending, - cast(cashwithdrawsuccess as {{ dbt_utils.type_float() }}) as cashwithdrawsuccess, - cast(highestmonthlysales as {{ dbt_utils.type_float() }}) as highestmonthlysales, - cast(transactionrejected as {{ dbt_utils.type_float() }}) as transactionrejected, - cast(cashwithdrawrejected as {{ dbt_utils.type_float() }}) as cashwithdrawrejected, - cast(teambonuspendingcash as {{ dbt_utils.type_float() }}) as teambonuspendingcash, - cast(teambonussuccesscash as {{ dbt_utils.type_float() }}) as teambonussuccesscash, - cast(transactiondelivered as {{ dbt_utils.type_float() }}) as transactiondelivered, - cast(cashpaymentprocessing as {{ dbt_utils.type_float() }}) as cashpaymentprocessing, - cast(transactiondelivering as {{ dbt_utils.type_float() }}) as transactiondelivering, - cast(eventrewardpendingcash as {{ dbt_utils.type_float() }}) as eventrewardpendingcash, - cast(eventrewardsuccesscash as {{ dbt_utils.type_float() }}) as eventrewardsuccesscash, - cast(transactioncashpending as {{ dbt_utils.type_float() }}) as transactioncashpending, - cast(voucherbonuspendingcash as {{ dbt_utils.type_float() }}) as voucherbonuspendingcash, - cast(voucherbonussuccesscash as {{ dbt_utils.type_float() }}) as voucherbonussuccesscash, - cast(eventreferralpendingcash as {{ dbt_utils.type_float() }}) as eventreferralpendingcash, - cast(eventreferralsuccesscash as {{ dbt_utils.type_float() }}) as eventreferralsuccesscash, - cast(promotionbonuspendingcash as {{ dbt_utils.type_float() }}) as promotionbonuspendingcash, - cast(promotionbonussuccesscash as {{ dbt_utils.type_float() }}) as promotionbonussuccesscash, - cast(transactionwaitingapprove as {{ dbt_utils.type_float() }}) as transactionwaitingapprove, - cast(commissiontransactiontotal as {{ dbt_utils.type_float() }}) as commissiontransactiontotal, - cast(membershipbonuspendingcash as {{ dbt_utils.type_float() }}) as membershipbonuspendingcash, - cast(membershipbonussuccesscash as {{ dbt_utils.type_float() }}) as membershipbonussuccesscash, - cast(commissiontransactionpending as {{ dbt_utils.type_float() }}) as commissiontransactionpending, - cast(transactionpaymentprocessing as {{ dbt_utils.type_float() }}) as transactionpaymentprocessing, - cast(commissiontransactioncashback as {{ dbt_utils.type_float() }}) as commissiontransactioncashback, - cast(commissiontransactionrejected as {{ dbt_utils.type_float() }}) as commissiontransactionrejected, - cast(commissiontransactiondelivered as {{ dbt_utils.type_float() }}) as commissiontransactiondelivered, - cast(commissiontransactiondelivering as {{ dbt_utils.type_float() }}) as commissiontransactiondelivering, - cast(revenuethismonth_aibyte_transform as {{ dbt_utils.type_string() }}) as revenuethismonth_aibyte_transform, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_statistic_ab1') }} --- statistic at users/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_statistic_ab3.sql b/models/generated/airbyte_ctes/unibag/users_statistic_ab3.sql deleted file mode 100644 index eb8e312..0000000 --- a/models/generated/airbyte_ctes/unibag/users_statistic_ab3.sql +++ /dev/null @@ -1,72 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('users_statistic_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_users_hashid', - 'cashtotal', - 'cashpending', - 'cashcashback', - 'cashgivegift', - 'cashrejected', - 'taxtotalcash', - 'totalgiftbox', - 'totaltickets', - 'cashcancelled', - 'cashdelivered', - 'cashremaining', - 'customertotal', - 'totalcartitem', - 'withdrawtotal', - 'cashdelivering', - 'taxcashpending', - 'withdrawpending', - 'withdrawsuccess', - 'revenuelastmonth', - 'totalsalesuccess', - 'transactiontotal', - 'withdrawrejected', - 'cashwithdrawtotal', - 'cashwaitingapprove', - 'transactionpending', - 'transactionsuccess', - 'cashwithdrawpending', - 'cashwithdrawsuccess', - 'highestmonthlysales', - 'transactionrejected', - 'cashwithdrawrejected', - 'teambonuspendingcash', - 'teambonussuccesscash', - 'transactiondelivered', - 'cashpaymentprocessing', - 'transactiondelivering', - 'eventrewardpendingcash', - 'eventrewardsuccesscash', - 'transactioncashpending', - 'voucherbonuspendingcash', - 'voucherbonussuccesscash', - 'eventreferralpendingcash', - 'eventreferralsuccesscash', - 'promotionbonuspendingcash', - 'promotionbonussuccesscash', - 'transactionwaitingapprove', - 'commissiontransactiontotal', - 'membershipbonuspendingcash', - 'membershipbonussuccesscash', - 'commissiontransactionpending', - 'transactionpaymentprocessing', - 'commissiontransactioncashback', - 'commissiontransactionrejected', - 'commissiontransactiondelivered', - 'commissiontransactiondelivering', - 'revenuethismonth_aibyte_transform', - ]) }} as _airbyte_statistic_hashid, - tmp.* -from {{ ref('users_statistic_ab2') }} tmp --- statistic at users/statistic -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_team_ab1.sql b/models/generated/airbyte_ctes/unibag/users_team_ab1.sql deleted file mode 100644 index 0e8f632..0000000 --- a/models/generated/airbyte_ctes/unibag/users_team_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('users') }} -select - _airbyte_users_hashid, - {{ json_extract_scalar('team', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('team', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('team', ['role'], ['role']) }} as {{ adapter.quote('role') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users') }} as table_alias --- team at users/team -where 1 = 1 -and team is not null - diff --git a/models/generated/airbyte_ctes/unibag/users_team_ab2.sql b/models/generated/airbyte_ctes/unibag/users_team_ab2.sql deleted file mode 100644 index 914b790..0000000 --- a/models/generated/airbyte_ctes/unibag/users_team_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('users_team_ab1') }} -select - _airbyte_users_hashid, - 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('role') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('role') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_team_ab1') }} --- team at users/team -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_team_ab3.sql b/models/generated/airbyte_ctes/unibag/users_team_ab3.sql deleted file mode 100644 index a43255f..0000000 --- a/models/generated/airbyte_ctes/unibag/users_team_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('users_team_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_users_hashid', - '_id', - adapter.quote('name'), - adapter.quote('role'), - ]) }} as _airbyte_team_hashid, - tmp.* -from {{ ref('users_team_ab2') }} tmp --- team at users/team -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_zalo_ab1.sql b/models/generated/airbyte_ctes/unibag/users_zalo_ab1.sql deleted file mode 100644 index 65e34a7..0000000 --- a/models/generated/airbyte_ctes/unibag/users_zalo_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('users') }} -select - _airbyte_users_hashid, - {{ json_extract_scalar('zalo', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('zalo', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('zalo', ['photo'], ['photo']) }} as photo, - {{ json_extract_scalar('zalo', ['token'], ['token']) }} as {{ adapter.quote('token') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users') }} as table_alias --- zalo at users/zalo -where 1 = 1 -and zalo is not null - diff --git a/models/generated/airbyte_ctes/unibag/users_zalo_ab2.sql b/models/generated/airbyte_ctes/unibag/users_zalo_ab2.sql deleted file mode 100644 index 682c4c0..0000000 --- a/models/generated/airbyte_ctes/unibag/users_zalo_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('users_zalo_ab1') }} -select - _airbyte_users_hashid, - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('id') }}, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(photo as {{ dbt_utils.type_string() }}) as photo, - cast({{ adapter.quote('token') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('token') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('users_zalo_ab1') }} --- zalo at users/zalo -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/users_zalo_ab3.sql b/models/generated/airbyte_ctes/unibag/users_zalo_ab3.sql deleted file mode 100644 index 79c6b8b..0000000 --- a/models/generated/airbyte_ctes/unibag/users_zalo_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('users_zalo_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_users_hashid', - adapter.quote('id'), - adapter.quote('name'), - 'photo', - adapter.quote('token'), - ]) }} as _airbyte_zalo_hashid, - tmp.* -from {{ ref('users_zalo_ab2') }} tmp --- zalo at users/zalo -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_ab1.sql b/models/generated/airbyte_ctes/unibag/vouchers_ab1.sql index d49d726..54b21a5 100644 --- a/models/generated/airbyte_ctes/unibag/vouchers_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/vouchers_ab1.sql @@ -10,15 +10,15 @@ 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('table_alias', '_airbyte_data', ['logo'], ['logo']) }} as logo, + {{ json_extract_scalar('_airbyte_data', ['logo'], ['logo']) }} as logo, {{ 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_array('_airbyte_data', ['covers'], ['covers']) }} as covers, - {{ json_extract('table_alias', '_airbyte_data', ['options'], ['options']) }} as {{ adapter.quote('options') }}, + {{ json_extract_scalar('_airbyte_data', ['options'], ['options']) }} as {{ adapter.quote('options') }}, {{ json_extract_scalar('_airbyte_data', ['startAt'], ['startAt']) }} as startat, - {{ json_extract('table_alias', '_airbyte_data', ['applyFor'], ['applyFor']) }} as applyfor, + {{ json_extract_scalar('_airbyte_data', ['applyFor'], ['applyFor']) }} as applyfor, {{ 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, diff --git a/models/generated/airbyte_ctes/unibag/vouchers_ab2.sql b/models/generated/airbyte_ctes/unibag/vouchers_ab2.sql index e740cad..f48ce06 100644 --- a/models/generated/airbyte_ctes/unibag/vouchers_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/vouchers_ab2.sql @@ -10,15 +10,15 @@ 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 {{ type_json() }}) as logo, + cast(logo as {{ dbt_utils.type_string() }}) as logo, 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, covers, - cast({{ adapter.quote('options') }} as {{ type_json() }}) as {{ adapter.quote('options') }}, + 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 {{ type_json() }}) as applyfor, + cast(applyfor as {{ dbt_utils.type_string() }}) as applyfor, 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, diff --git a/models/generated/airbyte_ctes/unibag/vouchers_ab3.sql b/models/generated/airbyte_ctes/unibag/vouchers_ab3.sql index c352115..2fa0827 100644 --- a/models/generated/airbyte_ctes/unibag/vouchers_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/vouchers_ab3.sql @@ -11,15 +11,15 @@ select '_id', 'code', adapter.quote('desc'), - object_to_string('logo'), + 'logo', adapter.quote('type'), 'endat', 'title', boolean_to_string('active'), array_to_string('covers'), - object_to_string(adapter.quote('options')), + adapter.quote('options'), 'startat', - object_to_string('applyfor'), + 'applyfor', 'articleid', 'createdat', 'updatedat', diff --git a/models/generated/airbyte_ctes/unibag/vouchers_applyfor_ab1.sql b/models/generated/airbyte_ctes/unibag/vouchers_applyfor_ab1.sql deleted file mode 100644 index 8ecd5d4..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_applyfor_ab1.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('vouchers') }} -select - _airbyte_vouchers_hashid, - {{ json_extract_array('applyfor', ['list'], ['list']) }} as list, - {{ json_extract_scalar('applyfor', ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_scalar('applyfor', ['provinces'], ['provinces']) }} as provinces, - {{ json_extract_scalar('applyfor', ['isApplyAllOrder'], ['isApplyAllOrder']) }} as isapplyallorder, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('vouchers') }} as table_alias --- applyfor at vouchers/applyFor -where 1 = 1 -and applyfor is not null - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_applyfor_ab2.sql b/models/generated/airbyte_ctes/unibag/vouchers_applyfor_ab2.sql deleted file mode 100644 index 0578f30..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_applyfor_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('vouchers_applyfor_ab1') }} -select - _airbyte_vouchers_hashid, - list, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - cast(provinces as {{ dbt_utils.type_string() }}) as provinces, - {{ cast_to_boolean('isapplyallorder') }} as isapplyallorder, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('vouchers_applyfor_ab1') }} --- applyfor at vouchers/applyFor -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_applyfor_ab3.sql b/models/generated/airbyte_ctes/unibag/vouchers_applyfor_ab3.sql deleted file mode 100644 index a651dfc..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_applyfor_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('vouchers_applyfor_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_vouchers_hashid', - array_to_string('list'), - adapter.quote('type'), - 'provinces', - boolean_to_string('isapplyallorder'), - ]) }} as _airbyte_applyfor_hashid, - tmp.* -from {{ ref('vouchers_applyfor_ab2') }} tmp --- applyfor at vouchers/applyFor -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_logo_ab1.sql b/models/generated/airbyte_ctes/unibag/vouchers_logo_ab1.sql deleted file mode 100644 index 7b4a7ec..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_logo_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('vouchers') }} -select - _airbyte_vouchers_hashid, - {{ json_extract_scalar('logo', ['_id'], ['_id']) }} as _id, - {{ json_extract_scalar('logo', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract('table_alias', 'logo', ['dimensions'], ['dimensions']) }} as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('vouchers') }} as table_alias --- logo at vouchers/logo -where 1 = 1 -and logo is not null - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_logo_ab2.sql b/models/generated/airbyte_ctes/unibag/vouchers_logo_ab2.sql deleted file mode 100644 index 7d87fb2..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_logo_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('vouchers_logo_ab1') }} -select - _airbyte_vouchers_hashid, - cast(_id as {{ dbt_utils.type_string() }}) as _id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(dimensions as {{ type_json() }}) as dimensions, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('vouchers_logo_ab1') }} --- logo at vouchers/logo -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_logo_ab3.sql b/models/generated/airbyte_ctes/unibag/vouchers_logo_ab3.sql deleted file mode 100644 index bbf5599..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_logo_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('vouchers_logo_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_vouchers_hashid', - '_id', - adapter.quote('name'), - object_to_string('dimensions'), - ]) }} as _airbyte_logo_hashid, - tmp.* -from {{ ref('vouchers_logo_ab2') }} tmp --- logo at vouchers/logo -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_ab1.sql b/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_ab1.sql deleted file mode 100644 index 482c25b..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('vouchers_logo') }} -select - _airbyte_logo_hashid, - {{ json_extract('table_alias', 'dimensions', ['md'], ['md']) }} as md, - {{ json_extract('table_alias', 'dimensions', ['sm'], ['sm']) }} as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('vouchers_logo') }} as table_alias --- dimensions at vouchers/logo/dimensions -where 1 = 1 -and dimensions is not null - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_ab2.sql b/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_ab2.sql deleted file mode 100644 index 5a5221d..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('vouchers_logo_dimensions_ab1') }} -select - _airbyte_logo_hashid, - cast(md as {{ type_json() }}) as md, - cast(sm as {{ type_json() }}) as sm, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('vouchers_logo_dimensions_ab1') }} --- dimensions at vouchers/logo/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_ab3.sql b/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_ab3.sql deleted file mode 100644 index 2e1fcfb..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('vouchers_logo_dimensions_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_logo_hashid', - object_to_string('md'), - object_to_string('sm'), - ]) }} as _airbyte_dimensions_hashid, - tmp.* -from {{ ref('vouchers_logo_dimensions_ab2') }} tmp --- dimensions at vouchers/logo/dimensions -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_md_ab1.sql b/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_md_ab1.sql deleted file mode 100644 index 72a6bd0..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_md_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('vouchers_logo_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('md', ['url'], ['url']) }} as url, - {{ json_extract_scalar('md', ['width'], ['width']) }} as width, - {{ json_extract_scalar('md', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('vouchers_logo_dimensions') }} as table_alias --- md at vouchers/logo/dimensions/md -where 1 = 1 -and md is not null - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_md_ab2.sql b/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_md_ab2.sql deleted file mode 100644 index 159ffaf..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_md_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('vouchers_logo_dimensions_md_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('vouchers_logo_dimensions_md_ab1') }} --- md at vouchers/logo/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_md_ab3.sql b/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_md_ab3.sql deleted file mode 100644 index 02c4210..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_md_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('vouchers_logo_dimensions_md_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_md_hashid, - tmp.* -from {{ ref('vouchers_logo_dimensions_md_ab2') }} tmp --- md at vouchers/logo/dimensions/md -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_sm_ab1.sql b/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_sm_ab1.sql deleted file mode 100644 index c285fde..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_sm_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('vouchers_logo_dimensions') }} -select - _airbyte_dimensions_hashid, - {{ json_extract_scalar('sm', ['url'], ['url']) }} as url, - {{ json_extract_scalar('sm', ['width'], ['width']) }} as width, - {{ json_extract_scalar('sm', ['height'], ['height']) }} as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('vouchers_logo_dimensions') }} as table_alias --- sm at vouchers/logo/dimensions/sm -where 1 = 1 -and sm is not null - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_sm_ab2.sql b/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_sm_ab2.sql deleted file mode 100644 index dc3e8db..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_sm_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('vouchers_logo_dimensions_sm_ab1') }} -select - _airbyte_dimensions_hashid, - cast(url as {{ dbt_utils.type_string() }}) as url, - cast(width as {{ dbt_utils.type_float() }}) as width, - cast(height as {{ dbt_utils.type_float() }}) as height, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('vouchers_logo_dimensions_sm_ab1') }} --- sm at vouchers/logo/dimensions/sm -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_sm_ab3.sql b/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_sm_ab3.sql deleted file mode 100644 index 1b48dcc..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_logo_dimensions_sm_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('vouchers_logo_dimensions_sm_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_dimensions_hashid', - 'url', - 'width', - 'height', - ]) }} as _airbyte_sm_hashid, - tmp.* -from {{ ref('vouchers_logo_dimensions_sm_ab2') }} tmp --- sm at vouchers/logo/dimensions/sm -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_options_ab1.sql b/models/generated/airbyte_ctes/unibag/vouchers_options_ab1.sql deleted file mode 100644 index 38848f1..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_options_ab1.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('vouchers') }} -select - _airbyte_vouchers_hashid, - {{ json_extract('table_alias', adapter.quote('options'), ['bonus'], ['bonus']) }} as bonus, - {{ json_extract_array(adapter.quote('options'), ['milestones'], ['milestones']) }} as milestones, - {{ json_extract_scalar(adapter.quote('options'), ['transactionMinValue'], ['transactionMinValue']) }} as transactionminvalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('vouchers') }} as table_alias --- options at vouchers/options -where 1 = 1 -and {{ adapter.quote('options') }} is not null - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_options_ab2.sql b/models/generated/airbyte_ctes/unibag/vouchers_options_ab2.sql deleted file mode 100644 index e84e700..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_options_ab2.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('vouchers_options_ab1') }} -select - _airbyte_vouchers_hashid, - cast(bonus as {{ type_json() }}) as bonus, - milestones, - cast(transactionminvalue as {{ dbt_utils.type_float() }}) as transactionminvalue, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('vouchers_options_ab1') }} --- options at vouchers/options -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_options_ab3.sql b/models/generated/airbyte_ctes/unibag/vouchers_options_ab3.sql deleted file mode 100644 index 29e4df1..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_options_ab3.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('vouchers_options_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_vouchers_hashid', - object_to_string('bonus'), - array_to_string('milestones'), - 'transactionminvalue', - ]) }} as _airbyte_options_hashid, - tmp.* -from {{ ref('vouchers_options_ab2') }} tmp --- options at vouchers/options -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_options_bonus_ab1.sql b/models/generated/airbyte_ctes/unibag/vouchers_options_bonus_ab1.sql deleted file mode 100644 index 2b51112..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_options_bonus_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-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: {{ ref('vouchers_options') }} -select - _airbyte_options_hashid, - {{ json_extract_scalar('bonus', ['type'], ['type']) }} as {{ adapter.quote('type') }}, - {{ json_extract_scalar('bonus', ['value'], ['value']) }} as {{ adapter.quote('value') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('vouchers_options') }} as table_alias --- bonus at vouchers/options/bonus -where 1 = 1 -and bonus is not null - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_options_bonus_ab2.sql b/models/generated/airbyte_ctes/unibag/vouchers_options_bonus_ab2.sql deleted file mode 100644 index 516f6df..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_options_bonus_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type --- depends_on: {{ ref('vouchers_options_bonus_ab1') }} -select - _airbyte_options_hashid, - cast({{ adapter.quote('type') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('type') }}, - cast({{ adapter.quote('value') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('value') }}, - _airbyte_ab_id, - _airbyte_emitted_at, - {{ current_timestamp() }} as _airbyte_normalized_at -from {{ ref('vouchers_options_bonus_ab1') }} --- bonus at vouchers/options/bonus -where 1 = 1 - diff --git a/models/generated/airbyte_ctes/unibag/vouchers_options_bonus_ab3.sql b/models/generated/airbyte_ctes/unibag/vouchers_options_bonus_ab3.sql deleted file mode 100644 index 0293721..0000000 --- a/models/generated/airbyte_ctes/unibag/vouchers_options_bonus_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ -{{ config( - indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], - schema = "_airbyte_unibag", - tags = [ "nested-intermediate" ] -) }} --- SQL model to build a hash column based on the values of this record --- depends_on: {{ ref('vouchers_options_bonus_ab2') }} -select - {{ dbt_utils.surrogate_key([ - '_airbyte_options_hashid', - adapter.quote('type'), - adapter.quote('value'), - ]) }} as _airbyte_bonus_hashid, - tmp.* -from {{ ref('vouchers_options_bonus_ab2') }} tmp --- bonus at vouchers/options/bonus -where 1 = 1 - diff --git a/models/generated/airbyte_tables/unibag/product_sku.sql b/models/generated/airbyte_tables/unibag/product_sku.sql index 795af0c..b62ba82 100644 --- a/models/generated/airbyte_tables/unibag/product_sku.sql +++ b/models/generated/airbyte_tables/unibag/product_sku.sql @@ -24,7 +24,6 @@ select {{ adapter.quote('info') }}::json->'supplier'->>'name' AS supplier_name, {{ adapter.quote('info') }}::json->>'dimension' AS info_dimension, unitCode AS info_unit_code, - supplierSku AS supplier_sku, 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, diff --git a/models/generated/airbyte_tables/unibag/team_activities.sql b/models/generated/airbyte_tables/unibag/team_activities.sql index e427835..96ce4a0 100644 --- a/models/generated/airbyte_tables/unibag/team_activities.sql +++ b/models/generated/airbyte_tables/unibag/team_activities.sql @@ -19,3 +19,4 @@ select from {{ ref('team_activities_ab3') }} -- team_activities from {{ source('unibag', '_airbyte_raw_team_activities') }} where 1 = 1 + diff --git a/models/generated/sources.yml b/models/generated/sources.yml index cffd1b7..8fdcd74 100644 --- a/models/generated/sources.yml +++ b/models/generated/sources.yml @@ -29,7 +29,6 @@ sources: - name: _airbyte_raw_promotion_orders - name: _airbyte_raw_promotions - name: _airbyte_raw_referrals - - name: _airbyte_raw_session_deliveries - name: _airbyte_raw_social_post_views - name: _airbyte_raw_social_posts - name: _airbyte_raw_suppliers