Skills/Tabular/Reshape table

Reshape table

~1 credits / MB of input (up to 5)

Trim a CSV, JSON, or XLSX file down to just the columns and rows you need, then get the result as a new file in any of those formats. Select which columns to keep, add row filters (equals, greater than, contains, and more), sort by one or more columns, and cap the output at a row limit. No code or SQL required.

Use when

You want a large file cut down to specific columns and rows, or a sorted top-N slice, with no code.

Not for

Totals, averages, group-by, pivots, deduplication, joins across files, renaming or computing columns, or running SQL or formulas.

Cost

~1 credits / MB of input (up to 5)

Charged on the input size, so a wide source costs the same whether you keep one column or all.

Estimated; the actual charge depends on your input and is shown in the response.

What it accepts

Set these inside the intent when you run it.

source_filerequired

A download URL pointing to the CSV, JSON, or XLSX file to reshape.

target_formatrequired

The format to write the result in. One of csv, json, or xlsx.

columnsoptional

List of column names to keep, in the order you want them.

filtersoptional

Row conditions to apply (AND-combined). Each specifies a column, operator (eq, ne, gt, lt, ge, le, contains, in, notnull, isnull), and value.

sortoptional

Columns to sort by, each with an optional descending flag.

limitoptional

Maximum number of rows to return, applied after sorting.

sheetoptional

For XLSX source files, the sheet name to read. Omit to use the first sheet.

What you get back

A time-limited download link to the reshaped file with only the selected columns and matching rows.

Run it

Run this sub-skill directly: pin it with operation and pass its inputs in the intent. (Omit operation and the Tabular skill will route from your intent instead.)

curl -X POST "https://skill.askfaro.com/skills/tabular/run" \
  -H "Authorization: Bearer $FARO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"intent":{"operation":"reshape","source_file":"https://example.com/sales.csv","target_format":"csv","columns":["name","revenue","region"],"filters":[{"op":"gt","value":1000,"column":"revenue"}],"sort":[{"desc":true,"column":"revenue"}],"limit":50,"sheet":"Sheet1"}}'

Example requests

  • From this CSV, keep only the name and revenue columns where revenue is over 10000.
  • Give me the top 20 rows sorted by date descending from this spreadsheet.
  • Filter this sales data to rows where region equals US and export as JSON.