dbt-selly/models/generated/airbyte_ctes/unibag/events_ab3.sql

38 lines
1.0 KiB
MySQL
Raw Permalink Normal View History

2022-03-22 04:03:52 +00:00
{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
unique_key = '_airbyte_ab_id',
schema = "_airbyte_unibag",
tags = [ "top-level-intermediate" ]
) }}
-- SQL model to build a hash column based on the values of this record
-- depends_on: {{ ref('events_ab2') }}
select
{{ dbt_utils.surrogate_key([
'_id',
2022-05-10 14:30:53 +00:00
'code',
2022-03-22 04:03:52 +00:00
adapter.quote('desc'),
2022-05-10 14:30:53 +00:00
object_to_string('icon'),
2022-03-22 04:03:52 +00:00
adapter.quote('name'),
adapter.quote('type'),
2022-05-10 14:30:53 +00:00
object_to_string('cover'),
2022-03-22 04:03:52 +00:00
'endat',
boolean_to_string('active'),
2022-05-10 14:30:53 +00:00
object_to_string('notice'),
2022-03-22 04:03:52 +00:00
'article',
2022-05-10 14:30:53 +00:00
object_to_string(adapter.quote('options')),
2022-03-22 04:03:52 +00:00
'startat',
2022-05-10 14:30:53 +00:00
object_to_string('segments'),
2022-03-22 04:03:52 +00:00
'createdat',
array_to_string('suppliers'),
'updatedat',
array_to_string('information'),
'displayendat',
boolean_to_string('isapplyforall'),
'displaystartat',
]) }} as _airbyte_events_hashid,
tmp.*
from {{ ref('events_ab2') }} tmp
-- events
where 1 = 1