diff --git a/.github/workflows/run-dbt-prd.yml b/.github/workflows/run-dbt-prd.yml new file mode 100644 index 000000000..3d34121ad --- /dev/null +++ b/.github/workflows/run-dbt-prd.yml @@ -0,0 +1,39 @@ +# .github/workflows/run-dbt-prd.yml +name: run_dbt_prd + +on: + push: + branches: + - main + pull_request: + branches: + - main +env: + DBT_PROFILES_DIR: ./nyc_parking_violations + DBT_PROJECT_DIR: ./nyc_parking_violations + +jobs: + dbt_setup: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - name: Install dependencies + run: pip install -r requirements.txt + + - name: Check dbt version + run: | + dbt --version + dbt debug + + - name: Check compile & test + run: | + dbt compile + dbt run + dbt test diff --git a/.vscode/settings.json b/.vscode/settings.json index 236981053..ca20f9585 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -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 diff --git a/nyc_parking_violations/profiles.yml b/nyc_parking_violations/profiles.yml index cabe18c54..1e7b98b40 100644 --- a/nyc_parking_violations/profiles.yml +++ b/nyc_parking_violations/profiles.yml @@ -2,11 +2,11 @@ nyc_parking_violations: outputs: dev: type: duckdb - path: '../data/nyc_parking_violations.db' + 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 \ No newline at end of file + path: '../data/prod_nyc_parking_violations.db' + target: dev diff --git a/run_sql_queries_here.ipynb b/run_sql_queries_here.ipynb index f7c54e6c9..51d0854a3 100644 --- a/run_sql_queries_here.ipynb +++ b/run_sql_queries_here.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -14,10 +14,108 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
| \n", + " | name | \n", + "
|---|---|
| 0 | \n", + "bronze_parking_violation_codes | \n", + "
| 1 | \n", + "bronze_parking_violations | \n", + "
| 2 | \n", + "first_model | \n", + "
| 3 | \n", + "gold_ticket_metrics | \n", + "
| 4 | \n", + "gold_vehicles_metrics | \n", + "
| 5 | \n", + "parking_violation_codes | \n", + "
| 6 | \n", + "parking_violations_2023 | \n", + "
| 7 | \n", + "ref_model | \n", + "
| 8 | \n", + "silver_parking_violation_codes | \n", + "
| 9 | \n", + "silver_parking_violations | \n", + "
| 10 | \n", + "silver_violation_tickets | \n", + "
| 11 | \n", + "silver_violation_vehicles | \n", + "