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, it is important to follow these steps:
-
Specify the project name and the table name within the FROM portion of the SELECT statement separated by a period (.).
-
Specify a view schema
Hydrolix has the notion that a single data set can have different query data structures. The query data structure, or view schema allows for a user's access to a data set to be restricted to a set of columns, but can also be used to set the data type for a column. For example, something that is stored as a number may also need to be operated on as a string sometimes.
If no view is specified and a default view has been defined, the view schema is not required as part of the SQL.
-
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.