Thread
#prefect-community
    Jacob Blanco

    Jacob Blanco

    1 year ago
    Hey folks, we use flows in conjunction with parameterized schedules A LOT and I was wondering if it’s possible to alter the name of a Flow Run to contain some identifier based on Flow parameters? So for example if one of the flow parameters is a table name, is it possible to have the flow name be something like
    "my_table-intrepid-iguana"
    or something like that. This would make it easier to navigate the flow runs in the Cloud UI.
    Kevin Kho

    Kevin Kho

    1 year ago
    Hi @Jacob Blanco, You can use the Client to
    set_flow_run_name
    given a flow_run_id. It feels like this operation might be best done with a Python script where you query for flow_runs and their parameters like this:
    query {
      flow_run (where: {flow_id: {_eq: "9fc3af5c-bf51-4b6f-a44b-589536432f19"}}){
        	id
        	state
        	parameters
        	flow_id
        }
      }
    and then you can use the parameters supplied and pass it to the
    set_flow_run_name
    . Not 100% sure this will work.
    Ignore everything I said. I think the easier way to do this is to use the StartFlowRun task which lets you give a run_name. If you kickoff your flow run this way, you can pass parameter names to it and construct the run_name also
    Jacob Blanco

    Jacob Blanco

    1 year ago
    😄 I appreciate your extensive follow-up on this.
    Kevin Kho

    Kevin Kho

    1 year ago
    lol!