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

39 lines
1002 B
MySQL
Raw 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',
adapter.quote('desc'),
2022-05-11 04:21:03 +00:00
'icon',
2022-03-22 04:03:52 +00:00
adapter.quote('name'),
adapter.quote('type'),
2022-05-11 04:21:03 +00:00
'cover',
2022-03-22 04:03:52 +00:00
'endat',
boolean_to_string('active'),
2022-05-11 04:21:03 +00:00
'notice',
'screen',
2022-03-22 04:03:52 +00:00
'article',
2022-05-11 04:21:03 +00:00
adapter.quote('options'),
2022-03-22 04:03:52 +00:00
'startat',
2022-05-11 04:21:03 +00:00
'segments',
2022-03-22 04:03:52 +00:00
'createdat',
2022-05-11 04:21:03 +00:00
'grouptype',
2022-03-22 04:03:52 +00:00
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