Compare commits

...

4 Commits

Author SHA1 Message Date
Ubuntu 4b86cd5551 add give_gift data 2022-06-01 17:30:33 +07:00
Ubuntu c5c4d4cfcc add sync b rands 2022-05-27 21:47:46 +07:00
Ubuntu 25bf52e4c0 update 2022-05-26 21:44:20 +07:00
Ubuntu a27c99cf15 update 2022-05-12 05:53:59 +07:00
26 changed files with 530 additions and 599 deletions

View File

@ -6,5 +6,5 @@ push:
run:
dbt deps --profiles-dir=. --project-dir=.
#dbt run --profiles-dir=. --project-dir=. --full-refresh
dbt run --profiles-dir=. --project-dir=. --full-refresh --select admin_tags
dbt run --profiles-dir=. --project-dir=. --full-refresh --select user_give_gift

View File

@ -53,6 +53,10 @@ vars:
admin_tags_ab2: unibag._airbyte_raw_admin_tags
admin_tags_ab3: unibag._airbyte_raw_admin_tags
admin_tags: unibag._airbyte_raw_admin_tags
brands_ab1: unibag._airbyte_raw_brands
brands_ab2: unibag._airbyte_raw_brands
brands_ab3: unibag._airbyte_raw_brands
brands: unibag._airbyte_raw_brands
cash_flows_ab1: unibag._airbyte_raw_cash_flows
cash_flows_ab2: unibag._airbyte_raw_cash_flows
cash_flows_ab3: unibag._airbyte_raw_cash_flows
@ -77,6 +81,10 @@ vars:
events_ab2: unibag._airbyte_raw_events
events_ab3: unibag._airbyte_raw_events
events: unibag._airbyte_raw_events
give_gifts_ab1: unibag._airbyte_raw_give_gifts
give_gifts_ab2: unibag._airbyte_raw_give_gifts
give_gifts_ab3: unibag._airbyte_raw_give_gifts
give_gifts: unibag._airbyte_raw_give_gifts
inventories_ab1: unibag._airbyte_raw_inventories
inventories_ab2: unibag._airbyte_raw_inventories
inventories_ab3: unibag._airbyte_raw_inventories
@ -165,6 +173,10 @@ vars:
team_bonus_ab2: unibag._airbyte_raw_team_bonus
team_bonus_ab3: unibag._airbyte_raw_team_bonus
team_bonus: unibag._airbyte_raw_team_bonus
team_histories_ab1: unibag._airbyte_raw_team_histories
team_histories_ab2: unibag._airbyte_raw_team_histories
team_histories_ab3: unibag._airbyte_raw_team_histories
team_histories: unibag._airbyte_raw_team_histories
team_members_ab1: unibag._airbyte_raw_team_members
team_members_ab2: unibag._airbyte_raw_team_members
team_members_ab3: unibag._airbyte_raw_team_members
@ -173,6 +185,14 @@ vars:
teams_ab2: unibag._airbyte_raw_teams
teams_ab3: unibag._airbyte_raw_teams
teams: unibag._airbyte_raw_teams
user_courses_ab1: unibag._airbyte_raw_user_courses
user_courses_ab2: unibag._airbyte_raw_user_courses
user_courses_ab3: unibag._airbyte_raw_user_courses
user_courses: unibag._airbyte_raw_user_courses
user_give_gift_ab1: unibag._airbyte_raw_user_give_gift
user_give_gift_ab2: unibag._airbyte_raw_user_give_gift
user_give_gift_ab3: unibag._airbyte_raw_user_give_gift
user_give_gift: unibag._airbyte_raw_user_give_gift
user_identifications_ab1: unibag._airbyte_raw_user_identifications
user_identifications_ab2: unibag._airbyte_raw_user_identifications
user_identifications_ab3: unibag._airbyte_raw_user_identifications
@ -193,599 +213,3 @@ vars:
wards_ab2: unibag._airbyte_raw_wards
wards_ab3: unibag._airbyte_raw_wards
wards: unibag._airbyte_raw_wards
cash_flows_options_ab1: unibag._airbyte_raw_cash_flows
cash_flows_options_ab2: unibag._airbyte_raw_cash_flows
cash_flows_options_ab3: unibag._airbyte_raw_cash_flows
cash_flows_options: unibag._airbyte_raw_cash_flows
customers_info_ab1: unibag._airbyte_raw_customers
customers_info_ab2: unibag._airbyte_raw_customers
customers_info_ab3: unibag._airbyte_raw_customers
customers_info: unibag._airbyte_raw_customers
customers_statistic_ab1: unibag._airbyte_raw_customers
customers_statistic_ab2: unibag._airbyte_raw_customers
customers_statistic_ab3: unibag._airbyte_raw_customers
customers_statistic: unibag._airbyte_raw_customers
event_rewards_options_ab1: unibag._airbyte_raw_event_rewards
event_rewards_options_ab2: unibag._airbyte_raw_event_rewards
event_rewards_options_ab3: unibag._airbyte_raw_event_rewards
event_rewards_options: unibag._airbyte_raw_event_rewards
events_icon_ab1: unibag._airbyte_raw_events
events_icon_ab2: unibag._airbyte_raw_events
events_icon_ab3: unibag._airbyte_raw_events
events_icon: unibag._airbyte_raw_events
events_cover_ab1: unibag._airbyte_raw_events
events_cover_ab2: unibag._airbyte_raw_events
events_cover_ab3: unibag._airbyte_raw_events
events_cover: unibag._airbyte_raw_events
events_notice_ab1: unibag._airbyte_raw_events
events_notice_ab2: unibag._airbyte_raw_events
events_notice_ab3: unibag._airbyte_raw_events
events_notice: unibag._airbyte_raw_events
events_options_ab1: unibag._airbyte_raw_events
events_options_ab2: unibag._airbyte_raw_events
events_options_ab3: unibag._airbyte_raw_events
events_options: unibag._airbyte_raw_events
events_segments_ab1: unibag._airbyte_raw_events
events_segments_ab2: unibag._airbyte_raw_events
events_segments_ab3: unibag._airbyte_raw_events
events_segments: unibag._airbyte_raw_events
inventories_contact_ab1: unibag._airbyte_raw_inventories
inventories_contact_ab2: unibag._airbyte_raw_inventories
inventories_contact_ab3: unibag._airbyte_raw_inventories
inventories_contact: unibag._airbyte_raw_inventories
inventories_partner_ab1: unibag._airbyte_raw_inventories
inventories_partner_ab2: unibag._airbyte_raw_inventories
inventories_partner_ab3: unibag._airbyte_raw_inventories
inventories_partner: unibag._airbyte_raw_inventories
inventories_location_ab1: unibag._airbyte_raw_inventories
inventories_location_ab2: unibag._airbyte_raw_inventories
inventories_location_ab3: unibag._airbyte_raw_inventories
inventories_location: unibag._airbyte_raw_inventories
inventories_supplier_ab1: unibag._airbyte_raw_inventories
inventories_supplier_ab2: unibag._airbyte_raw_inventories
inventories_supplier_ab3: unibag._airbyte_raw_inventories
inventories_supplier: unibag._airbyte_raw_inventories
inventories_paymentmethods_ab1: unibag._airbyte_raw_inventories
inventories_paymentmethods_ab2: unibag._airbyte_raw_inventories
inventories_paymentmethods_ab3: unibag._airbyte_raw_inventories
inventories_paymentmethods: unibag._airbyte_raw_inventories
membership_histories_new_ab1: unibag._airbyte_raw_membership_histories
membership_histories_new_ab2: unibag._airbyte_raw_membership_histories
membership_histories_new_ab3: unibag._airbyte_raw_membership_histories
membership_histories_new: unibag._airbyte_raw_membership_histories
membership_histories_old_ab1: unibag._airbyte_raw_membership_histories
membership_histories_old_ab2: unibag._airbyte_raw_membership_histories
membership_histories_old_ab3: unibag._airbyte_raw_membership_histories
membership_histories_old: unibag._airbyte_raw_membership_histories
order_deliveries_weight_ab1: unibag._airbyte_raw_order_deliveries
order_deliveries_weight_ab2: unibag._airbyte_raw_order_deliveries
order_deliveries_weight_ab3: unibag._airbyte_raw_order_deliveries
order_deliveries_weight: unibag._airbyte_raw_order_deliveries
order_deliveries_customer_ab1: unibag._airbyte_raw_order_deliveries
order_deliveries_customer_ab2: unibag._airbyte_raw_order_deliveries
order_deliveries_customer_ab3: unibag._airbyte_raw_order_deliveries
order_deliveries_customer: unibag._airbyte_raw_order_deliveries
order_deliveries_delivery_ab1: unibag._airbyte_raw_order_deliveries
order_deliveries_delivery_ab2: unibag._airbyte_raw_order_deliveries
order_deliveries_delivery_ab3: unibag._airbyte_raw_order_deliveries
order_deliveries_delivery: unibag._airbyte_raw_order_deliveries
order_deliveries_location_ab1: unibag._airbyte_raw_order_deliveries
order_deliveries_location_ab2: unibag._airbyte_raw_order_deliveries
order_deliveries_location_ab3: unibag._airbyte_raw_order_deliveries
order_deliveries_location: unibag._airbyte_raw_order_deliveries
order_deliveries_promotion_ab1: unibag._airbyte_raw_order_deliveries
order_deliveries_promotion_ab2: unibag._airbyte_raw_order_deliveries
order_deliveries_promotion_ab3: unibag._airbyte_raw_order_deliveries
order_deliveries_promotion: unibag._airbyte_raw_order_deliveries
order_deliveries_trackingtime_ab1: unibag._airbyte_raw_order_deliveries
order_deliveries_trackingtime_ab2: unibag._airbyte_raw_order_deliveries
order_deliveries_trackingtime_ab3: unibag._airbyte_raw_order_deliveries
order_deliveries_trackingtime: unibag._airbyte_raw_order_deliveries
order_items_sku_ab1: unibag._airbyte_raw_order_items
order_items_sku_ab2: unibag._airbyte_raw_order_items
order_items_sku_ab3: unibag._airbyte_raw_order_items
order_items_sku: unibag._airbyte_raw_order_items
order_items_price_ab1: unibag._airbyte_raw_order_items
order_items_price_ab2: unibag._airbyte_raw_order_items
order_items_price_ab3: unibag._airbyte_raw_order_items
order_items_price: unibag._airbyte_raw_order_items
orders_price_ab1: unibag._airbyte_raw_orders
orders_price_ab2: unibag._airbyte_raw_orders
orders_price_ab3: unibag._airbyte_raw_orders
orders_price: unibag._airbyte_raw_orders
orders_payment_ab1: unibag._airbyte_raw_orders
orders_payment_ab2: unibag._airbyte_raw_orders
orders_payment_ab3: unibag._airbyte_raw_orders
orders_payment: unibag._airbyte_raw_orders
orders_delivery_ab1: unibag._airbyte_raw_orders
orders_delivery_ab2: unibag._airbyte_raw_orders
orders_delivery_ab3: unibag._airbyte_raw_orders
orders_delivery: unibag._airbyte_raw_orders
orders_supplier_ab1: unibag._airbyte_raw_orders
orders_supplier_ab2: unibag._airbyte_raw_orders
orders_supplier_ab3: unibag._airbyte_raw_orders
orders_supplier: unibag._airbyte_raw_orders
orders_inventory_ab1: unibag._airbyte_raw_orders
orders_inventory_ab2: unibag._airbyte_raw_orders
orders_inventory_ab3: unibag._airbyte_raw_orders
orders_inventory: unibag._airbyte_raw_orders
orders_promotion_ab1: unibag._airbyte_raw_orders
orders_promotion_ab2: unibag._airbyte_raw_orders
orders_promotion_ab3: unibag._airbyte_raw_orders
orders_promotion: unibag._airbyte_raw_orders
orders_sendemail_ab1: unibag._airbyte_raw_orders
orders_sendemail_ab2: unibag._airbyte_raw_orders
orders_sendemail_ab3: unibag._airbyte_raw_orders
orders_sendemail: unibag._airbyte_raw_orders
orders_useragent_ab1: unibag._airbyte_raw_orders
orders_useragent_ab2: unibag._airbyte_raw_orders
orders_useragent_ab3: unibag._airbyte_raw_orders
orders_useragent: unibag._airbyte_raw_orders
product_categories_icon_ab1: unibag._airbyte_raw_product_categories
product_categories_icon_ab2: unibag._airbyte_raw_product_categories
product_categories_icon_ab3: unibag._airbyte_raw_product_categories
product_categories_icon: unibag._airbyte_raw_product_categories
product_categories_statistic_ab1: unibag._airbyte_raw_product_categories
product_categories_statistic_ab2: unibag._airbyte_raw_product_categories
product_categories_statistic_ab3: unibag._airbyte_raw_product_categories
product_categories_statistic: unibag._airbyte_raw_product_categories
product_sku_info_ab1: unibag._airbyte_raw_product_sku
product_sku_info_ab2: unibag._airbyte_raw_product_sku
product_sku_info_ab3: unibag._airbyte_raw_product_sku
product_sku_info: unibag._airbyte_raw_product_sku
product_sku_price_ab1: unibag._airbyte_raw_product_sku
product_sku_price_ab2: unibag._airbyte_raw_product_sku
product_sku_price_ab3: unibag._airbyte_raw_product_sku
product_sku_price: unibag._airbyte_raw_product_sku
product_sku_statistic_ab1: unibag._airbyte_raw_product_sku
product_sku_statistic_ab2: unibag._airbyte_raw_product_sku
product_sku_statistic_ab3: unibag._airbyte_raw_product_sku
product_sku_statistic: unibag._airbyte_raw_product_sku
product_sku_pricepercent_ab1: unibag._airbyte_raw_product_sku
product_sku_pricepercent_ab2: unibag._airbyte_raw_product_sku
product_sku_pricepercent_ab3: unibag._airbyte_raw_product_sku
product_sku_pricepercent: unibag._airbyte_raw_product_sku
product_sku_versions_info_ab1: unibag._airbyte_raw_product_sku_versions
product_sku_versions_info_ab2: unibag._airbyte_raw_product_sku_versions
product_sku_versions_info_ab3: unibag._airbyte_raw_product_sku_versions
product_sku_versions_info: unibag._airbyte_raw_product_sku_versions
product_sku_versions_price_ab1: unibag._airbyte_raw_product_sku_versions
product_sku_versions_price_ab2: unibag._airbyte_raw_product_sku_versions
product_sku_versions_price_ab3: unibag._airbyte_raw_product_sku_versions
product_sku_versions_price: unibag._airbyte_raw_product_sku_versions
product_sku_versions_statistic_ab1: unibag._airbyte_raw_product_sku_versions
product_sku_versions_statistic_ab2: unibag._airbyte_raw_product_sku_versions
product_sku_versions_statistic_ab3: unibag._airbyte_raw_product_sku_versions
product_sku_versions_statistic: unibag._airbyte_raw_product_sku_versions
products_info_ab1: unibag._airbyte_raw_products
products_info_ab2: unibag._airbyte_raw_products
products_info_ab3: unibag._airbyte_raw_products
products_info: unibag._airbyte_raw_products
products_order_ab1: unibag._airbyte_raw_products
products_order_ab2: unibag._airbyte_raw_products
products_order_ab3: unibag._airbyte_raw_products
products_order: unibag._airbyte_raw_products
products_price_ab1: unibag._airbyte_raw_products
products_price_ab2: unibag._airbyte_raw_products
products_price_ab3: unibag._airbyte_raw_products
products_price: unibag._airbyte_raw_products
products_score_ab1: unibag._airbyte_raw_products
products_score_ab2: unibag._airbyte_raw_products
products_score_ab3: unibag._airbyte_raw_products
products_score: unibag._airbyte_raw_products
products_statistic_ab1: unibag._airbyte_raw_products
products_statistic_ab2: unibag._airbyte_raw_products
products_statistic_ab3: unibag._airbyte_raw_products
products_statistic: unibag._airbyte_raw_products
products_pricepercent_ab1: unibag._airbyte_raw_products
products_pricepercent_ab2: unibag._airbyte_raw_products
products_pricepercent_ab3: unibag._airbyte_raw_products
products_pricepercent: unibag._airbyte_raw_products
products_sharestatistic_ab1: unibag._airbyte_raw_products
products_sharestatistic_ab2: unibag._airbyte_raw_products
products_sharestatistic_ab3: unibag._airbyte_raw_products
products_sharestatistic: unibag._airbyte_raw_products
products_reviewstatistic_ab1: unibag._airbyte_raw_products
products_reviewstatistic_ab2: unibag._airbyte_raw_products
products_reviewstatistic_ab3: unibag._airbyte_raw_products
products_reviewstatistic: unibag._airbyte_raw_products
promotion_orders_supplier_ab1: unibag._airbyte_raw_promotion_orders
promotion_orders_supplier_ab2: unibag._airbyte_raw_promotion_orders
promotion_orders_supplier_ab3: unibag._airbyte_raw_promotion_orders
promotion_orders_supplier: unibag._airbyte_raw_promotion_orders
promotions_options_ab1: unibag._airbyte_raw_promotions
promotions_options_ab2: unibag._airbyte_raw_promotions
promotions_options_ab3: unibag._airbyte_raw_promotions
promotions_options: unibag._airbyte_raw_promotions
promotions_applyfor_ab1: unibag._airbyte_raw_promotions
promotions_applyfor_ab2: unibag._airbyte_raw_promotions
promotions_applyfor_ab3: unibag._airbyte_raw_promotions
promotions_applyfor: unibag._airbyte_raw_promotions
promotions_statistic_ab1: unibag._airbyte_raw_promotions
promotions_statistic_ab2: unibag._airbyte_raw_promotions
promotions_statistic_ab3: unibag._airbyte_raw_promotions
promotions_statistic: unibag._airbyte_raw_promotions
promotions_conditionforuser_ab1: unibag._airbyte_raw_promotions
promotions_conditionforuser_ab2: unibag._airbyte_raw_promotions
promotions_conditionforuser_ab3: unibag._airbyte_raw_promotions
promotions_conditionforuser: unibag._airbyte_raw_promotions
promotions_suppliercommission_ab1: unibag._airbyte_raw_promotions
promotions_suppliercommission_ab2: unibag._airbyte_raw_promotions
promotions_suppliercommission_ab3: unibag._airbyte_raw_promotions
promotions_suppliercommission: unibag._airbyte_raw_promotions
session_deliveries_request_ab1: unibag._airbyte_raw_session_deliveries
session_deliveries_request_ab2: unibag._airbyte_raw_session_deliveries
session_deliveries_request_ab3: unibag._airbyte_raw_session_deliveries
session_deliveries_request: unibag._airbyte_raw_session_deliveries
session_deliveries_customer_ab1: unibag._airbyte_raw_session_deliveries
session_deliveries_customer_ab2: unibag._airbyte_raw_session_deliveries
session_deliveries_customer_ab3: unibag._airbyte_raw_session_deliveries
session_deliveries_customer: unibag._airbyte_raw_session_deliveries
session_deliveries_delivery_ab1: unibag._airbyte_raw_session_deliveries
session_deliveries_delivery_ab2: unibag._airbyte_raw_session_deliveries
session_deliveries_delivery_ab3: unibag._airbyte_raw_session_deliveries
session_deliveries_delivery: unibag._airbyte_raw_session_deliveries
session_deliveries_location_ab1: unibag._airbyte_raw_session_deliveries
session_deliveries_location_ab2: unibag._airbyte_raw_session_deliveries
session_deliveries_location_ab3: unibag._airbyte_raw_session_deliveries
session_deliveries_location: unibag._airbyte_raw_session_deliveries
session_deliveries_promotion_ab1: unibag._airbyte_raw_session_deliveries
session_deliveries_promotion_ab2: unibag._airbyte_raw_session_deliveries
session_deliveries_promotion_ab3: unibag._airbyte_raw_session_deliveries
session_deliveries_promotion: unibag._airbyte_raw_session_deliveries
social_posts_statistic_ab1: unibag._airbyte_raw_social_posts
social_posts_statistic_ab2: unibag._airbyte_raw_social_posts
social_posts_statistic_ab3: unibag._airbyte_raw_social_posts
social_posts_statistic: unibag._airbyte_raw_social_posts
social_posts_sharestatistic_ab1: unibag._airbyte_raw_social_posts
social_posts_sharestatistic_ab2: unibag._airbyte_raw_social_posts
social_posts_sharestatistic_ab3: unibag._airbyte_raw_social_posts
social_posts_sharestatistic: unibag._airbyte_raw_social_posts
suppliers_bank_ab1: unibag._airbyte_raw_suppliers
suppliers_bank_ab2: unibag._airbyte_raw_suppliers
suppliers_bank_ab3: unibag._airbyte_raw_suppliers
suppliers_bank: unibag._airbyte_raw_suppliers
suppliers_logo_ab1: unibag._airbyte_raw_suppliers
suppliers_logo_ab2: unibag._airbyte_raw_suppliers
suppliers_logo_ab3: unibag._airbyte_raw_suppliers
suppliers_logo: unibag._airbyte_raw_suppliers
suppliers_balance_ab1: unibag._airbyte_raw_suppliers
suppliers_balance_ab2: unibag._airbyte_raw_suppliers
suppliers_balance_ab3: unibag._airbyte_raw_suppliers
suppliers_balance: unibag._airbyte_raw_suppliers
suppliers_location_ab1: unibag._airbyte_raw_suppliers
suppliers_location_ab2: unibag._airbyte_raw_suppliers
suppliers_location_ab3: unibag._airbyte_raw_suppliers
suppliers_location: unibag._airbyte_raw_suppliers
suppliers_statistic_ab1: unibag._airbyte_raw_suppliers
suppliers_statistic_ab2: unibag._airbyte_raw_suppliers
suppliers_statistic_ab3: unibag._airbyte_raw_suppliers
suppliers_statistic: unibag._airbyte_raw_suppliers
suppliers_reviewstatistic_ab1: unibag._airbyte_raw_suppliers
suppliers_reviewstatistic_ab2: unibag._airbyte_raw_suppliers
suppliers_reviewstatistic_ab3: unibag._airbyte_raw_suppliers
suppliers_reviewstatistic: unibag._airbyte_raw_suppliers
team_activities_options_ab1: unibag._airbyte_raw_team_activities
team_activities_options_ab2: unibag._airbyte_raw_team_activities
team_activities_options_ab3: unibag._airbyte_raw_team_activities
team_activities_options: unibag._airbyte_raw_team_activities
team_members_statistic_ab1: unibag._airbyte_raw_team_members
team_members_statistic_ab2: unibag._airbyte_raw_team_members
team_members_statistic_ab3: unibag._airbyte_raw_team_members
team_members_statistic: unibag._airbyte_raw_team_members
team_members_statisticmonth_ab1: unibag._airbyte_raw_team_members
team_members_statisticmonth_ab2: unibag._airbyte_raw_team_members
team_members_statisticmonth_ab3: unibag._airbyte_raw_team_members
team_members_statisticmonth: unibag._airbyte_raw_team_members
teams_logo_ab1: unibag._airbyte_raw_teams
teams_logo_ab2: unibag._airbyte_raw_teams
teams_logo_ab3: unibag._airbyte_raw_teams
teams_logo: unibag._airbyte_raw_teams
teams_level_ab1: unibag._airbyte_raw_teams
teams_level_ab2: unibag._airbyte_raw_teams
teams_level_ab3: unibag._airbyte_raw_teams
teams_level: unibag._airbyte_raw_teams
teams_statistic_ab1: unibag._airbyte_raw_teams
teams_statistic_ab2: unibag._airbyte_raw_teams
teams_statistic_ab3: unibag._airbyte_raw_teams
teams_statistic: unibag._airbyte_raw_teams
teams_information_ab1: unibag._airbyte_raw_teams
teams_information_ab2: unibag._airbyte_raw_teams
teams_information_ab3: unibag._airbyte_raw_teams
teams_information: unibag._airbyte_raw_teams
user_identifications_backside_ab1: unibag._airbyte_raw_user_identifications
user_identifications_backside_ab2: unibag._airbyte_raw_user_identifications
user_identifications_backside_ab3: unibag._airbyte_raw_user_identifications
user_identifications_backside: unibag._airbyte_raw_user_identifications
user_identifications_frontside_ab1: unibag._airbyte_raw_user_identifications
user_identifications_frontside_ab2: unibag._airbyte_raw_user_identifications
user_identifications_frontside_ab3: unibag._airbyte_raw_user_identifications
user_identifications_frontside: unibag._airbyte_raw_user_identifications
user_identifications_detectinformation_ab1: unibag._airbyte_raw_user_identifications
user_identifications_detectinformation_ab2: unibag._airbyte_raw_user_identifications
user_identifications_detectinformation_ab3: unibag._airbyte_raw_user_identifications
user_identifications_detectinformation: unibag._airbyte_raw_user_identifications
users_info_ab1: unibag._airbyte_raw_users
users_info_ab2: unibag._airbyte_raw_users
users_info_ab3: unibag._airbyte_raw_users
users_info: unibag._airbyte_raw_users
users_team_ab1: unibag._airbyte_raw_users
users_team_ab2: unibag._airbyte_raw_users
users_team_ab3: unibag._airbyte_raw_users
users_team: unibag._airbyte_raw_users
users_zalo_ab1: unibag._airbyte_raw_users
users_zalo_ab2: unibag._airbyte_raw_users
users_zalo_ab3: unibag._airbyte_raw_users
users_zalo: unibag._airbyte_raw_users
users_email_ab1: unibag._airbyte_raw_users
users_email_ab2: unibag._airbyte_raw_users
users_email_ab3: unibag._airbyte_raw_users
users_email: unibag._airbyte_raw_users
users_phone_ab1: unibag._airbyte_raw_users
users_phone_ab2: unibag._airbyte_raw_users
users_phone_ab3: unibag._airbyte_raw_users
users_phone: unibag._airbyte_raw_users
users_avatar_ab1: unibag._airbyte_raw_users
users_avatar_ab2: unibag._airbyte_raw_users
users_avatar_ab3: unibag._airbyte_raw_users
users_avatar: unibag._airbyte_raw_users
users_facebook_ab1: unibag._airbyte_raw_users
users_facebook_ab2: unibag._airbyte_raw_users
users_facebook_ab3: unibag._airbyte_raw_users
users_facebook: unibag._airbyte_raw_users
users_referral_ab1: unibag._airbyte_raw_users
users_referral_ab2: unibag._airbyte_raw_users
users_referral_ab3: unibag._airbyte_raw_users
users_referral: unibag._airbyte_raw_users
users_statistic_ab1: unibag._airbyte_raw_users
users_statistic_ab2: unibag._airbyte_raw_users
users_statistic_ab3: unibag._airbyte_raw_users
users_statistic: unibag._airbyte_raw_users
users_membership_ab1: unibag._airbyte_raw_users
users_membership_ab2: unibag._airbyte_raw_users
users_membership_ab3: unibag._airbyte_raw_users
users_membership: unibag._airbyte_raw_users
users_identification_ab1: unibag._airbyte_raw_users
users_identification_ab2: unibag._airbyte_raw_users
users_identification_ab3: unibag._airbyte_raw_users
users_identification: unibag._airbyte_raw_users
vouchers_logo_ab1: unibag._airbyte_raw_vouchers
vouchers_logo_ab2: unibag._airbyte_raw_vouchers
vouchers_logo_ab3: unibag._airbyte_raw_vouchers
vouchers_logo: unibag._airbyte_raw_vouchers
vouchers_options_ab1: unibag._airbyte_raw_vouchers
vouchers_options_ab2: unibag._airbyte_raw_vouchers
vouchers_options_ab3: unibag._airbyte_raw_vouchers
vouchers_options: unibag._airbyte_raw_vouchers
vouchers_applyfor_ab1: unibag._airbyte_raw_vouchers
vouchers_applyfor_ab2: unibag._airbyte_raw_vouchers
vouchers_applyfor_ab3: unibag._airbyte_raw_vouchers
vouchers_applyfor: unibag._airbyte_raw_vouchers
events_icon_dimensions_ab1: unibag._airbyte_raw_events
events_icon_dimensions_ab2: unibag._airbyte_raw_events
events_icon_dimensions_ab3: unibag._airbyte_raw_events
events_icon_dimensions: unibag._airbyte_raw_events
events_cover_dimensions_ab1: unibag._airbyte_raw_events
events_cover_dimensions_ab2: unibag._airbyte_raw_events
events_cover_dimensions_ab3: unibag._airbyte_raw_events
events_cover_dimensions: unibag._airbyte_raw_events
events_segments_lastmonthsales_ab1: unibag._airbyte_raw_events
events_segments_lastmonthsales_ab2: unibag._airbyte_raw_events
events_segments_lastmonthsales_ab3: unibag._airbyte_raw_events
events_segments_lastmonthsales: unibag._airbyte_raw_events
events_segments_highestmonthlysales_ab1: unibag._airbyte_raw_events
events_segments_highestmonthlysales_ab2: unibag._airbyte_raw_events
events_segments_highestmonthlysales_ab3: unibag._airbyte_raw_events
events_segments_highestmonthlysales: unibag._airbyte_raw_events
inventories_location_location_ab1: unibag._airbyte_raw_inventories
inventories_location_location_ab2: unibag._airbyte_raw_inventories
inventories_location_location_ab3: unibag._airbyte_raw_inventories
inventories_location_location: unibag._airbyte_raw_inventories
membership_histories_new_condition_ab1: unibag._airbyte_raw_membership_histories
membership_histories_new_condition_ab2: unibag._airbyte_raw_membership_histories
membership_histories_new_condition_ab3: unibag._airbyte_raw_membership_histories
membership_histories_new_condition: unibag._airbyte_raw_membership_histories
membership_histories_old_condition_ab1: unibag._airbyte_raw_membership_histories
membership_histories_old_condition_ab2: unibag._airbyte_raw_membership_histories
membership_histories_old_condition_ab3: unibag._airbyte_raw_membership_histories
membership_histories_old_condition: unibag._airbyte_raw_membership_histories
membership_histories_old_statistic_ab1: unibag._airbyte_raw_membership_histories
membership_histories_old_statistic_ab2: unibag._airbyte_raw_membership_histories
membership_histories_old_statistic_ab3: unibag._airbyte_raw_membership_histories
membership_histories_old_statistic: unibag._airbyte_raw_membership_histories
order_deliveries_delivery_feeship_ab1: unibag._airbyte_raw_order_deliveries
order_deliveries_delivery_feeship_ab2: unibag._airbyte_raw_order_deliveries
order_deliveries_delivery_feeship_ab3: unibag._airbyte_raw_order_deliveries
order_deliveries_delivery_feeship: unibag._airbyte_raw_order_deliveries
orders_delivery_weight_ab1: unibag._airbyte_raw_orders
orders_delivery_weight_ab2: unibag._airbyte_raw_orders
orders_delivery_weight_ab3: unibag._airbyte_raw_orders
orders_delivery_weight: unibag._airbyte_raw_orders
orders_delivery_feeship_ab1: unibag._airbyte_raw_orders
orders_delivery_feeship_ab2: unibag._airbyte_raw_orders
orders_delivery_feeship_ab3: unibag._airbyte_raw_orders
orders_delivery_feeship: unibag._airbyte_raw_orders
orders_delivery_location_ab1: unibag._airbyte_raw_orders
orders_delivery_location_ab2: unibag._airbyte_raw_orders
orders_delivery_location_ab3: unibag._airbyte_raw_orders
orders_delivery_location: unibag._airbyte_raw_orders
product_categories_icon_dimensions_ab1: unibag._airbyte_raw_product_categories
product_categories_icon_dimensions_ab2: unibag._airbyte_raw_product_categories
product_categories_icon_dimensions_ab3: unibag._airbyte_raw_product_categories
product_categories_icon_dimensions: unibag._airbyte_raw_product_categories
product_sku_info_category_ab1: unibag._airbyte_raw_product_sku
product_sku_info_category_ab2: unibag._airbyte_raw_product_sku
product_sku_info_category_ab3: unibag._airbyte_raw_product_sku
product_sku_info_category: unibag._airbyte_raw_product_sku
product_sku_info_supplier_ab1: unibag._airbyte_raw_product_sku
product_sku_info_supplier_ab2: unibag._airbyte_raw_product_sku
product_sku_info_supplier_ab3: unibag._airbyte_raw_product_sku
product_sku_info_supplier: unibag._airbyte_raw_product_sku
product_sku_info_inventory_ab1: unibag._airbyte_raw_product_sku
product_sku_info_inventory_ab2: unibag._airbyte_raw_product_sku
product_sku_info_inventory_ab3: unibag._airbyte_raw_product_sku
product_sku_info_inventory: unibag._airbyte_raw_product_sku
product_sku_versions_info_category_ab1: unibag._airbyte_raw_product_sku_versions
product_sku_versions_info_category_ab2: unibag._airbyte_raw_product_sku_versions
product_sku_versions_info_category_ab3: unibag._airbyte_raw_product_sku_versions
product_sku_versions_info_category: unibag._airbyte_raw_product_sku_versions
product_sku_versions_info_supplier_ab1: unibag._airbyte_raw_product_sku_versions
product_sku_versions_info_supplier_ab2: unibag._airbyte_raw_product_sku_versions
product_sku_versions_info_supplier_ab3: unibag._airbyte_raw_product_sku_versions
product_sku_versions_info_supplier: unibag._airbyte_raw_product_sku_versions
product_sku_versions_info_inventory_ab1: unibag._airbyte_raw_product_sku_versions
product_sku_versions_info_inventory_ab2: unibag._airbyte_raw_product_sku_versions
product_sku_versions_info_inventory_ab3: unibag._airbyte_raw_product_sku_versions
product_sku_versions_info_inventory: unibag._airbyte_raw_product_sku_versions
products_info_category_ab1: unibag._airbyte_raw_products
products_info_category_ab2: unibag._airbyte_raw_products
products_info_category_ab3: unibag._airbyte_raw_products
products_info_category: unibag._airbyte_raw_products
products_info_supplier_ab1: unibag._airbyte_raw_products
products_info_supplier_ab2: unibag._airbyte_raw_products
products_info_supplier_ab3: unibag._airbyte_raw_products
products_info_supplier: unibag._airbyte_raw_products
products_info_inventory_ab1: unibag._airbyte_raw_products
products_info_inventory_ab2: unibag._airbyte_raw_products
products_info_inventory_ab3: unibag._airbyte_raw_products
products_info_inventory: unibag._airbyte_raw_products
promotions_options_bonus_ab1: unibag._airbyte_raw_promotions
promotions_options_bonus_ab2: unibag._airbyte_raw_promotions
promotions_options_bonus_ab3: unibag._airbyte_raw_promotions
promotions_options_bonus: unibag._airbyte_raw_promotions
session_deliveries_request_to_ab1: unibag._airbyte_raw_session_deliveries
session_deliveries_request_to_ab2: unibag._airbyte_raw_session_deliveries
session_deliveries_request_to_ab3: unibag._airbyte_raw_session_deliveries
session_deliveries_request_to: unibag._airbyte_raw_session_deliveries
session_deliveries_request_from_ab1: unibag._airbyte_raw_session_deliveries
session_deliveries_request_from_ab2: unibag._airbyte_raw_session_deliveries
session_deliveries_request_from_ab3: unibag._airbyte_raw_session_deliveries
session_deliveries_request_from: unibag._airbyte_raw_session_deliveries
session_deliveries_delivery_feeship_ab1: unibag._airbyte_raw_session_deliveries
session_deliveries_delivery_feeship_ab2: unibag._airbyte_raw_session_deliveries
session_deliveries_delivery_feeship_ab3: unibag._airbyte_raw_session_deliveries
session_deliveries_delivery_feeship: unibag._airbyte_raw_session_deliveries
suppliers_logo_dimensions_ab1: unibag._airbyte_raw_suppliers
suppliers_logo_dimensions_ab2: unibag._airbyte_raw_suppliers
suppliers_logo_dimensions_ab3: unibag._airbyte_raw_suppliers
suppliers_logo_dimensions: unibag._airbyte_raw_suppliers
teams_logo_dimensions_ab1: unibag._airbyte_raw_teams
teams_logo_dimensions_ab2: unibag._airbyte_raw_teams
teams_logo_dimensions_ab3: unibag._airbyte_raw_teams
teams_logo_dimensions: unibag._airbyte_raw_teams
user_identifications_backside_dimensions_ab1: unibag._airbyte_raw_user_identifications
user_identifications_backside_dimensions_ab2: unibag._airbyte_raw_user_identifications
user_identifications_backside_dimensions_ab3: unibag._airbyte_raw_user_identifications
user_identifications_backside_dimensions: unibag._airbyte_raw_user_identifications
user_identifications_frontside_dimensions_ab1: unibag._airbyte_raw_user_identifications
user_identifications_frontside_dimensions_ab2: unibag._airbyte_raw_user_identifications
user_identifications_frontside_dimensions_ab3: unibag._airbyte_raw_user_identifications
user_identifications_frontside_dimensions: unibag._airbyte_raw_user_identifications
user_identifications__ation_addressentities_ab1: unibag._airbyte_raw_user_identifications
user_identifications__ation_addressentities_ab2: unibag._airbyte_raw_user_identifications
user_identifications__ation_addressentities_ab3: unibag._airbyte_raw_user_identifications
user_identifications__ation_addressentities: unibag._airbyte_raw_user_identifications
users_avatar_dimensions_ab1: unibag._airbyte_raw_users
users_avatar_dimensions_ab2: unibag._airbyte_raw_users
users_avatar_dimensions_ab3: unibag._airbyte_raw_users
users_avatar_dimensions: unibag._airbyte_raw_users
vouchers_logo_dimensions_ab1: unibag._airbyte_raw_vouchers
vouchers_logo_dimensions_ab2: unibag._airbyte_raw_vouchers
vouchers_logo_dimensions_ab3: unibag._airbyte_raw_vouchers
vouchers_logo_dimensions: unibag._airbyte_raw_vouchers
vouchers_options_bonus_ab1: unibag._airbyte_raw_vouchers
vouchers_options_bonus_ab2: unibag._airbyte_raw_vouchers
vouchers_options_bonus_ab3: unibag._airbyte_raw_vouchers
vouchers_options_bonus: unibag._airbyte_raw_vouchers
events_icon_dimensions_md_ab1: unibag._airbyte_raw_events
events_icon_dimensions_md_ab2: unibag._airbyte_raw_events
events_icon_dimensions_md_ab3: unibag._airbyte_raw_events
events_icon_dimensions_md: unibag._airbyte_raw_events
events_icon_dimensions_sm_ab1: unibag._airbyte_raw_events
events_icon_dimensions_sm_ab2: unibag._airbyte_raw_events
events_icon_dimensions_sm_ab3: unibag._airbyte_raw_events
events_icon_dimensions_sm: unibag._airbyte_raw_events
events_cover_dimensions_md_ab1: unibag._airbyte_raw_events
events_cover_dimensions_md_ab2: unibag._airbyte_raw_events
events_cover_dimensions_md_ab3: unibag._airbyte_raw_events
events_cover_dimensions_md: unibag._airbyte_raw_events
events_cover_dimensions_sm_ab1: unibag._airbyte_raw_events
events_cover_dimensions_sm_ab2: unibag._airbyte_raw_events
events_cover_dimensions_sm_ab3: unibag._airbyte_raw_events
events_cover_dimensions_sm: unibag._airbyte_raw_events
product_categories_icon_dimensions_md_ab1: unibag._airbyte_raw_product_categories
product_categories_icon_dimensions_md_ab2: unibag._airbyte_raw_product_categories
product_categories_icon_dimensions_md_ab3: unibag._airbyte_raw_product_categories
product_categories_icon_dimensions_md: unibag._airbyte_raw_product_categories
product_categories_icon_dimensions_sm_ab1: unibag._airbyte_raw_product_categories
product_categories_icon_dimensions_sm_ab2: unibag._airbyte_raw_product_categories
product_categories_icon_dimensions_sm_ab3: unibag._airbyte_raw_product_categories
product_categories_icon_dimensions_sm: unibag._airbyte_raw_product_categories
product_sku_info_inventory_location_ab1: unibag._airbyte_raw_product_sku
product_sku_info_inventory_location_ab2: unibag._airbyte_raw_product_sku
product_sku_info_inventory_location_ab3: unibag._airbyte_raw_product_sku
product_sku_info_inventory_location: unibag._airbyte_raw_product_sku
products_info_inventory_location_ab1: unibag._airbyte_raw_products
products_info_inventory_location_ab2: unibag._airbyte_raw_products
products_info_inventory_location_ab3: unibag._airbyte_raw_products
products_info_inventory_location: unibag._airbyte_raw_products
session_deliveries_request_to_location_ab1: unibag._airbyte_raw_session_deliveries
session_deliveries_request_to_location_ab2: unibag._airbyte_raw_session_deliveries
session_deliveries_request_to_location_ab3: unibag._airbyte_raw_session_deliveries
session_deliveries_request_to_location: unibag._airbyte_raw_session_deliveries
suppliers_logo_dimensions_md_ab1: unibag._airbyte_raw_suppliers
suppliers_logo_dimensions_md_ab2: unibag._airbyte_raw_suppliers
suppliers_logo_dimensions_md_ab3: unibag._airbyte_raw_suppliers
suppliers_logo_dimensions_md: unibag._airbyte_raw_suppliers
suppliers_logo_dimensions_sm_ab1: unibag._airbyte_raw_suppliers
suppliers_logo_dimensions_sm_ab2: unibag._airbyte_raw_suppliers
suppliers_logo_dimensions_sm_ab3: unibag._airbyte_raw_suppliers
suppliers_logo_dimensions_sm: unibag._airbyte_raw_suppliers
teams_logo_dimensions_md_ab1: unibag._airbyte_raw_teams
teams_logo_dimensions_md_ab2: unibag._airbyte_raw_teams
teams_logo_dimensions_md_ab3: unibag._airbyte_raw_teams
teams_logo_dimensions_md: unibag._airbyte_raw_teams
teams_logo_dimensions_sm_ab1: unibag._airbyte_raw_teams
teams_logo_dimensions_sm_ab2: unibag._airbyte_raw_teams
teams_logo_dimensions_sm_ab3: unibag._airbyte_raw_teams
teams_logo_dimensions_sm: unibag._airbyte_raw_teams
user_identifications_backside_dimensions_md_ab1: unibag._airbyte_raw_user_identifications
user_identifications_backside_dimensions_md_ab2: unibag._airbyte_raw_user_identifications
user_identifications_backside_dimensions_md_ab3: unibag._airbyte_raw_user_identifications
user_identifications_backside_dimensions_md: unibag._airbyte_raw_user_identifications
user_identifications_backside_dimensions_sm_ab1: unibag._airbyte_raw_user_identifications
user_identifications_backside_dimensions_sm_ab2: unibag._airbyte_raw_user_identifications
user_identifications_backside_dimensions_sm_ab3: unibag._airbyte_raw_user_identifications
user_identifications_backside_dimensions_sm: unibag._airbyte_raw_user_identifications
user_identifications__ontside_dimensions_md_ab1: unibag._airbyte_raw_user_identifications
user_identifications__ontside_dimensions_md_ab2: unibag._airbyte_raw_user_identifications
user_identifications__ontside_dimensions_md_ab3: unibag._airbyte_raw_user_identifications
user_identifications__ontside_dimensions_md: unibag._airbyte_raw_user_identifications
user_identifications__ontside_dimensions_sm_ab1: unibag._airbyte_raw_user_identifications
user_identifications__ontside_dimensions_sm_ab2: unibag._airbyte_raw_user_identifications
user_identifications__ontside_dimensions_sm_ab3: unibag._airbyte_raw_user_identifications
user_identifications__ontside_dimensions_sm: unibag._airbyte_raw_user_identifications
users_avatar_dimensions_md_ab1: unibag._airbyte_raw_users
users_avatar_dimensions_md_ab2: unibag._airbyte_raw_users
users_avatar_dimensions_md_ab3: unibag._airbyte_raw_users
users_avatar_dimensions_md: unibag._airbyte_raw_users
users_avatar_dimensions_sm_ab1: unibag._airbyte_raw_users
users_avatar_dimensions_sm_ab2: unibag._airbyte_raw_users
users_avatar_dimensions_sm_ab3: unibag._airbyte_raw_users
users_avatar_dimensions_sm: unibag._airbyte_raw_users
vouchers_logo_dimensions_md_ab1: unibag._airbyte_raw_vouchers
vouchers_logo_dimensions_md_ab2: unibag._airbyte_raw_vouchers
vouchers_logo_dimensions_md_ab3: unibag._airbyte_raw_vouchers
vouchers_logo_dimensions_md: unibag._airbyte_raw_vouchers
vouchers_logo_dimensions_sm_ab1: unibag._airbyte_raw_vouchers
vouchers_logo_dimensions_sm_ab2: unibag._airbyte_raw_vouchers
vouchers_logo_dimensions_sm_ab3: unibag._airbyte_raw_vouchers
vouchers_logo_dimensions_sm: unibag._airbyte_raw_vouchers
product_sku_info_inv__ory_location_location_ab1: unibag._airbyte_raw_product_sku
product_sku_info_inv__ory_location_location_ab2: unibag._airbyte_raw_product_sku
product_sku_info_inv__ory_location_location_ab3: unibag._airbyte_raw_product_sku
product_sku_info_inv__ory_location_location: unibag._airbyte_raw_product_sku
products_info_inventory_location_location_ab1: unibag._airbyte_raw_products
products_info_inventory_location_location_ab2: unibag._airbyte_raw_products
products_info_inventory_location_location_ab3: unibag._airbyte_raw_products
products_info_inventory_location_location: unibag._airbyte_raw_products

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,28 @@
{{ 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_brands') }}
select
{{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id,
{{ json_extract_scalar('_airbyte_data', ['desc'], ['desc']) }} as {{ adapter.quote('desc') }},
{{ json_extract_scalar('_airbyte_data', ['logo'], ['logo']) }} as logo,
{{ 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_array('_airbyte_data', ['photos'], ['photos']) }} as photos,
{{ json_extract_scalar('_airbyte_data', ['country'], ['country']) }} as country,
{{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat,
{{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat,
{{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring,
{{ json_extract_scalar('_airbyte_data', ['totalProduct'], ['totalProduct']) }} as totalproduct,
_airbyte_ab_id,
_airbyte_emitted_at,
{{ current_timestamp() }} as _airbyte_normalized_at
from {{ source('unibag', '_airbyte_raw_brands') }} as table_alias
-- brands
where 1 = 1

View File

@ -0,0 +1,28 @@
{{ 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('brands_ab1') }}
select
cast(_id as {{ dbt_utils.type_string() }}) as _id,
cast({{ adapter.quote('desc') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('desc') }},
cast(logo as {{ dbt_utils.type_string() }}) as logo,
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,
photos,
cast(country as {{ dbt_utils.type_string() }}) as country,
cast(createdat as {{ dbt_utils.type_string() }}) as createdat,
cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat,
cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring,
cast(totalproduct as {{ dbt_utils.type_float() }}) as totalproduct,
_airbyte_ab_id,
_airbyte_emitted_at,
{{ current_timestamp() }} as _airbyte_normalized_at
from {{ ref('brands_ab1') }}
-- brands
where 1 = 1

View File

@ -0,0 +1,28 @@
{{ 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('brands_ab2') }}
select
{{ dbt_utils.surrogate_key([
'_id',
adapter.quote('desc'),
'logo',
adapter.quote('name'),
'slug',
boolean_to_string('active'),
array_to_string('photos'),
'country',
'createdat',
'updatedat',
'searchstring',
'totalproduct',
]) }} as _airbyte_brands_hashid,
tmp.*
from {{ ref('brands_ab2') }} tmp
-- brands
where 1 = 1

View File

@ -0,0 +1,25 @@
{{ 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_give_gifts') }}
select
{{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id,
{{ json_extract_scalar('_airbyte_data', ['title'], ['title']) }} as title,
{{ json_extract_scalar('_airbyte_data', ['status'], ['status']) }} as status,
{{ json_extract_scalar('_airbyte_data', ['content'], ['content']) }} as {{ adapter.quote('content') }},
{{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat,
{{ json_extract_scalar('_airbyte_data', ['createdBy'], ['createdBy']) }} as createdby,
{{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat,
{{ json_extract_scalar('_airbyte_data', ['searchString'], ['searchString']) }} as searchstring,
{{ json_extract_scalar('_airbyte_data', ['lastChangeUsersAt'], ['lastChangeUsersAt']) }} as lastchangeusersat,
_airbyte_ab_id,
_airbyte_emitted_at,
{{ current_timestamp() }} as _airbyte_normalized_at
from {{ source('unibag', '_airbyte_raw_give_gifts') }} as table_alias
-- give_gifts
where 1 = 1

View File

@ -0,0 +1,25 @@
{{ 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('give_gifts_ab1') }}
select
cast(_id as {{ dbt_utils.type_string() }}) as _id,
cast(title as {{ dbt_utils.type_string() }}) as title,
cast(status as {{ dbt_utils.type_string() }}) as status,
cast({{ adapter.quote('content') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('content') }},
cast(createdat as {{ dbt_utils.type_string() }}) as createdat,
cast(createdby as {{ dbt_utils.type_string() }}) as createdby,
cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat,
cast(searchstring as {{ dbt_utils.type_string() }}) as searchstring,
cast(lastchangeusersat as {{ dbt_utils.type_string() }}) as lastchangeusersat,
_airbyte_ab_id,
_airbyte_emitted_at,
{{ current_timestamp() }} as _airbyte_normalized_at
from {{ ref('give_gifts_ab1') }}
-- give_gifts
where 1 = 1

View File

@ -0,0 +1,25 @@
{{ 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('give_gifts_ab2') }}
select
{{ dbt_utils.surrogate_key([
'_id',
'title',
'status',
adapter.quote('content'),
'createdat',
'createdby',
'updatedat',
'searchstring',
'lastchangeusersat',
]) }} as _airbyte_give_gifts_hashid,
tmp.*
from {{ ref('give_gifts_ab2') }} tmp
-- give_gifts
where 1 = 1

View File

@ -0,0 +1,24 @@
{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
unique_key = '_airbyte_ab_id',
schema = "_airbyte_unibag",
tags = [ "top-level-intermediate" ]
) }}
-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema
-- depends_on: {{ source('unibag', '_airbyte_raw_team_histories') }}
select
{{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id,
{{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }},
{{ json_extract_scalar('_airbyte_data', ['team'], ['team']) }} as team,
{{ json_extract_scalar('_airbyte_data', ['level'], ['level']) }} as {{ adapter.quote('level') }},
{{ json_extract_scalar('_airbyte_data', ['leader'], ['leader']) }} as leader,
{{ json_extract_scalar('_airbyte_data', ['status'], ['status']) }} as status,
{{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat,
{{ json_extract_scalar('_airbyte_data', ['statistic'], ['statistic']) }} as statistic,
_airbyte_ab_id,
_airbyte_emitted_at,
{{ current_timestamp() }} as _airbyte_normalized_at
from {{ source('unibag', '_airbyte_raw_team_histories') }} as table_alias
-- team_histories
where 1 = 1

View File

@ -0,0 +1,24 @@
{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
unique_key = '_airbyte_ab_id',
schema = "_airbyte_unibag",
tags = [ "top-level-intermediate" ]
) }}
-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type
-- depends_on: {{ ref('team_histories_ab1') }}
select
cast(_id as {{ dbt_utils.type_string() }}) as _id,
cast({{ adapter.quote('date') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('date') }},
cast(team as {{ dbt_utils.type_string() }}) as team,
cast({{ adapter.quote('level') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('level') }},
cast(leader as {{ dbt_utils.type_string() }}) as leader,
cast(status as {{ dbt_utils.type_string() }}) as status,
cast(createdat as {{ dbt_utils.type_string() }}) as createdat,
cast(statistic as {{ dbt_utils.type_string() }}) as statistic,
_airbyte_ab_id,
_airbyte_emitted_at,
{{ current_timestamp() }} as _airbyte_normalized_at
from {{ ref('team_histories_ab1') }}
-- team_histories
where 1 = 1

View File

@ -0,0 +1,24 @@
{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
unique_key = '_airbyte_ab_id',
schema = "_airbyte_unibag",
tags = [ "top-level-intermediate" ]
) }}
-- SQL model to build a hash column based on the values of this record
-- depends_on: {{ ref('team_histories_ab2') }}
select
{{ dbt_utils.surrogate_key([
'_id',
adapter.quote('date'),
'team',
adapter.quote('level'),
'leader',
'status',
'createdat',
'statistic',
]) }} as _airbyte_team_histories_hashid,
tmp.*
from {{ ref('team_histories_ab2') }} tmp
-- team_histories
where 1 = 1

View File

@ -0,0 +1,23 @@
{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
unique_key = '_airbyte_ab_id',
schema = "_airbyte_unibag",
tags = [ "top-level-intermediate" ]
) }}
-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema
-- depends_on: {{ source('unibag', '_airbyte_raw_user_courses') }}
select
{{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id,
{{ json_extract_scalar('_airbyte_data', ['user'], ['user']) }} as {{ adapter.quote('user') }},
{{ json_extract_scalar('_airbyte_data', ['course'], ['course']) }} as course,
{{ json_extract_scalar('_airbyte_data', ['hoolaId'], ['hoolaId']) }} as hoolaid,
{{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat,
{{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat,
{{ json_extract_scalar('_airbyte_data', ['academyAccount'], ['academyAccount']) }} as academyaccount,
_airbyte_ab_id,
_airbyte_emitted_at,
{{ current_timestamp() }} as _airbyte_normalized_at
from {{ source('unibag', '_airbyte_raw_user_courses') }} as table_alias
-- user_courses
where 1 = 1

View File

@ -0,0 +1,23 @@
{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
unique_key = '_airbyte_ab_id',
schema = "_airbyte_unibag",
tags = [ "top-level-intermediate" ]
) }}
-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type
-- depends_on: {{ ref('user_courses_ab1') }}
select
cast(_id as {{ dbt_utils.type_string() }}) as _id,
cast({{ adapter.quote('user') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('user') }},
cast(course as {{ dbt_utils.type_string() }}) as course,
cast(hoolaid as {{ dbt_utils.type_string() }}) as hoolaid,
cast(createdat as {{ dbt_utils.type_string() }}) as createdat,
cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat,
cast(academyaccount as {{ dbt_utils.type_string() }}) as academyaccount,
_airbyte_ab_id,
_airbyte_emitted_at,
{{ current_timestamp() }} as _airbyte_normalized_at
from {{ ref('user_courses_ab1') }}
-- user_courses
where 1 = 1

View File

@ -0,0 +1,23 @@
{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
unique_key = '_airbyte_ab_id',
schema = "_airbyte_unibag",
tags = [ "top-level-intermediate" ]
) }}
-- SQL model to build a hash column based on the values of this record
-- depends_on: {{ ref('user_courses_ab2') }}
select
{{ dbt_utils.surrogate_key([
'_id',
adapter.quote('user'),
'course',
'hoolaid',
'createdat',
'updatedat',
'academyaccount',
]) }} as _airbyte_user_courses_hashid,
tmp.*
from {{ ref('user_courses_ab2') }} tmp
-- user_courses
where 1 = 1

View File

@ -0,0 +1,25 @@
{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
unique_key = '_airbyte_ab_id',
schema = "_airbyte_unibag",
tags = [ "top-level-intermediate" ]
) }}
-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema
-- depends_on: {{ source('unibag', '_airbyte_raw_user_give_gift') }}
select
{{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id,
{{ json_extract_scalar('_airbyte_data', ['gift'], ['gift']) }} as gift,
{{ json_extract_scalar('_airbyte_data', ['user'], ['user']) }} as {{ adapter.quote('user') }},
{{ json_extract_scalar('_airbyte_data', ['title'], ['title']) }} as title,
{{ json_extract_scalar('_airbyte_data', ['giveGift'], ['giveGift']) }} as givegift,
{{ json_extract_scalar('_airbyte_data', ['createdAt'], ['createdAt']) }} as createdat,
{{ json_extract_scalar('_airbyte_data', ['updatedAt'], ['updatedAt']) }} as updatedat,
{{ json_extract_scalar('_airbyte_data', ['isCompleted'], ['isCompleted']) }} as iscompleted,
{{ json_extract_scalar('_airbyte_data', ['notificationContent'], ['notificationContent']) }} as notificationcontent,
_airbyte_ab_id,
_airbyte_emitted_at,
{{ current_timestamp() }} as _airbyte_normalized_at
from {{ source('unibag', '_airbyte_raw_user_give_gift') }} as table_alias
-- user_give_gift
where 1 = 1

View File

@ -0,0 +1,25 @@
{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
unique_key = '_airbyte_ab_id',
schema = "_airbyte_unibag",
tags = [ "top-level-intermediate" ]
) }}
-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type
-- depends_on: {{ ref('user_give_gift_ab1') }}
select
cast(_id as {{ dbt_utils.type_string() }}) as _id,
cast(gift as {{ dbt_utils.type_string() }}) as gift,
cast({{ adapter.quote('user') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('user') }},
cast(title as {{ dbt_utils.type_string() }}) as title,
cast(givegift as {{ dbt_utils.type_string() }}) as givegift,
cast(createdat as {{ dbt_utils.type_string() }}) as createdat,
cast(updatedat as {{ dbt_utils.type_string() }}) as updatedat,
{{ cast_to_boolean('iscompleted') }} as iscompleted,
cast(notificationcontent as {{ dbt_utils.type_string() }}) as notificationcontent,
_airbyte_ab_id,
_airbyte_emitted_at,
{{ current_timestamp() }} as _airbyte_normalized_at
from {{ ref('user_give_gift_ab1') }}
-- user_give_gift
where 1 = 1

View File

@ -0,0 +1,25 @@
{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
unique_key = '_airbyte_ab_id',
schema = "_airbyte_unibag",
tags = [ "top-level-intermediate" ]
) }}
-- SQL model to build a hash column based on the values of this record
-- depends_on: {{ ref('user_give_gift_ab2') }}
select
{{ dbt_utils.surrogate_key([
'_id',
'gift',
adapter.quote('user'),
'title',
'givegift',
'createdat',
'updatedat',
boolean_to_string('iscompleted'),
'notificationcontent',
]) }} as _airbyte_user_give_gift_hashid,
tmp.*
from {{ ref('user_give_gift_ab2') }} tmp
-- user_give_gift
where 1 = 1

View File

@ -0,0 +1,25 @@
{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
unique_key = '_airbyte_ab_id',
schema = "unibag",
tags = [ "top-level" ]
) }}
-- Final base SQL model
-- depends_on: {{ ref('brands_ab3') }}
select
_id,
{{ adapter.quote('name') }},
active,
{{ adapter.quote('country') }}::json->>'name' AS country_name,
{{ adapter.quote('country') }}::json->>'code' AS country_code,
createdat::timestamp AS created_at,
updatedat::timestamp AS updated_at,
COALESCE(cast(totalproduct AS integer), 0) AS total_product,
_airbyte_ab_id,
_airbyte_emitted_at,
{{ current_timestamp() }} as _airbyte_normalized_at,
_airbyte_brands_hashid
from {{ ref('brands_ab3') }}
-- brands from {{ source('unibag', '_airbyte_raw_brands') }}
where 1 = 1

View File

@ -0,0 +1,25 @@
{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
unique_key = '_airbyte_ab_id',
schema = "unibag",
tags = [ "top-level" ]
) }}
-- Final base SQL model
-- depends_on: {{ ref('give_gifts_ab3') }}
select
_id,
title,
status,
{{ adapter.quote('content') }},
createdby AS created_by,
lastchangeusersat::timestamp AS last_change_users_at,
createdat::timestamp AS created_at,
updatedat::timestamp AS updated_at,
_airbyte_ab_id,
_airbyte_emitted_at,
{{ current_timestamp() }} as _airbyte_normalized_at,
_airbyte_give_gifts_hashid
from {{ ref('give_gifts_ab3') }}
-- give_gifts from {{ source('unibag', '_airbyte_raw_give_gifts') }}
where 1 = 1

View File

@ -11,6 +11,7 @@ select
sku,
{{ adapter.quote('name') }},
active,
brand AS brand_id,
-- quantity,
picture AS photo,
cast({{ adapter.quote('price') }}::json->>'base' AS numeric) AS price_base,

View File

@ -0,0 +1,25 @@
{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
unique_key = '_airbyte_ab_id',
schema = "unibag",
tags = [ "top-level" ]
) }}
-- Final base SQL model
-- depends_on: {{ ref('team_histories_ab3') }}
select
_id,
team AS team_id,
leader AS leader_id,
status,
{{ adapter.quote('date') }}::timestamp,
{{ adapter.quote('level') }}::jsonb,
statistic::jsonb,
createdat::timestamp AS created_at,
_airbyte_ab_id,
_airbyte_emitted_at,
{{ current_timestamp() }} as _airbyte_normalized_at,
_airbyte_team_histories_hashid
from {{ ref('team_histories_ab3') }}
-- team_histories from {{ source('unibag', '_airbyte_raw_team_histories') }}
where 1 = 1

View File

@ -12,7 +12,7 @@ select
team AS team_id,
{{ adapter.quote('user') }} AS seller_id,
isleft AS is_left,
leftat AS left_at,
leftat::timestamp AS left_at,
joinedat::timestamp AS joined_at,
createdat::timestamp AS created_at,
updatedat::timestamp AS updated_at,

View File

@ -0,0 +1,24 @@
{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
unique_key = '_airbyte_ab_id',
schema = "unibag",
tags = [ "top-level" ]
) }}
-- Final base SQL model
-- depends_on: {{ ref('user_courses_ab3') }}
select
_id,
{{ adapter.quote('user') }} AS seller_id,
course::jsonb,
hoolaid AS hoola_id,
academyaccount AS academy_account_id,
createdat::timestamp AS created_at,
updatedat::timestamp AS updated_at,
_airbyte_ab_id,
_airbyte_emitted_at,
{{ current_timestamp() }} as _airbyte_normalized_at,
_airbyte_user_courses_hashid
from {{ ref('user_courses_ab3') }}
-- user_courses from {{ source('unibag', '_airbyte_raw_user_courses') }}
where 1 = 1

View File

@ -0,0 +1,27 @@
{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
unique_key = '_airbyte_ab_id',
schema = "unibag",
tags = [ "top-level" ]
) }}
-- Final base SQL model
-- depends_on: {{ ref('user_give_gift_ab3') }}
select
_id,
{{ adapter.quote('user') }} AS seller_id,
title,
givegift AS give_gift_id,
iscompleted AS is_completed,
gift::json->>'type' AS gift_type,
cast(gift::json->>'value' AS numeric) AS gift_value,
gift::json->>'label' AS gift_label,
createdat::timestamp AS created_at,
updatedat::timestamp AS updated_at,
_airbyte_ab_id,
_airbyte_emitted_at,
{{ current_timestamp() }} as _airbyte_normalized_at,
_airbyte_user_give_gift_hashid
from {{ ref('user_give_gift_ab3') }}
-- user_give_gift from {{ source('unibag', '_airbyte_raw_user_give_gift') }}
where 1 = 1

View File

@ -7,12 +7,14 @@ sources:
identifier: false
tables:
- name: _airbyte_raw_admin_tags
- name: _airbyte_raw_brands
- name: _airbyte_raw_cash_flows
- name: _airbyte_raw_cities
- name: _airbyte_raw_customers
- name: _airbyte_raw_districts
- name: _airbyte_raw_event_rewards
- name: _airbyte_raw_events
- name: _airbyte_raw_give_gifts
- name: _airbyte_raw_inventories
- name: _airbyte_raw_membership
- name: _airbyte_raw_membership_histories
@ -35,8 +37,11 @@ sources:
- name: _airbyte_raw_suppliers
- name: _airbyte_raw_team_activities
- name: _airbyte_raw_team_bonus
- name: _airbyte_raw_team_histories
- name: _airbyte_raw_team_members
- name: _airbyte_raw_teams
- name: _airbyte_raw_user_courses
- name: _airbyte_raw_user_give_gift
- name: _airbyte_raw_user_identifications
- name: _airbyte_raw_users
- name: _airbyte_raw_voucher_bonus