This commit is contained in:
Pablo Martin 2023-11-03 10:26:11 +01:00
parent 045ce1ec45
commit 3fce12819b
4 changed files with 35 additions and 2 deletions

View file

@ -9,7 +9,9 @@ WITH src_reviews AS (
FROM
{{ ref('src_reviews') }}
)
SELECT *
SELECT
{{ dbt_utils.surrogate_key(['listing_id', 'review_date', 'reviewer_name', 'review_text']) }} as review_id,
*
FROM
src_reviews
WHERE

View file

@ -5,6 +5,7 @@ WITH raw_reviews AS (
SELECT
listing_id,
date AS review_date,
reviewer_name AS reviewer_name,
comments AS review_text,
sentiment AS review_sentiment
FROM

View file

@ -0,0 +1,3 @@
packages:
- package: dbt-labs/dbt_utils
version: 0.8.0

View file

@ -81,3 +81,30 @@ You can also define your own custom generic tests.
- Macros are jinja templates.
- There are many built-in macros in dbt, but you can also use your own macros.
- dbt packages exist and you can use them to have more tests and macros that you can use.
## Documentation
- Documentation is kept in the repo (yay)
- Documentation can be defined in yaml files or in standalone markdown files. For example, the landing page can be customized with an `overview.md` file.
- Documentation can be quick-served with dbt, but ideally you should compile it and serve it with a regular web server, like Nginx.
-