oneAI icon

oneAI

Interact with the oneAI API

Dataset → Update Schema

AI-generated

Summary

Modify an existing dataset's schema in a specified space by adding, renaming, or dropping columns, and optionally updating the dataset description.

Inputs

  • Space ID (required) — Specify the ID of the space containing the dataset whose schema will be updated.
  • Table Name (required) — Provide the exact name of the dataset (table) to update.
  • Add Columns — Define one or more new columns to add, specifying each column's name and data type. Added columns will contain null values for existing rows.
  • Drop Columns — List column names, separated by commas, to remove from the dataset. This operation discards the data in these columns.
  • Rename Columns — Provide one or more rename operations that map existing column names to new valid identifiers, preserving their data and type.
  • Clear Description — Choose to remove the current dataset description entirely. If set, this overrides any new description value.
  • Description — Set a new textual description for the dataset, ignored if Clear Description is enabled.

Output shape

a single object containing the updated dataset schema details and metadata.

The operation executes a schema update request to the OneAI API for the specified dataset. Only columns explicitly added, dropped, or renamed are affected; other data remains intact. The description update depends on the Clear Description flag. Errors may be reported if invalid columns or space IDs are given.

Links

Discussion