Skip to content
SegmentStream/ Docs

Loading documentation…

↑ ↓ to navigate  ↵ to open  Esc to close
Website Console
Section menu

Preview rows from a warehouse table

GET /api/workspaces/{workspaceId}/warehouse/datasets/{datasetId}/tables/{tableId}/preview

Endpoint

GET/api/workspaces/{workspaceId}/warehouse/datasets/{datasetId}/tables/{tableId}/preview

Read a sample page from a table to inspect values before querying it. This is a repeatable read. See warehouse_tableMetadata. Required personal key scopes: workspace:view, warehouse:query.

Authorization

Bearer token · workspace:view · warehouse:query

Parameters

workspaceId path · string · required
Workspace UUID returned by list workspaces.
datasetId path · string · required
Warehouse dataset identifier.
tableId path · string · required
Table identifier within the dataset.
pageToken query · optional
Continuation token from the preceding response.
rowIndex query · optional
Zero-based row position at which to start the preview.
API-Version header · string · optional
Optional platform API major version. Omit to use the current default. Allowed values: 1

Responses

200 Success
application/json schema
{
  "type": "object",
  "properties": {
    "access": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/SharedObject_26"
        },
        {
          "type": "null"
        }
      ],
      "description": "Permissions observed for this resource when the server handled the request."
    },
    "table": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Identifier of this resource."
        },
        "name": {
          "type": "string",
          "allOf": [
            {
              "description": "Name identifying this item within its parent resource."
            }
          ]
        },
        "type": {
          "type": "string",
          "enum": [
            "clone",
            "external",
            "materialized-view",
            "snapshot",
            "table"
          ],
          "description": "Type of the value or resource described here."
        },
        "columns": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/SharedObject_148"
          },
          "description": "Names and types of the returned columns."
        },
        "schemaColumns": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/SharedObject_148"
              }
            },
            {
              "type": "null"
            }
          ],
          "description": "Columns in the recorded table schema."
        },
        "nextPageToken": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Opaque token for fetching the next page."
        },
        "revision": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Version of the configuration represented by this entry."
        },
        "datasetId": {
          "type": "string",
          "description": "Warehouse dataset identifier."
        },
        "description": {
          "type": "string",
          "description": "Human-readable explanation of the item."
        },
        "location": {
          "type": "string",
          "description": "Region or location in which the resource is hosted."
        },
        "partitioning": {
          "type": "string",
          "description": "Rules that divide the asset or table into partitions."
        },
        "rowCount": {
          "type": "string",
          "pattern": "^\\d+$",
          "description": "Number of rows in the result or table."
        },
        "rows": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "boolean"
                },
                {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "string",
                      "enum": [
                        "Infinity",
                        "-Infinity",
                        "NaN"
                      ]
                    }
                  ]
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          "description": "Result rows for the selected fields and interval."
        },
        "sizeBytes": {
          "type": "string",
          "pattern": "^\\d+$",
          "description": "Size of the content in bytes."
        },
        "updatedAt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Time when the item was updated."
        }
      },
      "required": [
        "id",
        "name",
        "type",
        "columns",
        "datasetId",
        "description",
        "location",
        "partitioning",
        "rowCount",
        "rows",
        "sizeBytes"
      ],
      "additionalProperties": false,
      "description": "Warehouse table addressed by this result."
    }
  },
  "required": [
    "table"
  ],
  "additionalProperties": false
}
Full schema and referenced types ↗
Example
{
  "table": {
    "id": "orders",
    "name": "orders",
    "type": "table",
    "columns": [
      {
        "name": "order_id",
        "type": "String",
        "mode": "Required",
        "description": "Order identifier."
      }
    ],
    "datasetId": "sales",
    "description": "Daily orders",
    "location": "EU",
    "partitioning": "",
    "rowCount": "0",
    "rows": [],
    "sizeBytes": "0"
  }
}
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
Deprecation
Present when the operation is deprecated. RFC 9745 date in seconds since the Unix epoch.
Sunset
Present when retirement is scheduled. HTTP date of planned removal, per RFC 8594.
400 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
401 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
403 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
404 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
406 Unsupported platform API version
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
409 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
429 Request limit reached
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
Retry-After
Seconds to wait before retrying the request.
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
503 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).