Exasol Database Skill
Trigger when the user asks for Exasol database interaction, exapump, Exasol SQL, EXA_ system views, schemas, tables, or query execution outside exasol-import and exasol-export.
Step 0: Establish Connection
Ensure a working exapump profile before proceeding:
- If the user names a profile, test it with
exapump sql --profile <name> "SELECT 1"; always place --profile after the subcommand. Otherwise test the default profile with exapump sql "SELECT 1".
- On success, proceed — and keep the same
--profile <name> after the subcommand on every later exapump command.
- On failure, run
exapump profile list to see which profiles exist.
- If profiles exist, present them and ask which to use, then inspect that one with
exapump profile show <name> — it masks credentials — to confirm the required fields are set. Never read, cat, or print ~/.exapump/config.toml; it stores credentials in clear text. If a credential value does appear in any command output, do not repeat it in the conversation.
- If no usable profile exists, have the user create one locally with
exapump profile add <name> (omit --password and exapump prompts on a hidden line) or exapump profile init, then retry step 1. Never ask the user to paste a password into the conversation, and never pass one as a command-line argument.
Routing Algorithm
After the connection is established, determine the task type and load only the references needed:
SQL execution (queries, DDL, DML, schema inspection):
- Load:
references/exapump-reference.md (CLI usage)
- Load:
references/exasol-sql.md (core SQL behavior)
- Load:
references/exasol-grammar.md for the exact statement syntax (SELECT/DQL, DDL, DML, DCL, session & admin) — the EBNF the docs.exasol.com syntax diagrams are generated from. Consult it before inventing syntax or when unsure a clause exists. Read only the section you need — it is large.
- Load:
references/exasol-grammar-functions.md for built-in function, operator, predicate, literal, and data-type syntax (e.g. the exact argument order of a function). Same EBNF source, split out so statement lookups don't pull in the full function catalog.
- Load:
references/exasol-reserved-keywords.md and ingest the full list before designing queries — every reserved word (pinned to Exasol 2026.1.0) must be double-quoted when used as an identifier. On a keyword-related syntax error, re-query the running DB as described in Before writing any SQL in case the file has drifted from the DB version.
Table design (DISTRIBUTE BY, PARTITION BY, CREATE TABLE layout):
- Load:
references/table-design.md
Query profiling / performance (slow queries, data skew, REORGANIZE):
- Load:
references/query-profiling.md
Analytics / window functions (ROW_NUMBER, RANK, LAG/LEAD, QUALIFY, GROUPING SETS):
- Load:
references/analytics-qualify.md
- Load:
references/exasol-grammar-functions.md for exact analytic-function and OVER (…) window-clause syntax
BucketFS file management (upload/download/list/delete files in BucketFS, bfsdefault, bucket paths):
- Activate the exasol-bucketfs skill for guidance
UDF development (CREATE SCRIPT, ExaIterator, SCALAR/SET, Script Language Containers, SLC, exaslct):
- Activate the exasol-udfs skill for guidance
Multiple routes can apply — load all that match.
- Before writing any SQL (applies to routes 1–4):
- Ingest
references/exasol-reserved-keywords.md before designing queries — load the reserved-word list (pinned to Exasol 2026.1.0) up front so you quote reserved identifiers from the start rather than discovering them through errors
- Always double-quote every identifier (column names, table names, schema names) in SELECT, FROM, WHERE, GROUP BY, ORDER BY, and JOIN clauses — without exception
- This preserves mixed-case names and prevents reserved-keyword errors in a single rule
- Do NOT quote SQL keywords, functions, or aliases — only object identifiers
- If a query fails with a syntax error that looks like an unquoted reserved word, do not trust the pinned file blindly — the DB may be newer or older than 2026.1.0 and the list can drift either way. Fetch the authoritative list for the running version and reconcile:
exapump sql "SELECT KEYWORD FROM EXA_SQL_KEYWORDS WHERE RESERVED ORDER BY KEYWORD"
- For the exact shape of any clause (optional parts, ordering, comma-lists), consult
references/exasol-grammar.md (statements) or references/exasol-grammar-functions.md (functions / predicates / literals / data types) rather than guessing from examples.
Related Skills
This skill handles core database interaction: connecting, SQL execution, schema inspection, and table design.
For direct native IMPORT and local file movement into Exasol, use exasol-import.
For direct native EXPORT and local file movement out of Exasol, use exasol-export.
For broad extension, connector, or federation selection, use exasol-extension-catalog.
For BucketFS file management (upload, download, list, delete), the exasol-bucketfs skill provides specialized guidance and will activate automatically when relevant.
For UDF development and Script Language Containers, the exasol-udfs skill provides specialized guidance and will activate automatically when relevant.
1---2name: exasol-database3description: Exasol database interaction via the exapump CLI and Exasol SQL. Covers SQL queries and DML/DDL such as `SELECT`, `INSERT`, `UPDATE`, `DELETE`, `MERGE`, `CREATE TABLE`, `ALTER TABLE`, and `DROP TABLE`, `CREATE CONNECTION` connection objects without import or export intent, schema inspection, table design, `exapump sql` and `exapump profile`, query profiling, analytics, and Exasol-specific SQL behavior outside exasol-import and exasol-export.4---56# Exasol Database Skill78Trigger when the user asks for **Exasol database interaction**, **exapump**, **Exasol SQL**, **EXA_** system views, schemas, tables, or query execution outside **exasol-import** and **exasol-export**.910## Step 0: Establish Connection1112Ensure a working exapump profile before proceeding:13141. If the user names a profile, test it with `exapump sql --profile <name> "SELECT 1"`; always place `--profile` after the subcommand. Otherwise test the default profile with `exapump sql "SELECT 1"`.152. On success, proceed — and keep the same `--profile <name>` after the subcommand on every later `exapump` command.163. On failure, run `exapump profile list` to see which profiles exist.174. If profiles exist, present them and ask which to use, then inspect that one with `exapump profile show <name>` — it masks credentials — to confirm the required fields are set. **Never read, `cat`, or print `~/.exapump/config.toml`; it stores credentials in clear text.** If a credential value does appear in any command output, do not repeat it in the conversation.185. If no usable profile exists, have the user create one locally with `exapump profile add <name>` (omit `--password` and exapump prompts on a hidden line) or `exapump profile init`, then retry step 1. Never ask the user to paste a password into the conversation, and never pass one as a command-line argument.1920## Routing Algorithm2122After the connection is established, determine the task type and load **only** the references needed:23241. **SQL execution** (queries, DDL, DML, schema inspection):25 - Load: `references/exapump-reference.md` (CLI usage)26 - Load: `references/exasol-sql.md` (core SQL behavior)27 - Load: `references/exasol-grammar.md` for the **exact statement syntax** (SELECT/DQL, DDL, DML, DCL, session & admin) — the EBNF the docs.exasol.com syntax diagrams are generated from. Consult it before inventing syntax or when unsure a clause exists. **Read only the section you need** — it is large.28 - Load: `references/exasol-grammar-functions.md` for **built-in function, operator, predicate, literal, and data-type syntax** (e.g. the exact argument order of a function). Same EBNF source, split out so statement lookups don't pull in the full function catalog.29 - Load: `references/exasol-reserved-keywords.md` and **ingest the full list before designing queries** — every reserved word (pinned to Exasol 2026.1.0) must be double-quoted when used as an identifier. On a keyword-related syntax error, re-query the running DB as described in **Before writing any SQL** in case the file has drifted from the DB version.30312. **Table design** (DISTRIBUTE BY, PARTITION BY, CREATE TABLE layout):32 - Load: `references/table-design.md`33343. **Query profiling / performance** (slow queries, data skew, REORGANIZE):35 - Load: `references/query-profiling.md`36374. **Analytics / window functions** (ROW_NUMBER, RANK, LAG/LEAD, QUALIFY, GROUPING SETS):38 - Load: `references/analytics-qualify.md`39 - Load: `references/exasol-grammar-functions.md` for exact analytic-function and `OVER (…)` window-clause syntax40415. **BucketFS file management** (upload/download/list/delete files in BucketFS, bfsdefault, bucket paths):42 - Activate the **exasol-bucketfs** skill for guidance43446. **UDF development** (CREATE SCRIPT, ExaIterator, SCALAR/SET, Script Language Containers, SLC, exaslct):45 - Activate the **exasol-udfs** skill for guidance4647Multiple routes can apply — load all that match.48497. **Before writing any SQL** (applies to routes 1–4):50 - **Ingest `references/exasol-reserved-keywords.md` before designing queries** — load the reserved-word list (pinned to Exasol 2026.1.0) up front so you quote reserved identifiers from the start rather than discovering them through errors51 - **Always double-quote every identifier** (column names, table names, schema names) in SELECT, FROM, WHERE, GROUP BY, ORDER BY, and JOIN clauses — without exception52 - This preserves mixed-case names and prevents reserved-keyword errors in a single rule53 - Do NOT quote SQL keywords, functions, or aliases — only object identifiers54 - If a query fails with a syntax error that looks like an unquoted reserved word, do **not** trust the pinned file blindly — the DB may be newer or older than 2026.1.0 and the list can drift either way. Fetch the authoritative list for the running version and reconcile: `exapump sql "SELECT KEYWORD FROM EXA_SQL_KEYWORDS WHERE RESERVED ORDER BY KEYWORD"`55 - For the exact shape of any clause (optional parts, ordering, comma-lists), consult `references/exasol-grammar.md` (statements) or `references/exasol-grammar-functions.md` (functions / predicates / literals / data types) rather than guessing from examples.5657## Related Skills5859This skill handles core database interaction: connecting, SQL execution, schema inspection, and table design.60For direct native `IMPORT` and local file movement into Exasol, use **exasol-import**.61For direct native `EXPORT` and local file movement out of Exasol, use **exasol-export**.62For broad extension, connector, or federation selection, use **exasol-extension-catalog**.63For BucketFS file management (upload, download, list, delete), the **exasol-bucketfs** skill provides specialized guidance and will activate automatically when relevant.64For UDF development and Script Language Containers, the **exasol-udfs** skill provides specialized guidance and will activate automatically when relevant.