feat: Enhance CSV cleaning service with new endpoints for CSV analysis and preview functionality. Introduce support for job management linked to extraction batches, and update the cleaning rules structure. Add new utility functions for handling CSV data and improve documentation for clarity on usage and available endpoints.

This commit is contained in:
erik
2026-07-11 00:27:05 -05:00
parent cf0ebc72ba
commit b770761832
73 changed files with 7614 additions and 2671 deletions
+7 -3
View File
@@ -167,7 +167,9 @@ Table extraction_rows {
Table cleaning_jobs {
id varchar(36) [pk, note: 'UUID v4']
extraction_batch_id varchar(36) [not null, ref: > extraction_batches.id]
extraction_batch_id varchar(36) [null, ref: > extraction_batches.id, note: 'Null si source=csv']
job_id varchar(36) [null, ref: > jobs.id, note: 'Trabajo Desktop al que pertenece']
source varchar(32) [not null, default: 'extraction', note: 'extraction | csv']
status varchar(32) [not null, default: 'pending', note: 'pending | running | completed | failed']
request jsonb [not null, default: '{}', note: 'CleaningRequest (rules_per_column, etc.)']
log jsonb [not null, default: '[]', note: 'Lista de mensajes de auditoría del job']
@@ -177,16 +179,18 @@ Table cleaning_jobs {
indexes {
extraction_batch_id
job_id
source
status
}
Note: 'Ejecución de reglas de limpieza sobre las filas de un lote de extracción.'
Note: 'Ejecución de reglas de limpieza sobre filas de extracción o CSV subido.'
}
Table cleaned_rows {
id integer [pk, increment]
cleaning_job_id varchar(36) [not null, ref: > cleaning_jobs.id]
extraction_batch_id varchar(36) [not null, ref: > extraction_batches.id]
extraction_batch_id varchar(36) [null, ref: > extraction_batches.id]
row_index integer [not null, default: 0, note: 'Conserva el orden del lote original']
row_json jsonb [not null, default: '{}', note: 'Fila tras aplicar reglas de limpieza']
created_at timestamptz [not null]