Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backlog tickets fix #61

Merged
merged 1 commit into from
Jan 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions models/ticket_history/int_zendesk__field_history_scd.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ with change_data as (
,sum(case when {{ col.name }} is null
then 0
else 1
end) over (order by ticket_id, date_day rows unbounded preceding) as {{ col.name }}_field_patition
end) over (order by ticket_id, date_day rows unbounded preceding) as {{ col.name }}_field_partition
{% endfor %}

from change_data
Expand All @@ -36,7 +36,7 @@ with change_data as (

{% for col in ticket_columns if col.name|lower not in ['date_day','ending_day','ticket_id','ticket_day_id'] %}

,first_value( {{ col.name }} ) over (partition by {{ col.name }}_field_patition order by valid_from asc rows between unbounded preceding and current row) as {{ col.name }}
,first_value( {{ col.name }} ) over (partition by {{ col.name }}_field_partition, ticket_id order by valid_from asc rows between unbounded preceding and current row) as {{ col.name }}

{% endfor %}
from set_values
Expand Down