dbt-selly/models/generated/airbyte_tables/unibag/cash_flows.sql

26 lines
779 B
SQL

{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}],
unique_key = '_airbyte_ab_id',
schema = "unibag",
tags = [ "top-level" ]
) }}
-- Final base SQL model
-- depends_on: {{ ref('cash_flows_ab3') }}
select
_id AS id,
{{ adapter.quote('value') }},
{{ adapter.quote('action') }},
newbalance AS new_balance,
oldbalance AS old_balance,
targetid AS target_id,
targettype AS target_type,
{{ adapter.quote('user') }} AS seller_id,
createdat::timestamp AS created_at,
_airbyte_ab_id,
_airbyte_emitted_at,
{{ current_timestamp() }} as _airbyte_normalized_at,
_airbyte_cash_flows_hashid
from {{ ref('cash_flows_ab3') }}
-- cash_flows from {{ source('unibag', '_airbyte_raw_cash_flows') }}
where 1 = 1