# Decimal CSV/ETL & Quarantine Pipeline

> Stop float rounding drift, silent row drops, and duplicate cron imports in Python CSV pipelines.

Decimal CSV/ETL & Quarantine Pipeline is a paid AI agent skill on Agensi by Víctor Betancourt, in Data & Databases. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $12 (one-time purchase)
- Creator: [Víctor Betancourt](https://www.agensi.io/creators/mc3yohan)
- Category: [Data & Databases](https://www.agensi.io/skills/data-databases)
- Version: 1.0
- Last updated: 2026-11-27
- Security: scan passed (2026-11-27); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/decimal-csv-etl-quarantine-pipeline
- Tags: database, finance, api, python, etl, csv, sqlite, data-quality

## About this skill

Stop losing financial data to silent rounding errors and failed batch imports. This skill provides a specialized pipeline for ingesting messy CSV data into SQLite with absolute precision and crash-safety. It replaces fragile `float` math with strict `decimal.Decimal` logic and ensures every row is either safely committed or formally quarantined.

### What it does
- **Strict Decimal Parsing** converts currency and quantity strings directly into `decimal.Decimal` to eliminate binary floating-point drift in accounting.
- **Row-Level Quarantine** routes malformed or ambiguous rows to a structured `quarantine.csv` with line numbers and error codes instead of aborting the job.
- **Idempotency Guarding** uses SHA-256 content fingerprints and SQLite WAL mode to prevent duplicate imports from retried crons or webhooks.
- **Locale Normalization** handles mixed US/EU decimal separators and ambiguous date formats through explicit configuration rather than guessing.
- **Static Code Auditing** scans existing Python ETL scripts for common traps like missing BOM handling, broad exceptions, or unsafe SQLite locking.

### How it works
1. **Audit** existing code using the AST scanner to identify `ETL-001` (float money) or `ETL-004` (unsafe SQLite locks) defects.
2. **Configure** the ingestion schema and locale settings to match the source data's decimal and date conventions.
3. **Execute** the quarantine pipeline to process CSV inputs, populating the SQLite ledger and generating a quarantine report for invalid rows.
4. **Verify** idempotency by re-running the same input to confirm zero new insertions and zero data corruption.

### Frameworks & tools
Python 3.10+ standard library. Uses `decimal`, `sqlite3` in WAL mode, `hashlib`, and `ast` for static analysis. Zero external dependencies or network access required.

### Why this beats prompting it yourself
Prompting an LLM for ETL logic often results in code that uses `pandas` defaults or simple `float()` casts, leading to 0.01 rounding errors. This skill enforces specific SQLite `BEGIN IMMEDIATE` patterns and `utf-8-sig` handling that are frequently overlooked in generic AI-generated code.

### Use cases
- Ingesting financial CSVs with mixed separators without rounding drift.
- Deduplicating recurring batch imports using collision-free fingerprints.
- Handling malformed rows in high-volume pipelines without dropping data.
- Auditing legacy Python scripts for monetary and crash-safety bugs.

### Known limitations
Requires Python 3.10 or higher. Designed for CSV and SQLite workflows only. Does not support non-relational destinations or Excel (.xlsx) files directly without conversion to CSV.

## Requires

- Python 3.10+

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Decimal CSV/ETL & Quarantine Pipeline skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill prevent data loss during messy CSV imports?

This skill solves the 'silent rounding error' problem by replacing standard floating-point math with strict decimal precision, and it prevents job crashes by routing malformed data to a quarantine file rather than aborting the entire import.

### Which AI agents or environments are compatible with Decimal Etl Quarantine?

The skill is built for Python 3.10+ and is compatible with any AI agent capable of executing Python code. It has zero external dependencies, making it highly portable across local environments and sandboxed AI runners.

### What specific components are included in this skill package?

Each purchase includes the core ETL pipeline logic, the AST-based static code auditor for identifying existing bugs, and a configuration template for handling various international decimal and date formats.

### Can I use this skill to process Excel files directly?

No, this skill is purpose-built for high-integrity CSV-to-SQLite workflows. To process Excel (.xlsx) files, you must first convert them to CSV format to ensure the strict decimal parsing works correctly.

### How does the skill handle duplicate data if I run the same import twice?

The skill uses SHA-256 content fingerprinting to create a unique signature for every batch. If you attempt to import the same data twice, the 'Idempotency Guard' recognizes the fingerprint and prevents duplicate entries or database corruption.

### What is the initial setup process like for a new user?

Setup is minimal; once the skill is added to your agent's library, you simply define your source CSV path and SQLite destination. The included auditor can then be run immediately against your existing scripts to suggest safety improvements.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
