update
This commit is contained in:
		
							parent
							
								
									e305bb2baa
								
							
						
					
					
						commit
						eef556e75c
					
				| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('cash_flows_options_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_cash_flows_hashid,
 | 
					 | 
				
			||||||
    orderid,
 | 
					 | 
				
			||||||
    ordercode,
 | 
					 | 
				
			||||||
    givegiftid,
 | 
					 | 
				
			||||||
    givegifttitle,
 | 
					 | 
				
			||||||
    usergivegiftid,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_options_hashid
 | 
					 | 
				
			||||||
from {{ ref('cash_flows_options_ab3') }}
 | 
					 | 
				
			||||||
-- options at cash-flows/options from {{ ref('cash_flows') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('customers_info_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_customers_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    email,
 | 
					 | 
				
			||||||
    address,
 | 
					 | 
				
			||||||
    companyname,
 | 
					 | 
				
			||||||
    taxidentificationnumber,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_info_hashid
 | 
					 | 
				
			||||||
from {{ ref('customers_info_ab3') }}
 | 
					 | 
				
			||||||
-- info at customers/info from {{ ref('customers') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('customers_statistic_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_customers_hashid,
 | 
					 | 
				
			||||||
    expensetotal,
 | 
					 | 
				
			||||||
    transactiontotal_aibyte_transform,
 | 
					 | 
				
			||||||
    transactionpending_aibyte_transform,
 | 
					 | 
				
			||||||
    transactionsuccess_aibyte_transform,
 | 
					 | 
				
			||||||
    transactionrejected_aibyte_transform,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_statistic_hashid
 | 
					 | 
				
			||||||
from {{ ref('customers_statistic_ab3') }}
 | 
					 | 
				
			||||||
-- statistic at customers/statistic from {{ ref('customers') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,23 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('event_rewards_options_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_event_rewards_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('order') }},
 | 
					 | 
				
			||||||
    invitee,
 | 
					 | 
				
			||||||
    {{ adapter.quote('percent') }},
 | 
					 | 
				
			||||||
    referral,
 | 
					 | 
				
			||||||
    minordervalue,
 | 
					 | 
				
			||||||
    minordertoclaim,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_options_hashid
 | 
					 | 
				
			||||||
from {{ ref('event_rewards_options_ab3') }}
 | 
					 | 
				
			||||||
-- options at event-rewards/options from {{ ref('event_rewards') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('events_cover_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_events_hashid,
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    dimensions,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_cover_hashid
 | 
					 | 
				
			||||||
from {{ ref('events_cover_ab3') }}
 | 
					 | 
				
			||||||
-- cover at events/cover from {{ ref('events') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,19 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('events_cover_dimensions_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_cover_hashid,
 | 
					 | 
				
			||||||
    md,
 | 
					 | 
				
			||||||
    sm,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_dimensions_hashid
 | 
					 | 
				
			||||||
from {{ ref('events_cover_dimensions_ab3') }}
 | 
					 | 
				
			||||||
-- dimensions at events/cover/dimensions from {{ ref('events_cover') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('events_cover_dimensions_md_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_dimensions_hashid,
 | 
					 | 
				
			||||||
    url,
 | 
					 | 
				
			||||||
    width,
 | 
					 | 
				
			||||||
    height,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_md_hashid
 | 
					 | 
				
			||||||
from {{ ref('events_cover_dimensions_md_ab3') }}
 | 
					 | 
				
			||||||
-- md at events/cover/dimensions/md from {{ ref('events_cover_dimensions') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('events_cover_dimensions_sm_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_dimensions_hashid,
 | 
					 | 
				
			||||||
    url,
 | 
					 | 
				
			||||||
    width,
 | 
					 | 
				
			||||||
    height,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_sm_hashid
 | 
					 | 
				
			||||||
from {{ ref('events_cover_dimensions_sm_ab3') }}
 | 
					 | 
				
			||||||
-- sm at events/cover/dimensions/sm from {{ ref('events_cover_dimensions') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('events_icon_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_events_hashid,
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    dimensions,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_icon_hashid
 | 
					 | 
				
			||||||
from {{ ref('events_icon_ab3') }}
 | 
					 | 
				
			||||||
-- icon at events/icon from {{ ref('events') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,19 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('events_icon_dimensions_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_icon_hashid,
 | 
					 | 
				
			||||||
    md,
 | 
					 | 
				
			||||||
    sm,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_dimensions_hashid
 | 
					 | 
				
			||||||
from {{ ref('events_icon_dimensions_ab3') }}
 | 
					 | 
				
			||||||
-- dimensions at events/icon/dimensions from {{ ref('events_icon') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('events_icon_dimensions_md_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_dimensions_hashid,
 | 
					 | 
				
			||||||
    url,
 | 
					 | 
				
			||||||
    width,
 | 
					 | 
				
			||||||
    height,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_md_hashid
 | 
					 | 
				
			||||||
from {{ ref('events_icon_dimensions_md_ab3') }}
 | 
					 | 
				
			||||||
-- md at events/icon/dimensions/md from {{ ref('events_icon_dimensions') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('events_icon_dimensions_sm_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_dimensions_hashid,
 | 
					 | 
				
			||||||
    url,
 | 
					 | 
				
			||||||
    width,
 | 
					 | 
				
			||||||
    height,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_sm_hashid
 | 
					 | 
				
			||||||
from {{ ref('events_icon_dimensions_sm_ab3') }}
 | 
					 | 
				
			||||||
-- sm at events/icon/dimensions/sm from {{ ref('events_icon_dimensions') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,19 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('events_notice_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_events_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('label') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('value') }},
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_notice_hashid
 | 
					 | 
				
			||||||
from {{ ref('events_notice_ab3') }}
 | 
					 | 
				
			||||||
-- notice at events/notice from {{ ref('events') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,23 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('events_options_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_events_hashid,
 | 
					 | 
				
			||||||
    cash,
 | 
					 | 
				
			||||||
    {{ adapter.quote('percent') }},
 | 
					 | 
				
			||||||
    validindays,
 | 
					 | 
				
			||||||
    minordervalue,
 | 
					 | 
				
			||||||
    minordertoclaim,
 | 
					 | 
				
			||||||
    usercreatedbeforedate,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_options_hashid
 | 
					 | 
				
			||||||
from {{ ref('events_options_ab3') }}
 | 
					 | 
				
			||||||
-- options at events/options from {{ ref('events') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('events_segments_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_events_hashid,
 | 
					 | 
				
			||||||
    segments,
 | 
					 | 
				
			||||||
    usersegment,
 | 
					 | 
				
			||||||
    lastmonthsales,
 | 
					 | 
				
			||||||
    highestmonthlysales,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_segments_hashid
 | 
					 | 
				
			||||||
from {{ ref('events_segments_ab3') }}
 | 
					 | 
				
			||||||
-- segments at events/segments from {{ ref('events') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('events_segments_highestmonthlysales_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_segments_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('to') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('from') }},
 | 
					 | 
				
			||||||
    active,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_highestmonthlysales_hashid
 | 
					 | 
				
			||||||
from {{ ref('events_segments_highestmonthlysales_ab3') }}
 | 
					 | 
				
			||||||
-- highestmonthlysales at events/segments/highestMonthlySales from {{ ref('events_segments') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('events_segments_lastmonthsales_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_segments_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('to') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('from') }},
 | 
					 | 
				
			||||||
    active,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_lastmonthsales_hashid
 | 
					 | 
				
			||||||
from {{ ref('events_segments_lastmonthsales_ab3') }}
 | 
					 | 
				
			||||||
-- lastmonthsales at events/segments/lastMonthSales from {{ ref('events_segments') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('inventories_contact_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_inventories_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    email,
 | 
					 | 
				
			||||||
    phone,
 | 
					 | 
				
			||||||
    address,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_contact_hashid
 | 
					 | 
				
			||||||
from {{ ref('inventories_contact_ab3') }}
 | 
					 | 
				
			||||||
-- contact at inventories/contact from {{ ref('inventories') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('inventories_location_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_inventories_hashid,
 | 
					 | 
				
			||||||
    ward,
 | 
					 | 
				
			||||||
    address,
 | 
					 | 
				
			||||||
    district,
 | 
					 | 
				
			||||||
    {{ adapter.quote('location') }},
 | 
					 | 
				
			||||||
    province,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_location_hashid
 | 
					 | 
				
			||||||
from {{ ref('inventories_location_ab3') }}
 | 
					 | 
				
			||||||
-- location at inventories/location from {{ ref('inventories') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,19 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('inventories_location_location_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_location_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('type') }},
 | 
					 | 
				
			||||||
    coordinates,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_location_3_hashid
 | 
					 | 
				
			||||||
from {{ ref('inventories_location_location_ab3') }}
 | 
					 | 
				
			||||||
-- location at inventories/location/location from {{ ref('inventories_location') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,19 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('inventories_partner_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_inventories_hashid,
 | 
					 | 
				
			||||||
    code,
 | 
					 | 
				
			||||||
    identitycode,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_partner_hashid
 | 
					 | 
				
			||||||
from {{ ref('inventories_partner_ab3') }}
 | 
					 | 
				
			||||||
-- partner at inventories/partner from {{ ref('inventories') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,19 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('inventories_paymentmethods_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_inventories_hashid,
 | 
					 | 
				
			||||||
    cod,
 | 
					 | 
				
			||||||
    banktransfer,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_paymentmethods_hashid
 | 
					 | 
				
			||||||
from {{ ref('inventories_paymentmethods_ab3') }}
 | 
					 | 
				
			||||||
-- paymentmethods at inventories/paymentMethods from {{ ref('inventories') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('inventories_supplier_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_inventories_hashid,
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    searchstring,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_supplier_hashid
 | 
					 | 
				
			||||||
from {{ ref('inventories_supplier_ab3') }}
 | 
					 | 
				
			||||||
-- supplier at inventories/supplier from {{ ref('inventories') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,24 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('membership_histories_new_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_membership_histories_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('level') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('condition') }},
 | 
					 | 
				
			||||||
    statistic,
 | 
					 | 
				
			||||||
    {{ adapter.quote('transaction') }},
 | 
					 | 
				
			||||||
    bonuspercent,
 | 
					 | 
				
			||||||
    transactionminvalue,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_new_hashid
 | 
					 | 
				
			||||||
from {{ ref('membership_histories_new_ab3') }}
 | 
					 | 
				
			||||||
-- new at membership-histories/new from {{ ref('membership_histories') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('membership_histories_new_condition_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_new_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    sales,
 | 
					 | 
				
			||||||
    {{ adapter.quote('transaction') }},
 | 
					 | 
				
			||||||
    bonuspercent,
 | 
					 | 
				
			||||||
    transactionminvalue,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_condition_hashid
 | 
					 | 
				
			||||||
from {{ ref('membership_histories_new_condition_ab3') }}
 | 
					 | 
				
			||||||
-- condition at membership-histories/new/condition from {{ ref('membership_histories_new') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,24 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('membership_histories_old_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_membership_histories_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('level') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('condition') }},
 | 
					 | 
				
			||||||
    statistic,
 | 
					 | 
				
			||||||
    {{ adapter.quote('transaction') }},
 | 
					 | 
				
			||||||
    bonuspercent,
 | 
					 | 
				
			||||||
    transactionminvalue,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_old_hashid
 | 
					 | 
				
			||||||
from {{ ref('membership_histories_old_ab3') }}
 | 
					 | 
				
			||||||
-- old at membership-histories/old from {{ ref('membership_histories') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('membership_histories_old_condition_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_old_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    sales,
 | 
					 | 
				
			||||||
    {{ adapter.quote('transaction') }},
 | 
					 | 
				
			||||||
    bonuspercent,
 | 
					 | 
				
			||||||
    transactionminvalue,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_condition_hashid
 | 
					 | 
				
			||||||
from {{ ref('membership_histories_old_condition_ab3') }}
 | 
					 | 
				
			||||||
-- condition at membership-histories/old/condition from {{ ref('membership_histories_old') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,19 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('membership_histories_old_statistic_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_old_hashid,
 | 
					 | 
				
			||||||
    sales,
 | 
					 | 
				
			||||||
    {{ adapter.quote('transaction') }},
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_statistic_hashid
 | 
					 | 
				
			||||||
from {{ ref('membership_histories_old_statistic_ab3') }}
 | 
					 | 
				
			||||||
-- statistic at membership-histories/old/statistic from {{ ref('membership_histories_old') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('order_deliveries_customer_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_order_deliveries_hashid,
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    phone,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_customer_hashid
 | 
					 | 
				
			||||||
from {{ ref('order_deliveries_customer_ab3') }}
 | 
					 | 
				
			||||||
-- customer at order-deliveries/customer from {{ ref('order_deliveries') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,30 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('order_deliveries_delivery_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_order_deliveries_hashid,
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    fee,
 | 
					 | 
				
			||||||
    {{ adapter.quote('desc') }},
 | 
					 | 
				
			||||||
    note,
 | 
					 | 
				
			||||||
    feeship,
 | 
					 | 
				
			||||||
    currency,
 | 
					 | 
				
			||||||
    couriername,
 | 
					 | 
				
			||||||
    servicecode,
 | 
					 | 
				
			||||||
    servicename,
 | 
					 | 
				
			||||||
    deliverycode,
 | 
					 | 
				
			||||||
    maxdeliverydays,
 | 
					 | 
				
			||||||
    mindeliverydays,
 | 
					 | 
				
			||||||
    estimatetimedelivery,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_delivery_hashid
 | 
					 | 
				
			||||||
from {{ ref('order_deliveries_delivery_ab3') }}
 | 
					 | 
				
			||||||
-- delivery at order-deliveries/delivery from {{ ref('order_deliveries') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('order_deliveries_delivery_feeship_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_delivery_hashid,
 | 
					 | 
				
			||||||
    cod,
 | 
					 | 
				
			||||||
    total,
 | 
					 | 
				
			||||||
    shipping,
 | 
					 | 
				
			||||||
    insurance,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_feeship_hashid
 | 
					 | 
				
			||||||
from {{ ref('order_deliveries_delivery_feeship_ab3') }}
 | 
					 | 
				
			||||||
-- feeship at order-deliveries/delivery/feeShip from {{ ref('order_deliveries_delivery') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,23 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('order_deliveries_location_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_order_deliveries_hashid,
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    ward,
 | 
					 | 
				
			||||||
    address,
 | 
					 | 
				
			||||||
    district,
 | 
					 | 
				
			||||||
    province,
 | 
					 | 
				
			||||||
    fulladdress,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_location_hashid
 | 
					 | 
				
			||||||
from {{ ref('order_deliveries_location_ab3') }}
 | 
					 | 
				
			||||||
-- location at order-deliveries/location from {{ ref('order_deliveries') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('order_deliveries_promotion_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_order_deliveries_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('type') }},
 | 
					 | 
				
			||||||
    discount,
 | 
					 | 
				
			||||||
    isapplied,
 | 
					 | 
				
			||||||
    minordervalue,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_promotion_hashid
 | 
					 | 
				
			||||||
from {{ ref('order_deliveries_promotion_ab3') }}
 | 
					 | 
				
			||||||
-- promotion at order-deliveries/promotion from {{ ref('order_deliveries') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('order_deliveries_trackingtime_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_order_deliveries_hashid,
 | 
					 | 
				
			||||||
    pickedat,
 | 
					 | 
				
			||||||
    completedat,
 | 
					 | 
				
			||||||
    deliveringat,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_trackingtime_hashid
 | 
					 | 
				
			||||||
from {{ ref('order_deliveries_trackingtime_ab3') }}
 | 
					 | 
				
			||||||
-- trackingtime at order-deliveries/trackingTime from {{ ref('order_deliveries') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('order_deliveries_weight_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_order_deliveries_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('real') }},
 | 
					 | 
				
			||||||
    sent,
 | 
					 | 
				
			||||||
    converted,
 | 
					 | 
				
			||||||
    multiplier,
 | 
					 | 
				
			||||||
    convertedwithmultiplier,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_weight_hashid
 | 
					 | 
				
			||||||
from {{ ref('order_deliveries_weight_ab3') }}
 | 
					 | 
				
			||||||
-- weight at order-deliveries/weight from {{ ref('order_deliveries') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,29 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('order_items_price_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_order_items_hashid,
 | 
					 | 
				
			||||||
    base,
 | 
					 | 
				
			||||||
    sell,
 | 
					 | 
				
			||||||
    market,
 | 
					 | 
				
			||||||
    profit,
 | 
					 | 
				
			||||||
    volume,
 | 
					 | 
				
			||||||
    weight,
 | 
					 | 
				
			||||||
    maximum,
 | 
					 | 
				
			||||||
    minimum,
 | 
					 | 
				
			||||||
    profituni,
 | 
					 | 
				
			||||||
    supplierprice,
 | 
					 | 
				
			||||||
    membershippercent,
 | 
					 | 
				
			||||||
    membershipcommission,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_price_hashid
 | 
					 | 
				
			||||||
from {{ ref('order_items_price_ab3') }}
 | 
					 | 
				
			||||||
-- price at order-items/price from {{ ref('order_items') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,25 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('order_items_sku_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_order_items_hashid,
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    sku,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('type') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('source') }},
 | 
					 | 
				
			||||||
    picture,
 | 
					 | 
				
			||||||
    {{ adapter.quote('version') }},
 | 
					 | 
				
			||||||
    properties,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_sku_hashid
 | 
					 | 
				
			||||||
from {{ ref('order_items_sku_ab3') }}
 | 
					 | 
				
			||||||
-- sku at order-items/sku from {{ ref('order_items') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,40 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('orders_delivery_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_orders_hashid,
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    fee,
 | 
					 | 
				
			||||||
    code,
 | 
					 | 
				
			||||||
    note,
 | 
					 | 
				
			||||||
    title,
 | 
					 | 
				
			||||||
    status,
 | 
					 | 
				
			||||||
    weight,
 | 
					 | 
				
			||||||
    feeship,
 | 
					 | 
				
			||||||
    currency,
 | 
					 | 
				
			||||||
    freeship,
 | 
					 | 
				
			||||||
    {{ adapter.quote('location') }},
 | 
					 | 
				
			||||||
    sourceid,
 | 
					 | 
				
			||||||
    couriername,
 | 
					 | 
				
			||||||
    servicecode,
 | 
					 | 
				
			||||||
    servicename,
 | 
					 | 
				
			||||||
    customername,
 | 
					 | 
				
			||||||
    customerphone,
 | 
					 | 
				
			||||||
    discountvalue,
 | 
					 | 
				
			||||||
    servicedelivery,
 | 
					 | 
				
			||||||
    estimatedeliveryat,
 | 
					 | 
				
			||||||
    estimatetimedelivery,
 | 
					 | 
				
			||||||
    maxdeliveryday_aibyte_transform,
 | 
					 | 
				
			||||||
    mindeliveryday_aibyte_transform,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_delivery_hashid
 | 
					 | 
				
			||||||
from {{ ref('orders_delivery_ab3') }}
 | 
					 | 
				
			||||||
-- delivery at orders/delivery from {{ ref('orders') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('orders_delivery_feeship_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_delivery_hashid,
 | 
					 | 
				
			||||||
    cod,
 | 
					 | 
				
			||||||
    total,
 | 
					 | 
				
			||||||
    shipping,
 | 
					 | 
				
			||||||
    insurance,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_feeship_hashid
 | 
					 | 
				
			||||||
from {{ ref('orders_delivery_feeship_ab3') }}
 | 
					 | 
				
			||||||
-- feeship at orders/delivery/feeShip from {{ ref('orders_delivery') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,23 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('orders_delivery_location_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_delivery_hashid,
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    ward,
 | 
					 | 
				
			||||||
    address,
 | 
					 | 
				
			||||||
    district,
 | 
					 | 
				
			||||||
    province,
 | 
					 | 
				
			||||||
    fulladdress,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_location_hashid
 | 
					 | 
				
			||||||
from {{ ref('orders_delivery_location_ab3') }}
 | 
					 | 
				
			||||||
-- location at orders/delivery/location from {{ ref('orders_delivery') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('orders_delivery_weight_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_delivery_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('real') }},
 | 
					 | 
				
			||||||
    sent,
 | 
					 | 
				
			||||||
    converted,
 | 
					 | 
				
			||||||
    multiplier,
 | 
					 | 
				
			||||||
    convertedwithmultiplier,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_weight_hashid
 | 
					 | 
				
			||||||
from {{ ref('orders_delivery_weight_ab3') }}
 | 
					 | 
				
			||||||
-- weight at orders/delivery/weight from {{ ref('orders_delivery') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('orders_inventory_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_orders_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('id') }},
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    canissueinvoice,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_inventory_hashid
 | 
					 | 
				
			||||||
from {{ ref('orders_inventory_ab3') }}
 | 
					 | 
				
			||||||
-- inventory at orders/inventory from {{ ref('orders') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('orders_payment_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_orders_hashid,
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    {{ adapter.quote('method') }},
 | 
					 | 
				
			||||||
    status,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_payment_hashid
 | 
					 | 
				
			||||||
from {{ ref('orders_payment_ab3') }}
 | 
					 | 
				
			||||||
-- payment at orders/payment from {{ ref('orders') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,31 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('orders_price_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_orders_hashid,
 | 
					 | 
				
			||||||
    sell,
 | 
					 | 
				
			||||||
    total,
 | 
					 | 
				
			||||||
    market,
 | 
					 | 
				
			||||||
    weight,
 | 
					 | 
				
			||||||
    maximum,
 | 
					 | 
				
			||||||
    minimum,
 | 
					 | 
				
			||||||
    profituni,
 | 
					 | 
				
			||||||
    promotion,
 | 
					 | 
				
			||||||
    supplierprice,
 | 
					 | 
				
			||||||
    wholesalebonus,
 | 
					 | 
				
			||||||
    membershippercent,
 | 
					 | 
				
			||||||
    membershipcommission,
 | 
					 | 
				
			||||||
    base_aibyte_transform,
 | 
					 | 
				
			||||||
    profit_aibyte_transform,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_price_hashid
 | 
					 | 
				
			||||||
from {{ ref('orders_price_ab3') }}
 | 
					 | 
				
			||||||
-- price at orders/price from {{ ref('orders') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('orders_promotion_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_orders_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('type') }},
 | 
					 | 
				
			||||||
    discount,
 | 
					 | 
				
			||||||
    isapplied,
 | 
					 | 
				
			||||||
    minordervalue,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_promotion_hashid
 | 
					 | 
				
			||||||
from {{ ref('orders_promotion_ab3') }}
 | 
					 | 
				
			||||||
-- promotion at orders/promotion from {{ ref('orders') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,18 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('orders_sendemail_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_orders_hashid,
 | 
					 | 
				
			||||||
    status,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_sendemail_hashid
 | 
					 | 
				
			||||||
from {{ ref('orders_sendemail_ab3') }}
 | 
					 | 
				
			||||||
-- sendemail at orders/sendEmail from {{ ref('orders') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('orders_supplier_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_orders_hashid,
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    searchstring,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_supplier_hashid
 | 
					 | 
				
			||||||
from {{ ref('orders_supplier_ab3') }}
 | 
					 | 
				
			||||||
-- supplier at orders/supplier from {{ ref('orders') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('orders_useragent_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_orders_hashid,
 | 
					 | 
				
			||||||
    ip,
 | 
					 | 
				
			||||||
    {{ adapter.quote('version') }},
 | 
					 | 
				
			||||||
    platform,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_useragent_hashid
 | 
					 | 
				
			||||||
from {{ ref('orders_useragent_ab3') }}
 | 
					 | 
				
			||||||
-- useragent at orders/userAgent from {{ ref('orders') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_categories_icon_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_product_categories_hashid,
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    dimensions,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_icon_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_categories_icon_ab3') }}
 | 
					 | 
				
			||||||
-- icon at product-categories/icon from {{ ref('product_categories') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,19 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_categories_icon_dimensions_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_icon_hashid,
 | 
					 | 
				
			||||||
    md,
 | 
					 | 
				
			||||||
    sm,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_dimensions_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_categories_icon_dimensions_ab3') }}
 | 
					 | 
				
			||||||
-- dimensions at product-categories/icon/dimensions from {{ ref('product_categories_icon') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_categories_icon_dimensions_md_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_dimensions_hashid,
 | 
					 | 
				
			||||||
    url,
 | 
					 | 
				
			||||||
    width,
 | 
					 | 
				
			||||||
    height,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_md_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_categories_icon_dimensions_md_ab3') }}
 | 
					 | 
				
			||||||
-- md at product-categories/icon/dimensions/md from {{ ref('product_categories_icon_dimensions') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_categories_icon_dimensions_sm_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_dimensions_hashid,
 | 
					 | 
				
			||||||
    url,
 | 
					 | 
				
			||||||
    width,
 | 
					 | 
				
			||||||
    height,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_sm_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_categories_icon_dimensions_sm_ab3') }}
 | 
					 | 
				
			||||||
-- sm at product-categories/icon/dimensions/sm from {{ ref('product_categories_icon_dimensions') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,23 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_categories_statistic_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_product_categories_hashid,
 | 
					 | 
				
			||||||
    salestotal,
 | 
					 | 
				
			||||||
    totalshare,
 | 
					 | 
				
			||||||
    salesweektotal,
 | 
					 | 
				
			||||||
    salesyeartotal,
 | 
					 | 
				
			||||||
    salesmonthtotal,
 | 
					 | 
				
			||||||
    salestwomonthtotal,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_statistic_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_categories_statistic_ab3') }}
 | 
					 | 
				
			||||||
-- statistic at product-categories/statistic from {{ ref('product_categories') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_sku_info_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_product_sku_hashid,
 | 
					 | 
				
			||||||
    weight,
 | 
					 | 
				
			||||||
    category,
 | 
					 | 
				
			||||||
    supplier,
 | 
					 | 
				
			||||||
    dimension,
 | 
					 | 
				
			||||||
    inventory,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_info_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_sku_info_ab3') }}
 | 
					 | 
				
			||||||
-- info at product-sku/info from {{ ref('product_sku') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_sku_info_category_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_info_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('id') }},
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    searchstring,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_category_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_sku_info_category_ab3') }}
 | 
					 | 
				
			||||||
-- category at product-sku/info/category from {{ ref('product_sku_info') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,19 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_sku_info_inv__ory_location_location_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_location_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('type') }},
 | 
					 | 
				
			||||||
    coordinates,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_location_5_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_sku_info_inv__ory_location_location_ab3') }}
 | 
					 | 
				
			||||||
-- location at product-sku/info/inventory/location/location from {{ ref('product_sku_info_inventory_location') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_sku_info_inventory_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_info_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('id') }},
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('location') }},
 | 
					 | 
				
			||||||
    searchstring,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_inventory_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_sku_info_inventory_ab3') }}
 | 
					 | 
				
			||||||
-- inventory at product-sku/info/inventory from {{ ref('product_sku_info') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_sku_info_inventory_location_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_inventory_hashid,
 | 
					 | 
				
			||||||
    ward,
 | 
					 | 
				
			||||||
    address,
 | 
					 | 
				
			||||||
    district,
 | 
					 | 
				
			||||||
    {{ adapter.quote('location') }},
 | 
					 | 
				
			||||||
    province,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_location_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_sku_info_inventory_location_ab3') }}
 | 
					 | 
				
			||||||
-- location at product-sku/info/inventory/location from {{ ref('product_sku_info_inventory') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_sku_info_supplier_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_info_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('id') }},
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    searchstring,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_supplier_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_sku_info_supplier_ab3') }}
 | 
					 | 
				
			||||||
-- supplier at product-sku/info/supplier from {{ ref('product_sku_info') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,24 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_sku_price_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_product_sku_hashid,
 | 
					 | 
				
			||||||
    base,
 | 
					 | 
				
			||||||
    market,
 | 
					 | 
				
			||||||
    profit,
 | 
					 | 
				
			||||||
    maximum,
 | 
					 | 
				
			||||||
    minimum,
 | 
					 | 
				
			||||||
    supplier,
 | 
					 | 
				
			||||||
    wholesalebonus,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_price_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_sku_price_ab3') }}
 | 
					 | 
				
			||||||
-- price at product-sku/price from {{ ref('product_sku') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,19 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_sku_pricepercent_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_product_sku_hashid,
 | 
					 | 
				
			||||||
    supplier,
 | 
					 | 
				
			||||||
    minimumpricedifferential,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_pricepercent_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_sku_pricepercent_ab3') }}
 | 
					 | 
				
			||||||
-- pricepercent at product-sku/pricePercent from {{ ref('product_sku') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,25 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_sku_statistic_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_product_sku_hashid,
 | 
					 | 
				
			||||||
    saletotal,
 | 
					 | 
				
			||||||
    salepending,
 | 
					 | 
				
			||||||
    salewaiting,
 | 
					 | 
				
			||||||
    salecashback,
 | 
					 | 
				
			||||||
    salecancelled,
 | 
					 | 
				
			||||||
    saledelivered,
 | 
					 | 
				
			||||||
    saledelivering,
 | 
					 | 
				
			||||||
    salepaymentprocessing,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_statistic_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_sku_statistic_ab3') }}
 | 
					 | 
				
			||||||
-- statistic at product-sku/statistic from {{ ref('product_sku') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_sku_versions_info_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_product_sku_versions_hashid,
 | 
					 | 
				
			||||||
    weight,
 | 
					 | 
				
			||||||
    category,
 | 
					 | 
				
			||||||
    supplier,
 | 
					 | 
				
			||||||
    dimension,
 | 
					 | 
				
			||||||
    inventory,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_info_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_sku_versions_info_ab3') }}
 | 
					 | 
				
			||||||
-- info at product-sku-versions/info from {{ ref('product_sku_versions') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_sku_versions_info_category_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_info_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('id') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    searchstring,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_category_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_sku_versions_info_category_ab3') }}
 | 
					 | 
				
			||||||
-- category at product-sku-versions/info/category from {{ ref('product_sku_versions_info') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_sku_versions_info_inventory_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_info_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('id') }},
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    searchstring,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_inventory_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_sku_versions_info_inventory_ab3') }}
 | 
					 | 
				
			||||||
-- inventory at product-sku-versions/info/inventory from {{ ref('product_sku_versions_info') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_sku_versions_info_supplier_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_info_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('id') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    searchstring,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_supplier_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_sku_versions_info_supplier_ab3') }}
 | 
					 | 
				
			||||||
-- supplier at product-sku-versions/info/supplier from {{ ref('product_sku_versions_info') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_sku_versions_price_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_product_sku_versions_hashid,
 | 
					 | 
				
			||||||
    base,
 | 
					 | 
				
			||||||
    market,
 | 
					 | 
				
			||||||
    maximum,
 | 
					 | 
				
			||||||
    minimum,
 | 
					 | 
				
			||||||
    supplier,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_price_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_sku_versions_price_ab3') }}
 | 
					 | 
				
			||||||
-- price at product-sku-versions/price from {{ ref('product_sku_versions') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,25 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('product_sku_versions_statistic_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_product_sku_versions_hashid,
 | 
					 | 
				
			||||||
    saletotal,
 | 
					 | 
				
			||||||
    salepending,
 | 
					 | 
				
			||||||
    salewaiting,
 | 
					 | 
				
			||||||
    salecashback,
 | 
					 | 
				
			||||||
    salecancelled,
 | 
					 | 
				
			||||||
    saledelivered,
 | 
					 | 
				
			||||||
    saledelivering,
 | 
					 | 
				
			||||||
    salepaymentprocessing,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_statistic_hashid
 | 
					 | 
				
			||||||
from {{ ref('product_sku_versions_statistic_ab3') }}
 | 
					 | 
				
			||||||
-- statistic at product-sku-versions/statistic from {{ ref('product_sku_versions') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('products_info_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_products_hashid,
 | 
					 | 
				
			||||||
    profit,
 | 
					 | 
				
			||||||
    category,
 | 
					 | 
				
			||||||
    supplier,
 | 
					 | 
				
			||||||
    inventory,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_info_hashid
 | 
					 | 
				
			||||||
from {{ ref('products_info_ab3') }}
 | 
					 | 
				
			||||||
-- info at products/info from {{ ref('products') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('products_info_category_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_info_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('id') }},
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    searchstring,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_category_hashid
 | 
					 | 
				
			||||||
from {{ ref('products_info_category_ab3') }}
 | 
					 | 
				
			||||||
-- category at products/info/category from {{ ref('products_info') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('products_info_inventory_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_info_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('id') }},
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('location') }},
 | 
					 | 
				
			||||||
    searchstring,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_inventory_hashid
 | 
					 | 
				
			||||||
from {{ ref('products_info_inventory_ab3') }}
 | 
					 | 
				
			||||||
-- inventory at products/info/inventory from {{ ref('products_info') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,23 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('products_info_inventory_location_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_inventory_hashid,
 | 
					 | 
				
			||||||
    ward,
 | 
					 | 
				
			||||||
    address,
 | 
					 | 
				
			||||||
    district,
 | 
					 | 
				
			||||||
    {{ adapter.quote('location') }},
 | 
					 | 
				
			||||||
    province,
 | 
					 | 
				
			||||||
    provincename,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_location_hashid
 | 
					 | 
				
			||||||
from {{ ref('products_info_inventory_location_ab3') }}
 | 
					 | 
				
			||||||
-- location at products/info/inventory/location from {{ ref('products_info_inventory') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,19 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('products_info_inventory_location_location_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_location_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('type') }},
 | 
					 | 
				
			||||||
    coordinates,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_location_5_hashid
 | 
					 | 
				
			||||||
from {{ ref('products_info_inventory_location_location_ab3') }}
 | 
					 | 
				
			||||||
-- location at products/info/inventory/location/location from {{ ref('products_info_inventory_location') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('products_info_supplier_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_info_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('id') }},
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    searchstring,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_supplier_hashid
 | 
					 | 
				
			||||||
from {{ ref('products_info_supplier_ab3') }}
 | 
					 | 
				
			||||||
-- supplier at products/info/supplier from {{ ref('products_info') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('products_order_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_products_hashid,
 | 
					 | 
				
			||||||
    newest,
 | 
					 | 
				
			||||||
    profit,
 | 
					 | 
				
			||||||
    topsale,
 | 
					 | 
				
			||||||
    scoreyesterday,
 | 
					 | 
				
			||||||
    region_aibyte_transform,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_order_hashid
 | 
					 | 
				
			||||||
from {{ ref('products_order_ab3') }}
 | 
					 | 
				
			||||||
-- order at products/order from {{ ref('products') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,24 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('products_price_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_products_hashid,
 | 
					 | 
				
			||||||
    base,
 | 
					 | 
				
			||||||
    market,
 | 
					 | 
				
			||||||
    profit,
 | 
					 | 
				
			||||||
    maximum,
 | 
					 | 
				
			||||||
    minimum,
 | 
					 | 
				
			||||||
    supplier,
 | 
					 | 
				
			||||||
    wholesalebonus,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_price_hashid
 | 
					 | 
				
			||||||
from {{ ref('products_price_ab3') }}
 | 
					 | 
				
			||||||
-- price at products/price from {{ ref('products') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,24 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('products_pricepercent_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_products_hashid,
 | 
					 | 
				
			||||||
    base,
 | 
					 | 
				
			||||||
    selly,
 | 
					 | 
				
			||||||
    market,
 | 
					 | 
				
			||||||
    maximum,
 | 
					 | 
				
			||||||
    minimum,
 | 
					 | 
				
			||||||
    supplier,
 | 
					 | 
				
			||||||
    minimumpricedifferential,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_pricepercent_hashid
 | 
					 | 
				
			||||||
from {{ ref('products_pricepercent_ab3') }}
 | 
					 | 
				
			||||||
-- pricepercent at products/pricePercent from {{ ref('products') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,31 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('products_reviewstatistic_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_products_hashid,
 | 
					 | 
				
			||||||
    total,
 | 
					 | 
				
			||||||
    totalreview,
 | 
					 | 
				
			||||||
    totalscore1,
 | 
					 | 
				
			||||||
    totalscore2,
 | 
					 | 
				
			||||||
    totalscore3,
 | 
					 | 
				
			||||||
    totalscore4,
 | 
					 | 
				
			||||||
    totalscore5,
 | 
					 | 
				
			||||||
    scoreaverage,
 | 
					 | 
				
			||||||
    totalhasmedia,
 | 
					 | 
				
			||||||
    totalhascontent,
 | 
					 | 
				
			||||||
    scoreaverageweektotal,
 | 
					 | 
				
			||||||
    scoreaverageyeartotal,
 | 
					 | 
				
			||||||
    scoreaveragemonthtotal,
 | 
					 | 
				
			||||||
    scoreaveragetwomonthtotal,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_reviewstatistic_hashid
 | 
					 | 
				
			||||||
from {{ ref('products_reviewstatistic_ab3') }}
 | 
					 | 
				
			||||||
-- reviewstatistic at products/reviewStatistic from {{ ref('products') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('products_score_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_products_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('view') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('order') }},
 | 
					 | 
				
			||||||
    profit,
 | 
					 | 
				
			||||||
    {{ adapter.quote('current') }},
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_score_hashid
 | 
					 | 
				
			||||||
from {{ ref('products_score_ab3') }}
 | 
					 | 
				
			||||||
-- score at products/score from {{ ref('products') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('products_sharestatistic_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_products_hashid,
 | 
					 | 
				
			||||||
    totalshare,
 | 
					 | 
				
			||||||
    totalsharefromsocialpost,
 | 
					 | 
				
			||||||
    totalsharefromproductdetail,
 | 
					 | 
				
			||||||
    totaluniquesharefromsocialpost,
 | 
					 | 
				
			||||||
    totaluniquesharefromproductdetail,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_sharestatistic_hashid
 | 
					 | 
				
			||||||
from {{ ref('products_sharestatistic_ab3') }}
 | 
					 | 
				
			||||||
-- sharestatistic at products/shareStatistic from {{ ref('products') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,39 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('products_statistic_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_products_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('view') }},
 | 
					 | 
				
			||||||
    skutotal,
 | 
					 | 
				
			||||||
    saletotal,
 | 
					 | 
				
			||||||
    skuactive,
 | 
					 | 
				
			||||||
    totalpost,
 | 
					 | 
				
			||||||
    salestotal,
 | 
					 | 
				
			||||||
    salepending,
 | 
					 | 
				
			||||||
    salewaiting,
 | 
					 | 
				
			||||||
    salecashback,
 | 
					 | 
				
			||||||
    salecancelled,
 | 
					 | 
				
			||||||
    saledelivered,
 | 
					 | 
				
			||||||
    saleweektotal,
 | 
					 | 
				
			||||||
    saleyeartotal,
 | 
					 | 
				
			||||||
    saledelivering,
 | 
					 | 
				
			||||||
    salemonthtotal,
 | 
					 | 
				
			||||||
    salesweektotal,
 | 
					 | 
				
			||||||
    salesyeartotal,
 | 
					 | 
				
			||||||
    salesmonthtotal,
 | 
					 | 
				
			||||||
    saletwomonthtotal,
 | 
					 | 
				
			||||||
    salestwomonthtotal,
 | 
					 | 
				
			||||||
    salepaymentprocessing,
 | 
					 | 
				
			||||||
    totalinventory_aibyte_transform,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_statistic_hashid
 | 
					 | 
				
			||||||
from {{ ref('products_statistic_ab3') }}
 | 
					 | 
				
			||||||
-- statistic at products/statistic from {{ ref('products') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('promotion_orders_supplier_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_promotion_orders_hashid,
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    searchstring,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_supplier_hashid
 | 
					 | 
				
			||||||
from {{ ref('promotion_orders_supplier_ab3') }}
 | 
					 | 
				
			||||||
-- supplier at promotion-orders/supplier from {{ ref('promotion_orders') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('promotions_applyfor_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_promotions_hashid,
 | 
					 | 
				
			||||||
    list,
 | 
					 | 
				
			||||||
    {{ adapter.quote('type') }},
 | 
					 | 
				
			||||||
    provinces,
 | 
					 | 
				
			||||||
    isapplyallorder,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_applyfor_hashid
 | 
					 | 
				
			||||||
from {{ ref('promotions_applyfor_ab3') }}
 | 
					 | 
				
			||||||
-- applyfor at promotions/applyFor from {{ ref('promotions') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('promotions_conditionforuser_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_promotions_hashid,
 | 
					 | 
				
			||||||
    gender,
 | 
					 | 
				
			||||||
    applyfor,
 | 
					 | 
				
			||||||
    segments,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_conditionforuser_hashid
 | 
					 | 
				
			||||||
from {{ ref('promotions_conditionforuser_ab3') }}
 | 
					 | 
				
			||||||
-- conditionforuser at promotions/conditionForUser from {{ ref('promotions') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('promotions_options_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_promotions_hashid,
 | 
					 | 
				
			||||||
    bonus,
 | 
					 | 
				
			||||||
    milestones,
 | 
					 | 
				
			||||||
    suppliermilestones,
 | 
					 | 
				
			||||||
    transactionminvalue,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_options_hashid
 | 
					 | 
				
			||||||
from {{ ref('promotions_options_ab3') }}
 | 
					 | 
				
			||||||
-- options at promotions/options from {{ ref('promotions') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,19 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('promotions_options_bonus_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_options_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('type') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('value') }},
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_bonus_hashid
 | 
					 | 
				
			||||||
from {{ ref('promotions_options_bonus_ab3') }}
 | 
					 | 
				
			||||||
-- bonus at promotions/options/bonus from {{ ref('promotions_options') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,30 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('promotions_statistic_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_promotions_hashid,
 | 
					 | 
				
			||||||
    nmv,
 | 
					 | 
				
			||||||
    usertotal,
 | 
					 | 
				
			||||||
    quantitypendingtotal,
 | 
					 | 
				
			||||||
    quantitysuccesstotal,
 | 
					 | 
				
			||||||
    quantityrejectedtotal,
 | 
					 | 
				
			||||||
    commissionpendingtotal,
 | 
					 | 
				
			||||||
    commissionsuccesstotal,
 | 
					 | 
				
			||||||
    commissionrejectedtotal,
 | 
					 | 
				
			||||||
    quantitynotrejectedtotal,
 | 
					 | 
				
			||||||
    suppliercommissionpending,
 | 
					 | 
				
			||||||
    suppliercommissionsuccess,
 | 
					 | 
				
			||||||
    commissionnotrejectedtotal,
 | 
					 | 
				
			||||||
    suppliercommissionnotrejected,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_statistic_hashid
 | 
					 | 
				
			||||||
from {{ ref('promotions_statistic_ab3') }}
 | 
					 | 
				
			||||||
-- statistic at promotions/statistic from {{ ref('promotions') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,19 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('promotions_suppliercommission_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_promotions_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('type') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('value') }},
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_suppliercommission_hashid
 | 
					 | 
				
			||||||
from {{ ref('promotions_suppliercommission_ab3') }}
 | 
					 | 
				
			||||||
-- suppliercommission at promotions/supplierCommission from {{ ref('promotions') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('session_deliveries_customer_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_session_deliveries_hashid,
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    phone,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_customer_hashid
 | 
					 | 
				
			||||||
from {{ ref('session_deliveries_customer_ab3') }}
 | 
					 | 
				
			||||||
-- customer at session-deliveries/customer from {{ ref('session_deliveries') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,33 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('session_deliveries_delivery_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_session_deliveries_hashid,
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    fee,
 | 
					 | 
				
			||||||
    {{ adapter.quote('desc') }},
 | 
					 | 
				
			||||||
    note,
 | 
					 | 
				
			||||||
    title,
 | 
					 | 
				
			||||||
    feeship,
 | 
					 | 
				
			||||||
    currency,
 | 
					 | 
				
			||||||
    sourceid,
 | 
					 | 
				
			||||||
    couriername,
 | 
					 | 
				
			||||||
    servicecode,
 | 
					 | 
				
			||||||
    servicename,
 | 
					 | 
				
			||||||
    deliverycode,
 | 
					 | 
				
			||||||
    maxdeliverydays,
 | 
					 | 
				
			||||||
    mindeliverydays,
 | 
					 | 
				
			||||||
    realshippingfee,
 | 
					 | 
				
			||||||
    estimatetimedelivery,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_delivery_hashid
 | 
					 | 
				
			||||||
from {{ ref('session_deliveries_delivery_ab3') }}
 | 
					 | 
				
			||||||
-- delivery at session-deliveries/delivery from {{ ref('session_deliveries') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('session_deliveries_delivery_feeship_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_delivery_hashid,
 | 
					 | 
				
			||||||
    cod,
 | 
					 | 
				
			||||||
    total,
 | 
					 | 
				
			||||||
    shipping,
 | 
					 | 
				
			||||||
    insurance,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_feeship_hashid
 | 
					 | 
				
			||||||
from {{ ref('session_deliveries_delivery_feeship_ab3') }}
 | 
					 | 
				
			||||||
-- feeship at session-deliveries/delivery/feeShip from {{ ref('session_deliveries_delivery') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,23 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('session_deliveries_location_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_session_deliveries_hashid,
 | 
					 | 
				
			||||||
    _id,
 | 
					 | 
				
			||||||
    ward,
 | 
					 | 
				
			||||||
    address,
 | 
					 | 
				
			||||||
    district,
 | 
					 | 
				
			||||||
    province,
 | 
					 | 
				
			||||||
    fulladdress,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_location_hashid
 | 
					 | 
				
			||||||
from {{ ref('session_deliveries_location_ab3') }}
 | 
					 | 
				
			||||||
-- location at session-deliveries/location from {{ ref('session_deliveries') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('session_deliveries_promotion_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_session_deliveries_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('type') }},
 | 
					 | 
				
			||||||
    discount,
 | 
					 | 
				
			||||||
    isapplied,
 | 
					 | 
				
			||||||
    minordervalue,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_promotion_hashid
 | 
					 | 
				
			||||||
from {{ ref('session_deliveries_promotion_ab3') }}
 | 
					 | 
				
			||||||
-- promotion at session-deliveries/promotion from {{ ref('session_deliveries') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,27 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('session_deliveries_request_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_session_deliveries_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('to') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('from') }},
 | 
					 | 
				
			||||||
    items,
 | 
					 | 
				
			||||||
    checksum,
 | 
					 | 
				
			||||||
    codamount,
 | 
					 | 
				
			||||||
    ordercode,
 | 
					 | 
				
			||||||
    restockat,
 | 
					 | 
				
			||||||
    ispreorder,
 | 
					 | 
				
			||||||
    totalamount,
 | 
					 | 
				
			||||||
    paymentmethod,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_request_hashid
 | 
					 | 
				
			||||||
from {{ ref('session_deliveries_request_ab3') }}
 | 
					 | 
				
			||||||
-- request at session-deliveries/request from {{ ref('session_deliveries') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,19 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('session_deliveries_request_from_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_request_hashid,
 | 
					 | 
				
			||||||
    userid,
 | 
					 | 
				
			||||||
    warehouseid,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_from_hashid
 | 
					 | 
				
			||||||
from {{ ref('session_deliveries_request_from_ab3') }}
 | 
					 | 
				
			||||||
-- from at session-deliveries/request/from from {{ ref('session_deliveries_request') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,20 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('session_deliveries_request_to_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_request_hashid,
 | 
					 | 
				
			||||||
    {{ adapter.quote('name') }},
 | 
					 | 
				
			||||||
    phone,
 | 
					 | 
				
			||||||
    {{ adapter.quote('location') }},
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_to_hashid
 | 
					 | 
				
			||||||
from {{ ref('session_deliveries_request_to_ab3') }}
 | 
					 | 
				
			||||||
-- to at session-deliveries/request/to from {{ ref('session_deliveries_request') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('session_deliveries_request_to_location_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_to_hashid,
 | 
					 | 
				
			||||||
    address,
 | 
					 | 
				
			||||||
    wardcode,
 | 
					 | 
				
			||||||
    districtcode,
 | 
					 | 
				
			||||||
    provincecode,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_location_hashid
 | 
					 | 
				
			||||||
from {{ ref('session_deliveries_request_to_location_ab3') }}
 | 
					 | 
				
			||||||
-- location at session-deliveries/request/to/location from {{ ref('session_deliveries_request_to') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('social_posts_sharestatistic_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_social_posts_hashid,
 | 
					 | 
				
			||||||
    totalshare,
 | 
					 | 
				
			||||||
    totalsharefromsocialpost,
 | 
					 | 
				
			||||||
    totalsharefromproductdetail,
 | 
					 | 
				
			||||||
    totaluniquesharefromsocialpost,
 | 
					 | 
				
			||||||
    totaluniquesharefromproductdetail,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_sharestatistic_hashid
 | 
					 | 
				
			||||||
from {{ ref('social_posts_sharestatistic_ab3') }}
 | 
					 | 
				
			||||||
-- sharestatistic at social-posts/shareStatistic from {{ ref('social_posts') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,23 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('social_posts_statistic_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_social_posts_hashid,
 | 
					 | 
				
			||||||
    likes,
 | 
					 | 
				
			||||||
    {{ adapter.quote('views') }},
 | 
					 | 
				
			||||||
    {{ adapter.quote('comments') }},
 | 
					 | 
				
			||||||
    uniqueviews,
 | 
					 | 
				
			||||||
    shares_aibyte_transform,
 | 
					 | 
				
			||||||
    uniqueshares_aibyte_transform,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_statistic_hashid
 | 
					 | 
				
			||||||
from {{ ref('social_posts_statistic_ab3') }}
 | 
					 | 
				
			||||||
-- statistic at social-posts/statistic from {{ ref('social_posts') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,26 +0,0 @@
 | 
				
			||||||
{{ config(
 | 
					 | 
				
			||||||
    indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
 | 
					 | 
				
			||||||
    schema = "unibag",
 | 
					 | 
				
			||||||
    tags = [ "nested" ]
 | 
					 | 
				
			||||||
) }}
 | 
					 | 
				
			||||||
-- Final base SQL model
 | 
					 | 
				
			||||||
-- depends_on: {{ ref('suppliers_balance_ab3') }}
 | 
					 | 
				
			||||||
select
 | 
					 | 
				
			||||||
    _airbyte_suppliers_hashid,
 | 
					 | 
				
			||||||
    currentcash,
 | 
					 | 
				
			||||||
    orderpendingcash,
 | 
					 | 
				
			||||||
    totalpendingcash,
 | 
					 | 
				
			||||||
    withdrawrejectcash,
 | 
					 | 
				
			||||||
    orderreconciledcash,
 | 
					 | 
				
			||||||
    withdrawpendingcash,
 | 
					 | 
				
			||||||
    withdrawsuccesscash,
 | 
					 | 
				
			||||||
    changebalancerequestapproved,
 | 
					 | 
				
			||||||
    orderwaitingforreconcilecash,
 | 
					 | 
				
			||||||
    _airbyte_ab_id,
 | 
					 | 
				
			||||||
    _airbyte_emitted_at,
 | 
					 | 
				
			||||||
    {{ current_timestamp() }} as _airbyte_normalized_at,
 | 
					 | 
				
			||||||
    _airbyte_balance_hashid
 | 
					 | 
				
			||||||
from {{ ref('suppliers_balance_ab3') }}
 | 
					 | 
				
			||||||
-- balance at suppliers/balance from {{ ref('suppliers') }}
 | 
					 | 
				
			||||||
where 1 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
		Reference in New Issue