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, .docx, .xls, or .xlsx.
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.
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.
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:
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, .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, .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.
Status code. 0 indicates that the operation is successful. Otherwise, the operation fails. For error troubleshooting, refer to Error Codes.
A data source object.