timeplus-sql-guide
Write and execute Timeplus streaming SQL for real-time analytics. Use this skill when the user wants to create streams, run streaming queries, build materialized views, ingest data, send data to sinks, write UDFs, or simulate data with random streams. Executes SQL via the ClickHouse-compatible HTTP interface on port 8123 using environment variables TIMEPLUS_HOST, TIMEPLUS_USER, and TIMEPLUS_PASSWORD. Covers full Timeplus SQL syntax including window functions, JOINs, CTEs, UDFs, data types, aggregations, and all DDL/DML statements.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/gangtao/timeplus-sql-guideTimeplus Streaming SQL Guide
You are an expert in Timeplus — a high-performance real-time streaming analytics platform built on a streaming SQL engine (Proton). You write correct, efficient Timeplus SQL and execute it via the ClickHouse-compatible HTTP API.
Quick Reference
| Task | Reference |
|---|---|
| Get data in | references/INGESTION.md |
| Transform data | references/TRANSFORMATIONS.md |
| Send data out | references/SINKS.md |
| Full SQL syntax, types, functions | references/SQL_REFERENCE.md |
| Random streams (simulated data) | references/RANDOM_STREAMS.md |
| Python & JavaScript UDFs | references/UDFS.md |
| Python Table Functions | references/Python_TABLE_FUNCTION.md |
Executing SQL
Environment Setup
Always use these environment variables — never hardcode credentials:
export TIMEPLUS_HOST=localhost # hostname or IP
export TIMEPLUS_USER=default # username
export TIMEPLUS_PASSWORD='' # password (can be empty)
Running SQL via curl (port 8123)
Port 8123 is the ClickHouse-compatible HTTP interface. Use it for all DDL and
historical queries (CREATE, DROP, INSERT, SELECT from table(...)).
Always use username password with -u option
NOTE, if the curl returns nothing, it is not an error, it means the query returns no records. You can check the HTTP status code to confirm success (200 OK) or failure (4xx/5xx).
# Standard pattern — pipe SQL into curl
echo "YOUR SQL HERE" | curl "http://${TIMEPLUS_HOST}:8123/" \
-u "${TIMEPLUS_USER}:${TIMEPLUS_PASSWORD}" \
--data-binary @-
Health check:
curl "http://${TIMEPLUS_HOST}:8123/"
# Returns: Ok.
DDL example — create a stream:
echo "CREATE STREAM IF NOT EXISTS sensor_data (
device_id string,
temperature float32,
ts datetime64(3, 'UTC') DEFAULT now64(3, 'UTC')
) SETTINGS logstore_retention_ms=86400000" | \
curl "http://${TIMEPLUS_HOST}:8123/" \
-u "${TIMEPLUS_USER}:${TIMEPLUS_PASSWORD}" \
--data-binary @-
Historical query with JSON output:
echo "SELECT * FROM table(sensor_data) LIMIT 10" | \
curl "http://${TIMEPLUS_HOST}:8123/?default_format=JSONEachRow" \
-u "${TIMEPLUS_USER}:${TIMEPLUS_PASSWORD}" \
--data-binary @-
Insert data:
echo "INSERT INTO sensor_data (device_id, temperature) VALUES ('dev-1', 23.5), ('dev-2', 18.2)" | \
curl "http://${TIMEPLUS_HOST}:8123/" \
-u "${TIMEPLUS_USER}:${TIMEPLUS_PASSWORD}" \
--data-binary @-
Streaming Ingest via REST API (port 3218)
For pushing event batches into a stream:
curl -s -X POST "http://${TIMEPLUS_HOST}:3218/proton/v1/ingest/streams/sensor_data" \
-H "Content-Type: application/json" \
-d '{
"columns": ["device_id", "temperature"],
"data": [
["dev-1", 23.5],
["dev-2", 18.2],
["dev-3", 31.0]
]
}'
Output Formats
Append ?default_format=<format> to the URL:
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-gangtao-timeplus-sql-guide": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
cisco-asa-syslog
Parse, interpret, and analyze Cisco ASA (Adaptive Security Appliance) firewall syslog messages. Use this skill whenever working with Cisco ASA log files, syslog streams from ASA devices, firewall event analysis, or security investigations involving ASA-generated events. Covers the syslog protocol foundation and the ASA-specific message format with message ID categorization.
timeplus-app-builder
Build real-time Timeplus data processing and analysis applications. Creates pure frontend HTML/JavaScript apps that connect directly to Timeplus Proton via @timeplus/proton-javascript-driver (UMD), visualize live streaming data with @timeplus/vistral (UMD), and follow the Timeplus UI style guide. No npm build or bundler required — output is a single self-contained HTML file.
searxng-web-search
Search the web using a self-hosted SearXNG metasearch engine. Use when the user asks to search the web, find information online, look up recent news, research a topic, or needs current data from the internet. Also use when the agent needs to gather external context to answer a question. Requires a running SearXNG instance with JSON API enabled.