> ## 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.

# Create map field

> Marks one existing field as a map field and returns its name.

`axiom.createMapField` marks one existing field as a map field and returns its name. This changes indexing, not retained event values.

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

export default automation("Create map field", () => {
  onHttpRequest({ scope: "automation" })
  axiom.createMapField({ datasetName: "production", fieldName: "attributes" })
})
```

## Inputs

`datasetName` selects the dataset by name or ID. `fieldName` is the existing field to mark as a map field.

## Output

Returns `{ name: string }` for the configured map field.

## Permission and failures

The API token needs the organization-level `datasets|update` capability and access to the target dataset. Axiom rejects missing datasets, unknown fields, and fields that cannot be configured as maps. This mutation is not retried automatically after an ambiguous provider response.
