diff --git a/models/example/my_first_dbt_model.sql b/models/example/my_first_dbt_model.sql index f31a12d..313aa04 100644 --- a/models/example/my_first_dbt_model.sql +++ b/models/example/my_first_dbt_model.sql @@ -9,7 +9,7 @@ {{ config(materialized='table') }} -with source_data as ( +/*with source_data as ( select 1 as id union all @@ -20,8 +20,8 @@ with source_data as ( select * from source_data -/* - Uncomment the line below to remove records with null `id` values -*/ --- where id is not null + +-- where id is not null*/ + +select * from pagila.dbt_aanubhava.ayush \ No newline at end of file diff --git a/models/example/my_second_dbt_model.sql b/models/example/my_second_dbt_model.sql index c91f879..0833de1 100644 --- a/models/example/my_second_dbt_model.sql +++ b/models/example/my_second_dbt_model.sql @@ -3,4 +3,6 @@ select * from {{ ref('my_first_dbt_model') }} -where id = 1 +where O_ORDERKEY = 1200003 + +/*select * from ayush limit 100*/ diff --git a/models/example/schema.yml b/models/example/schema.yml index 8dee309..28d8721 100644 --- a/models/example/schema.yml +++ b/models/example/schema.yml @@ -5,7 +5,7 @@ models: - name: my_first_dbt_model description: "A starter dbt model" columns: - - name: id + - name: O_ORDERKEY description: "The primary key for this table" tests: - unique @@ -14,8 +14,9 @@ models: - name: my_second_dbt_model description: "A starter dbt model" columns: - - name: id + - name: O_ORDERKEY description: "The primary key for this table" tests: - unique - not_null + \ No newline at end of file diff --git a/models/example/seedcheck.sql b/models/example/seedcheck.sql new file mode 100644 index 0000000..0a33b70 --- /dev/null +++ b/models/example/seedcheck.sql @@ -0,0 +1 @@ +select country_name from {{ ref('country_codes') }} \ No newline at end of file diff --git a/models/example/test.sql b/models/example/test.sql new file mode 100644 index 0000000..3ee6ff5 --- /dev/null +++ b/models/example/test.sql @@ -0,0 +1,3 @@ +select * +from {{ ref('my_first_dbt_model') }} +where O_ORDERKEY != 1200004 \ No newline at end of file diff --git a/seeds/country_codes.csv b/seeds/country_codes.csv new file mode 100644 index 0000000..c9e2073 --- /dev/null +++ b/seeds/country_codes.csv @@ -0,0 +1,4 @@ +country_code,country_name +US,United States +CA,Canada +GB,United Kingdom \ No newline at end of file diff --git a/seeds/schema.yml b/seeds/schema.yml new file mode 100644 index 0000000..f866f39 --- /dev/null +++ b/seeds/schema.yml @@ -0,0 +1,14 @@ +version: 2 + +seeds: + - name: country_codes + description: A mapping of two letter country codes to country names + columns: + - name: country_code + tests: + - unique + - not_null + - name: country_name + tests: + - unique + - not_null \ No newline at end of file