SQL API
Execute SQL queries from your application.
Use cases
Bespoke data access patterns
Query with SQL directly for access patterns that don’t fit into the other APIs.
Features
Query with SQL syntax
Query with SQL syntax
Query your data using familiar SQL syntax over the API.
See the SQL Reference documentation for more details.
Query Data Pools using their unique name or ID.
Query Data Pools using their unique name or ID.
Using the Data Pool ID:
Using the Data Pool Name without spaces:
Using the Data Pool Name with spaces:
ClickHouse and Postgres SQL dialects
ClickHouse and Postgres SQL dialects
Compatible with PostgreSQL and ClickHouse SQL dialects.
Example
Example 1: Simple SQL query
Get the first 3 rows from the “TacoSoft Demo Data” Data Pool.
Usage
Arguments
Input to the SqlV1 api.
The SQL query.
The SQL dialect to use. If not provided, the query is parsed on a best-effort basis.
Response
Response from the SQL API.
The column names in the same order as present in the data
field.
The data gathered by the SQL query. The data is returned in an N x M matrix format, where the first dimension are the rows retrieved, and the second dimension are the columns. Each cell can be either a string or null, and the string can represent a number, text, date or boolean value.
The Query statistics and metadata.