Skip to content

Commit 6ed58b5

Browse files
committed
First commmit
0 parents  commit 6ed58b5

File tree

11 files changed

+111
-0
lines changed

11 files changed

+111
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
target/
3+
dbt_packages/
4+
logs/

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Welcome to your new dbt project!
2+
3+
### Using the starter project
4+
5+
Try running the following commands:
6+
- dbt run
7+
- dbt test
8+
9+
10+
### Resources:
11+
- Learn more about dbt [in the docs](https://docs.getdbt.com/docs/introduction)
12+
- Check out [Discourse](https://discourse.getdbt.com/) for commonly asked questions and answers
13+
- Join the [chat](https://community.getdbt.com/) on Slack for live discussions and support
14+
- Find [dbt events](https://events.getdbt.com) near you
15+
- Check out [the blog](https://blog.getdbt.com/) for the latest news on dbt's development and best practices

analyses/.gitkeep

Whitespace-only changes.

dbt_project.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
# Name your project! Project names should contain only lowercase characters
3+
# and underscores. A good package name should reflect your organization's
4+
# name or the intended use of these models
5+
name: 'shopify'
6+
version: '1.0.0'
7+
config-version: 2
8+
9+
# This setting configures which "profile" dbt uses for this project.
10+
profile: 'shopify'
11+
12+
# These configurations specify where dbt should look for different types of files.
13+
# The `model-paths` config, for example, states that models in this project can be
14+
# found in the "models/" directory. You probably won't need to change these!
15+
model-paths: ["models"]
16+
analysis-paths: ["analyses"]
17+
test-paths: ["tests"]
18+
seed-paths: ["seeds"]
19+
macro-paths: ["macros"]
20+
snapshot-paths: ["snapshots"]
21+
22+
target-path: "target" # directory which will store compiled SQL files
23+
clean-targets: # directories to be removed by `dbt clean`
24+
- "target"
25+
- "dbt_packages"
26+
27+
28+
# Configuring models
29+
# Full documentation: https://docs.getdbt.com/docs/configuring-models
30+
31+
# In this example config, we tell dbt to build all models in the example/ directory
32+
# as tables. These settings can be overridden in the individual model files
33+
# using the `{{ config(...) }}` macro.
34+
models:
35+
shopify:
36+
# Config indicated by + and applies to all files under models/example/
37+
example:
38+
+materialized: view

macros/.gitkeep

Whitespace-only changes.

models/example/my_first_dbt_model.sql

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
/*
3+
Welcome to your first dbt model!
4+
Did you know that you can also configure models directly within SQL files?
5+
This will override configurations stated in dbt_project.yml
6+
7+
Try changing "table" to "view" below
8+
*/
9+
10+
{{ config(materialized='table') }}
11+
12+
with source_data as (
13+
14+
select 1 as id
15+
union all
16+
select null as id
17+
18+
)
19+
20+
select *
21+
from source_data
22+
23+
/*
24+
Uncomment the line below to remove records with null `id` values
25+
*/
26+
27+
-- where id is not null
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
-- Use the `ref` function to select from other models
3+
4+
select *
5+
from {{ ref('my_first_dbt_model') }}
6+
where id = 1

models/example/schema.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
version: 2
3+
4+
models:
5+
- name: my_first_dbt_model
6+
description: "A starter dbt model"
7+
columns:
8+
- name: id
9+
description: "The primary key for this table"
10+
tests:
11+
- unique
12+
- not_null
13+
14+
- name: my_second_dbt_model
15+
description: "A starter dbt model"
16+
columns:
17+
- name: id
18+
description: "The primary key for this table"
19+
tests:
20+
- unique
21+
- not_null

seeds/.gitkeep

Whitespace-only changes.

snapshots/.gitkeep

Whitespace-only changes.

tests/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)