Querying Best Practices
This page provides best practices for querying data from kdb Insights.
Querying data with negative infinity partitions
Columns that contain null timestamp values are not suitable for use as partition columns. Data that is saved and partitioned that contain partitioned timestamps such as -0Wp and therefore a date partition of-0Wd (negative infinity) is not returned by in the payload of any API request.
// Checking directly on the HDB process
q) min date
-0Wd
// Running an API call to retrieve min date from the database. This filters out any partitioned data where the partitioned column is `-0Wd`.
q)last GATEWAY(`.kxi.sql;enlist[`query]!enlist"select min(date) as minDate from trade";`;()!())
minDate
----------
2025.04.25