feat: initial project setup
This commit is contained in:
22
dbt/dbt_project.yml
Normal file
22
dbt/dbt_project.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
name: data_platform
|
||||
version: "1.0.0"
|
||||
profile: data_platform
|
||||
|
||||
model-paths: ["models"]
|
||||
seed-paths: ["seeds"]
|
||||
test-paths: ["tests"]
|
||||
analysis-paths: ["analyses"]
|
||||
macro-paths: ["macros"]
|
||||
snapshot-paths: ["snapshots"]
|
||||
|
||||
target-path: "target"
|
||||
clean-targets:
|
||||
- "target"
|
||||
- "dbt_packages"
|
||||
|
||||
models:
|
||||
data_platform:
|
||||
staging:
|
||||
+materialized: view
|
||||
marts:
|
||||
+materialized: table
|
||||
12
dbt/models/staging/schema.yml
Normal file
12
dbt/models/staging/schema.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
version: 2
|
||||
|
||||
models:
|
||||
- name: stg_example
|
||||
description: >
|
||||
A placeholder staging model. Replace with your actual source tables.
|
||||
columns:
|
||||
- name: id
|
||||
description: Primary key.
|
||||
tests:
|
||||
- unique
|
||||
- not_null
|
||||
5
dbt/models/staging/stg_example.sql
Normal file
5
dbt/models/staging/stg_example.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Placeholder staging model.
|
||||
-- Replace this with your actual source query, e.g.:
|
||||
-- select * from {{ source('my_source', 'my_table') }}
|
||||
|
||||
select 1 as id, 'example' as name
|
||||
12
dbt/profiles.yml
Normal file
12
dbt/profiles.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
data_platform:
|
||||
target: "{{ env_var('DBT_TARGET', 'dev') }}"
|
||||
outputs:
|
||||
dev:
|
||||
type: postgres
|
||||
host: "{{ env_var('POSTGRES_HOST', 'localhost') }}"
|
||||
port: "{{ env_var('POSTGRES_PORT', '5432') | int }}"
|
||||
user: "{{ env_var('POSTGRES_USER') }}"
|
||||
password: "{{ env_var('POSTGRES_PASSWORD') }}"
|
||||
dbname: "{{ env_var('POSTGRES_DB') }}"
|
||||
schema: staging
|
||||
threads: 4
|
||||
Reference in New Issue
Block a user