add dbt run
This commit is contained in:
parent
c0990bf87c
commit
96884a8c89
5 changed files with 31 additions and 1 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
- add extractor and loader
|
- add extractor and loader
|
||||||
- configure extractor and loader
|
- configure extractor and loader
|
||||||
- meltano run name-of-extractor name-of-loader
|
- meltano run name-of-extractor name-of-loader
|
||||||
|
- meltano add utility dbt-postgres; meltano invoke dbt-postgres:initialize
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,3 +52,9 @@ plugins:
|
||||||
- name: dbt-postgres
|
- name: dbt-postgres
|
||||||
variant: dbt-labs
|
variant: dbt-labs
|
||||||
pip_url: dbt-core dbt-postgres meltano-dbt-ext~=0.3.0
|
pip_url: dbt-core dbt-postgres meltano-dbt-ext~=0.3.0
|
||||||
|
config:
|
||||||
|
host: localhost
|
||||||
|
port: 5444
|
||||||
|
user: dw
|
||||||
|
dbname: dw_db
|
||||||
|
schema: intermediate
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,7 @@ clean-targets:
|
||||||
- dbt_packages
|
- dbt_packages
|
||||||
- logs
|
- logs
|
||||||
models:
|
models:
|
||||||
my_meltano_project: null
|
my_meltano_project:
|
||||||
|
staging:
|
||||||
|
+schema: staging
|
||||||
|
|
||||||
|
|
|
||||||
8
pizza_dw/transform/models/staging/sources.yml
Normal file
8
pizza_dw/transform/models/staging/sources.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
config-version: 2
|
||||||
|
version: 2
|
||||||
|
sources:
|
||||||
|
- name: app # the name we want to reference this source by
|
||||||
|
schema: tap_app # the schema the raw data was loaded into
|
||||||
|
tables:
|
||||||
|
- name: customers
|
||||||
|
- name: pizza_orders
|
||||||
12
pizza_dw/transform/models/staging/stg__pizza_orders.sql
Normal file
12
pizza_dw/transform/models/staging/stg__pizza_orders.sql
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{{
|
||||||
|
config(
|
||||||
|
materialized='table'
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
|
||||||
|
with raw_pizza_orders as (
|
||||||
|
select *
|
||||||
|
from {{ source('app', 'pizza_orders') }}
|
||||||
|
)
|
||||||
|
select *
|
||||||
|
from raw_pizza_orders
|
||||||
Loading…
Add table
Add a link
Reference in a new issue