Commit c5afb85
Fix delta external table schema diff, script syntax, and cleanup (#164)
* Fix delta external table schema diff, script syntax, and cleanup
Three fixes for delta external tables:
1. Schema perpetual diff: The bulk loader populates the schema for all
external tables from the cluster, but delta tables auto-infer their
schema from the delta log — so YAML configs intentionally omit it.
This caused a perpetual diff on every run. Fix: before comparing,
clear the cluster-side schema for delta tables when the YAML doesn't
specify one. If the YAML provides a custom schema, keep it for
proper comparison.
2. Missing closing paren: CreateDeltaScript generated an unclosed
parenthesis around the connection string, producing invalid KQL
that fails Kusto syntax validation and cannot be applied.
3. Remove unnecessary dataFormat requirement: Delta tables don't use
dataformat= in the Kusto command syntax. Removed the misleading
validation that required it.
4. Only emit with() properties when set: Delta script no longer emits
empty folder='', docString='', fileExtension='' when not specified
in YAML. The with() block is omitted entirely if no properties are
set.
Fixes github/data#11973
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address comments
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 9587667 commit c5afb85
File tree
2 files changed
+26
-3
lines changed- KustoSchemaTools
- Changes
- Model
2 files changed
+26
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
116 | 132 | | |
117 | 133 | | |
118 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
151 | 154 | | |
| 155 | + | |
152 | 156 | | |
153 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
154 | 161 | | |
155 | 162 | | |
156 | 163 | | |
| |||
0 commit comments