forked from tuva-health/tuva
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdbt_v1.10.15_databricks_build_full_refresh.yml
More file actions
49 lines (40 loc) · 1.6 KB
/
dbt_v1.10.15_databricks_build_full_refresh.yml
File metadata and controls
49 lines (40 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Databricks CICD Full Refresh
on:
workflow_dispatch: # Allows manual trigger from UI
concurrency:
# Ensure only one Databricks workflow runs at a time to prevent database conflicts
group: ci-databricks
cancel-in-progress: false
jobs:
dbt_run:
runs-on: ubuntu-latest
env:
# Environment variables
PYTHON_VERSION: "3.10"
DBT_PROJECT_DIR: "./integration_tests"
DBT_CORE_VERSION: "1.10.15"
# Databricks connection variables
DBT_DATABRICKS_CI_HOST: ${{ secrets.DBT_DATABRICKS_CI_HOST }}
DBT_DATABRICKS_CI_HTTP_PATH: ${{ secrets.DBT_DATABRICKS_CI_HTTP_PATH }}
DBT_DATABRICKS_CI_TOKEN: ${{ secrets.DBT_DATABRICKS_CI_TOKEN }}
DBT_DATABRICKS_CI_CATALOG: ${{ secrets.DBT_DATABRICKS_CI_CATALOG }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
# Certifi addresses a known certificate issue with databricks and dbt
- name: Install dbt-core and Databricks adapter
run: |
python -m pip install --upgrade pip
pip install dbt-core==1.10.15 dbt-databricks
# Install SSL certificates fix
pip install certifi
- name: Load dbt dependencies
run: dbt deps --profiles-dir ./integration_tests/profiles/databricks
- name: Test connection
run: dbt debug --profiles-dir ./integration_tests/profiles/databricks
- name: Build dbt models (full-refresh)
run: |
dbt build --full-refresh --profiles-dir ./integration_tests/profiles/databricks