Overview of the Trench API
This endpoint allows you to execute read-only queries against your Trench data. The endpoint will proxy the request to the underlying ClickHouse database. For more information about ClickHouse’s query language, see the official documentation.
To query a specific nested property, you can use the JSONExtract
function. For example, to query all events where the totalAccounts
property is greater than 3, you can use the following query:
Similarly, you can query the context and traits:
All identify
calls are sent to the same underlying events
ClickHouse table, so you can join events with identified users using the userId
column. For example, to query all events for a user with the ID user-123
, you can use the following query:
To get the tracking events and the user’s most recently provided email, you can join the track
and identify
event types:
The queries have been successfully executed.
The response is of type object
.
Overview of the Trench API
This endpoint allows you to execute read-only queries against your Trench data. The endpoint will proxy the request to the underlying ClickHouse database. For more information about ClickHouse’s query language, see the official documentation.
To query a specific nested property, you can use the JSONExtract
function. For example, to query all events where the totalAccounts
property is greater than 3, you can use the following query:
Similarly, you can query the context and traits:
All identify
calls are sent to the same underlying events
ClickHouse table, so you can join events with identified users using the userId
column. For example, to query all events for a user with the ID user-123
, you can use the following query:
To get the tracking events and the user’s most recently provided email, you can join the track
and identify
event types:
The queries have been successfully executed.
The response is of type object
.