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
Copy file name to clipboardExpand all lines: docs/guides/tablediff.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,24 +140,30 @@ When diffing multiple models, SQLMesh will:
140
140
141
141
The `--select-model` option supports a powerful selection syntax that lets you choose models using patterns, tags, dependencies and git status. For complete details, see the [model selection guide](./model_selection.md).
142
142
143
-
> Note: models will only be data diffed if there's a breaking change that impacts them.
143
+
> Note: Models will only be data diffed if there's a breaking change that impacts them.
144
144
145
145
Here are some common patterns you can use:
146
-
> Note: Surround your selection pattern in single or double quotes. Ex: '*', "sqlmesh_example.*"
146
+
147
+
> Note: Surround your selection pattern in single or double quotes. Ex: `'*'`, `"sqlmesh_example.*"`
148
+
147
149
### Wildcard Patterns
150
+
148
151
-`*` - All models in the project
149
152
-`sqlmesh_example.*` - All models in the sqlmesh_example schema
150
153
151
154
### Upstream/Downstream Selection
155
+
152
156
-`+model_name` - Select the model and its upstream dependencies
153
157
-`model_name+` - Select the model and its downstream dependencies
154
158
-`+model_name+` - Select the model and both its upstream and downstream dependencies
155
159
156
160
### Tag-based Selection
161
+
157
162
-`tag:finance` - All models with the "finance" tag
158
163
-`tag:reporting*` - All models with tags starting with "reporting"
159
164
160
165
### Git-based Selection
166
+
161
167
-`git:feature` - Select models whose files have changed compared to main branch, including:
162
168
- Untracked files (new files not in git)
163
169
- Uncommitted changes in working directory
@@ -168,12 +174,14 @@ Here are some common patterns you can use:
168
174
> Note: Git-based selection excludes deleted files and respects your `.gitignore` settings.
169
175
170
176
### Logical Operators
177
+
171
178
You can combine multiple selectors using logical operators:
172
179
-`&` (AND): Both conditions must be true
173
180
-`|` (OR): Either condition must be true
174
181
-`^` (NOT): Negates a condition
175
182
176
183
#### Complex Selection Examples
184
+
177
185
-`(tag:finance & ^tag:deprecated)` - Models with finance tag that don't have deprecated tag
178
186
-`(+model_a | model_b+)` - Model A and its upstream deps OR model B and its downstream deps
179
187
-`(tag:finance & git:main)` - Changed models that also have the finance tag
0 commit comments