Create Ingestion Job
create_ingestion_jobCreates a job that loads CSV, Parquet, JSON, ORC, or Avro files from object storage into a target watsonx.data catalog, schema, and table using configurable Spark settings.
Instructions
Create a data ingestion job to load data into watsonx.data.
Args:
job_id: Unique job identifier (e.g., "ingestion-1234567890")
catalog: Target catalog name
schema: Target schema name
table: Target table name
file_paths: Source file path (e.g., "s3://bucket-name/file.csv")
file_type: Source file type - "csv", "parquet", "json", "orc", "avro" (default: "csv")
bucket_name: S3 bucket name (extracted from file_paths if not provided)
bucket_type: Bucket type - "amazon_s3", "aws_s3", "minio", "ibm_cos", "ibm_ceph",
"adls_gen1", "adls_gen2", "google_cs", "ibm_storage_scale", "ozone" (default: "ibm_cos")
write_mode: Write mode - "append", "overwrite" (default: "append")
engine_id: Spark engine ID to use for ingestion
field_delimiter: CSV field delimiter (default: ",")
line_delimiter: CSV line delimiter (default: "
") escape_character: CSV escape character (default: "") header: Whether CSV has header row (default: true) encoding: File encoding (default: "UTF-8") driver_memory: Spark driver memory (default: "2G") driver_cores: Spark driver cores (default: 1) executor_memory: Spark executor memory (default: "2G") executor_cores: Spark executor cores (default: 1) num_executors: Number of Spark executors (default: 1)
Returns:
Dict with job_id, status, and creation details
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"job_id": "<job_id>",
"catalog": "<catalog>",
"schema": "<schema>",
"table": "<table>",
"file_paths": "<file_paths>"
},
"name": "create_ingestion_job"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| header | No | ||
| job_id | Yes | ||
| schema | Yes | ||
| catalog | Yes | ||
| encoding | No | UTF-8 | |
| engine_id | No | ||
| file_type | No | csv | |
| file_paths | Yes | ||
| write_mode | No | append | |
| bucket_name | No | ||
| bucket_type | No | ibm_cos | |
| driver_cores | No | ||
| driver_memory | No | 2G | |
| num_executors | No | ||
| executor_cores | No | ||
| line_delimiter | No | ||
| executor_memory | No | 2G | |
| field_delimiter | No | , | |
| escape_character | No | \ |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||