More thingies
This commit is contained in:
parent
718366d09c
commit
ba37fc09e7
6 changed files with 5 additions and 55 deletions
|
|
@ -27,6 +27,8 @@ Once you have set this up and the database as well, you can run `dbt debug` to e
|
||||||
|
|
||||||
You should also delete the lines under the `dbtlearn` key in the `dbt_project.yml` file.
|
You should also delete the lines under the `dbtlearn` key in the `dbt_project.yml` file.
|
||||||
|
|
||||||
|
Also delete the contents of the `models` folder.
|
||||||
|
|
||||||
|
|
||||||
# DBT noisy things below
|
# DBT noisy things below
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
|
|
||||||
/*
|
|
||||||
Welcome to your first dbt model!
|
|
||||||
Did you know that you can also configure models directly within SQL files?
|
|
||||||
This will override configurations stated in dbt_project.yml
|
|
||||||
|
|
||||||
Try changing "table" to "view" below
|
|
||||||
*/
|
|
||||||
|
|
||||||
{{ config(materialized='table') }}
|
|
||||||
|
|
||||||
with source_data as (
|
|
||||||
|
|
||||||
select 1 as id
|
|
||||||
union all
|
|
||||||
select null as id
|
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
select *
|
|
||||||
from source_data
|
|
||||||
|
|
||||||
/*
|
|
||||||
Uncomment the line below to remove records with null `id` values
|
|
||||||
*/
|
|
||||||
|
|
||||||
-- where id is not null
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
|
|
||||||
-- Use the `ref` function to select from other models
|
|
||||||
|
|
||||||
select *
|
|
||||||
from {{ ref('my_first_dbt_model') }}
|
|
||||||
where id = 1
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
|
|
||||||
version: 2
|
|
||||||
|
|
||||||
models:
|
|
||||||
- name: my_first_dbt_model
|
|
||||||
description: "A starter dbt model"
|
|
||||||
columns:
|
|
||||||
- name: id
|
|
||||||
description: "The primary key for this table"
|
|
||||||
tests:
|
|
||||||
- unique
|
|
||||||
- not_null
|
|
||||||
|
|
||||||
- name: my_second_dbt_model
|
|
||||||
description: "A starter dbt model"
|
|
||||||
columns:
|
|
||||||
- name: id
|
|
||||||
description: "The primary key for this table"
|
|
||||||
tests:
|
|
||||||
- unique
|
|
||||||
- not_null
|
|
||||||
BIN
images/dataflow_overview.png
Normal file
BIN
images/dataflow_overview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 163 KiB |
|
|
@ -103,4 +103,6 @@ dbt makes sense nowadays because the modern data stack makes transformations wit
|
||||||
## dbt project structure
|
## dbt project structure
|
||||||
|
|
||||||
|
|
||||||
- `dbt_project.yml`: header of the project, with stuff like versioning, the default profile for the project, the paths to different folders, etc.
|
- `dbt_project.yml`: header of the project, with stuff like versioning, the default profile for the project, the paths to different folders, etc.
|
||||||
|
|
||||||
|
This is a pic of the data flow we are going to build: 
|
||||||
Loading…
Add table
Add a link
Reference in a new issue