# Use database as source

**URL:** <https://support.prodi.gy/t/use-database-as-source/5609>\
**Category:** Uncategorized\
**Created:** [May 4, 2022, 3:22pm UTC](https://support.prodi.gy/t/use-database-as-source/5609 "2022-05-04T15:22:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dna](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/dna/32/2962_2.png) [@dna](https://support.prodi.gy/u/dna)\
**Post date:** [May 4, 2022, 3:22pm UTC](https://support.prodi.gy/t/use-database-as-source/5609/1 "2022-05-04T15:22:12Z")

</div>

It seems Prodigy supports the custom loader, is there a way to use a database server as source by creating a generator? Is there a recipe available to use?

Thank you!

---

<div class="post-metadata">

**Author:** ![ljvmiranda921](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ljvmiranda921/32/3197_2.png) [@ljvmiranda921](https://support.prodi.gy/u/ljvmiranda921)\
**Post date:** [May 5, 2022, 3:18am UTC](https://support.prodi.gy/t/use-database-as-source/5609/2 "2022-05-05T03:18:05Z")

</div>

Hi @dna , welcome to Prodigy!

We don't have a tutorial / recipe specifically for your use-case (each one tends to be different so it's difficult to cover everything).

For what it's worth, you can check how it's done in [this example that uses an API backend](https://prodi.gy/docs/custom-recipes#example-blocks). If you look at the `recipe.py` example, the most important thing is that you define a function (in this case, `get_stream`) that takes in the examples you want and yields them with respect to the format of your [annotation interface](https://prodi.gy/docs/api-interfaces).
