Skip to content

Commit

Permalink
revert document_metadata changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Maria Lorena Rodriguez Viruel committed Aug 23, 2024
1 parent 9c2315d commit 588c48a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions models/root/document_metadata.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{% set import_couchdb_data = select_table("{{ env_var('POSTGRES_SCHEMA') }}.{{ env_var('POSTGRES_TABLE') }}", ref('test_source_table')) %}

{{
config(
materialized = 'incremental',
Expand All @@ -20,7 +18,7 @@ SELECT
_deleted,
saved_timestamp,
doc->>'type' as doc_type
FROM {{ import_couchdb_data }}
FROM {{ env_var('POSTGRES_SCHEMA') }}.{{ env_var('POSTGRES_TABLE') }} source_table
{% if is_incremental() %}
WHERE source_table.saved_timestamp >= {{ max_existing_timestamp('saved_timestamp') }}
{% endif %}

0 comments on commit 588c48a

Please sign in to comment.