Thingies
This commit is contained in:
parent
045ce1ec45
commit
3fce12819b
4 changed files with 35 additions and 2 deletions
|
|
@ -9,7 +9,9 @@ WITH src_reviews AS (
|
||||||
FROM
|
FROM
|
||||||
{{ ref('src_reviews') }}
|
{{ ref('src_reviews') }}
|
||||||
)
|
)
|
||||||
SELECT *
|
SELECT
|
||||||
|
{{ dbt_utils.surrogate_key(['listing_id', 'review_date', 'reviewer_name', 'review_text']) }} as review_id,
|
||||||
|
*
|
||||||
FROM
|
FROM
|
||||||
src_reviews
|
src_reviews
|
||||||
WHERE
|
WHERE
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ WITH raw_reviews AS (
|
||||||
SELECT
|
SELECT
|
||||||
listing_id,
|
listing_id,
|
||||||
date AS review_date,
|
date AS review_date,
|
||||||
|
reviewer_name AS reviewer_name,
|
||||||
comments AS review_text,
|
comments AS review_text,
|
||||||
sentiment AS review_sentiment
|
sentiment AS review_sentiment
|
||||||
FROM
|
FROM
|
||||||
|
|
|
||||||
3
code_thingies/dbtlearn/packages.yml
Normal file
3
code_thingies/dbtlearn/packages.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
packages:
|
||||||
|
- package: dbt-labs/dbt_utils
|
||||||
|
version: 0.8.0
|
||||||
29
notes/8.md
29
notes/8.md
|
|
@ -80,4 +80,31 @@ You can also define your own custom generic tests.
|
||||||
|
|
||||||
- Macros are jinja templates.
|
- Macros are jinja templates.
|
||||||
- There are many built-in macros in dbt, but you can also use your own macros.
|
- 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.
|
- 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.
|
||||||
|
-
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue