File size: 6,207 Bytes
38e0f5f
 
60b8555
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38e0f5f
 
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
 
 
 
38e0f5f
60b8555
38e0f5f
60b8555
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
 
 
 
 
 
 
 
 
38e0f5f
60b8555
38e0f5f
60b8555
 
 
 
 
38e0f5f
60b8555
38e0f5f
60b8555
 
 
38e0f5f
60b8555
38e0f5f
60b8555
 
 
 
 
 
 
 
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
 
 
 
 
 
 
 
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
 
 
 
 
 
 
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
 
 
 
 
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
 
 
 
 
 
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
 
38e0f5f
60b8555
38e0f5f
60b8555
 
38e0f5f
60b8555
 
 
 
 
38e0f5f
60b8555
38e0f5f
60b8555
 
 
38e0f5f
60b8555
38e0f5f
60b8555
 
 
 
38e0f5f
60b8555
 
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
 
 
38e0f5f
60b8555
38e0f5f
60b8555
 
 
 
 
 
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
 
 
 
 
 
 
 
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
 
 
 
 
 
 
 
 
 
 
 
38e0f5f
60b8555
38e0f5f
60b8555
 
 
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
 
 
 
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
38e0f5f
60b8555
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
---
library_name: transformers
pipeline_tag: text-generation
license: apache-2.0
language:
- en
tags:
- etl
- data-engineering
- databricks
- spark
- sql
- lora
- qlora
- qwen2.5
- instruction-tuning
base_model:
- Qwen/Qwen2.5-1.5B-Instruct
---

# ETL Error Explainer v2

## Model Description

ETL Error Explainer v2 is a domain-specific instruction-tuned language model designed to analyze ETL and data pipeline failures.

Given an ETL error message and execution context (environment, severity, cloud provider), the model produces a structured JSON response containing:

- category
- root_cause
- immediate_fix
- long_term_fix

The model is intended to assist Data Engineers, Analytics Engineers, Platform Engineers, and DevOps teams during troubleshooting and incident response.

---

# Model Details

## Developed by

Fırat Çelik

## Model type

Instruction-tuned causal language model

## Base model

Qwen/Qwen2.5-1.5B-Instruct

## Fine-tuning method

QLoRA (4-bit NF4 Quantization + LoRA)

## Language

English

## License

Apache-2.0

---

# Model Sources

## Hugging Face Repository

https://huggingface.co/firfircelik/etl-error-explainer-v2

## Dataset

Synthetic ETL troubleshooting instruction dataset created by the author.

---

# Intended Uses

## Direct Use

The model is designed for structured ETL troubleshooting.

Example applications include:

- Spark error explanation
- SQL exception analysis
- Databricks job failures
- Azure Data Factory pipeline failures
- Kafka ingestion errors
- Snowflake query failures
- Schema evolution issues
- Authentication and permission errors
- Data validation failures

Input:

```
Context:
environment=prod
severity=High
cloud=Azure

Analyze the following Databricks failure:

org.apache.spark.sql.AnalysisException:
cannot resolve 'customer_email'
```

Output:

```json
{
  "category": "...",
  "root_cause": "...",
  "immediate_fix": "...",
  "long_term_fix": "..."
}
```

---

## Downstream Uses

The model can be integrated into:

- AI Data Engineering copilots
- Internal troubleshooting assistants
- Incident response systems
- RAG applications
- Chatbots
- IDE assistants
- Knowledge base generation
- Support automation

---

## Out-of-Scope Uses

The model is **not** intended for:

- General-purpose chat
- Code generation
- SQL execution
- Production system diagnosis
- Security analysis
- Legal advice
- Medical advice

Outputs should always be reviewed before applying fixes to production environments.

---

# Bias, Risks and Limitations

The model has been trained specifically for ETL troubleshooting.

Limitations include:

- It does not inspect live systems.
- It may suggest common fixes that are not applicable in every environment.
- It cannot validate infrastructure configurations.
- It may hallucinate missing context if insufficient information is provided.
- It should complement—not replace—human expertise.

---

# Recommendations

Best performance is achieved when prompts include:

- Full error messages
- Stack traces
- Cloud provider
- Environment (dev/test/prod)
- Severity level
- Relevant SQL or Spark snippets

---

# Getting Started

```python
from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "firfircelik/etl-error-explainer-v2"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)

prompt = """
Context:
environment=prod
severity=High
cloud=Azure

Analyze the following Databricks failure:

org.apache.spark.sql.AnalysisException:
cannot resolve 'customer_email'
"""

inputs = tokenizer(prompt, return_tensors="pt")

outputs = model.generate(
    **inputs,
    max_new_tokens=256
)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```

---

# Training Details

## Base Model

Qwen/Qwen2.5-1.5B-Instruct

## Fine-Tuning Method

QLoRA

- 4-bit NF4 quantization
- LoRA adapters
- PEFT

## LoRA Configuration

| Parameter | Value |
|-----------|------:|
| r | 16 |
| alpha | 32 |
| dropout | 0.05 |
| target modules | q_proj, k_proj, v_proj, o_proj |

## Optimizer

paged_adamw_8bit

## Training Hyperparameters

| Parameter | Value |
|-----------|------:|
| Epochs | 3 |
| Batch Size | 4 |
| Gradient Accumulation | 4 |
| Effective Batch Size | 16 |
| Learning Rate | 2e-4 |
| Sequence Length | 512 |

---

# Training Data

The model was trained on a synthetic instruction dataset covering realistic ETL failures.

Covered domains include:

- Apache Spark
- Databricks
- SQL
- Azure Data Factory
- Snowflake
- Kafka
- Delta Lake
- Data validation
- Schema evolution
- Authentication
- File ingestion
- Cloud storage

Each sample contains:

- execution context
- instruction
- structured target JSON

---

# Evaluation

A held-out validation split (10%) was used during training.

Additionally, the model was manually tested using unseen ETL failure scenarios.

Evaluation focused on:

- JSON validity
- Root cause correctness
- Practical remediation quality
- Instruction following

---

# Environmental Impact

## Hardware

NVIDIA Tesla T4

## Platform

Kaggle Notebooks

## Training Method

QLoRA (4-bit)

Using QLoRA significantly reduces GPU memory usage and energy consumption compared to full fine-tuning.

---

# Technical Specifications

## Architecture

- Transformer Decoder
- Causal Language Modeling

## Objective

Instruction-following generation of structured ETL troubleshooting responses.

Output format:

```json
{
  "category": "...",
  "root_cause": "...",
  "immediate_fix": "...",
  "long_term_fix": "..."
}
```

---

# Supported Domains

| Domain | Supported |
|----------|-----------|
| Apache Spark | ✅ |
| Databricks | ✅ |
| SQL | ✅ |
| Azure Data Factory | ✅ |
| Kafka | ✅ |
| Snowflake | ✅ |
| Delta Lake | ✅ |
| Schema Evolution | ✅ |
| Authentication | ✅ |
| Data Validation | ✅ |
| Cloud Storage | ✅ |

---

# Citation

```bibtex
@misc{celik2026etlexplainer,
  author = {Fırat Çelik},
  title = {ETL Error Explainer v2},
  year = {2026},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/firfircelik/etl-error-explainer-v2}}
}
```

---

# Contact

GitHub

https://github.com/firfircelik

Hugging Face

https://huggingface.co/firfircelik