dataset-skill

Analyzes companyRAG dataset tables with DuckDB SELECT queries via ai-search MCP tools.

Updated Aug 12, 2026
One-click install
npx skills add https://github.com/innFactory-AI/company-ai-stack-skills --skill dataset-skill-innfactory-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dataset-skill
Source: https://github.com/innFactory-AI/company-ai-stack-skills/tree/main/de/skills/company-rag/dataset-skill
Command: npx skills add https://github.com/innFactory-AI/company-ai-stack-skills --skill dataset-skill-innfactory-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Answering business questions from companyRAG datasets normally requires knowing table structures and writing correct SQL by hand. This Skill guides the agent to explore schemas first and then run accurate DuckDB SELECT queries, so answers come from real data instead of guesses. ## Core Features & Use Cases - Schema Exploration: Lists collections and tables, inspects column names, types, and sample rows with list_datasets, get_schema, describe_table, and get_sample before writing any query. - SQL Analysis: Executes DuckDB SELECT queries via execute_sql, supporting joins across multiple tables, window functions, DATE_TRUNC, and PIVOT/UNPIVOT. - Data Cleaning: Persists cleanup queries as reusable _clean views with save_transform when raw data has issues like currency symbols in numeric columns. - Use Case: Ask "What was the monthly revenue per customer segment in 2024?" and the agent inspects the dataset schema, writes the correct join and aggregation, and returns a Markdown table of verified results. ## Quick Start Ask the agent to analyze a table in your companyRAG dataset collection, for example to show total revenue per month from the 2024 orders table.

Frequently Asked Questions about dataset-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query companyRAG datasets with SQL?▼

Use the execute_sql tool from the ai-search MCP server with the collection name and a DuckDB SELECT statement. Always run get_schema or describe_table first so the query uses exact table and column names instead of guesses.

How to explore dataset schema before writing SQL queries?▼

Call list_datasets to see all collections and tables, then get_schema for column names and types, or describe_table to also get sample rows. This schema-first workflow prevents errors from assumed column names.

Can I run INSERT or UPDATE queries on companyRAG datasets?▼

No, only SELECT queries are allowed through execute_sql. INSERT, UPDATE, DELETE, DROP, and CREATE statements are blocked, so datasets cannot be modified directly; cleanup is done via save_transform views.

Does the dataset tool support joins across multiple tables?▼

Yes, a collection can contain multiple tables, and get_schema without a dataset parameter lists them all. Shared columns act as join keys, and explicit JOINs with aliases are recommended in the DuckDB query.

How do I fix dirty data like currency symbols in number columns?▼

Use save_transform to store a SELECT query that cleans the data, such as casting stripped currency strings to DECIMAL. It creates a <table>_clean view that is automatically used for future queries.

What SQL dialect does companyRAG dataset querying use?▼

Queries use DuckDB syntax, not PostgreSQL or MySQL. Features like DATE_TRUNC, DATEDIFF, window functions such as LAG and RANK, and PIVOT/UNPIVOT are available for analysis.