Production-ready
Data Analyst Agent
Deterministic validation agent that enriches SQL query results with business-friendly labels, coerces PostgreSQL string-typed numbers to actual numbers, filters garbage rows, strips internal columns, and translates raw c
Enterprise Assistant department for Colaberry Enterprise agents
Built by Colaberry
About the Agent
What this agent does, the challenges it addresses, and where it delivers value.
Deterministic validation agent that enriches SQL query results with business-friendly labels, coerces PostgreSQL string-typed numbers to actual numbers, filters garbage rows, strips internal columns, and translates raw column names in insights to business language. No LLM calls - pure functions with sub-2ms latency.
Challenges This Agent Addresses
- 1**Business Intelligence**: Ensures query results display "Total Leads" instead of "lead_count" in reports and dashboards
- 2**Executive Reporting**: Removes technical database artifacts from insights before presenting to non-technical stakeholders
- 3**Data Quality**: Filters out meaningless zero-value rows that would clutter charts and tables
How the Agent Works
Step-by-step operational flow showing how this agent processes tasks end-to-end.
Step 1
**Strip internal columns**: Removes columns not useful for display (id, uuid, created_by, updated_by, deleted_at, and most _id columns)
Step 2
**Coerce numeric strings**: PostgreSQL returns bigint COUNT/SUM results as strings. The agent identifies numeric-looking strings in known aggregate columns (_count, _total, value, amount, score, etc.) and converts them to actual JavaScript numbers
Step 3
**Filter garbage rows**: Removes rows where all numeric values are zero or null, keeping only rows with at least one positive value
Step 4
**Enrich insight labels**: Scans insight messages for raw column names (e.g., "error_count", "avg_duration_ms") and replaces them with business labels (e.g., "Errors", "Avg Duration (ms)")
Step 5
**Business dictionary**: Maintains a 100+ entry mapping of raw column names to labels covering counts, rates, scores, financial fields, entity fields, statuses, and time fields
Execution Modes
Inputs & Outputs
What data this agent consumes and the artifacts or actions it produces.
Input Data
- List of `SqlResult` objects (rows of raw database query results)
- List of `Insight` objects (analytical findings with raw metric names)
Deliverables
- Enriched `SqlResult` list with:
- Numeric string values coerced to numbers
- Internal columns stripped (id, uuid, created_by, etc.)
- Garbage rows removed (all-zero or all-null numeric values)
- Enriched `Insight` list with:
- Raw column names replaced by business labels in messages
- Metric fields translated to business-friendly names
Core Tasks
- Data & Analytics
Systems Connected
Internal systems, APIs, and tools this agent integrates with.
Tools & APIs
Agent Specs
Technical specifications, requirements, and deployment details.
Related Agents
Other agents in the same department or industry.
Ready to deploy this agent?
Schedule a walkthrough with our team to see how this agent integrates with your workflows.