More models and knowledge
This commit is contained in:
parent
23a70ed74e
commit
ab581b0fb5
5 changed files with 83 additions and 3 deletions
19
code_thingies/dbtlearn/models/fact/fact_reviews.sql
Normal file
19
code_thingies/dbtlearn/models/fact/fact_reviews.sql
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{{
|
||||
config(
|
||||
materialized = 'incremental',
|
||||
on_schema_change = 'fail'
|
||||
)
|
||||
}}
|
||||
WITH src_reviews AS (
|
||||
SELECT *
|
||||
FROM
|
||||
{{ ref('src_reviews') }}
|
||||
)
|
||||
SELECT *
|
||||
FROM
|
||||
src_reviews
|
||||
WHERE
|
||||
review_text IS NOT NULL
|
||||
{% if is_incremental() %}
|
||||
AND review_date > (SELECT MAX(review_date) FROM {{ this }})
|
||||
{% endif %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue