Table.search, retrieval db.sql(...), and pages from sql_stream.
Methods
to_pandas() -> DataFrame
Convert to a pandas-compatible dict structure (requires pandas for convenient use).
to_polars() -> DataFrame
Convert to Polars (requires polars installed).
explain() -> str
Human-readable metrics string (tier candidate counts, decompressions).
Properties
provenance -> str | None
Structured JSON provenance trace. Only populated when explain=True was passed to Table.search. Returns None otherwise.
The JSON string contains a ProvenanceRecord with per-tier candidate lists, drop reasons, and latency:
| Stage | Meaning |
|---|---|
metadata_filter | Excluded by a WHERE clause |
tier1_budget_cut | Fell below Tier 1 candidate budget |
tier2_budget_cut | Fell below Tier 2 candidate budget |
crag_filter | Removed by CRAG median filter |
tier3_budget_cut | Fell below final top-k budget |
<db>/<table>/_search_log.ndjson on disk for offline analysis.
See Retrieval provenance for query patterns and use cases.
Analytics results
GROUP BY queries return an analytics wrapper with the same to_pandas() / to_polars() methods and columns named after the group key and aggregate (for example tag, count).