Hello, Is it possible to get a run history for all the flows using the GraphQL query rather than looking at each flow?
a
Anna Geller
12/20/2021, 5:08 PM
Normally, you would need to query the API e.g.:
Copy code
query {
flow_run{
logs {
message
level
info
created
}
}
}
but you could also tackle it from the execution side by making sure that you collect the logs from your execution layer e.g. Kubernetes or ECS cluster
v
Vipul
12/20/2021, 5:20 PM
Thanks, @Anna Geller. Though I might not have been clear, I wanted to track the run time for each flow historically, i.e. flow X took 10 min today, 12 min yesterday and so on...
a
Anna Geller
12/20/2021, 5:21 PM
are you on Prefect Cloud or Server?
v
Vipul
12/20/2021, 5:22 PM
Server
a
Anna Geller
12/20/2021, 5:24 PM
with Server you have access to the underlying database, so you could write queries in Postgres to calculate and visualize this
v
Vipul
12/20/2021, 5:27 PM
Yes, I could, but I don't understand the underlying table structure, so if you can assist me or provide a pointer, it might help me. Thanks.
a
Anna Geller
12/20/2021, 5:28 PM
maybe someone from the community can chime in, I haven’t worked that much with Server’s database.
What I would do is to go into the database and explore the tables to see which fields you may need to calculate the queries for that
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.