diff --git a/destination_catalog.json b/destination_catalog.json index f02509f..f51ebe6 100644 --- a/destination_catalog.json +++ b/destination_catalog.json @@ -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":[]}]} \ No newline at end of file +{"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":[]}]} \ No newline at end of file diff --git a/models/generated/airbyte_ctes/selly_express/se_orders_ab1.sql b/models/generated/airbyte_ctes/unibag/se_orders_ab1.sql similarity index 91% rename from models/generated/airbyte_ctes/selly_express/se_orders_ab1.sql rename to models/generated/airbyte_ctes/unibag/se_orders_ab1.sql index f1988d1..a8b02b3 100644 --- a/models/generated/airbyte_ctes/selly_express/se_orders_ab1.sql +++ b/models/generated/airbyte_ctes/unibag/se_orders_ab1.sql @@ -1,11 +1,11 @@ {{ config( indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], unique_key = '_airbyte_ab_id', - schema = "_airbyte_selly_express", + schema = "_airbyte_unibag", tags = [ "top-level-intermediate" ] ) }} -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema --- depends_on: {{ source('selly_express', '_airbyte_raw_se_orders') }} +-- depends_on: {{ source('unibag', '_airbyte_raw_se_orders') }} select {{ json_extract_scalar('_airbyte_data', ['to'], ['to']) }} as {{ adapter.quote('to') }}, {{ json_extract_scalar('_airbyte_data', ['_id'], ['_id']) }} as _id, @@ -29,7 +29,7 @@ select _airbyte_ab_id, _airbyte_emitted_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 where 1 = 1 diff --git a/models/generated/airbyte_ctes/selly_express/se_orders_ab2.sql b/models/generated/airbyte_ctes/unibag/se_orders_ab2.sql similarity index 97% rename from models/generated/airbyte_ctes/selly_express/se_orders_ab2.sql rename to models/generated/airbyte_ctes/unibag/se_orders_ab2.sql index 90e9f35..9a1ce1e 100644 --- a/models/generated/airbyte_ctes/selly_express/se_orders_ab2.sql +++ b/models/generated/airbyte_ctes/unibag/se_orders_ab2.sql @@ -1,7 +1,7 @@ {{ config( indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], unique_key = '_airbyte_ab_id', - schema = "_airbyte_selly_express", + schema = "_airbyte_unibag", tags = [ "top-level-intermediate" ] ) }} -- SQL model to cast each column to its adequate SQL type converted from the JSON schema type diff --git a/models/generated/airbyte_ctes/selly_express/se_orders_ab3.sql b/models/generated/airbyte_ctes/unibag/se_orders_ab3.sql similarity index 95% rename from models/generated/airbyte_ctes/selly_express/se_orders_ab3.sql rename to models/generated/airbyte_ctes/unibag/se_orders_ab3.sql index e926eec..fea7c3d 100644 --- a/models/generated/airbyte_ctes/selly_express/se_orders_ab3.sql +++ b/models/generated/airbyte_ctes/unibag/se_orders_ab3.sql @@ -1,7 +1,7 @@ {{ config( indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], unique_key = '_airbyte_ab_id', - schema = "_airbyte_selly_express", + schema = "_airbyte_unibag", tags = [ "top-level-intermediate" ] ) }} -- SQL model to build a hash column based on the values of this record diff --git a/models/generated/airbyte_tables/selly_express/se_orders.sql b/models/generated/airbyte_tables/unibag/se_orders.sql similarity index 93% rename from models/generated/airbyte_tables/selly_express/se_orders.sql rename to models/generated/airbyte_tables/unibag/se_orders.sql index 1893c76..7828db7 100644 --- a/models/generated/airbyte_tables/selly_express/se_orders.sql +++ b/models/generated/airbyte_tables/unibag/se_orders.sql @@ -1,7 +1,7 @@ {{ config( indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}], unique_key = '_airbyte_ab_id', - schema = "selly_express", + schema = "unibag", tags = [ "top-level" ] ) }} -- Final base SQL model @@ -30,6 +30,6 @@ select {{ current_timestamp() }} as _airbyte_normalized_at, _airbyte_se_orders_hashid 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 diff --git a/models/generated/sources.yml b/models/generated/sources.yml index ba17ed4..67c7c52 100644 --- a/models/generated/sources.yml +++ b/models/generated/sources.yml @@ -1,6 +1,6 @@ version: 2 sources: -- name: selly_express +- name: unibag quoting: database: true schema: false