Hi everyone — I’m trying to write a query using the prefect API but I not having much success.
All our flows have at least 1 parameter called Scope, and I’m trying to see the latest flow_run for each parameter.scope and state combination. In SQL I’d use a window function to get the rank/row_number, partitioned by parameter.scope and state, ordering by the scheduled start date, but not sure I can achieve the same thing with graphql.
Can anyone help with this?
k
Kevin Kho
09/24/2021, 4:31 PM
Hey @Bruno Murino, I don’t think you can use GraphQL to do that. You would need to query the flow runs and use Python to filter the result.
Kevin Kho
09/24/2021, 4:32 PM
You can query if a certain parameter exists but not on the value
b
Bruno Murino
09/24/2021, 4:49 PM
yea I thought so — I’ll probably make do by sending multiple queries and having some loops. Thanks Kevin!
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.