You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- ...
order_payments as (
select
order_id,
{% for payment_method in payment_methods -%}
sum(case when payment_method ='{{ payment_method }}' then amount else 0 end)
as {{ payment_method }}_amount,
{% endfor -%}
sum(amount) as total_amount
from payments
group by order_id
),
Can payment_methods defined once in `models/staging/schema.yml', so that we could avoid data inconsistencies in the future. If it is possible, how can I do it?
The text was updated successfully, but these errors were encountered:
The accepted values for
payment_method
field forstg_customers
are defined in `models/staging/schema.yml'.These values are used in
models/orders.sql
.Can
payment_methods
defined once in `models/staging/schema.yml', so that we could avoid data inconsistencies in the future. If it is possible, how can I do it?The text was updated successfully, but these errors were encountered: