Environment profiles
Environment Profiles let you define per-environment configuration values
(variables, runner settings) in a standalone YAML file.
Profile variables feed into the same {{VAR}} placeholder substitution used in
Floe config files, giving you a clean separation between logic (the config) and
environment-specific values (the profile).
Machine-readable schema
Section titled “Machine-readable schema”A JSON-Schema-compatible YAML schema is provided at schemas/profile.schema.yaml.
It covers every field defined in this document with types, required /
additionalProperties constraints, and inline descriptions.
AI-assisted authoring — paste the contents of schemas/profile.schema.yaml into
your AI assistant (or point it at the file) and ask it to generate a valid
profile for your environment. The schema enumerates all allowed values (e.g.
runner.type: local|kubernetes_job|databricks_job) and marks required fields, so generated output can be
validated immediately with a JSON Schema validator or floe validate --profile <file>.
Schema v1
Section titled “Schema v1”apiVersion: floe/v1 # required; must be exactly "floe/v1"kind: EnvironmentProfile # required; must be exactly "EnvironmentProfile"metadata: # required name: dev # required; non-empty string identifier description: "..." # optional env: dev # optional; free-form environment label tags: [development, local] # optional; string listexecution: # optional runner: type: local # required when execution is present orchestration: # optional; see "Running entities in parallel" strategy: parallel # optional; "sequential" (default) or "parallel" max_concurrent_entities: 4 # optional; integer >= 1variables: # optional; flat string → string map KEY: valuereport: # optional; see "Fixing where run reports go" storage: ops # required when report is present prefix: activations/uat # optionalRequired fields
Section titled “Required fields”| Field | Notes |
|---|---|
apiVersion |
Must equal floe/v1. |
kind |
Must equal EnvironmentProfile. |
metadata.name |
Non-empty string. |
All other fields are optional.
Profile location
Section titled “Profile location”A profile is a local path, an s3://, gs:// or abfss:// URI or env:NAME, for -p / --profile on every command and for profile_path=
in the Python API:
floe run -c config.yml -p s3://my-bucket/profiles/prod.ymlAn s3:// profile is read with the AWS default credential chain (AWS_ENDPOINT_URL_S3 and
AWS_S3_FORCE_PATH_STYLE for S3-compatible stores), as an s3:// manifest is. A missing object fails with
profile not found: <uri>. floe manifest generate -p s3://... records the URI as profile_uri, and the
SHA-256 of the object as profile_checksum. The config (-c) is still a local path.
A gs://<bucket>/<key> or abfss://<container>@<account>.dfs.core.windows.net/<key> profile is read the same way, with
credentials and endpoint from the environment: GOOGLE_* (Application Default Credentials), or AZURE_STORAGE_ACCOUNT_KEY
and AZURE_CLIENT_*. For Azurite set AZURE_STORAGE_ENDPOINT (and AZURE_ALLOW_HTTP=true for http://); these are
obstore’s variables, Floe adds none. az://, abfs:// and gcs:// spellings are refused.
-p env:NAME reads the profile YAML from environment variable NAME, so a container or Job needs no profile file:
FLOE_PROFILE_CONTENT="$(cat profile.yml)" floe run -c config.yml -p env:FLOE_PROFILE_CONTENTAn unset or empty variable fails with a FloeConfigError naming it. The profile behaves exactly as a file one
(${VAR} references are expanded the same way). A profile never rebases paths, so a relative path it supplies
(e.g. through variables) resolves against the config’s directory, as for a file profile; there is no profile
directory to resolve against. execution.runner is validated only: floe run always runs in-process and never launches
a runner, so a Job started with its own profile does not start another Job. floe manifest generate -p env:NAME
records env:NAME as profile_uri and the SHA-256 of the variable’s content as profile_checksum.
Variable precedence and resolution
Section titled “Variable precedence and resolution”When variable sources are merged at runtime the following precedence applies (highest wins):
config variables > env file variables > profile variables- Profile variables – defined in
variables:of the profile file. - Env file variables – loaded from the YAML file named by
env.file:in the main Floe YAML config. - Config variables – defined in
env.vars:of the main Floe YAML config.
Variable values may themselves contain ${VAR} references that are
expanded recursively (nested resolution). Unresolved placeholders and
circular references both produce an immediate, actionable error before
the run begins.
For the full resolution rules and nested reference examples see Variable resolution.
Examples
Section titled “Examples”dev.yml
Section titled “dev.yml”apiVersion: floe/v1kind: EnvironmentProfilemetadata: name: dev env: devexecution: runner: type: localvariables: CATALOG: dev_catalog SCHEMA: dev_bronze TABLE_PREFIX: dev INCOMING_DIR: /tmp/floe/incoming OUTPUT_DIR: /tmp/floe/output REPORT_DIR: /tmp/floe/reportsuat.yml
Section titled “uat.yml”apiVersion: floe/v1kind: EnvironmentProfilemetadata: name: uat env: uatexecution: runner: type: localvariables: CATALOG: uat_catalog SCHEMA: uat_bronze TABLE_PREFIX: uat INCOMING_DIR: /data/uat/incoming OUTPUT_DIR: /data/uat/output REPORT_DIR: /data/uat/reportsprod.yml
Section titled “prod.yml”apiVersion: floe/v1kind: EnvironmentProfilemetadata: name: prod env: prodexecution: runner: type: localvariables: CATALOG: prod_catalog SCHEMA: prod_bronze TABLE_PREFIX: prod INCOMING_DIR: /data/prod/incoming OUTPUT_DIR: /data/prod/output REPORT_DIR: /data/prod/reportsNamed runners
Section titled “Named runners”Add execution.runners beside execution.runner to define overrides. Each
named runner inherits unset fields from the default runner, including nested
resource fields. Select a name with runner on a domain or entity.
execution: runner: type: kubernetes_job image: registry.example/floe:0.10 namespace: floe resources: {memory_mb: 512} runners: large: resources: {memory_limit_mb: 4096}databricks.yml (runner MVP)
Section titled “databricks.yml (runner MVP)”apiVersion: floe/v1kind: EnvironmentProfilemetadata: name: prod-dbx env: prodexecution: runner: type: databricks_job workspace_url: https://adb-1234.5.azuredatabricks.net existing_cluster_id: 1111-222222-abc123 config_uri: dbfs:/floe/configs/prod.yml # passed to floe CLI as `-c` python_file_uri: dbfs:/floe/bin/floe_entry.py # spark_python_task python_file job_name: floe-{domain}-{env} # rendered before job lookup/create auth: service_principal_oauth_ref: env://DATABRICKS_TOKENvariables: CATALOG: prod_catalogconfig_uri and python_file_uri are intentionally separate: the first is the
floe YAML config the CLI is invoked with (-c), the second is the Python entry
script Databricks executes as spark_python_task.python_file. They are usually
distinct artifacts.
Databricks auth expectations for orchestrator runtimes:
auth.service_principal_oauth_refis required in the profile/manifest contract and must be of the formenv://<VAR>(schema-enforced). When set, it is the source of truth and takes precedence over anyFLOE_DATABRICKS_OAUTH_TOKENfallback.- If
auth.service_principal_oauth_refis not set, the runtime falls back toFLOE_DATABRICKS_OAUTH_TOKEN. - Other reference schemes (for example
secret://...) are rejected at runtime and at schema-validation time. Resolve them upstream into an env var before the orchestrator process starts.
Delta on Databricks: a sink.accepted.format: delta entity writes a path-based Delta table on S3
(see Delta sink), which Databricks can read by its path. With a type: unity
catalog and sink.accepted.delta, Floe also registers it in Unity Catalog as an external table
(see Unity Catalog).
Per-run env vars and existing_cluster_id:
- Databricks does not allow per-run OS env vars on a
spark_python_taskattached to an existing cluster.runner.env_parametersis therefore not delivered per-run; values that the floe CLI reads from the environment (e.g.FLOE_ENV) must be configured at cluster level. The orchestrator process still readsenv_parameters.FLOE_ENVto render{env}injob_name, but does not push it to the running task.
kubernetes.yml (pod options)
Section titled “kubernetes.yml (pod options)”A kubernetes_job runner can shape the Job’s pod. Every option is optional and is carried into the
manifest runner definition only when set; dagster-floe applies them (airflow-floe ignores them).
execution: runner: type: kubernetes_job image: registry/floe:0.8 namespace: floe-prod command: [python, -m, floe] # container command, a string or a list labels: {olf.io/flow: ingest} # added to the defaults (`app`, `floe-job`), which win on a clash annotations: {team: data} # pod template annotations image_pull_policy: IfNotPresent security_context: {runAsNonRoot: true} # container securityContext, verbatim node_selector: {pool: batch} tolerations: [{key: batch, operator: Exists, effect: NoSchedule}] # verbatim backoff_limit: 2 # Job backoffLimit, default 0 poll_interval_seconds: 2 # seconds between Job status reads, default 10 env_from: [{secretRef: {name: floe-env}}] # container envFrom, verbatimlabels, annotations and node_selector are string maps, backoff_limit is a non-negative integer,
and security_context, tolerations and env_from are copied as written: Kubernetes validates them.
Floe itself does not check the pod options. Any key of a kubernetes_job runner that Floe does not use
goes into the manifest as written, so a new pod option needs only an orchestrator release. Floe rejects
only values JSON cannot carry: a mapping key that is not a string, or .inf and .nan. When dagster-floe
loads the manifest, it rejects a known option with the wrong type (backoff_limit: two). It ignores a key
it does not know, so a mistyped key such as node_selectr is reported by neither floe validate nor
dagster-floe and has no effect.
A local or databricks_job runner still accepts the options above and leaves them out of the manifest,
so a profile copied from a kubernetes_job keeps loading. It rejects any other unknown key.
poll_interval_seconds is an integer of at least 1 (default 10): dagster-floe reads the Job’s status that
often, so a Job that finishes early is only noticed at the next poll. A lower value such as 2 shortens
short Jobs at the cost of more Kubernetes API reads.
job_scope (entity by default, or domain) sets how many Jobs a run launches. entity starts one Job
per entity: each pays pod start and one poll interval, but they are isolated and run in parallel through
Dagster’s executor. domain starts one Job per domain: pod start and polling are paid once, but its
entities run one after another.
Using profile variables in a Floe config
Section titled “Using profile variables in a Floe config”Profile variables are consumed by the standard {{VAR}} placeholder syntax in
the main config file. The example below shows how catalog and schema values
defined in a profile can drive path construction.
version: "0.8"report: path: "{{REPORT_DIR}}"entities: - name: customers source: format: csv path: "{{INCOMING_DIR}}/customers.csv" sink: accepted: format: parquet path: "{{OUTPUT_DIR}}/{{TABLE_PREFIX}}_customers.parquet" policy: severity: warn schema: columns: - name: customer_id type: string nullable: falseValidation errors
Section titled “Validation errors”The parser and validator return actionable errors for common problems:
| Situation | Error message (example) |
|---|---|
Wrong apiVersion |
profile.apiVersion: expected "floe/v1", got "floe/v2" |
Wrong kind |
profile.kind: expected "EnvironmentProfile", got "SomethingElse" |
Missing metadata |
profile.metadata is required |
Missing metadata.name |
profile.metadata.name is required |
| Unknown field | unknown field profile.unknownField |
| Unknown runner | profile.execution.runner.type: unknown runner "kubernetes"; known runners: local, kubernetes_job, databricks_job |
Missing python_file_uri |
profile.execution.runner.python_file_uri is required for databricks_job |
| Unresolved variable | profile variable "PATH_VAR" contains unresolved placeholder: ${UNDEFINED} |
File layout convention
Section titled “File layout convention”Place profiles alongside the main config or in a dedicated profiles/
directory:
my-project/├── config.yml # main Floe config└── profiles/ ├── dev.yml ├── uat.yml └── prod.ymlSee example/profiles/ in this repository for ready-to-use templates.
The machine-readable field reference is in schemas/profile.schema.yaml.
Environment catalog overrides
Section titled “Environment catalog overrides”Profiles can carry a catalogs: block with the same catalog definition shape as
main Floe configs. When a command is run with both --config and --profile,
the profile catalogs: block replaces the config-level catalogs: block for
that invocation. This keeps entity logic in the shared config while moving
Iceberg catalog endpoints and Glue databases (e.g. database: dev_{domain}_silver) into
environment-specific files.
apiVersion: floe/v1kind: EnvironmentProfilemetadata: name: prodcatalogs: default: prod_polaris definitions: - name: prod_polaris type: rest uri: https://polaris.example.com/api/catalog warehouse: bronze credential: "client_credentials:${POLARIS_CLIENT_ID}:${POLARIS_CLIENT_SECRET}" warehouse_storage: lake_s3 warehouse_prefix: icebergNotes:
warehouse_storagestill references a storage definition from the main config.- Profile-only validation (
floe validate --profile profiles/prod.yml) checks the profile schema, known keys, runner contracts, variable placeholder syntax, duplicate catalog names, andcatalogs.defaultreferences. - Full config validation (
floe validate -c config.yml --profile profiles/prod.yml) additionally checks catalog/storage compatibility and entity sink bindings.
Fixing where run reports go
Section titled “Fixing where run reports go”A profile’s report: block fixes where every run report of the environment is written, so a
platform can grant each environment read access on one prefix it controls (#1237):
report: storage: ops # required: a storage name from the profile or the config prefix: activations/uat # optional- Reports use
report.storage, and their base is<prefix>/<project report.path>(the project’sreport.pathdefaults toreport). Withstorages.definitions[ops].prefix: floe, a projectreport.path: team_awrites unders3://<bucket>/floe/activations/uat/team_a/. - This applies to every report of the run:
run.summary.json, each entity’srun.jsonandrun.failure.json. The summary records the resolved location. - The project cannot move reports out of that prefix.
floe validateandfloe runfail withreport.path must be a relative path under the profile's report prefix (got <path>)for an absolutereport.path, a URI or a path with.., and withreport.storage=<name> differs from the profile's report.storage=<name>when the project names another storage. - Without a profile
report:block,report.pathandreport.storagebehave as before.
Running entities in parallel
Section titled “Running entities in parallel”execution.orchestration also sets how many entities one floe run process runs at once
(floe run -c … -p …, floe run --manifest … generated with the profile, and floe.run(…, profile_path=…)).
Dagster reads the same fields to cap its own executor.
execution: runner: {type: local} orchestration: {strategy: parallel, max_concurrent_entities: 4}- Opt-in. Only
strategy: parallelruns entities in parallel threads.sequential, noorchestrationblock, ormax_concurrent_entities: 1run them one after another in config order, as before.max_concurrent_entitiesdefaults tomin(4, CPU count)whenstrategy: parallelleaves it unset. - Never at the same time: entities with the same Iceberg table (catalog, namespace, table), the same
accepted path or the same incremental state file; and
merge_scd1/merge_scd2entities, which run one at a time. They wait for each other while other entities proceed. - Order.
entity_started,file_*andentity_finishedevents of different entities interleave, and observers (including yourset_observercallback) are called from worker threads. The reports, therun.summary.jsonentity list and the console summary stay in config order. Every entity’s inputs are still listed before the firstentity_started. - Failure. A policy
abortfails only its entity. Any other error stops new entities from starting, lets the running ones finish (they release or promote their incremental claims), then raises the first error in config order. An interrupt (Ctrl-C) is handled the same way: the running entities finish first. - Ephemeral disk. Each running entity may hold up to its download prefetch window (8 files, about
512 MiB) in a temporary directory. Size ephemeral storage for
workers × 512 MiBplus the largest file. - Memory. Each running entity holds its own chunk (up to 1M rows) in memory, and a merge entity’s DuckDB
(
memory_limit4 GB) can run alongside non-merge entities. Peak memory grows withmax_concurrent_entities: size the pod forworkers× one entity’s working set (plus DuckDB when merges are configured), not for a sequential run.
Existing profiles that already say strategy: parallel for Dagster now also run the entities of a
domain Job in parallel inside its floe run.
Hardening assessment and plan
Section titled “Hardening assessment and plan”Current profile feature gaps and fixes:
- No standalone profile validation path — previously
floe validatealways required a config. Fixed by allowingfloe validate --profile <file>to parse and validate anEnvironmentProfileby itself. - Environment-specific catalogs forced into shared configs — catalog targets
are often environment-specific. Fixed by adding
profile.catalogsand applying it as an invocation-scoped replacement for config-levelcatalogs. - Partial profile validation only — profile parsing rejected unknown keys and checked runner/variable basics, but catalog duplicates/default references had no profile-level guard. Fixed with profile catalog validation.
- Validation order inconsistency — manifest generation validated the config before loading the profile, so profile-provided catalogs could not satisfy catalog bindings. Fixed by loading the profile first and passing profile catalogs into config validation.
- Remaining hardening work — profile paths are local-only while config supports URI resolution,
and profile catalog validation cannot fully verify
warehouse_storagewithout a config. Future work should reuse config URI resolution for profile loading, and add a combined validation report that clearly separates profile-only errors from config/profile integration errors.
Synced from floe @ v1.1.0 (313b534), docs/guides/profiles.md.