Skip to main content

Use cases

Bespoke data access patterns

Query with SQL directly for access patterns that don’t fit into the other APIs.

Features

Query your data using familiar SQL syntax over the API.See the SQL Reference documentation for more details.
Using the Data Pool ID:
Using the Data Pool Name without spaces:
Using the Data Pool Name with spaces:
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.
String
required
The SQL query.
SqlDialectV1
The SQL dialect to use. If not provided, the query is parsed on a best-effort basis.

Response

Response from the SQL API.
[SqlColumnResponse!]
required
The column names in the same order as present in the data field.
[[String]!]
required
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.
QueryInfo
required
The Query statistics and metadata.

Embeddable UI components

useSql

A React Hook for querying data using raw SQL.