Skip to content
Open

Main #38

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"files.autoSave": "afterDelay",
"screencastMode.onlyKeyboardShortcuts": true,
"terminal.integrated.fontSize": 18,
"workbench.activityBar.visible": true,
"workbench.colorTheme": "Visual Studio Dark",
"workbench.fontAliasing": "antialiased",
"workbench.statusBar.visible": true
Expand Down
5 changes: 5 additions & 0 deletions =2.28
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Requirement already satisfied: requests in /Users/mac/anaconda3/lib/python3.11/site-packages (2.31.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /Users/mac/anaconda3/lib/python3.11/site-packages (from requests) (2.0.4)
Requirement already satisfied: idna<4,>=2.5 in /Users/mac/anaconda3/lib/python3.11/site-packages (from requests) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/mac/anaconda3/lib/python3.11/site-packages (from requests) (1.26.16)
Requirement already satisfied: certifi>=2017.4.17 in /Users/mac/anaconda3/lib/python3.11/site-packages (from requests) (2023.7.22)
Binary file modified data/nyc_parking_violations.db
Binary file not shown.
Binary file modified data/prod_nyc_parking_violations.db
Binary file not shown.
2 changes: 1 addition & 1 deletion nyc_parking_violations/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.user.yml

target/
dbt_packages/
logs/
1 change: 1 addition & 0 deletions nyc_parking_violations/.user.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 2f44a91d-3632-440f-a77d-b256f6b88a8e
3 changes: 2 additions & 1 deletion nyc_parking_violations/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ models:
silver_violation_vehicles:
+materialized: view
gold:
+materialized: table
+ materialized: table
tests:
+store_failures: true

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SELECT
code AS violation_code,
definition,
manhattan_96th_st_below,
all_other_areas
FROM
parking_violation_codes
Select
code As violation_code,
definition,
manhattan_96th_st_below,
all_other_areas
From
parking_violation_codes
2 changes: 1 addition & 1 deletion nyc_parking_violations/models/example/first_model.sql
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SELECT * FROM parking_violation_codes
select * from parking_violation_codes
8 changes: 4 additions & 4 deletions nyc_parking_violations/models/example/ref_model.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SELECT
COUNT(*)
FROM
{{ref('first_model')}}
select
count(*)
from
{{ref('first_model')}}
20 changes: 10 additions & 10 deletions nyc_parking_violations/profiles.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
nyc_parking_violations:
outputs:
dev:
type: duckdb
path: '../data/nyc_parking_violations.db'
prod:
type: duckdb
# note that path is slightly different as GitHub actions
# start in the root directory and not in the
# nyc_parking_violations directory
path: './data/prod_nyc_parking_violations.db'
target: dev
dev:
type: duckdb
path: '../data/nyc_parking_violations.db'
prod:
type: duckdb
# note that path is slihtly different as Github actions
# start in the root directory and not in the
# nyc_parking_violations directory
path: '../data/prod_nyc_parking_violations.db'
target: dev
1 change: 0 additions & 1 deletion nyc_parking_violations/tests/generic/generic_not_null.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-- source: https://docs.getdbt.com/guides/best-practices/writing-custom-generic-tests#generic-tests-with-default-config-values
{% test generic_not_null(model, column_name) %}

select *
Expand Down
3 changes: 1 addition & 2 deletions nyc_parking_violations/tests/violation_codes_revenue.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{{ config(severity = 'warn') }}

{{ config(severity = 'warn')}}
SELECT
violation_code,
SUM(fee_usd) AS total_revenue_usd
Expand Down
Loading