Hey folks, is there a way to add metadata tags/labels to Flows/Flow Groups?
Adding a Label to a Flow Group has the added feature of helping decide which Agent to run on, but I'm looking for something that's purely informational. The goal is to be able to query GraphQL for flows with specific tags and do something with that list of IDs.
For example, if we want to pause all jobs for Client X, but not Client Y or Z (and there's nothing in the flow naming convention to indicate), we want to be able to just run a query for all jobs with tag "Client-X" and then run a mutation to pause/delay those flows.
Or maybe we want to track slow flows -- so we query for flows running 50% slower than their past monthly average runtime and add a "slow" tag so we can make some changes.
Does this exist? Is there a place in a flow for arbitrary information? Maybe a "tags" parameter that just never gets used?
z
Zanie
05/05/2021, 6:47 PM
Hey @Nathan Walker -- this is an interesting use-case! This is something I've been thinking of as a better version of projects. There is a "description" on the "Flow" object that does not get used, but it's a string type and you'll probably want JSON for a fast lookup here (substring searches will be slow without specific indices on our end)
🙌 1
Zanie
05/05/2021, 6:49 PM
A hack might be to use "Parameters" with default values (eek) since you can query them on flows and flow runs
n
Nathan Walker
05/05/2021, 6:50 PM
Oooo, I like both of these. Hacky, sure, but they'll get the job done!
z
Zanie
05/05/2021, 6:50 PM
They're stored as JSONB so you can use the
_contains
operator for a fast lookup
👀 1
Zanie
05/05/2021, 6:51 PM
Although they're only stored on the flow run if they're non-default... hmm.
n
Nathan Walker
05/05/2021, 6:51 PM
OH, speaking of JSONB, is there a way to use JSONB for query variables in the Apollo playground? I can get it to work in Hasura and in Python, but the Apollo playground tells me my JSONB object isn't JSONB...
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.