warehouse_tables

Create a self-managed warehouse table from an uploaded file

Turn a previously uploaded file into a self-managed warehouse table.

The file already sits in PostHog's own bucket (see upload_file), so the table points straight at it and is read in place — no import pipeline and no recurring sync, the same shape as a linked S3/GCS bucket. The read location is always derived from the caller's own team, so a client-supplied upload_id can only resolve inside that team's folder, and the table carries no credential (reads fall back to the node role, never a user-supplied key).

post/api/projects/{project_id}/warehouse_tables/create_from_upload/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/warehouse_tables/create_from_upload/
  • Auth: HTTP bearer

Path parameters

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Request body

upload_idstring uuid required

Id returned by upload_file for the stored file.

filenamestring required

Sanitized filename returned by upload_file.

file_format'csv' | 'json' | 'parquet' required
  • csv - csv
  • json - json
  • parquet - parquet
table_namestring required

Name the resulting table is queried by in HogQL.

Response

idstring uuid required
deletedboolean nullable

Whether the table is soft-deleted and hidden from queries.

namestring required

Name the table is queried by in HogQL. Must be unique within the project, and must start with a letter or underscore and contain only letters, numbers, and underscores.

hogql_namestring required

Dotted name the table is queried by in HogQL (e.g. googleanalytics.devices or postgres.<prefix>.<table>), as opposed to name, which is the underlying storage identifier.

format'CSV' | 'CSVWithNames' | 'Parquet' | 'JSONEachRow' | 'Delta' | 'DeltaS3Wrapper' required
  • CSV - CSV
  • CSVWithNames - CSVWithNames
  • Parquet - Parquet
  • JSONEachRow - JSON
  • Delta - Delta
  • DeltaS3Wrapper - DeltaS3Wrapper
created_atstring date-time required
url_patternstring required

HTTPS URL of the files to read, with * matching any part of a path segment (e.g. https://your-bucket.s3.amazonaws.com/orders/*.parquet). All matched files are read as one table. Must point at a bucket you control, not at PostHog's own storage.

columnsobject[] required
external_schemaobject nullable required
optionsobject

Per-format read options. The only one read today is csv_allow_double_quotes (boolean), for CSV files that quote fields with doubled quotes.

user_access_levelstring nullable required

The effective access level the user has for this object

Changes

No recorded changes to this operation across all 1 revision of this API.