bulk_import
Import bulk data into a CockroachDB table from CSV or Avro files stored in cloud or web storage, supporting S3, Azure Blob, Google Storage, and HTTP/HTTPS URLs.
Instructions
Bulk import data into a table from a file (CSV or Avro) stored in cloud or web storage. Supports S3, Azure Blob, Google Storage, HTTP/HTTPS URLs.
Args: table_name (str): Name of the table to import data into. file_url (str): URL to the data file (s3://, azure://, gs://, http://, https://, etc.). format (str): File format ('csv' or 'avro'). delimiter (str): CSV delimiter (default: ','). skip_header (bool): Whether to skip the first row as header (default: True).
Returns: A success message or an error message.
Example: bulk_import(ctx, table_name="users", file_url="s3://bucket/data.csv", format="csv", delimiter=";", skip_header=True)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
delimiter | No | , | |
file_url | Yes | ||
format | Yes | ||
skip_header | No | ||
table_name | Yes |