get_rows
Retrieve filtered rows from datasets using safe, SQL-parameterized filters. Supports operators like eq, contains, and between, plus column projection to reduce token usage.
Instructions
Filtered row retrieval via structured filters. All filters are SQL-parameterized (no injection). Operators: eq, neq, gt, gte, lt, lte, contains, in, is_null, between. Use columns=[] to project — reduces tokens significantly on wide tables. Prefer aggregate() for summaries over paginating through rows.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max rows returned (default 50, hard cap 500) | |
| offset | No | Pagination offset (default 0) | |
| redact | No | Scrub PII / credentials (emails, SSNs, Luhn-valid credit cards, JWTs, API keys, PEM blocks, AWS keys, GitHub/Slack tokens) from row cells before return (default true). Numeric cells are never altered. _meta.redaction reports cells_redacted + per-pattern counts. | |
| columns | No | Column projection — reduces tokens (default: all) | |
| dataset | Yes | Dataset identifier | |
| filters | No | Filter conditions (ANDed). E.g. [{"column": "AREA NAME", "op": "eq", "value": "Hollywood"}] | |
| order_by | No | Column to sort by | |
| order_dir | No | Sort direction (default 'asc') | asc |
| redact_patterns | No | Additional Python regex patterns to layer on top of the built-in set. Invalid patterns are silently skipped (reported in _meta.redaction.invalid_custom_patterns). | |
| redact_skip_columns | No | Column names to exempt from redaction (e.g. an `email_hashed` column where the email pattern would false-positive). |