download_dataset
Download a dataset from a URL to a local file with automatic format detection. Use for large datasets that cannot be handled in memory.
Instructions
Download a dataset file from a URL to a local path with automatic format detection.
Better for large datasets that cannot be handled in-memory or when Json responses are too large or not supported.
The file extension is automatically determined from the Content-Type header.
Args:
url: The URL of the file to download.
output_path: Optional. A relative or absolute path for the saved file.
If relative, it's resolved against the configured storage directory.
If absolute, it MUST be inside the storage directory.
If not provided, a filename is generated from the URL with the appropriate extension.
Example:
# Saves to <storage_dir>/my_data/export.xml (extension based on content type)
download_dataset(url="http://.../data", output_path="my_data/export")
# Saves to <storage_dir>/<generated_name>.<ext> (extension based on content type)
download_dataset(url="http://.../data")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |