hi community! is there a way to look-up a flow's i...
# prefect-community
h
hi community! is there a way to look-up a flow's id using the flow name/project name via the client? this suggests you can via the cli
a
what are you trying to do?
h
hi Anna! i'm trying to start multiple runs for a flow that's been previously registered
(i.e., runs with different parameters)
but to start multiple runs you don't necessarily have to know the flow ID
usually, you only need to know the flow name and project name
so while the above links answer your direct questions, I think this one will address your actual problem: https://discourse.prefect.io/t/how-to-map-over-flows-with-various-parameter-values/365
h
thank you! i'm using
create_flow_run
which seems to require a flow_id
a
Copy code
create_flow_run.map(
        flow_name=unmapped("yourflow"),
        project_name=unmapped("yourproject"),
        parameters=your_list_of_dicts
    )
h
oh, nice, this is what i need! šŸ˜„
šŸ‘ 1
thank you!
šŸ™Œ 1
is this for orion?
a
no, for Prefect 1.0
for Orion, you could do a for loop with subflows
h
hm, the method signature in client.py seems different:
Copy code
def create_flow_run(
        self,
        flow_id: str = None,
        context: dict = None,
        parameters: dict = None,
        run_config: RunConfig = None,
        labels: List[str] = None,
        scheduled_start_time: datetime.datetime = None,
        idempotency_key: str = None,
        run_name: str = None,
        version_group_id: str = None,
    ) -> str:
should i be importing it from somewhere else? i'm using prefect 1.1
a
*prefect.tasks.prefect.flow_run.create_flow_run*(flow_id=None, flow_name=None, project_name="", parameters=None, context=None, labels=None, run_name=None, run_config=None, scheduled_start_time=None, idempotency_key=None)
both id and name are valid
h
ah, ok, i was calling the method on a prefect client
thank you again!
šŸ™Œ 1