Upload a CSV file
To use this endpoint:
- The Upload data setting in Settings > Content permissions must enabled by an Organization Admin
- The authenticating user must have Restricted Querier permissions or higher on the model the file will be uploaded to
Upload a CSV file to create a new data input table. The file is parsed, converted to Arrow format, uploaded to storage, written to the connection’s table upload (scratch) schema, and a view is created in the specified model.
Uploaded files:
- Must be a CSV file with
.csvextension - Can have a maximum of 500,000 rows. Files will be truncated if this limit is exceeded.
The returned id can be passed as fileUploadId on a csv or spreadsheet queryPresentation tab via the Documents v2 draft-patch endpoints to bind the upload as a document Source tab.
Authorizations
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Body
Supported for Postgres, Snowflake, Databricks, Lakebase, BigQuery, Redshift, SQL Server, Fabric, and MotherDuck connections.
The column(s) that uniquely identify a row, as a JSON array of column names (["id"]) or a comma-separated list (id,region). null or an empty value means the upload doesn't have a key. If a key is set, every row must have a value for each key column.
The key becomes the view's primary key, recorded under the column names as your warehouse stores them.
See Setting keys for more information, including how to write to the table in apps.
Response
CSV file uploaded successfully and view created.

