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", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
name
0bronze_parking_violation_codes
1bronze_parking_violations
2first_model
3gold_ticket_metrics
4gold_vehicles_metrics
5parking_violation_codes
6parking_violations_2023
7ref_model
8silver_parking_violation_codes
9silver_parking_violations
10silver_violation_tickets
11silver_violation_vehicles
\n", + "
" + ], + "text/plain": [ + " name\n", + "0 bronze_parking_violation_codes\n", + "1 bronze_parking_violations\n", + "2 first_model\n", + "3 gold_ticket_metrics\n", + "4 gold_vehicles_metrics\n", + "5 parking_violation_codes\n", + "6 parking_violations_2023\n", + "7 ref_model\n", + "8 silver_parking_violation_codes\n", + "9 silver_parking_violations\n", + "10 silver_violation_tickets\n", + "11 silver_violation_vehicles" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "sql_query = '''\n", "show tables\n", + "\n", "'''\n", "\n", "with duckdb.connect('data/nyc_parking_violations.db') as con:\n", @@ -43,12 +141,7 @@ "pygments_lexer": "ipython3", "version": "3.10.12" }, - "orig_nbformat": 4, - "vscode": { - "interpreter": { - "hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6" - } - } + "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2