Luis Barragan
06/10/2026, 12:04 AMMarvin
06/10/2026, 12:04 AMMarvin
06/10/2026, 12:06 AMflow-name/deployment-name as the important human-facing identifier
- Avoid encoding too much changing metadata into the flow name itself
What Prefect enforces
Flow/deployment names cannot contain:
- /
- %
- &
- >
- <
So names like daily-etl are fine, but daily/etl is not.
Recommended style
Prefect docs and examples consistently use hyphen-separated lowercase names, e.g.:
- Flows: daily-etl, customer-sync, billing-reconciliation
- Deployments: prod, staging, nightly, backfill, us-east
Also, if you do not explicitly name a flow, Prefect will turn a Python function like my_flow_function into my-flow-function, which is a good signal that kebab-case is the intended convention.
Example:
python
from prefect import flow
@flow(name="daily-etl")
def run_daily_etl():
pass
Then deployments might be:
python
run_daily_etl.from_source(...).deploy(
name="prod",
work_pool_name="my-pool",
)
That gives you a clear identifier:
text
daily-etl/prod
Good practice for naming
A useful pattern is:
- Flow name = what the workflow does
- Deployment name = how/where/when it runs
Examples:
- Flow: customer-sync
- Deployments: prod, staging, hourly, manual-backfill
- Flow: warehouse-load
- Deployments: daily-prod, ad-hoc, dev
This is usually better than putting environment/schedule into the flow name itself unless they are truly different workflows.
Recommended rules of thumb
1. Keep flow names stable
- Prefer customer-sync
- Avoid renaming frequently, since names are how people recognize runs in the UI/CLI
2. Put execution context in deployment names
- Environment: prod, staging, dev
- Trigger/schedule: daily, hourly, manual
- Purpose: backfill, smoke-test
3. Be concise but specific
- Better: stripe-invoice-sync
- Worse: sync
- Worse: data-pipeline-thing
4. Use one consistent format everywhere
- Prefer all lowercase + hyphens
- Avoid mixing snake_case, camelCase, and spaces
5. Don’t overstuff names
- customer-sync-prod-daily-us-east-batch-v2 is usually too much
- If you need more metadata, use tags, parameters, descriptions, or work pools
Suggested naming patterns
Some patterns that work well:
- By business function
- Flow: invoice-generation
- Deployments: prod, staging
- By source -> destination
- Flow: salesforce-to-snowflake
- Deployments: hourly, backfill
- By operation
- Flow: db-maintenance
- Deployments: nightly, manual
When to create separate flows vs separate deployments
Use separate deployments when the core logic is the same but execution context differs.
Use separate flows when the workflows are meaningfully different.
For example:
- Same code, different schedule/env → one flow, multiple deployments
- Different business process or task graph → separate flows
Example I’d recommend
python
from prefect import flow
@flow(name="customer-sync")
def customer_sync():
pass
Deployments:
- customer-sync/prod
- customer-sync/staging
- customer-sync/backfill
That tends to stay readable in both UI and CLI.
Relevant docs/examples
- Prefect flows concept docs: Flows
- Prefect deployments docs: Deployments
- Python deployment patterns with `from_source(...).deploy(...)`: Deploy via Python
If you want, I can also suggest a team-wide naming convention template for flows + deployments for dev/staging/prod environments.Luis Barragan
06/10/2026, 12:09 AM/ are valid in a deployment name as long as it separates the name of the flow from the actual deployment identifier (e.g. the parameter)?Marvin
06/10/2026, 12:09 AMMarvin
06/10/2026, 12:09 AM/ is not valid inside the flow name or the deployment name itself, but Prefect uses / as the separator in the fully qualified deployment identifier:
text
<flow-name>/<deployment-name>
So this is valid:
text
customer-sync/prod
Where:
- flow name = customer-sync
- deployment name = prod
But this would not be valid as a deployment name by itself:
text
prod/us-east
because / cannot appear inside the name field.
So if you want that extra structure, prefer something like:
text
customer-sync/prod-us-east
or:
text
customer-sync/prod_us_east
though kebab-case like prod-us-east is the more common Prefect style.
In practice:
- Valid deployment reference: my-flow/my-deployment
- Invalid flow name: my/flow
- Invalid deployment name: my/deployment
If helpful, I can also show where this matters in:
- prefect deploy
- Python .deploy(name=...)
- running deployments from the CLI/API