capabilities.work

Dataset Filter Rows

A 3-step recipe with Hugging Face. We can help you get access.

Recipe · 3 steps

Dataset Filter Rows

Apply a SQL-like filter to a dataset split after confirming filter support.

  1. Check the dataset's validity and confirm the filter feature is available before issuing a filter query.
  2. Resolve the dataset's first subset and split to use as the filter target.
  3. Apply the SQL-like WHERE and optional ORDER BY clauses to the resolved split and return the matching rows.
What you'll need to have ready
  • hfToken: Hugging Face access token used as a Bearer credential.
  • dataset: The dataset id on the Hugging Face Hub.
  • where: SQL-like WHERE clause for filtering (e.g. "label = 1").
  • orderby: Optional SQL-like ORDER BY clause for sorting (e.g. "score DESC").
  • length: Number of rows to return (max 100).
For your developer

Arazzo workflow hugging-face:dataset-filter-rows, 3 operations: isValid → getSplits → filterRows. Specs on APIs.io.