Hi All! I hope you're having a good day. I am new to Prefect and need your help in understanding Prefect w.r.t databases. I need to add a database and run queries to get data. Can someone please guide what steps should i follow ?
@Anna Geller, is there a way to connect to a database via the Prefect UI ?
a
Anna Geller
11/18/2021, 3:04 PM
@Raghav Sharma What exactly do you have in mind? You can set a database secret in the Prefect UI and use this secret to connect to a database from a task.
In general, Prefect follows engineering best practices and therefore workflow is defined as code, not through drag and drop. So you can have a task defined in code and you can use the UI to observe the states of your flows and tasks.
Have you seen our getting started guide? It will walk you through all the steps from installation to building and running your first flows: https://docs.prefect.io/core/getting_started/quick-start.html
š 1
r
Raghav Sharma
11/19/2021, 7:21 AM
Hi @Anna Geller, my requirement is to connect to a database by passing required arguments such as username, password, host and db name(say) via Prefect UI. I am not sure if this is possible via UI. Currently i am connecting via defining a task and flow in my code.
Also, need to know if a particular response from a task that contains meta-data from a database can be displayed on the UI or not. Please guide.
Thanks!