Filter Rows
data.filter_rows
Overview
When you send tabular rows and a filter expression, we return only the rows that match — using a safe, compiled language (comparisons, AND/OR/NOT, string checks, in/not-in, null tests). No scripting, no user-supplied regex, no reflection. Do not use this for full SQL semantics or arbitrary code execution.
Row filtering by an LLM is slow and inconsistent. You get the same matches every time for the same rows and expression.
Reliability
STRICT and deterministic for identical rows, schema hints, nullPolicy, and expression. Validation errors (not retryable — fix input): INVALID_EXPRESSION (syntax or unsupported operator — rewrite the filter); LIMIT_EXCEEDED (expression nesting, string literal, or in-list too large — simplify); SIZE_LIMIT_EXCEEDED (filter string over 1,000,000 characters); row count over 100,000; nullPolicy error_on_null when a null is compared. When limit is reached, truncated is true.
Context footprint
Returns matched rows, matchedCount, scannedCount, truncated, and ok. A successful call costs 1 execution credit.
When to use it
When you already have row objects and a predicate expressible in the safe DSL.
When you need SQL joins, window functions, or arbitrary scripting.
Scope
Non-goals
- Does not execute code, SQL, or JavaScript
- Does not sort or aggregate rows
- Does not fetch data from files or URLs
- Does not accept user-supplied regular expressions
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
What this means
This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response may contain submitted or transformed content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| rows | array | Yes | Bounded array of 0 through 100000 input row objects keyed by column name, where missing keys count as null. |
| filter | string | Yes | Safe compiled filter expression over column names. |
| schema | object | No | Purpose-bound map from column name to a type hint; omit it to infer types from values. |
| nullPolicy | string | No | How null comparisons behave; omit it for false_on_null. |
| caseSensitive | boolean | No | Whether string comparison is case-sensitive; omit it for true. |
| limit | integer | No | Maximum matched rows to return; omit it for 100000. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| ok | boolean | Yes | True when filtering completed successfully. |
| rows | array | Yes | Bounded array of 0 through 100000 result row objects keyed by column name after this skill transformed the table. |
| matchedCount | integer | Yes | How many rows are returned in rows. |
| scannedCount | integer | Yes | How many input rows were examined before any early stop. |
| truncated | boolean | Yes | Whether the limit stopped collection before every match was returned. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"data.filter_rows","input":{"rows":[{"id":1,"country":"BE","amount":150},{"id":2,"country":"FR","amount":200}],"filter":"country = \"BE\" AND amount >= 100"}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("data.filter_rows", {"filter":"country = \"BE\" AND amount >= 100","rows":[{"amount":150,"id":1,"country":"BE"},{"amount":200,"id":2,"country":"FR"}]});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not execute code, SQL, or JavaScript
- Does not sort or aggregate rows
- Does not fetch data from files or URLs
- Does not accept user-supplied regular expressions
- Full SQL join/group semantics
- Fuzzy or regex-from-input matching
- Filtering more than 100,000 rows in one call
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "data.filter_rows",
"input": {
"filter": "country = \"BE\" AND amount >= 100",
"rows": [
{
"amount": 150,
"id": 1,
"country": "BE"
},
{
"amount": 200,
"id": 2,
"country": "FR"
}
]
}
}Examples
Belgian orders over 100
{
"filter": "country = \"BE\" AND amount >= 100",
"rows": [
{
"amount": 150,
"id": 1,
"country": "BE"
},
{
"amount": 200,
"id": 2,
"country": "FR"
}
]
}{
"ok": true,
"matchedCount": 1,
"scannedCount": 2,
"truncated": false,
"rows": [
{
"country": "BE",
"id": 1,
"amount": 150
}
]
}Open or pending status via in list
{
"filter": "status in [\"open\", \"pending\"]",
"rows": [
{
"status": "open",
"id": 1
},
{
"status": "closed",
"id": 2
}
]
}{
"ok": true,
"matchedCount": 1,
"scannedCount": 2,
"truncated": false,
"rows": [
{
"status": "open",
"id": 1
}
]
}Recommended use cases
- Filter API or CSV rows before export
- Select rows before aggregation
- Apply a deterministic WHERE-style predicate in an agent pipeline
Avoid for
- Full SQL join/group semantics
- Fuzzy or regex-from-input matching
- Filtering more than 100,000 rows in one call
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.