prefect icon indicating copy to clipboard operation
prefect copied to clipboard

Creating flow runs with mapped parameters

Open tyre opened this issue 1 year ago • 4 comments

First check

  • [X] I added a descriptive title to this issue.
  • [X] I used the GitHub search to find a similar request and didn't find it.
  • [X] I searched the Prefect documentation for this feature.

Prefect Version

2.x

Describe the current behavior

Today, when running a Quick run from the Prefect UI, flows with parameters must enter those parameters by hand. For example, a flow that took in the name of a customer would require writing that customer's name into the modal. The alternative is flows taking an id as a parameter (better than names which can overlap), but then the user is copy/pasting random UUIDs!

To get around this, we create one deployment per customer with the deployment named by looping through all of the customers and creating one with their name. This leads, as expected, to way too many flow names.

Describe the proposed behavior

Allow referencing an artifact as the source of a flow parameter. For example, we could run a regular task to keep an artifact of customers. The Run customer pipeline flow could then display a dropdown of customer names which would create the flow with the underlying customer id

Example Use

No response

Additional context

No response

tyre avatar Feb 09 '24 21:02 tyre

First check

  • [X] I added a descriptive title to this issue.
  • [X] I used the GitHub search to find a similar request and didn't find it.
  • [X] I searched the Prefect documentation for this feature.

Prefect Version

2.x

Describe the current behavior

Today, when running a Quick run from the Prefect UI, flows with parameters must enter those parameters by hand. For example, a flow that took in the name of a customer would require writing that customer's name into the modal. The alternative is flows taking an id as a parameter (better than names which can overlap), but then the user is copy/pasting random UUIDs!

To get around this, we create one deployment per customer with the deployment named by looping through all of the customers and creating one with their name. This leads, as expected, to way too many flow names.

Describe the proposed behavior

Allow referencing an artifact as the source of a flow parameter. For example, we could run a regular task to keep an artifact of customers. The Run customer pipeline flow could then display a dropdown of customer names which would create the flow with the underlying customer id

Example Use

No response

Additional context

No response

deatonsandra21 avatar Feb 11 '24 14:02 deatonsandra21

Thanks for the issue @tyre!

zhen0 avatar Feb 13 '24 13:02 zhen0

Any thoughts on whether this would be prioritized? Or if there's a way I could contribute, happy to look into it if someone could give a pointer where this would live.

Maybe pulling from an artifact table?

tyre avatar Jun 28 '24 15:06 tyre