POST /tables/previewFromFile to preview a table from a local file upload. The endpoint accepts a multipart form containing a file and a table-preview request object. It returns inferred schema/config details and sampled rows without creating a table.
Use
POST /tables/preview when the source file is already reachable from configured storage or a catalog. Use previewFromFile when you need to upload a local file directly to the controller for preview.Endpoint
The endpoint simulates a table preview with the uploaded file as the source data. It does not persist the file, create a schema, create a table, or ingest rows.
Basic JSON File Example
Create a request file:Inline Multipart Example
Example Response Shape
The response uses the same preview API shape as/tables/preview. Exact fields vary by source type and request options.
Request Configuration
At minimum, provide atableConfig with:
tableNametableTypetask.taskTypeConfigsMap.FileIngestionTask.inputFormat
inputFormat values:
Enable schema inference when you want StarTree to infer fields from the uploaded file:
Workflow
- Build a minimal table config and preview config.
- Upload a representative local file with
POST /tables/previewFromFile. - Inspect inferred schema, sampled rows, and summary.
- Adjust field names, time column, transforms, and indexes.
- Use the final schema and table config in the normal table creation flow.
Limits and Operational Notes
- The endpoint is intended for preview and onboarding workflows, not ingestion.
- Use representative but bounded sample files; do not upload production-scale data files.
- The multipart request must include both
requestandfile. - The
requestpart must be valid JSON that can deserialize as a table preview request. - The file format must match the
inputFormatin the request table task config.

