Skip to content

Commit

Permalink
fix order by jinja (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
akaBotelho authored Sep 13, 2024
1 parent 6716d2e commit df5091e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pipelines/migration/projeto_subsidio_sppo/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
Flows for projeto_subsidio_sppo
DBT 2024-09-10
DBT 2024-09-13
"""

from prefect import Parameter, case, task
Expand Down
2 changes: 1 addition & 1 deletion queries/models/projeto_subsidio_sppo/viagem_planejada.sql
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ and

{% else %}
{% if execute %}
{% set result = run_query("SELECT tipo_os, feed_version, feed_start_date, tipo_dia FROM " ~ ref('subsidio_data_versao_efetiva') ~ " WHERE data BETWEEN DATE_SUB(DATE('" ~ var("run_date") ~ "'), INTERVAL 2 DAY) AND DATE_SUB(DATE('" ~ var("run_date") ~ "'), INTERVAL 1 DAY) ORDER BY feed_version") %}
{% set result = run_query("SELECT tipo_os, feed_version, feed_start_date, tipo_dia FROM " ~ ref('subsidio_data_versao_efetiva') ~ " WHERE data BETWEEN DATE_SUB(DATE('" ~ var("run_date") ~ "'), INTERVAL 2 DAY) AND DATE_SUB(DATE('" ~ var("run_date") ~ "'), INTERVAL 1 DAY) ORDER BY data") %}
{% set tipo_oss = result.columns[0].values() %}
{% set feed_versions = result.columns[1].values() %}
{% set feed_start_dates = result.columns[2].values() %}
Expand Down

0 comments on commit df5091e

Please sign in to comment.