You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`DEV_SCHEMA_SUFFIX`| Personal dev schema suffix (creates `{team}__tmp_{suffix}`) | None (uses `{team}__tmp_`) |
42
54
43
55
See [Getting Started](docs/getting-started.md#2-set-environment-variables) for multiple options to set these variables (shell profile, session export, or inline).
@@ -54,12 +66,14 @@ uv run dbt test # Run tests
54
66
### Target Configuration
55
67
56
68
This project uses dbt targets to control **schema naming**, not API endpoints:
69
+
57
70
- Both `dev` and `prod` targets connect to the **same production API** (`trino.api.dune.com`)
58
71
- Target names control where models are written:
59
72
-**`dev` target** (default): Writes to `{team}__tmp_` schemas (safe for development)
60
73
-**`prod` target**: Writes to `{team}` schemas (production tables)
61
74
62
75
**Local development** uses `dev` target by default. To test with prod target locally:
76
+
63
77
```bash
64
78
uv run dbt run --target prod # Use prod schema naming
65
79
```
@@ -81,6 +95,7 @@ DEV_SCHEMA_SUFFIX=your_name uv run dbt run
81
95
```
82
96
83
97
To disable suffix after using it:
98
+
84
99
```bash
85
100
unset DEV_SCHEMA_SUFFIX
86
101
```
@@ -127,13 +142,13 @@ select * from dune.dune__tmp_.dbt_template_view_model
Copy file name to clipboardExpand all lines: docs/cicd.md
+14-7Lines changed: 14 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,13 @@ Continuous integration and deployment via GitHub Actions.
4
4
5
5
## GitHub-Hosted Runners
6
6
7
-
This template uses **GitHub-hosted runners** (`ubuntu-latest`) to execute CI/CD workflows.
7
+
This template uses **GitHub-hosted runners** (`ubuntu-latest`) to execute CI/CD workflows.
8
8
9
9
GitHub provides and manages these runners - no infrastructure setup required on your end.
10
10
11
11
## Pull Request Workflow (CI)
12
12
13
-
**Trigger:** Every pull request
13
+
**Trigger:** Every pull request
14
14
**File:**`.github/workflows/dbt_run.yml`
15
15
16
16
### What It Does
@@ -37,13 +37,15 @@ This is set via `DEV_SCHEMA_SUFFIX=pr{number}` environment variable.
37
37
### How to Pass CI
38
38
39
39
✅ **Keep branch updated:**
40
+
40
41
```bash
41
42
git fetch origin
42
43
git merge origin/main
43
44
git push
44
45
```
45
46
46
47
✅ **Test locally before pushing:**
48
+
47
49
```bash
48
50
uv run dbt run --select modified_model --full-refresh
49
51
uv run dbt test --select modified_model
@@ -53,8 +55,8 @@ uv run dbt test --select modified_model
53
55
54
56
## Production Workflow
55
57
56
-
**Trigger:** Manual (schedule disabled by default)
57
-
**File:**`.github/workflows/dbt_prod.yml`
58
+
**Trigger:** Manual (schedule disabled by default)
59
+
**File:**`.github/workflows/dbt_prod.yml`
58
60
**Branch:**`main` only
59
61
60
62
⚠️ **Note:** The hourly schedule is **disabled by default** in the template. Teams must uncomment the schedule in the workflow file when ready to enable automatic hourly runs.
@@ -79,6 +81,7 @@ The workflow saves `manifest.json` after each run and downloads it next time to
79
81
### Target Configuration
80
82
81
83
Production runs use `DBT_TARGET=prod`:
84
+
82
85
- Writes to `{team}` schemas (production)
83
86
- No suffix applied
84
87
@@ -102,25 +105,27 @@ Optional - defaults to `'dune'` if not set.
102
105
103
106
To receive failure alerts:
104
107
105
-
1.**Enable notifications:**
108
+
1.**Enable notifications:**
106
109
Profile → Settings → Notifications → Actions → "Notify me for failed workflows only"
107
110
108
111
2.**Verify email address** in GitHub settings
109
112
110
-
3.**Watch repository:**
113
+
3.**Watch repository:**
111
114
Click "Watch" button (any level works, even "Participating and @mentions")
112
115
113
116
## Workflow Triggers
114
117
115
118
### Pull Request Workflow
116
119
117
120
Runs when:
121
+
118
122
- PR opened, synchronized, or reopened
119
123
- Changes to: `models/`, `macros/`, `dbt_project.yml`, `profiles.yml`, `packages.yml`, workflow file
120
124
121
125
### Production Workflow
122
126
123
127
Runs when:
128
+
124
129
- Hourly (cron: `'0 * * * *'`) - **disabled by default, must be uncommented**
125
130
- Manual trigger via GitHub Actions UI
126
131
@@ -137,6 +142,7 @@ git push
137
142
### Test Failures
138
143
139
144
Check test output in GitHub Actions logs:
145
+
140
146
```
141
147
dbt test output → specific test name → error message
142
148
```
@@ -151,6 +157,7 @@ Query the model in Dune to investigate.
151
157
### Timeout
152
158
153
159
Workflows timeout after 30 minutes. If hitting this:
160
+
154
161
- Optimize query performance
155
162
- Add date filters during development
156
163
- Consider breaking large models into smaller pieces
@@ -160,6 +167,7 @@ Workflows timeout after 30 minutes. If hitting this:
160
167
Go to Actions tab → "dbt prod orchestration" → "Run workflow"
161
168
162
169
Use this for:
170
+
163
171
- Testing deployment changes
164
172
- Forcing a full refresh
165
173
- Running outside normal schedule
@@ -169,4 +177,3 @@ Use this for:
169
177
-[Development Workflow](development-workflow.md) - Local development process
170
178
-[Testing](testing.md) - Test requirements
171
179
-[Troubleshooting](troubleshooting.md) - Common issues
0 commit comments