Eugene Krall
12/22/2021, 2:27 PMDatabase Error in model messages (models/airbyte_incremental/whatsapp/messages.sql)
Syntax error: Expected "(" or keyword SELECT or keyword WITH but got keyword CREATE at [9:5]
The model is trying create an intermediary table like it did in the original modelscreate or replace view `link-179609`._airbyte_whatsapp.`messages_stg`
[DEPRECATED] Marcos Marx
(
.Remi Salmon
12/22/2021, 9:25 PMcreate or replace table `link-179609`.whatsapp.`messages`
partition by timestamp_trunc(_airbyte_emitted_at, day)
cluster by _airbyte_unique_key, _airbyte_emitted_at
OPTIONS()
as (
-- Final base SQL model
-- depends_on: `link-179609`.whatsapp.`messages_scd`
select
_airbyte_unique_key,
_id,
text,
type,
price,
bot_id,
status,
is_paid,
user_id,
campaign,
currency,
direction,
contact_id,
created_at,
updated_at,
channel_data,
reject_reason,
price_country_code,
_airbyte_ab_id,
_airbyte_emitted_at,
CURRENT_TIMESTAMP() as _airbyte_normalized_at,
_airbyte_messages_hashid
from `link-179609`.whatsapp.`messages_scd`
-- messages from `link-179609`.whatsapp._airbyte_raw_messages
where 1 = 1
and _airbyte_active_row = 1
);
create or replace table `link-179609`.whatsapp.`messages`
partition by timestamp_trunc(_airbyte_emitted_at, day)
cluster by _airbyte_unique_key, _airbyte_emitted_at
OPTIONS()
[DEPRECATED] Marcos Marx
developersteve
12/23/2021, 10:41 AMAdditional properties are not allowed ('dispatch' was unexpected)
fishtownanalytics/dbt:0.21.1
dbt found 1 package(s) specified in packages.yml, but only 0 package(s) installed in /tmp/dbt_modules. Run "dbt deps" to install package dependencies.
Chris (deprecated profile)
developersteve
12/23/2021, 1:57 PMjson_extract_scalar('_airbyte_data', ['campaign'], ['campaign']) }} as campaign
into that
json_extract_scalar('_airbyte_data', ['campaign']['messages'], ['campaign']['messages']) }} as campaign,
then I noticed that this is not the native bigquery function and it requires 3 arguments instead of two and no matter how I try, the compiled SQL is always odd