ClickHouse
The robomotion clickhouse CLI connects to ClickHouse for analytical SQL workloads. It supports executing SELECT queries, running INSERT/UPDATE/DELETE statements, and batch transactions for atomically executing multiple SQL commands.
When to use
- Run analytical SQL queries on ClickHouse columnar tables
- Insert data using batch transactions for atomicity
- Execute DDL or non-query SQL statements
Prerequisites
robomotionCLI installed- Package installed:
robomotion install clickhouse - ClickHouse connection credentials configured via Robomotion vault
IMPORTANT: Session Mode Required for Multi-Step Operations
Each CLI command runs as a separate process — connection IDs from connect do NOT persist across calls.
You MUST use --session on connect and pass --session-id to all subsequent commands.
Workflow
- Install (once):
robomotion install clickhouse - Connect with session:
robomotion clickhouse connect --session --output json # → {"outConnectionId":"<conn-id>","session_id":"<session-id>"} - Use the returned
conn-idandsession-idin all subsequent commands:robomotion clickhouse execute_query --conn-id "<conn-id>" --session-id "<session-id>" --output json - Disconnect when done:
robomotion clickhouse disconnect --conn-id "<conn-id>" --session-id "<session-id>" --output json
Always append --output json to get structured JSON results.
Commands Reference
robomotion clickhouse connect --session --output jsonConnect to a ClickHouse database server using credentialsrobomotion clickhouse create_batch --conn-id --session-id "<session-id>" --output jsonCreate a new batch transaction for executing multiple SQL commands atomicallyrobomotion clickhouse disconnect --conn-id --session-id "<session-id>" --output jsonDisconnect from a ClickHouse database server and release the connectionrobomotion clickhouse execute_non_query --conn-id --batch-id --session-id "<session-id>" --output jsonExecute a SQL command (INSERT٫ UPDATE٫ DELETE٫ etc.) that does not return resultsrobomotion clickhouse execute_query --conn-id --batch-id --session-id "<session-id>" --output jsonExecute a SQL SELECT query on ClickHouse and return the resultsrobomotion clickhouse send_batch --batch-id --output jsonCommit a batch transaction and execute all queued SQL commands
Environment
- ROBOMOTION_API_TOKEN (if vault credentials are needed)