diff --git a/Makefile b/Makefile index 412d30a..9818d9a 100644 --- a/Makefile +++ b/Makefile @@ -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 brands + dbt run --profiles-dir=. --project-dir=. --full-refresh --select user_give_gift diff --git a/dbt_project.yml b/dbt_project.yml index 143e594..f71ea31 100755 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -81,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 @@ -169,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 @@ -177,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 diff --git a/destination_catalog.json b/destination_catalog.json index 5612752..b4050fa 100644 --- a/destination_catalog.json +++ b/destination_catalog.json @@ -1 +1 @@ -{"streams":[{"stream":{"name":"admin-tags","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"color":{"type":"string"},"active":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"searchString":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"brands","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"desc":{"type":"string"},"logo":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"active":{"type":"boolean"},"photos":{"type":"array"},"country":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"searchString":{"type":"string"},"totalProduct":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"cash-flows","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"hash":{"type":"string"},"user":{"type":"string"},"value":{"type":"number"},"action":{"type":"string"},"options":{"type":"string"},"category":{"type":"string"},"targetId":{"type":"string"},"createdAt":{"type":"string"},"isAudited":{"type":"boolean"},"updatedAt":{"type":"string"},"newBalance":{"type":"number"},"oldBalance":{"type":"number"},"targetType":{"type":"string"},"isProcessed":{"type":"boolean"},"processStatus":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"cities","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"number"},"name":{"type":"string"},"slug":{"type":"string"},"order":{"type":"number"},"tncId":{"type":"number"},"region":{"type":"string"},"source":{"type":"string"},"tempId":{"type":"number"},"tncCode":{"type":"string"},"osirisId":{"type":"number"},"updatedAt":{"type":"string"},"searchString":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"customers","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"info":{"type":"string"},"name":{"type":"string"},"user":{"type":"string"},"phone":{"type":"string"},"source":{"type":"string"},"location":{"type":"array"},"createdAt":{"type":"string"},"isDeleted":{"type":"boolean"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"searchString":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"districts","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"city":{"type":"string"},"code":{"type":"number"},"name":{"type":"string"},"slug":{"type":"string"},"tncId":{"type":"number"},"cityId":{"type":"number"},"source":{"type":"string"},"tncCode":{"type":"string"},"gidoCode":{"type":"number"},"osirisId":{"type":"number"},"updatedAt":{"type":"string"},"searchString":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"event-rewards","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"cash":{"type":"number"},"type":{"type":"string"},"user":{"type":"string"},"event":{"type":"string"},"status":{"type":"string"},"options":{"type":"string"},"createdAt":{"type":"string"},"updatedat":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"events","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"desc":{"type":"string"},"icon":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"cover":{"type":"string"},"endAt":{"type":"string"},"active":{"type":"boolean"},"notice":{"type":"string"},"article":{"type":"string"},"options":{"type":"string"},"startAt":{"type":"string"},"segments":{"type":"string"},"createdAt":{"type":"string"},"suppliers":{"type":"array"},"updatedAt":{"type":"string"},"information":{"type":"array"},"displayEndAt":{"type":"string"},"isApplyForAll":{"type":"boolean"},"displayStartAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"inventories","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"number"},"name":{"type":"string"},"slug":{"type":"string"},"active":{"type":"boolean"},"contact":{"type":"string"},"partner":{"type":"string"},"checksum":{"type":"string"},"location":{"type":"string"},"supplier":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"minimumValue":{"type":"number"},"searchString":{"type":"string"},"paymentMethods":{"type":"string"},"canIssueInvoice":{"type":"boolean"},"deliveryMethods":{"type":"array"},"canAutoSendEmail":{"type":"boolean"},"invoiceDeliveryMethod":{"type":"string"},"doesSupportSellyExpress":{"type":"boolean"},"priorityDeliveryServiceCodes":{"type":"array"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"membership","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"guide":{"type":"string"},"level":{"type":"number"},"sales":{"type":"number"},"active":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"transaction":{"type":"number"},"bonusPercent":{"type":"number"},"transactionMinValue":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"membership-histories","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"new":{"type":"string"},"old":{"type":"string"},"type":{"type":"string"},"user":{"type":"string"},"createdAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"membership-orders","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"status":{"type":"string"},"percent":{"type":"number"},"targetID":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"commission":{"type":"number"},"isRejected":{"type":"boolean"},"membershipName":{"type":"string"},"membershipLevel":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"order-deliveries","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"order":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"weight":{"type":"string"},"service":{"type":"string"},"customer":{"type":"string"},"delivery":{"type":"string"},"location":{"type":"string"},"createdAt":{"type":"string"},"promotion":{"type":"string"},"updatedAt":{"type":"string"},"trackingCode":{"type":"string"},"trackingTime":{"type":"string"},"isAdminChange":{"type":"boolean"},"trackingOrderCode":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"order-histories","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"order":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"timeStamp":{"type":"number"},"updatedAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"order-items","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"sku":{"type":"string"},"date":{"type":"string"},"user":{"type":"string"},"order":{"type":"string"},"price":{"type":"string"},"status":{"type":"string"},"product":{"type":"string"},"customer":{"type":"string"},"quantity":{"type":"number"},"createdAt":{"type":"string"},"totalSell":{"type":"number"},"updatedAt":{"type":"string"},"cashbackAt":{"type":"string"},"totalPrice":{"type":"number"},"deliveredAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"orders","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"date":{"type":"string"},"hour":{"type":"number"},"note":{"type":"string"},"skus":{"type":"array"},"tags":{"type":"array"},"user":{"type":"string"},"price":{"type":"string"},"banned":{"type":"boolean"},"reason":{"type":"string"},"source":{"type":"string"},"status":{"type":"string"},"update":{"type":"string"},"payment":{"type":"string"},"remarks":{"type":"string"},"customer":{"type":"string"},"delivery":{"type":"string"},"pickupAt":{"type":"string"},"products":{"type":"array"},"supplier":{"type":"string"},"approveAt":{"type":"string"},"createdAt":{"type":"string"},"inventory":{"type":"string"},"isDeleted":{"type":"boolean"},"promotion":{"type":"string"},"requestId":{"type":"string"},"sendEmail":{"type":"string"},"totalItem":{"type":"number"},"updatedAt":{"type":"string"},"userAgent":{"type":"string"},"wholesale":{"type":"boolean"},"approvedAt":{"type":"string"},"cashbackAt":{"type":"string"},"codeOsiris":{"type":"string"},"isPreorder":{"type":"boolean"},"membership":{"type":"string"},"rejectedAt":{"type":"string"},"deliveredAt":{"type":"string"},"deliveringAt":{"type":"string"},"deliveryCode":{"type":"string"},"searchString":{"type":"string"},"staffApprove":{"type":"string"},"trackingCode":{"type":"string"},"processStatus":{"type":"string"},"hookTimeLastAt":{"type":"string"},"trackingCodeURL":{"type":"string"},"approvePaymentAt":{"type":"string"},"isChangeDelivery":{"type":"boolean"},"trackingOrderCode":{"type":"string"},"estimateCashbackAt":{"type":"string"},"isWaitingCancelled":{"type":"boolean"},"fromNewActiveSeller":{"type":"boolean"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"product-categories","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"icon":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"},"active":{"type":"boolean"},"covers":{"type":"array"},"featured":{"type":"boolean"},"createdAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"totalProduct":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"product-sku","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"sku":{"type":"string"},"info":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"brand":{"type":"string"},"cover":{"type":"string"},"price":{"type":"string"},"active":{"type":"boolean"},"author":{"type":"string"},"manual":{"type":"boolean"},"source":{"type":"string"},"display":{"type":"boolean"},"picture":{"type":"string"},"product":{"type":"string"},"version":{"type":"number"},"groupSku":{"type":"string"},"unitCode":{"type":"string"},"createdAt":{"type":"string"},"restockAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"oldProduct":{"type":"string"},"properties":{"type":"array"},"canPreorder":{"type":"boolean"},"supplierSku":{"type":"string"},"isOutOfStock":{"type":"boolean"},"pricePercent":{"type":"string"},"searchString":{"type":"string"},"updateReason":{"type":"string"},"updateActiveId":{"type":"string"},"displayInventory":{"type":"boolean"},"showRemainingQuantity":{"type":"boolean"},"quantity_aibyte_transform":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"product-sku-versions","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"sku":{"type":"string"},"info":{"type":"string"},"name":{"type":"string"},"price":{"type":"string"},"source":{"type":"string"},"codeSku":{"type":"string"},"picture":{"type":"string"},"product":{"type":"string"},"version":{"type":"number"},"createdAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"properties":{"type":"array"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"product-sub-categories","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"order":{"type":"number"},"active":{"type":"boolean"},"parent":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"searchString":{"type":"string"},"totalProduct":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"products","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"desc":{"type":"string"},"info":{"type":"string"},"name":{"type":"string"},"temp":{"type":"string"},"brand":{"type":"string"},"order":{"type":"string"},"price":{"type":"string"},"score":{"type":"string"},"active":{"type":"boolean"},"author":{"type":"string"},"guides":{"type":"array"},"photos":{"type":"array"},"videos":{"type":"array"},"quantity":{"type":"number"},"createdAt":{"type":"string"},"documents":{"type":"array"},"shareDesc":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"categories":{"type":"array"},"inactiveAt":{"type":"string"},"properties":{"type":"array"},"reActiveAt":{"type":"string"},"inventories":{"type":"array"},"displaySKUId":{"type":"string"},"isOutOfStock":{"type":"boolean"},"pricePercent":{"type":"string"},"searchString":{"type":"string"},"subCategories":{"type":"array"},"inactiveReason":{"type":"string"},"propertiesMain":{"type":"string"},"shareStatistic":{"type":"string"},"updateActiveId":{"type":"string"},"canIssueInvoice":{"type":"boolean"},"pendingInactive":{"type":"boolean"},"reviewStatistic":{"type":"string"},"highlightProperties":{"type":"array"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"promotion-orders","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"type":{"type":"string"},"user":{"type":"string"},"order":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"options":{"type":"string"},"supplier":{"type":"string"},"createdAt":{"type":"string"},"promotion":{"type":"string"},"updatedAt":{"type":"string"},"cashbackAt":{"type":"string"},"commission":{"type":"number"},"isRejected":{"type":"boolean"},"orderPriceTotal":{"type":"number"},"quantityPromotion":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"promotions","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"rest":{"type":"number"},"type":{"type":"string"},"endAt":{"type":"string"},"title":{"type":"string"},"active":{"type":"boolean"},"options":{"type":"string"},"startAt":{"type":"string"},"applyFor":{"type":"string"},"quantity":{"type":"number"},"articleID":{"type":"string"},"createdAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"searchString":{"type":"string"},"conditionForUser":{"type":"string"},"supplierCommission":{"type":"string"},"isUnlimitedQuantity":{"type":"boolean"},"maximumLimitPerUser":{"type":"number"},"milestonesStatistic":{"type":"array"},"isApplyForOrderWholesale":{"type":"boolean"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"referrals","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"invitee":{"type":"string"},"createdAt":{"type":"string"},"fromSystem":{"type":"boolean"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"session-deliveries","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"cart":{"type":"string"},"note":{"type":"string"},"title":{"type":"string"},"request":{"type":"string"},"service":{"type":"string"},"currency":{"type":"string"},"customer":{"type":"string"},"delivery":{"type":"string"},"location":{"type":"string"},"createdAt":{"type":"string"},"promotion":{"type":"string"},"sessionOrder":{"type":"string"},"paymentMethod":{"type":"string"},"estimateTimeDelivery":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"social-post-views","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"clientIP":{"type":"string"},"lastViewAt":{"type":"string"},"socialPost":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"social-posts","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"tags":{"type":"array"},"isPin":{"type":"boolean"},"order":{"type":"number"},"title":{"type":"string"},"author":{"type":"string"},"cities":{"type":"array"},"photos":{"type":"array"},"reason":{"type":"string"},"status":{"type":"string"},"videos":{"type":"array"},"content":{"type":"string"},"isTimer":{"type":"boolean"},"startAt":{"type":"string"},"products":{"type":"array"},"createdAt":{"type":"string"},"hasUpdate":{"type":"boolean"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"categories":{"type":"array"},"fromSystem":{"type":"boolean"},"contributor":{"type":"string"},"publishedAt":{"type":"string"},"searchString":{"type":"string"},"updatedCount":{"type":"number"},"shareStatistic":{"type":"string"},"enableNotificationForContributor":{"type":"boolean"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"suppliers","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"tax":{"type":"string"},"bank":{"type":"string"},"logo":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean"},"balance":{"type":"string"},"checkSum":{"type":"string"},"checksum":{"type":"string"},"location":{"type":"string"},"contracts":{"type":"array"},"createdAt":{"type":"string"},"documents":{"type":"array"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"categories":{"type":"array"},"inventories":{"type":"array"},"identifyCode":{"type":"number"},"searchString":{"type":"string"},"reconcileDays":{"type":"array"},"contractNumber":{"type":"string"},"reviewStatistic":{"type":"string"},"contractSignedAt":{"type":"string"},"emailForInvoices":{"type":"array"},"contractExpiredAt":{"type":"string"},"sendInvoiceRequestEveryDay":{"type":"boolean"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"team-activities","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"team":{"type":"string"},"action":{"type":"string"},"options":{"type":"string"},"targetId":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"team-bonus","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"team":{"type":"string"},"user":{"type":"string"},"status":{"type":"string"},"percent":{"type":"number"},"targetId":{"type":"string"},"teamName":{"type":"string"},"createdAt":{"type":"string"},"teamLevel":{"type":"number"},"updatedAt":{"type":"string"},"commission":{"type":"number"},"teamMember":{"type":"string"},"teamPromotion":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"team-members","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"role":{"type":"string"},"team":{"type":"string"},"user":{"type":"string"},"isLeft":{"type":"boolean"},"leftAt":{"type":"string"},"isNewbie":{"type":"boolean"},"joinedAt":{"type":"string"},"roleCode":{"type":"number"},"createdAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"isHomegrown":{"type":"boolean"},"isRemovedBy":{"type":"string"},"searchString":{"type":"string"},"statisticMonth":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"teams","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"desc":{"type":"string"},"logo":{"type":"string"},"name":{"type":"string"},"temp":{"type":"string"},"level":{"type":"string"},"active":{"type":"boolean"},"isFull":{"type":"boolean"},"cityCode":{"type":"number"},"adminUser":{"type":"string"},"createdAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"inviteLink":{"type":"string"},"information":{"type":"string"},"searchString":{"type":"string"},"inactiveReason":{"type":"string"},"changingNameCount":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"user-courses","json_schema":{"type":"object","properties":{}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"user-identifications","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"dob":{"type":"string"},"name":{"type":"string"},"note":{"type":"string"},"type":{"type":"string"},"user":{"type":"string"},"gender":{"type":"string"},"nation":{"type":"string"},"number":{"type":"string"},"status":{"type":"string"},"address":{"type":"string"},"backSide":{"type":"string"},"birthday":{"type":"string"},"createdAt":{"type":"string"},"frontSide":{"type":"string"},"issueDate":{"type":"string"},"updatedAt":{"type":"string"},"expiryDate":{"type":"string"},"issuePlace":{"type":"string"},"timeUpdate":{"type":"number"},"detectInformation":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"users","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"info":{"type":"string"},"name":{"type":"string"},"team":{"type":"string"},"zalo":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"avatar":{"type":"string"},"banned":{"type":"boolean"},"segment":{"type":"string"},"facebook":{"type":"string"},"hasOrder":{"type":"boolean"},"referral":{"type":"string"},"segments":{"type":"array"},"createdAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"membership":{"type":"string"},"registerFrom":{"type":"string"},"searchString":{"type":"string"},"isUpdatedInfo":{"type":"boolean"},"identification":{"type":"string"},"lastActivatedAt":{"type":"string"},"lastViewNotificationAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"voucher-bonus","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"order":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"commission":{"type":"number"},"isRejected":{"type":"boolean"},"userVoucher":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"vouchers","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"desc":{"type":"string"},"logo":{"type":"string"},"type":{"type":"string"},"endAt":{"type":"string"},"title":{"type":"string"},"active":{"type":"boolean"},"covers":{"type":"array"},"options":{"type":"string"},"startAt":{"type":"string"},"applyFor":{"type":"string"},"articleID":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"searchString":{"type":"string"},"isApplyForOrderWholesale":{"type":"boolean"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"wards","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"city":{"type":"string"},"code":{"type":"number"},"name":{"type":"string"},"slug":{"type":"string"},"tncId":{"type":"number"},"cityId":{"type":"number"},"source":{"type":"string"},"tncCode":{"type":"string"},"district":{"type":"string"},"gidoCode":{"type":"number"},"osirisId":{"type":"number"},"updatedAt":{"type":"string"},"districtId":{"type":"number"},"provinceId":{"type":"number"},"searchString":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]}]} \ No newline at end of file +{"streams":[{"stream":{"name":"admin-tags","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"color":{"type":"string"},"active":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"searchString":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"brands","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"desc":{"type":"string"},"logo":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"active":{"type":"boolean"},"photos":{"type":"array"},"country":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"searchString":{"type":"string"},"totalProduct":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"cash-flows","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"hash":{"type":"string"},"user":{"type":"string"},"value":{"type":"number"},"action":{"type":"string"},"options":{"type":"string"},"category":{"type":"string"},"targetId":{"type":"string"},"createdAt":{"type":"string"},"isAudited":{"type":"boolean"},"updatedAt":{"type":"string"},"newBalance":{"type":"number"},"oldBalance":{"type":"number"},"targetType":{"type":"string"},"isProcessed":{"type":"boolean"},"processStatus":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"cities","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"number"},"name":{"type":"string"},"slug":{"type":"string"},"order":{"type":"number"},"tncId":{"type":"number"},"region":{"type":"string"},"source":{"type":"string"},"tempId":{"type":"number"},"tncCode":{"type":"string"},"osirisId":{"type":"number"},"updatedAt":{"type":"string"},"searchString":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"customers","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"info":{"type":"string"},"name":{"type":"string"},"user":{"type":"string"},"phone":{"type":"string"},"source":{"type":"string"},"location":{"type":"array"},"createdAt":{"type":"string"},"isDeleted":{"type":"boolean"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"searchString":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"districts","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"city":{"type":"string"},"code":{"type":"number"},"name":{"type":"string"},"slug":{"type":"string"},"tncId":{"type":"number"},"cityId":{"type":"number"},"source":{"type":"string"},"tncCode":{"type":"string"},"gidoCode":{"type":"number"},"osirisId":{"type":"number"},"updatedAt":{"type":"string"},"searchString":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"event-rewards","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"cash":{"type":"number"},"type":{"type":"string"},"user":{"type":"string"},"event":{"type":"string"},"status":{"type":"string"},"options":{"type":"string"},"createdAt":{"type":"string"},"updatedat":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"events","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"desc":{"type":"string"},"icon":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"cover":{"type":"string"},"endAt":{"type":"string"},"active":{"type":"boolean"},"notice":{"type":"string"},"article":{"type":"string"},"options":{"type":"string"},"startAt":{"type":"string"},"segments":{"type":"string"},"createdAt":{"type":"string"},"suppliers":{"type":"array"},"updatedAt":{"type":"string"},"information":{"type":"array"},"displayEndAt":{"type":"string"},"isApplyForAll":{"type":"boolean"},"displayStartAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"give-gifts","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"content":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"searchString":{"type":"string"},"lastChangeUsersAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"inventories","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"number"},"name":{"type":"string"},"slug":{"type":"string"},"active":{"type":"boolean"},"contact":{"type":"string"},"partner":{"type":"string"},"checksum":{"type":"string"},"location":{"type":"string"},"supplier":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"minimumValue":{"type":"number"},"searchString":{"type":"string"},"paymentMethods":{"type":"string"},"canIssueInvoice":{"type":"boolean"},"deliveryMethods":{"type":"array"},"canAutoSendEmail":{"type":"boolean"},"invoiceDeliveryMethod":{"type":"string"},"doesSupportSellyExpress":{"type":"boolean"},"priorityDeliveryServiceCodes":{"type":"array"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"membership","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"guide":{"type":"string"},"level":{"type":"number"},"sales":{"type":"number"},"active":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"transaction":{"type":"number"},"bonusPercent":{"type":"number"},"transactionMinValue":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"membership-histories","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"new":{"type":"string"},"old":{"type":"string"},"type":{"type":"string"},"user":{"type":"string"},"createdAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"membership-orders","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"status":{"type":"string"},"percent":{"type":"number"},"targetID":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"commission":{"type":"number"},"isRejected":{"type":"boolean"},"membershipName":{"type":"string"},"membershipLevel":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"order-deliveries","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"order":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"weight":{"type":"string"},"service":{"type":"string"},"customer":{"type":"string"},"delivery":{"type":"string"},"location":{"type":"string"},"createdAt":{"type":"string"},"promotion":{"type":"string"},"updatedAt":{"type":"string"},"trackingCode":{"type":"string"},"trackingTime":{"type":"string"},"isAdminChange":{"type":"boolean"},"trackingOrderCode":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"order-histories","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"order":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"timeStamp":{"type":"number"},"updatedAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"order-items","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"sku":{"type":"string"},"date":{"type":"string"},"user":{"type":"string"},"order":{"type":"string"},"price":{"type":"string"},"status":{"type":"string"},"product":{"type":"string"},"customer":{"type":"string"},"quantity":{"type":"number"},"createdAt":{"type":"string"},"totalSell":{"type":"number"},"updatedAt":{"type":"string"},"cashbackAt":{"type":"string"},"totalPrice":{"type":"number"},"deliveredAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"orders","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"date":{"type":"string"},"hour":{"type":"number"},"note":{"type":"string"},"skus":{"type":"array"},"tags":{"type":"array"},"user":{"type":"string"},"price":{"type":"string"},"banned":{"type":"boolean"},"reason":{"type":"string"},"source":{"type":"string"},"status":{"type":"string"},"update":{"type":"string"},"payment":{"type":"string"},"remarks":{"type":"string"},"customer":{"type":"string"},"delivery":{"type":"string"},"pickupAt":{"type":"string"},"products":{"type":"array"},"supplier":{"type":"string"},"approveAt":{"type":"string"},"createdAt":{"type":"string"},"inventory":{"type":"string"},"isDeleted":{"type":"boolean"},"promotion":{"type":"string"},"requestId":{"type":"string"},"sendEmail":{"type":"string"},"totalItem":{"type":"number"},"updatedAt":{"type":"string"},"userAgent":{"type":"string"},"wholesale":{"type":"boolean"},"approvedAt":{"type":"string"},"cashbackAt":{"type":"string"},"codeOsiris":{"type":"string"},"isPreorder":{"type":"boolean"},"membership":{"type":"string"},"rejectedAt":{"type":"string"},"deliveredAt":{"type":"string"},"deliveringAt":{"type":"string"},"deliveryCode":{"type":"string"},"searchString":{"type":"string"},"staffApprove":{"type":"string"},"trackingCode":{"type":"string"},"processStatus":{"type":"string"},"hookTimeLastAt":{"type":"string"},"trackingCodeURL":{"type":"string"},"approvePaymentAt":{"type":"string"},"isChangeDelivery":{"type":"boolean"},"trackingOrderCode":{"type":"string"},"estimateCashbackAt":{"type":"string"},"isWaitingCancelled":{"type":"boolean"},"fromNewActiveSeller":{"type":"boolean"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"product-categories","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"icon":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"},"active":{"type":"boolean"},"covers":{"type":"array"},"featured":{"type":"boolean"},"createdAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"totalProduct":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"product-sku","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"sku":{"type":"string"},"info":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"brand":{"type":"string"},"cover":{"type":"string"},"price":{"type":"string"},"active":{"type":"boolean"},"author":{"type":"string"},"manual":{"type":"boolean"},"source":{"type":"string"},"display":{"type":"boolean"},"picture":{"type":"string"},"product":{"type":"string"},"version":{"type":"number"},"groupSku":{"type":"string"},"unitCode":{"type":"string"},"createdAt":{"type":"string"},"restockAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"oldProduct":{"type":"string"},"properties":{"type":"array"},"canPreorder":{"type":"boolean"},"supplierSku":{"type":"string"},"isOutOfStock":{"type":"boolean"},"pricePercent":{"type":"string"},"searchString":{"type":"string"},"updateReason":{"type":"string"},"updateActiveId":{"type":"string"},"displayInventory":{"type":"boolean"},"showRemainingQuantity":{"type":"boolean"},"quantity_aibyte_transform":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"product-sku-versions","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"sku":{"type":"string"},"info":{"type":"string"},"name":{"type":"string"},"price":{"type":"string"},"source":{"type":"string"},"codeSku":{"type":"string"},"picture":{"type":"string"},"product":{"type":"string"},"version":{"type":"number"},"createdAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"properties":{"type":"array"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"product-sub-categories","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"order":{"type":"number"},"active":{"type":"boolean"},"parent":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"searchString":{"type":"string"},"totalProduct":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"products","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"desc":{"type":"string"},"info":{"type":"string"},"name":{"type":"string"},"temp":{"type":"string"},"brand":{"type":"string"},"order":{"type":"string"},"price":{"type":"string"},"score":{"type":"string"},"active":{"type":"boolean"},"author":{"type":"string"},"guides":{"type":"array"},"photos":{"type":"array"},"videos":{"type":"array"},"quantity":{"type":"number"},"createdAt":{"type":"string"},"documents":{"type":"array"},"shareDesc":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"categories":{"type":"array"},"inactiveAt":{"type":"string"},"properties":{"type":"array"},"reActiveAt":{"type":"string"},"inventories":{"type":"array"},"displaySKUId":{"type":"string"},"isOutOfStock":{"type":"boolean"},"pricePercent":{"type":"string"},"searchString":{"type":"string"},"subCategories":{"type":"array"},"inactiveReason":{"type":"string"},"propertiesMain":{"type":"string"},"shareStatistic":{"type":"string"},"updateActiveId":{"type":"string"},"canIssueInvoice":{"type":"boolean"},"pendingInactive":{"type":"boolean"},"reviewStatistic":{"type":"string"},"highlightProperties":{"type":"array"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"promotion-orders","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"type":{"type":"string"},"user":{"type":"string"},"order":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"options":{"type":"string"},"supplier":{"type":"string"},"createdAt":{"type":"string"},"promotion":{"type":"string"},"updatedAt":{"type":"string"},"cashbackAt":{"type":"string"},"commission":{"type":"number"},"isRejected":{"type":"boolean"},"orderPriceTotal":{"type":"number"},"quantityPromotion":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"promotions","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"desc":{"type":"string"},"logo":{"type":"string"},"rest":{"type":"number"},"type":{"type":"string"},"endAt":{"type":"string"},"title":{"type":"string"},"active":{"type":"boolean"},"covers":{"type":"array"},"options":{"type":"string"},"startAt":{"type":"string"},"applyFor":{"type":"string"},"quantity":{"type":"number"},"articleID":{"type":"string"},"createdAt":{"type":"string"},"isDisplay":{"type":"boolean"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"searchString":{"type":"string"},"conditionForUser":{"type":"string"},"supplierCommission":{"type":"string"},"isUnlimitedQuantity":{"type":"boolean"},"maximumLimitPerUser":{"type":"number"},"milestonesStatistic":{"type":"array"},"isApplyForOrderWholesale":{"type":"boolean"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"referrals","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"invitee":{"type":"string"},"createdAt":{"type":"string"},"fromSystem":{"type":"boolean"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"session-deliveries","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"cart":{"type":"string"},"note":{"type":"string"},"title":{"type":"string"},"request":{"type":"string"},"service":{"type":"string"},"currency":{"type":"string"},"customer":{"type":"string"},"delivery":{"type":"string"},"location":{"type":"string"},"createdAt":{"type":"string"},"promotion":{"type":"string"},"sessionOrder":{"type":"string"},"paymentMethod":{"type":"string"},"estimateTimeDelivery":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"social-post-views","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"clientIP":{"type":"string"},"lastViewAt":{"type":"string"},"socialPost":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"social-posts","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"tags":{"type":"array"},"isPin":{"type":"boolean"},"order":{"type":"number"},"title":{"type":"string"},"author":{"type":"string"},"cities":{"type":"array"},"photos":{"type":"array"},"reason":{"type":"string"},"status":{"type":"string"},"videos":{"type":"array"},"content":{"type":"string"},"isTimer":{"type":"boolean"},"startAt":{"type":"string"},"products":{"type":"array"},"createdAt":{"type":"string"},"hasUpdate":{"type":"boolean"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"categories":{"type":"array"},"fromSystem":{"type":"boolean"},"contributor":{"type":"string"},"publishedAt":{"type":"string"},"searchString":{"type":"string"},"updatedCount":{"type":"number"},"shareStatistic":{"type":"string"},"enableNotificationForContributor":{"type":"boolean"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"suppliers","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"tax":{"type":"string"},"bank":{"type":"string"},"logo":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean"},"balance":{"type":"string"},"checkSum":{"type":"string"},"checksum":{"type":"string"},"location":{"type":"string"},"contracts":{"type":"array"},"createdAt":{"type":"string"},"documents":{"type":"array"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"categories":{"type":"array"},"inventories":{"type":"array"},"identifyCode":{"type":"number"},"searchString":{"type":"string"},"reconcileDays":{"type":"array"},"contractNumber":{"type":"string"},"reviewStatistic":{"type":"string"},"contractSignedAt":{"type":"string"},"emailForInvoices":{"type":"array"},"contractExpiredAt":{"type":"string"},"sendInvoiceRequestEveryDay":{"type":"boolean"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"team-activities","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"team":{"type":"string"},"action":{"type":"string"},"options":{"type":"string"},"targetId":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"team-bonus","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"team":{"type":"string"},"user":{"type":"string"},"status":{"type":"string"},"percent":{"type":"number"},"targetId":{"type":"string"},"teamName":{"type":"string"},"createdAt":{"type":"string"},"teamLevel":{"type":"number"},"updatedAt":{"type":"string"},"commission":{"type":"number"},"teamMember":{"type":"string"},"teamPromotion":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"team-histories","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"date":{"type":"string"},"team":{"type":"string"},"level":{"type":"string"},"leader":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"statistic":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"team-members","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"role":{"type":"string"},"team":{"type":"string"},"user":{"type":"string"},"isLeft":{"type":"boolean"},"leftAt":{"type":"string"},"isNewbie":{"type":"boolean"},"joinedAt":{"type":"string"},"roleCode":{"type":"number"},"createdAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"isHomegrown":{"type":"boolean"},"isRemovedBy":{"type":"string"},"searchString":{"type":"string"},"statisticMonth":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"teams","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"desc":{"type":"string"},"logo":{"type":"string"},"name":{"type":"string"},"temp":{"type":"string"},"level":{"type":"string"},"active":{"type":"boolean"},"isFull":{"type":"boolean"},"cityCode":{"type":"number"},"adminUser":{"type":"string"},"createdAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"inviteLink":{"type":"string"},"information":{"type":"string"},"searchString":{"type":"string"},"inactiveReason":{"type":"string"},"changingNameCount":{"type":"number"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"user-courses","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"course":{"type":"string"},"hoolaId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"academyAccount":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"user-give-gift","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"gift":{"type":"string"},"user":{"type":"string"},"title":{"type":"string"},"giveGift":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"isCompleted":{"type":"boolean"},"notificationContent":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"user-identifications","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"dob":{"type":"string"},"name":{"type":"string"},"note":{"type":"string"},"type":{"type":"string"},"user":{"type":"string"},"gender":{"type":"string"},"nation":{"type":"string"},"number":{"type":"string"},"status":{"type":"string"},"address":{"type":"string"},"backSide":{"type":"string"},"birthday":{"type":"string"},"createdAt":{"type":"string"},"frontSide":{"type":"string"},"issueDate":{"type":"string"},"updatedAt":{"type":"string"},"expiryDate":{"type":"string"},"issuePlace":{"type":"string"},"timeUpdate":{"type":"number"},"detectInformation":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"users","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"info":{"type":"string"},"name":{"type":"string"},"team":{"type":"string"},"zalo":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"avatar":{"type":"string"},"banned":{"type":"boolean"},"segment":{"type":"string"},"facebook":{"type":"string"},"hasOrder":{"type":"boolean"},"referral":{"type":"string"},"segments":{"type":"array"},"createdAt":{"type":"string"},"statistic":{"type":"string"},"updatedAt":{"type":"string"},"membership":{"type":"string"},"registerFrom":{"type":"string"},"searchString":{"type":"string"},"isUpdatedInfo":{"type":"boolean"},"identification":{"type":"string"},"lastActivatedAt":{"type":"string"},"lastViewNotificationAt":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"voucher-bonus","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"order":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"commission":{"type":"number"},"isRejected":{"type":"boolean"},"userVoucher":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"vouchers","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"code":{"type":"string"},"desc":{"type":"string"},"logo":{"type":"string"},"type":{"type":"string"},"endAt":{"type":"string"},"title":{"type":"string"},"active":{"type":"boolean"},"covers":{"type":"array"},"options":{"type":"string"},"startAt":{"type":"string"},"applyFor":{"type":"string"},"articleID":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"searchString":{"type":"string"},"isApplyForOrderWholesale":{"type":"boolean"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]},{"stream":{"name":"wards","json_schema":{"type":"object","properties":{"_id":{"type":"string"},"city":{"type":"string"},"code":{"type":"number"},"name":{"type":"string"},"slug":{"type":"string"},"tncId":{"type":"number"},"cityId":{"type":"number"},"source":{"type":"string"},"tncCode":{"type":"string"},"district":{"type":"string"},"gidoCode":{"type":"number"},"osirisId":{"type":"number"},"updatedAt":{"type":"string"},"districtId":{"type":"number"},"provinceId":{"type":"number"},"searchString":{"type":"string"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]}]} \ No newline at end of file diff --git a/models/generated/airbyte_ctes/unibag/give_gifts_ab1.sql b/models/generated/airbyte_ctes/unibag/give_gifts_ab1.sql new file mode 100644 index 0000000..365cb02 --- /dev/null +++ b/models/generated/airbyte_ctes/unibag/give_gifts_ab1.sql @@ -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 + diff --git a/models/generated/airbyte_ctes/unibag/give_gifts_ab2.sql b/models/generated/airbyte_ctes/unibag/give_gifts_ab2.sql new file mode 100644 index 0000000..8ab2510 --- /dev/null +++ b/models/generated/airbyte_ctes/unibag/give_gifts_ab2.sql @@ -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 + diff --git a/models/generated/airbyte_ctes/unibag/give_gifts_ab3.sql b/models/generated/airbyte_ctes/unibag/give_gifts_ab3.sql new file mode 100644 index 0000000..191a650 --- /dev/null +++ b/models/generated/airbyte_ctes/unibag/give_gifts_ab3.sql @@ -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 + diff --git a/models/generated/airbyte_ctes/unibag/team_histories_ab1.sql b/models/generated/airbyte_ctes/unibag/team_histories_ab1.sql new file mode 100644 index 0000000..dda4586 --- /dev/null +++ b/models/generated/airbyte_ctes/unibag/team_histories_ab1.sql @@ -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 + diff --git a/models/generated/airbyte_ctes/unibag/team_histories_ab2.sql b/models/generated/airbyte_ctes/unibag/team_histories_ab2.sql new file mode 100644 index 0000000..94acc93 --- /dev/null +++ b/models/generated/airbyte_ctes/unibag/team_histories_ab2.sql @@ -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 + diff --git a/models/generated/airbyte_ctes/unibag/team_histories_ab3.sql b/models/generated/airbyte_ctes/unibag/team_histories_ab3.sql new file mode 100644 index 0000000..b3c14ec --- /dev/null +++ b/models/generated/airbyte_ctes/unibag/team_histories_ab3.sql @@ -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 + diff --git a/models/generated/airbyte_ctes/unibag/user_courses_ab1.sql b/models/generated/airbyte_ctes/unibag/user_courses_ab1.sql new file mode 100644 index 0000000..56b2bb7 --- /dev/null +++ b/models/generated/airbyte_ctes/unibag/user_courses_ab1.sql @@ -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 + diff --git a/models/generated/airbyte_ctes/unibag/user_courses_ab2.sql b/models/generated/airbyte_ctes/unibag/user_courses_ab2.sql new file mode 100644 index 0000000..e522e56 --- /dev/null +++ b/models/generated/airbyte_ctes/unibag/user_courses_ab2.sql @@ -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 + diff --git a/models/generated/airbyte_ctes/unibag/user_courses_ab3.sql b/models/generated/airbyte_ctes/unibag/user_courses_ab3.sql new file mode 100644 index 0000000..1472234 --- /dev/null +++ b/models/generated/airbyte_ctes/unibag/user_courses_ab3.sql @@ -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 + diff --git a/models/generated/airbyte_ctes/unibag/user_give_gift_ab1.sql b/models/generated/airbyte_ctes/unibag/user_give_gift_ab1.sql new file mode 100644 index 0000000..bb0b648 --- /dev/null +++ b/models/generated/airbyte_ctes/unibag/user_give_gift_ab1.sql @@ -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 + diff --git a/models/generated/airbyte_ctes/unibag/user_give_gift_ab2.sql b/models/generated/airbyte_ctes/unibag/user_give_gift_ab2.sql new file mode 100644 index 0000000..b6bc30d --- /dev/null +++ b/models/generated/airbyte_ctes/unibag/user_give_gift_ab2.sql @@ -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 + diff --git a/models/generated/airbyte_ctes/unibag/user_give_gift_ab3.sql b/models/generated/airbyte_ctes/unibag/user_give_gift_ab3.sql new file mode 100644 index 0000000..9374c1b --- /dev/null +++ b/models/generated/airbyte_ctes/unibag/user_give_gift_ab3.sql @@ -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 + diff --git a/models/generated/airbyte_tables/unibag/give_gifts.sql b/models/generated/airbyte_tables/unibag/give_gifts.sql new file mode 100644 index 0000000..a2bf681 --- /dev/null +++ b/models/generated/airbyte_tables/unibag/give_gifts.sql @@ -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 + diff --git a/models/generated/airbyte_tables/unibag/team_histories.sql b/models/generated/airbyte_tables/unibag/team_histories.sql new file mode 100644 index 0000000..dfe5b1a --- /dev/null +++ b/models/generated/airbyte_tables/unibag/team_histories.sql @@ -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 + diff --git a/models/generated/airbyte_tables/unibag/team_members.sql b/models/generated/airbyte_tables/unibag/team_members.sql index a0a6009..bbb5051 100644 --- a/models/generated/airbyte_tables/unibag/team_members.sql +++ b/models/generated/airbyte_tables/unibag/team_members.sql @@ -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, diff --git a/models/generated/airbyte_tables/unibag/user_courses.sql b/models/generated/airbyte_tables/unibag/user_courses.sql new file mode 100644 index 0000000..71abda5 --- /dev/null +++ b/models/generated/airbyte_tables/unibag/user_courses.sql @@ -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 + diff --git a/models/generated/airbyte_tables/unibag/user_give_gift.sql b/models/generated/airbyte_tables/unibag/user_give_gift.sql new file mode 100644 index 0000000..6e20ccc --- /dev/null +++ b/models/generated/airbyte_tables/unibag/user_give_gift.sql @@ -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 + diff --git a/models/generated/sources.yml b/models/generated/sources.yml index d0c0e79..9a16098 100644 --- a/models/generated/sources.yml +++ b/models/generated/sources.yml @@ -14,6 +14,7 @@ sources: - 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 @@ -36,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