Skip to content

Commit be8f2a3

Browse files
committed
alpha_commit
1 parent 03db721 commit be8f2a3

File tree

10 files changed

+103
-0
lines changed

10 files changed

+103
-0
lines changed

Diff for: .gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -269,3 +269,10 @@ __pycache__/
269269
/api/*.exclude
270270

271271
*.pptx
272+
273+
# Default .gitignore content added by dbt Cloud# you shouldn't commit these into source control
274+
# these are the default directory names, adjust/add to fit your needs
275+
target/
276+
dbt_packages/
277+
logs/
278+
# end dbt Cloud content

Diff for: analyses/.gitkeep

Whitespace-only changes.

Diff for: dbt_project.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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: 'my_new_project'
6+
version: '1.0.0'
7+
config-version: 2
8+
9+
# This setting configures which "profile" dbt uses for this project.
10+
profile: 'default'
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 dbt, the default materialization for a model is a view. This means, when you run
32+
# dbt run or dbt build, all of your models will be built as a view in your data platform.
33+
# The configuration below will override this setting for models in the example folder to
34+
# instead be materialized as tables. Any models you add to the root of the models folder will
35+
# continue to be built as views. These settings can be overridden in the individual model files
36+
# using the `{{ config(...) }}` macro.
37+
38+
models:
39+
my_new_project:
40+
# Applies to all files under models/example/
41+
example:
42+
+materialized: table

Diff for: macros/.gitkeep

Whitespace-only changes.

Diff for: 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

Diff for: models/example/my_second_dbt_model.sql

+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

Diff for: 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

Diff for: seeds/.gitkeep

Whitespace-only changes.

Diff for: snapshots/.gitkeep

Whitespace-only changes.

Diff for: tests/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)