Add Columns
add_columnsAdds one or more columns to an existing table in a watsonx.data schema by specifying column names and data types.
Instructions
Add one or more columns to a table in a watsonx.data schema.
Note: Data types are typically specified in lowercase (e.g., "varchar", "int", "decimal"). While the API pattern allows both cases, lowercase is recommended for compatibility.
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": {
"catalog_name": "<catalog_name>",
"schema_name": "<schema_name>",
"table_name": "<table_name>",
"columns": "<columns>",
"engine_id": "<engine_id>"
},
"name": "add_columns"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| columns | Yes | List of column definitions, each with: name (required), type (required, lowercase recommended), comment (optional), extra (optional), precision (optional), scale (optional) | |
| engine_id | Yes | Engine ID to use for the operation (from list_engines) | |
| table_name | Yes | Table to add columns to | |
| schema_name | Yes | Schema containing the table | |
| catalog_name | Yes | Catalog containing the table (e.g., "iceberg_data") |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||