Skip to content

Commit

Permalink
use source as test input
Browse files Browse the repository at this point in the history
  • Loading branch information
Maria Lorena Rodriguez Viruel committed Aug 24, 2024
1 parent 588c48a commit 167e8c5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion models/root/document_metadata.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SELECT
_deleted,
saved_timestamp,
doc->>'type' as doc_type
FROM {{ env_var('POSTGRES_SCHEMA') }}.{{ env_var('POSTGRES_TABLE') }} source_table
from {{ source('couchdb', env_var('POSTGRES_TABLE')) }} source_table
{% if is_incremental() %}
WHERE source_table.saved_timestamp >= {{ max_existing_timestamp('saved_timestamp') }}
{% endif %}
2 changes: 1 addition & 1 deletion models/root/tests/document_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ unit_tests:
macros:
is_incremental: false
given:
- input: ref('test_source_table')
- input: source('couchdb', "{{ env_var('POSTGRES_TABLE') }}")
format: csv
fixture: contacts_test_source_table_input
expect:
Expand Down
7 changes: 0 additions & 7 deletions models/root/tests/test_source_table.sql

This file was deleted.

0 comments on commit 167e8c5

Please sign in to comment.