Hi everyone. I am trying to build an ETL process t...
# prefect-community
a
Hi everyone. I am trying to build an ETL process that pulls flows' data out of prefect, transforms it into a table, and gets loaded into a database. The request is to have a constant clean table in our database base where an analyst can grab the dataset and give a report on the consistency, reliability, and other potential metrics of our ETL processes. We are currently under the free version of 20,000 calls and have a single agent working with prefect cloud. I am wondering if anyone could point me in the right direction on getting started to pull data out of the API or the best documentation and examples out there. Any idea or resource will be highly appreciated.
k
You want to pull stuff like flow data right? We have an interactive API tab that uses GraphQL that you can use. When you figure a query out, you can do this in Python:
Copy code
from prefect.client import Client
client = Client()

client.graphql(query)
a
That snip of code helped a lot. and yes this was exactly what I was looking for. I managed to pull data already. Thank you, Kevin.
Hi Kevin, wanted to do a followed-up question. Is there documentation regarding all possible fields I can take out as metadata? I am trying to see if there is a way to pull the agent being used or a similar level. thank you in advance.
k
None beyond the documentation on the right side of the Interactive API tab in the UI
1
a
Thank you