ClickHouse Considerations
The Hydrolix query language is an ANSI-compliant SQL, based on the ClickHouse SQL language. Queries are passed through the Hydrolix Query API which offers programmatic access to your data.
To query data,
- Ingest some data
- Construct the WHERE clause
- Define the query conditions
- Execute the query against the Query API
Build a SQL Query⚓︎
When querying Hydrolix, follow these steps:
-
Specify the project name and the table name within the FROM portion of the SELECT statement separated by a period (.).
-
(optional) Specify a view schema
Hydrolix allows multiple, different read schema for the same table. The read schema is known as a custom view and limits the client's access to a subset of columns.
The view schema is optional in SQL queries. Queries default to using the automatic view schema which includes every column in the data set.
-
A
whereclauseWhen referencing data in tables, a time specification within a WHERE predicate is required. This predicate should reference the primary datetime column that was specified in the transform schema when the data was ingested.
-
Define the rest of the query.
Refer to the Hydrolix tutorials and SQL Reference to understand query syntax and see running examples.
-
Execute the query
Queries are sent to Hydrolix through the Query API. The only required parameter is "query" to pass in the query. Query results are returned as JSON.