dbt-selly/models/generated/airbyte_ctes/unibag/team_members_statisticmonth...

35 lines
2.1 KiB
SQL

{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
schema = "_airbyte_unibag",
tags = [ "nested-intermediate" ]
) }}
-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type
-- depends_on: {{ ref('team_members_statisticmonth_ab1') }}
select
_airbyte_team_members_hashid,
cast(sales as {{ dbt_utils.type_float() }}) as sales,
cast(thismonthsale as {{ dbt_utils.type_float() }}) as thismonthsale,
cast(transactiontotal as {{ dbt_utils.type_float() }}) as transactiontotal,
cast(transactionpending as {{ dbt_utils.type_float() }}) as transactionpending,
cast(transactionsuccess as {{ dbt_utils.type_float() }}) as transactionsuccess,
cast(transactionrejected as {{ dbt_utils.type_float() }}) as transactionrejected,
cast(cashtransactiontotal as {{ dbt_utils.type_float() }}) as cashtransactiontotal,
cast(transactiondelivered as {{ dbt_utils.type_float() }}) as transactiondelivered,
cast(transactiondelivering as {{ dbt_utils.type_float() }}) as transactiondelivering,
cast(cashtransactionpending as {{ dbt_utils.type_float() }}) as cashtransactionpending,
cast(cashtransactionsuccess as {{ dbt_utils.type_float() }}) as cashtransactionsuccess,
cast(cashtransactionrejected as {{ dbt_utils.type_float() }}) as cashtransactionrejected,
cast(cashtransactiondelivered as {{ dbt_utils.type_float() }}) as cashtransactiondelivered,
cast(cashtransactiondelivering as {{ dbt_utils.type_float() }}) as cashtransactiondelivering,
cast(transactionwaitingapprove as {{ dbt_utils.type_float() }}) as transactionwaitingapprove,
cast(transactionpaymentprocessing as {{ dbt_utils.type_float() }}) as transactionpaymentprocessing,
cast(cashtransactionwaitingapprove as {{ dbt_utils.type_float() }}) as cashtransactionwaitingapprove,
cast(cashtransactionpaymentprocessing as {{ dbt_utils.type_float() }}) as cashtransactionpaymentprocessing,
_airbyte_ab_id,
_airbyte_emitted_at,
{{ current_timestamp() }} as _airbyte_normalized_at
from {{ ref('team_members_statisticmonth_ab1') }}
-- statisticmonth at team-members/statisticMonth
where 1 = 1