# Can I directly query from prodigy database?

**URL:** <https://support.prodi.gy/t/can-i-directly-query-from-prodigy-database/3730>\
**Category:** Uncategorized\
**Tags:** usage, database\
**Created:** [December 11, 2020, 4:26pm UTC](https://support.prodi.gy/t/can-i-directly-query-from-prodigy-database/3730 "2020-12-11T16:26:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yw2903](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/yw2903/32/1614_2.png) [@yw2903](https://support.prodi.gy/u/yw2903)\
**Post date:** [December 11, 2020, 4:26pm UTC](https://support.prodi.gy/t/can-i-directly-query-from-prodigy-database/3730/1 "2020-12-11T16:26:31Z")

</div>

I store my training set in Neo4j database. Can I directly query from prodigy database and let them two databases interact?

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [December 11, 2020, 10:47pm UTC](https://support.prodi.gy/t/can-i-directly-query-from-prodigy-database/3730/2 "2020-12-11T22:47:35Z")

</div>

Yes, that's no problem, you can interact with Prodigy's database from Python, add custom logic to your recipe to save annotations straight to your Neo4j database (e.g. using a recipe's `update`) callback, or write a custom stream to load raw data from your other database.

Here are some resources, depending on what exactly you want to do:

- Database Python API: [https://prodi.gy/docs/api-database#database](https://prodi.gy/docs/api-database#database)
- Implementing a custom database: [https://prodi.gy/docs/api-database#custom](https://prodi.gy/docs/api-database#custom)
- Custom loading: [https://prodi.gy/docs/api-loaders#loaders-custom](https://prodi.gy/docs/api-loaders#loaders-custom)
- Custom recipes: [https://prodi.gy/docs/custom-recipes](https://prodi.gy/docs/custom-recipes)
