fix schema
This commit is contained in:
parent
022cf0139a
commit
508f88072f
|
@ -1 +1 @@
|
||||||
{"streams":[{"stream":{"name":"se-orders","json_schema":{"type":"object","properties":{"to":{"type":"string"},"_id":{"type":"string"},"cod":{"type":"number"},"code":{"type":"string"},"from":{"type":"string"},"note":{"type":"string"},"value":{"type":"number"},"client":{"type":"string"},"status":{"type":"string"},"volume":{"type":"string"},"weight":{"type":"number"},"courier":{"type":"string"},"distance":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"itemVolume":{"type":"number"},"searchString":{"type":"string"},"extraServices":{"type":"array"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"selly-express"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]}]}
|
{"streams":[{"stream":{"name":"se-orders","json_schema":{"type":"object","properties":{"to":{"type":"string"},"_id":{"type":"string"},"cod":{"type":"number"},"code":{"type":"string"},"from":{"type":"string"},"note":{"type":"string"},"value":{"type":"number"},"client":{"type":"string"},"status":{"type":"string"},"volume":{"type":"string"},"weight":{"type":"number"},"courier":{"type":"string"},"distance":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"itemVolume":{"type":"number"},"searchString":{"type":"string"},"extraServices":{"type":"array"}}},"supported_sync_modes":["full_refresh","incremental"],"default_cursor_field":[],"source_defined_primary_key":[],"namespace":"unibag"},"sync_mode":"full_refresh","cursor_field":[],"destination_sync_mode":"overwrite","primary_key":[]}]}
|
|
@ -1,11 +1,11 @@
|
||||||
{{ config(
|
{{ config(
|
||||||
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
|
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
|
||||||
unique_key = '_airbyte_ab_id',
|
unique_key = '_airbyte_ab_id',
|
||||||
schema = "_airbyte_selly_express",
|
schema = "_airbyte_unibag",
|
||||||
tags = [ "top-level-intermediate" ]
|
tags = [ "top-level-intermediate" ]
|
||||||
) }}
|
) }}
|
||||||
-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema
|
-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema
|
||||||
-- depends_on: {{ source('selly_express', '_airbyte_raw_se_orders') }}
|
-- depends_on: {{ source('unibag', '_airbyte_raw_se_orders') }}
|
||||||
select
|
select
|
||||||
{{ json_extract_scalar('_airbyte_data', ['to'], ['to']) }} as {{ adapter.quote('to') }},
|
{{ json_extract_scalar('_airbyte_data', ['to'], ['to']) }} as {{ adapter.quote('to') }},
|
||||||
{{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id,
|
{{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id,
|
||||||
|
@ -29,7 +29,7 @@ select
|
||||||
_airbyte_ab_id,
|
_airbyte_ab_id,
|
||||||
_airbyte_emitted_at,
|
_airbyte_emitted_at,
|
||||||
{{ current_timestamp() }} as _airbyte_normalized_at
|
{{ current_timestamp() }} as _airbyte_normalized_at
|
||||||
from {{ source('selly_express', '_airbyte_raw_se_orders') }} as table_alias
|
from {{ source('unibag', '_airbyte_raw_se_orders') }} as table_alias
|
||||||
-- se_orders
|
-- se_orders
|
||||||
where 1 = 1
|
where 1 = 1
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{{ config(
|
{{ config(
|
||||||
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
|
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
|
||||||
unique_key = '_airbyte_ab_id',
|
unique_key = '_airbyte_ab_id',
|
||||||
schema = "_airbyte_selly_express",
|
schema = "_airbyte_unibag",
|
||||||
tags = [ "top-level-intermediate" ]
|
tags = [ "top-level-intermediate" ]
|
||||||
) }}
|
) }}
|
||||||
-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type
|
-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type
|
|
@ -1,7 +1,7 @@
|
||||||
{{ config(
|
{{ config(
|
||||||
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
|
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
|
||||||
unique_key = '_airbyte_ab_id',
|
unique_key = '_airbyte_ab_id',
|
||||||
schema = "_airbyte_selly_express",
|
schema = "_airbyte_unibag",
|
||||||
tags = [ "top-level-intermediate" ]
|
tags = [ "top-level-intermediate" ]
|
||||||
) }}
|
) }}
|
||||||
-- SQL model to build a hash column based on the values of this record
|
-- SQL model to build a hash column based on the values of this record
|
|
@ -1,7 +1,7 @@
|
||||||
{{ config(
|
{{ config(
|
||||||
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
|
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
|
||||||
unique_key = '_airbyte_ab_id',
|
unique_key = '_airbyte_ab_id',
|
||||||
schema = "selly_express",
|
schema = "unibag",
|
||||||
tags = [ "top-level" ]
|
tags = [ "top-level" ]
|
||||||
) }}
|
) }}
|
||||||
-- Final base SQL model
|
-- Final base SQL model
|
||||||
|
@ -30,6 +30,6 @@ select
|
||||||
{{ current_timestamp() }} as _airbyte_normalized_at,
|
{{ current_timestamp() }} as _airbyte_normalized_at,
|
||||||
_airbyte_se_orders_hashid
|
_airbyte_se_orders_hashid
|
||||||
from {{ ref('se_orders_ab3') }}
|
from {{ ref('se_orders_ab3') }}
|
||||||
-- se_orders from {{ source('selly_express', '_airbyte_raw_se_orders') }}
|
-- se_orders from {{ source('unibag', '_airbyte_raw_se_orders') }}
|
||||||
where 1 = 1
|
where 1 = 1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
version: 2
|
version: 2
|
||||||
sources:
|
sources:
|
||||||
- name: selly_express
|
- name: unibag
|
||||||
quoting:
|
quoting:
|
||||||
database: true
|
database: true
|
||||||
schema: false
|
schema: false
|
||||||
|
|
Loading…
Reference in New Issue