Skip to content

Commit

Permalink
fix(#156): moving condition outside incremental
Browse files Browse the repository at this point in the history
  • Loading branch information
witash committed Feb 11, 2025
1 parent 4f1e208 commit 9893767
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions models/root/document_metadata.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ from {{ source('couchdb', env_var('POSTGRES_TABLE')) }} source_table

{% if is_incremental() %}
WHERE source_table.saved_timestamp >= {{ max_existing_timestamp('saved_timestamp') }}
{% endif %}

{% if var("batch_size") is not none %}
ORDER BY saved_timestamp
LIMIT {{ var('batch_size') }}
{% endif %}

{% if var("batch_size") is not none %}
ORDER BY saved_timestamp
LIMIT {{ var('batch_size') }}
{% endif %}

0 comments on commit 9893767

Please sign in to comment.