Querying¶
Bundles can be queried using SQL (Apache DataFusion syntax) using the query() method.
When querying, the table name of the bundle is bundle.
The query() method returns a QueryResult with methods to convert the results to your preferred format.
Basic Usage¶
Result Formats¶
The QueryResult object supports several output formats:
For large datasets, stream results batch by batch:
Parameterized Queries¶
Use $1, $2, etc. as placeholders to safely pass parameters:
Explain Plan¶
Use explain() to see the query execution plan. It returns a stream of record batches with plan_type and plan columns: