The query API lets you run ad-hoc SQL queries against CDF resources. You can test SQL statements before using them in transformations, explore data, and validate query logic interactively. The query endpoint executes the SQL and returns the results directly.Documentation Index
Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
Use this file to discover all available pages before exploring further.
What the query API does
Use the query API to run SQL against CDF resource types such as assets, events, time series, and data model instances. Each request sends a SQL string and receives the result set in the response. This is useful for prototyping transformation logic, debugging joins, and exploring the structure of your data.When to use it
- Before writing transformations: Test your SQL logic to ensure it produces the expected output.
- Data exploration: Run exploratory queries to understand relationships and data quality.
- Validation: Verify that query results match your expectations before deploying to production.
The query API executes queries synchronously. For large result sets, consider using transformations instead.