Transpose Table
data.transpose_table
Overview
You send a rectangular table. We return the transpose: each original row becomes a column named row_1, row_2, and so on, and mixed source types become NULLABLE_ANY. firstColumn=SOURCE_COLUMN_NAMES prepends a STRING column of the original names. This is not a pivot, a spreadsheet formula, or sparse matrix algebra.
A silent reshape that invents column names or coerces types makes a later union undebuggable. Generated names and NULLABLE_ANY on conflicts stay explicit.
Reliability
Output names are row_1 in source-row order, or source_column plus those names. A second transpose restores values, not original names. DUPLICATE_COLUMN — trigger: two input columns share the same NFC name so the table is not addressable by name; retryable: no; next: rename one column. SHAPE_INVALID — trigger: a row length does not equal the declared column count; retryable: no; next: pad or trim that row. TYPE_MISMATCH — trigger: a cell is not the declared column type, with no silent coercion; retryable: no; next: fix the cell or the type. ITEM_LIMIT_EXCEEDED — trigger: the table exceeds 1,000,000 cells; retryable: no; next: split the table.
Context footprint
One result row per original column, plus columnCount and rowCount. A successful call costs 1 execution credit.
When to use it
When a report is column-major and a later step needs each original row as its own column, including a zero-row table.
When you need a pivot with aggregations, or a spreadsheet-style formula transpose.
Scope
Non-goals
- Does not pivot or aggregate
- Does not evaluate spreadsheet formulas
- Does not treat the table as a sparse matrix
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 |
|---|---|---|---|
| table | object | Yes | Closed rectangular table: typed columns plus row-major arrays of JSON scalars or null. |
| firstColumn | string | No | ROW_INDEX generates row_1 names; SOURCE_COLUMN_NAMES prepends original names. Omit it for ROW_INDEX. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| columns | array | Yes | Result columns after transpose, 0 through 256 unique NFC names including optional source_column. |
| rows | array | Yes | From 0 through 256 result rows, one per original column, in source column order. |
| columnCount | integer | Yes | Non-negative count for this result. |
| rowCount | integer | Yes | Non-negative count for this result. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"data.transpose_table","input":{"table":{"columns":[{"name":"id","type":"STRING"},{"name":"city","type":"STRING"}],"rows":[["1","Paris"],["2","Lyon"]]}}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("data.transpose_table", {"table":{"rows":[["1","Paris"],["2","Lyon"]],"columns":[{"type":"STRING","name":"id"},{"type":"STRING","name":"city"}]}});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. |
| DUPLICATE_COLUMN | 400 | No | The request payload failed this skill's input validation. |
| SHAPE_INVALID | 400 | No | The request payload failed this skill's input validation. |
| TYPE_MISMATCH | 400 | No | The request payload failed this skill's input validation. |
| ITEM_LIMIT_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not pivot or aggregate
- Does not evaluate spreadsheet formulas
- Does not treat the table as a sparse matrix
- Building a pivot with aggregations
- Transposing a formula grid
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "data.transpose_table",
"input": {
"table": {
"rows": [
[
"1",
"Paris"
],
[
"2",
"Lyon"
]
],
"columns": [
{
"type": "STRING",
"name": "id"
},
{
"type": "STRING",
"name": "city"
}
]
}
}
}Examples
String table becomes row-named columns
{
"table": {
"rows": [
[
"1",
"Paris"
],
[
"2",
"Lyon"
]
],
"columns": [
{
"type": "STRING",
"name": "id"
},
{
"type": "STRING",
"name": "city"
}
]
}
}{
"columns": [
{
"type": "STRING",
"name": "row_1"
},
{
"type": "STRING",
"name": "row_2"
}
],
"rowCount": 2,
"rows": [
[
"1",
"2"
],
[
"Paris",
"Lyon"
]
],
"columnCount": 2
}Zero-row table keeps unicode names
{
"table": {
"rows": [],
"columns": [
{
"type": "STRING",
"name": "α"
}
]
},
"firstColumn": "SOURCE_COLUMN_NAMES"
}{
"columns": [
{
"type": "STRING",
"name": "source_column"
}
],
"rowCount": 1,
"rows": [
[
"α"
]
],
"columnCount": 1
}Recommended use cases
- Flip a 1-by-N extract so each original row is a column for a later union
- Keep original column names as a first STRING column before a second pass
Avoid for
- Building a pivot with aggregations
- Transposing a formula grid
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.