Create data source
Creates a data source in the specified dataset. You can create data sources only in datasets that you have created.
A data source can be in one of the following formats: .csv, .tsv, .md, .mdx, .json, .txt, .pdf, .pptx, .ppt, .doc, .docx, .xls, or .xlsx.
Authorizations
Headers
The trace ID you set in your system to trace this request. It can be up to 128 characters in length. If the request fails, you can provide it to the Powerdrill team to help with troubleshooting.
Path Parameters
The ID of the dataset in which you want to create a data source.
To check the datasets you have access to, call GET /v2/team/datasets.
Body
The name of the data source, including the file extension (e.g., example.csv
). The name must be between 1 and 128 characters. If it exceeds this limit, it will be truncated.
The type of the data source. Set it to FILE.
Your user ID, which uniquely identifies you within your team. To obtain your ID:
- If you're the team admin, refer to Check user information.
- If you're a system or virtual user, ask your team admin to check your user ID by referring to Check user information.
The URL of the file for public access.
You must specify either url
or file_object_key
, but not both.
Only files with the following extensions are supported: .csv, .tsv, .md, .mdx, .json, .txt, .pdf, .pptx, .ppt, .doc, .docx, .xls, or .xlsx.
The object storage path to your locally uploaded file.
You must specify either url
or file_object_key
, but not both.
Only files with the following extensions are supported: .csv, .tsv, .md, .mdx, .json, .txt, .pdf, .pptx, .ppt, .doc, .docx, .xls, or .xlsx.
How to obtain:
Each time you upload a file through the Upload file endpoint, its file_object_key
is returned. For more details, see How to Upload Local Files.
Response
Status code. 0 indicates that the operation is successful. Otherwise, the operation fails. For error troubleshooting, refer to Error Codes.
A data source object.