Commit 2f3b7ea
committed
fix(dlt): prevent credential type field overwriting db_type in format_config
format_config initialises config = {"type": db_type} then iterates all
credential object attributes and writes them into config. BigQuery
service-account credentials carry a "type": "service_account" field
(from the GCP service account JSON format) which overwrites the
"bigquery" key. parse_connection_config then raises:
ConfigError: Unknown connection type 'service_account'
This error fires before model generation starts, even though the direct
caller (generate_dlt_models) discards the connection config entirely.
The bug only surfaces with BigQuery service-account credentials; OAUTH
credentials do not carry a conflicting type field.
Fix: move config["type"] = db_type to after the credential loop so it
cannot be overwritten by credential attributes.
Signed-off-by: Mary Akowe <mary.akowe@madetech.com>1 parent 444c50d commit 2f3b7ea
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
219 | | - | |
| 217 | + | |
220 | 218 | | |
221 | 219 | | |
222 | 220 | | |
| |||
226 | 224 | | |
227 | 225 | | |
228 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
229 | 232 | | |
230 | 233 | | |
231 | 234 | | |
| |||
0 commit comments