> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Update dataset field

> Updates a field's name, type, visibility, description, or unit.

`axiom.updateDatasetField` updates a field's name, type, visibility, description, or unit. Supply the field's current or replacement `type`; when `name` is omitted, `fieldName` is preserved.

```ts automations/axiom-update-dataset-field.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { axiom } from "automate.ax/axiom"

export default automation("Update dataset field", () => {
  onHttpRequest({ scope: "automation" })
  axiom.updateDatasetField({
    datasetName: "production",
    fieldName: "service.name",
    type: "string",
    hidden: false,
    description: "OpenTelemetry service name",
  })
})
```

## Inputs

| Input         | Required | Description                                |
| ------------- | -------- | ------------------------------------------ |
| `datasetName` | Yes      | Dataset name or ID.                        |
| `fieldName`   | Yes      | Existing field name.                       |
| `name`        | No       | Replacement name; defaults to `fieldName`. |
| `type`        | Yes      | Current or replacement Axiom field type.   |
| `hidden`      | No       | Whether the field is hidden in Axiom.      |
| `description` | No       | Field description.                         |
| `unit`        | No       | Display unit.                              |

## Output

Returns the complete updated field definition.

## Permission and failures

The API token needs the organization-level `datasets|update` capability and access to the target dataset. Axiom rejects missing fields, unsupported type changes, and invalid names. This mutation is not retried automatically after an ambiguous provider response.
