Thread
#prefect-community
    Jacob Blanco

    Jacob Blanco

    1 year ago
    Is there any way in Cloud UI to view Flow runs by parameter value?
    Amit Gal

    Amit Gal

    1 year ago
    Have you tried the interactive API using graphql? Something like:
    query {
      flow_run(
        order_by: {created: desc}
      ) {
        name
        id
        parameters
      }
    should have you in the right direction, I think
    Kevin Kho

    Kevin Kho

    1 year ago
    Hi @Jacob Blanco, I think Amit's suggestion is the only way at the moment
    Jacob Blanco

    Jacob Blanco

    1 year ago
    Thanks Amit. We make heavy use of parameters so this is kind of a pain-point when navigating through Flow runs
    Jenny

    Jenny

    1 year ago
    Hi @Jacob Blanco you can narrow your query down a little further if you know the parameter keys. For example if I wanted to search for a flow run with the parameter c:3 I can use the following query in the Interactive API:
    {
      flow_run(where: {parameters: {_contains: {c: 3}}}) {
        parameters
        name
        id
      }
    }
    or I can search by parameter key:
    query {
      flow_run (where: {parameters: {_has_key: "c"}}) {
        parameters
        name
        id
      }
    }
    If searching by those values is useful let me know and I can add a ticket to add that search functionality to the UI.
    Jacob Blanco

    Jacob Blanco

    1 year ago
    Oh this is perfect! Just to explain the use-case a bit more. We have a few flows where the general structure is: • The flow contains some logic around HOW to run some monitoring/data job • The definition of the monitors or data job are defined elsewhere (mostly as SQL files) The parameters thus define which configuration to use, so for example if I have a job called
    "daily_payments_summary"
    there is a parameter
    "job_name"
    that is used to call that job specifically.
    Jenny

    Jenny

    1 year ago
    @Marvin open "Enable search by parameters in the UI" in UI
    Marvin

    Marvin

    1 year ago