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
The final CTE for quickbooks__cash_flow_statement should coalesce 0 with lag(cash_ending_period) since the value for the first row will always be null.
Corrected code:
final as (
select cash_flow_classifications.*,
coalesce(lag(cash_ending_period) over (partition by account_id, class_id, source_relation order by cash_flow_period), 0) as cash_beginning_period,
cash_ending_period - coalesce(lag(cash_ending_period) over (partition by account_id, class_id, source_relation order by cash_flow_period), 0) as cash_net_period
from cash_flow_classifications
)
Relevant error log or model output
No response
Expected behavior
Every row should have a value, even if 0
dbt Project configurations
/
Package versions
/
What database are you using dbt with?
snowflake
dbt Version
1.4.1
Additional Context
No response
Are you willing to open a PR to help address this issue?
Yes.
Yes, but I will need assistance and will schedule time during our office hours for guidance
No.
The text was updated successfully, but these errors were encountered:
Hi @caffeinebounce thanks for raising this and I agree with you that a coalesce to 0 would be ideal here! We are actually planning to include some changes to the QuickBooks package in the next few days and I think this would be a great fix to include.
I noticed you are open to contributing. If you would like, you can open a PR with this fix and I will integrate it into the next wave of changes.
Is there an existing issue for this?
Describe the issue
The final CTE for quickbooks__cash_flow_statement should coalesce 0 with lag(cash_ending_period) since the value for the first row will always be null.
Corrected code:
final as (
)
Relevant error log or model output
No response
Expected behavior
Every row should have a value, even if 0
dbt Project configurations
/
Package versions
/
What database are you using dbt with?
snowflake
dbt Version
1.4.1
Additional Context
No response
Are you willing to open a PR to help address this issue?
The text was updated successfully, but these errors were encountered: