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.
Quick reference
Section titled “Quick reference”| 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 |
Export
Section titled “Export”Export a flow to a file
Section titled “Export a flow to a file”# Dry-run — shows export metadata, writes nothingayx one flows export-dry-run <flow-id>
# Write the package to diskayx 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--outputflag (for example,ayx --output jsonorayx one flows list --output json) is reserved for selecting the text/json/yaml/table output format and is a separate argument.
Import
Section titled “Import”Preview an import
Section titled “Preview an import”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.
Import a flow
Section titled “Import a flow”# Basic import into the default locationayx one flows import <path/to/file> --apply
# Import into a specific folderayx one flows import <path/to/file> <folder-id> --apply
# Override JavaScript UDFs on conflictayx 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.
Promote a flow between environments
Section titled “Promote a flow between environments”This pattern exports from one environment and imports into another using --profile to target each:
# 1. Export from devayx one flows export \ --profile dev \ <flow-id> \ --output-file /tmp/my-flow.yxzp \ --apply
# 2. Preview the import on prodayx one flows import-dry-run \ --profile prod \ /tmp/my-flow.yxzp \ <prod-folder-id>
# 3. Commitayx one flows import \ --profile prod \ /tmp/my-flow.yxzp \ <prod-folder-id> \ --apply --yesAutomation patterns
Section titled “Automation patterns”Export multiple flows from a list of IDs
Section titled “Export multiple flows from a list of IDs”while IFS= read -r id; do ayx one flows export "$id" --output-file "./exports/${id}.yxzp" --applydone < flow-ids.txtValidate before importing in CI
Section titled “Validate before importing in CI”ayx --output json one flows import-dry-run my-flow.yxzp \ | jq -e '.ok'# Exits non-zero if the dry-run reports a problem