Skip to content

Import & export

Import and export let you move flows between Alteryx One environments — for example, promoting a flow from a development workspace to production. The binary format is the same package the Alteryx One UI produces, so the CLI and the UI are interoperable.

Mutating commands are dry-run by default — add --apply to commit.

Command What it does
ayx one flows export Export a flow to a local file
ayx one flows export-dry-run Preview what export would produce
ayx one flows import Import a flow package into the workspace
ayx one flows import-dry-run Preview an import without applying it
Terminal window
# Dry-run — shows export metadata, writes nothing
ayx one flows export-dry-run <flow-id>
# Write the package to disk
ayx one flows export <flow-id> --output-file <path/to/file> --apply

--output-file is required for export and specifies the local file path to write. The resulting file can be committed to version control or passed directly to import on a target environment.

Note: The file path flag is --output-file, not --output. The global --output flag (for example, ayx --output json or ayx one flows list --output json) is reserved for selecting the text/json/yaml/table output format and is a separate argument.

Terminal window
ayx one flows import-dry-run <path/to/file>
ayx one flows import-dry-run <path/to/file> <folder-id>

import-dry-run sends the package to the server for validation and returns what would happen, without committing anything. Run this before every import to catch conflicts early.

Terminal window
# Basic import into the default location
ayx one flows import <path/to/file> --apply
# Import into a specific folder
ayx one flows import <path/to/file> <folder-id> --apply
# Override JavaScript UDFs on conflict
ayx one flows import <path/to/file> --override-js-udfs --apply
# Skip the confirmation prompt (CI / scripts)
ayx one flows import <path/to/file> --apply --yes

--from-ui is available on both import and import-dry-run for packages produced by the Alteryx One web UI rather than by ayx one flows export. You generally do not need it when round-tripping through the CLI.

This pattern exports from one environment and imports into another using --profile to target each:

Terminal window
# 1. Export from dev
ayx one flows export \
--profile dev \
<flow-id> \
--output-file /tmp/my-flow.yxzp \
--apply
# 2. Preview the import on prod
ayx one flows import-dry-run \
--profile prod \
/tmp/my-flow.yxzp \
<prod-folder-id>
# 3. Commit
ayx one flows import \
--profile prod \
/tmp/my-flow.yxzp \
<prod-folder-id> \
--apply --yes
Terminal window
while IFS= read -r id; do
ayx one flows export "$id" --output-file "./exports/${id}.yxzp" --apply
done < flow-ids.txt
Terminal window
ayx --output json one flows import-dry-run my-flow.yxzp \
| jq -e '.ok'
# Exits non-zero if the dry-run reports a problem