GigAPI Bun provides a SQL interface to query time-series using GigAPI Catalog Metadata and DuckDB
# Install dependencies
bun install
# Start the server
bun start
PORT
: Server port (default: 8080)DATA_DIR
: Path to data directory (default: ./data)
$ curl -X POST "http://localhost:9999/query?db=mydb" \
-H "Content-Type: application/json" \
{"query": "SELECT time, location, temperature FROM weather WHERE time >= '2025-04-01T00:00:00'"}
GET /debug/{db}/{table}
: Inspect metadata and file structureGET /fs/{path}
: Browse files and directoriesPOST /sql
: Execute raw DuckDB queries
/data
/mydb
/weather
/date=2025-04-10
/hour=14
*.parquet
metadata.json
- Parse SQL query to extract measurement name and time range
- Find relevant parquet files using metadata
- Use DuckDB to execute optimized queries against selected files
- Post-process results to handle BigInt timestamps
- File paths in metadata.json may contain absolute paths; the system handles both absolute and relative paths
- Time fields are converted from nanosecond BigInt to ISO strings
- Add
?debug=true
to query requests for detailed troubleshooting information
Gigapipe is released under the GNU Affero General Public License v3.0 ©️ HEPVEST BV, All Rights Reserved.