pip install floe-python installs the floe command (see installation.md).
floe --help and floe <command> --help list every flag; floe --version prints the version.
Commands
Section titled “Commands”-
floe validate -c <config> [-p <profile>] [--entities <name[,name...]>]- Validate YAML config and exit with non-zero code on errors.
-papplies an environment profile first. With-pand no-c, only the profile is validated.
-
floe run (-c <config> | --manifest <manifest.json>) [-p <profile>] [--run-id <id>] [--entities <name[,name...]>] [--domain <name[,name...]>] [-F|--full-refresh] [--dry-run] [--log-format off|text|json] [--quiet|--verbose]- Execute ingestion using the config, or a manifest generated by
floe manifest generate. - Run reports are written under
<report.path>/run_<run_id>/...as defined in the config, or<report.path>/<domain>/run_<run_id>/...when every selected entity has one domain (D37). -ctakes a local path.--manifestalso takes ans3://,gs://orabfss://URI.s3://is read with the AWS default credential chain (AWS_ENDPOINT_URL_S3andAWS_S3_FORCE_PATH_STYLEfor S3-compatible stores);gs://andabfss://withGOOGLE_*andAZURE_*from the environment (AZURE_STORAGE_ENDPOINTfor an emulator). Relative local paths in a remote manifest resolve under itswork_root, elseFLOE_WORK_ROOT, else/workfor animagemanifest or the current directory for aclione. Ans3://report_base_uriwrites the reports there.-papplies an environment profile (a usage error with--manifest: the manifest is already compiled). It takes a local path, ans3://,gs://orabfss://URI read as--manifestis, orenv:NAME, the profile YAML held in environment variableNAME(every command that takes-pdoes the same).--domainselects every entity of the named domains (repeatable or comma-separated), in config order. An unknown domain is an error, and--domaincannot be combined with--entities.-F/--full-refreshrebuilds the accepted output from every input: files the incremental state already lists are read again,appendwrites asoverwrite, and withsink.archivethe archived files are read too (D24).merge_scd1replaces the table with the inputs’ rows in one commit, so a row deleted at the source leaves the table; a key in several inputs keeps the latest file’s row. It is rejected withmerge_scd2, whose version history cannot be rebuilt from the inputs.--log-format jsonemits NDJSON events to stdout (useful for orchestrators);offis the default.--dry-runresolves entity inputs and output targets without running ingestion.--quietreduces console output to run totals.--verboseexpands run output details.- An entity aborted by its policy fails only that entity; the run continues and exits
2(D36).
- Execute ingestion using the config, or a manifest generated by
-
floe manifest generate -c <config> -o <path|s3://...|-> [-p <profile>] [--entities <name[,name...]>] [--deterministic] [--manifest-name <name>] [--default-domain <domain>] [--manifest-path-mode default|resolved-uri] [--runtime image|cli]- Validate config and generate a common orchestrator manifest JSON (
spec_version= the Floe major.minor). -papplies an environment profile (variables, storages, catalogs, lineage) asfloe run -pdoes, and records itsprofile_uriandprofile_checksum. Itsexecutionblock setsexecution.orchestrationand, for akubernetes_jobordatabricks_jobrunner, thedefaultrunner definition.-o -writes manifest JSON to stdout; ans3://,gs://orabfss://output is uploaded.--deterministic,--manifest-name,--default-domain,--manifest-path-modeand--runtimeare described in manifest.md.
- Validate config and generate a common orchestrator manifest JSON (
-
floe add-entity -c <config> --input <path|file://...> [--format csv|json|parquet|xlsx] [--name <entity>] [--domain <domain>] [--source <ref> --resource <name>]- Infer a schema from an input file and add a new entity to the config.
- If
--domainmatches an included domain and--outputis omitted, writes<domain folder>/<name>.yml; fields supplied by domain defaults are omitted from that file. - If
-cpoints to a missing file, Floe creates a minimal config and adds the entity. - If
--formatis omitted, Floe infers it from the input file extension (.csv,.json,.parquet,.xlsx). - XLSX inference requires
floe-python[xlsx]. Floe uses the first worksheet, reads its first row as column names, and gives each column typestring. - If
--nameis omitted, Floe infers it from the input filename stem. --sourceand--resourcewrite a reference to a declaredsources:entry;--inputremains the file used for schema inference.- Generates defaults for
sink,policy, andschema.mismatch. - JSON inference is v0.3 bootstrap-focused: top-level keys only; nested objects/arrays are inferred as
string. --dry-runprints the YAML that would be written without creating the file.--output <new.yml>writes the updated root config to a new file instead of overwriting-c; with an included domain, this keeps the existing inline entity behavior.
-
floe state inspect -c <config> --entity <name> [-p <profile>]- Print the resolved incremental state URI for an entity and the current state JSON when present.
- Shows processed-file and active-claim counts.
- Helpful for confirming what Floe has already seen in
incremental_mode: file. - See docs/incremental.md for state file and CAS details.
-
floe state reset -c <config> --entity <name> --yes [-p <profile>]- Remove the local or remote state object for an entity.
- Requires
--yesbecause the next incremental run may reprocess previously tracked files. - Remote resets write the empty state conditionally (version or ETag), as remote incremental state does.
- See docs/incremental.md for reset behavior and permissions.
-
floe state forget -c <config> --entity <name> --file <uri> [--file <uri> ...] --yes [-p <profile>]- Remove the named files from an
incremental_mode: fileentity’s state so the next run ingests them again, for example a corrected file a partner re-sent. The other files, claims and watermark are untouched. --fileis the exact URIfloe state inspectprints, no normalization. Refused, with nothing written, when a URI is not tracked, is under a live claim, or (withsource.partitioning) falls before the listing window (use--full-refresh), and when the entity is not infilemode.- Requires
--yes. The state is written conditionally, as forreset. - See docs/incremental.md.
- Remove the named files from an
-
floe maintain -c <config> [-p <profile>] [--entities <name[,name...]>] [--older-than-days <n>] [--retain-last <n>] [--orphan-delay-days <n>] [--dry-run] [--compact --experimental]- Expire old snapshots of each selected entity’s Iceberg accepted table, then remove its orphan files; entities with other sinks are skipped.
- A snapshot is expired only if it is older than
--older-than-days(default 7) and outside the newest--retain-last(default 10). Branch and tag heads are never expired. - The retention floor is 7 days and 10 snapshots: a request below it fails, it is not clamped. The run’s retry guard reads recent snapshot summaries, so it relies on this floor.
- Expiry changes table metadata only and deletes no file; time travel to an expired snapshot fails afterwards.
- Orphan removal then deletes every object under the table location that the retained metadata no longer references (the files only expired snapshots used, and files of failed writes), once it is older than
--orphan-delay-days(default 3, at least 1). The delay keeps the files an in-flightfloe runhas written but not committed yet, so keep it longer than your longest run. Don’t keep other files under a table’s location: they count as orphans. - The scan lists S3 through Floe’s storage client (
listpermission on the table prefix) and fails without deleting anything if the listing misses the table’s current metadata file. --dry-runcommits nothing and deletes nothing: it prints the snapshots it would expire, and the orphan files and their total bytes as of now. Files that only the expired snapshots reference show up on the next run.--compact --experimental(experimental) first compacts the table: it reads the whole table at its current snapshot through DuckDB, with the MERGE position deletes applied, and rewrites it into target-sized files (write.target-file-size-bytes). It then commits onereplacesnapshot that drops every old data and delete file.--compactwithout--experimentalis refused, and--compacthas no dry run.- It subclasses private PyIceberg 0.12 internals, so a PyIceberg upgrade can break it. A test pins the PyIceberg version.
- Unpartitioned tables only, and no equality deletes. Every rewritten row is counted before the commit; on a mismatch nothing is committed.
- An append that lands during the compaction is kept. A MERGE that commits against the files being rewritten fails the compaction, so rerun it. A MERGE that started before the compaction committed fails at its own commit instead.
- Memory: DuckDB’s resident memory overshoots its
memory_limitby about 1.9x on large tables. Size the pod atmemory_limit+ ~3.5 GB (500M rows: 7.4 GB peak at a 4 GB limit). - The replaced files are reclaimed by orphan removal once the snapshots that reference them are expired.
- Run it after ingestion, not beside it.
-
floe contract import <workbook.xlsx> --output-dir <dir> [--domain NAME] [--dry-run] [--check] [--accept-breaking] [-c config.yml]- Offline: turns a business-owned domain workbook into one entity file per table plus a fail-closed
_domain.ymlscaffold (only if absent). Needs thexlsxextra and noconfig.yml. The workbook’sGuidesets the domain;--domainonly guards that it matches. - Any workbook error fails the command with cell diagnostics before anything is planned. Output:
created / updated / unchanged / blockedcounts, one line per file, then the changes grouped bybreaking,tightening,loosening,additive,metadata. - Reimport rewrites only the business-owned keys and leaves every other byte alone. A file whose owned keys were edited by hand, or that was not generated, is
blocked. Nothing is ever deleted: an entity file with no row in the workbook is reported as breaking. - Any
blockedfile, unsafe path, or breaking change without--accept-breakingfails and writes nothing. --dry-runprints the plan and writes nothing.--checkwrites nothing and exits non-zero when a file would be created or updated.-c config.ymlvalidates the project as it would be after the import (in a temporary copy) before writing, and lists engineer settings that weaken the contract. Failures that only nameTODO_placeholders are reported as “complete_domain.yml, then runfloe validate”; any other failure blocks.--output-dirmust be inside the config’s directory.- See Business contract.
- Offline: turns a business-owned domain workbook into one entity file per table plus a fail-closed
Dry-run behavior
Section titled “Dry-run behavior”- Dry-run resolves input files/objects using the same planning path as real runs.
- For cloud sources, dry-run lists matching objects but does not download them.
- Console preview prints resolved file count and a capped list (
50entries by default). - Use
--verboseto print the full resolved file list.
Examples
Section titled “Examples”-
Validate the sample config:
floe validate -c example/config.yml --entities customer
-
Run with default paths from the config:
floe run -c example/config.yml --entities customer
-
Run every entity of a domain:
floe run -c example/config.yml --domain sales
-
Full refresh of one entity:
floe run -c example/config.yml --entities customer --full-refresh
-
Run from a manifest:
floe run --manifest manifest.json --entities customer
-
Run with JSON logs:
floe run -c example/config.yml --entities customer --log-format json
-
Dry-run preview:
floe run -c example/config.yml --entities customer --dry-run
-
Generate common manifest:
floe manifest generate -c example/config.yml --output orchestrators/airflow-floe/example/manifest.airflow.json
-
Print common manifest to stdout:
floe manifest generate -c example/config.yml --output -
-
Add an entity from a CSV file:
floe add-entity -c example/config.yml --input ./in/customers.csv --format csv --name customers
-
Bootstrap a new config file and infer name/format:
floe add-entity -c new-config.yml --input ./in/orders.csv
-
Inspect incremental state:
floe state inspect -c example/config.yml --entity customer
-
Reset incremental state:
floe state reset -c example/config.yml --entity customer --yes
-
Expire old snapshots of an Iceberg entity (preview first):
floe maintain -c config.yml --entities orders --dry-run
-
Report output:
example/report/run_<run_id>/run.summary.jsonexample/report/run_<run_id>/customer/run.json
-
Set a run id:
floe run -c example/config.yml --entities customer --run-id dev-001
Synced from floe @ v1.1.0 (313b534), docs/reference/cli.md.