# Ingestion the result of a query in a database

**URL:** <https://community.dynatrace.com/t/ingestion-the-result-of-a-query-in-a-database/37082>\
**Category:** Open Q&A\
**Tags:** databases\
**Created:** [October 31, 2022, 4:56pm UTC](https://community.dynatrace.com/t/ingestion-the-result-of-a-query-in-a-database/37082 "2022-10-31T16:56:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Breno](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/breno/32/22199_2.png) [@Breno](https://community.dynatrace.com/u/Breno)\
**Post date:** [October 31, 2022, 4:56pm UTC](https://community.dynatrace.com/t/ingestion-the-result-of-a-query-in-a-database/37082/1 "2022-10-31T16:56:59Z")

</div>

Hello,

I would like to know if it is possible to ingest data from the execution of a query in the database.

For example: select count(co\_user) from tb\_user

That way, I can put in a panel how many users there are in the tb\_user table.

---

<div class="post-metadata">

**Author:** ![PedroDeodato](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pedrodeodato/32/32284_2.png) [@PedroDeodato](https://community.dynatrace.com/u/PedroDeodato)\
**Post date:** [October 31, 2022, 5:21pm UTC](https://community.dynatrace.com/t/ingestion-the-result-of-a-query-in-a-database/37082/2 "2022-10-31T17:21:08Z")

</div>

Hey, [@Breno](https://community.dynatrace.com/user/39101)&nbsp;,

Short answer: Yes, it is 🙂

What you are describing is precisely the feature offered by the “Custom Database Queries” ActiveGate extension, available on the [Dynatrace Hub](https://www.dynatrace.com/hub/detail/custom-database-queries/?query=custom+database+)!

On the description, you’ll find:

“This&nbsp;[Activegate](https://www.dynatrace.com/support/help/shortlink/activegate-hub)&nbsp;custom extension allows you to run queries against&nbsp; **Oracle, MSSQL, MySQL, DB2, PostgreSQL, Informix or SAP HANA** &nbsp;databases and send the results back to Dynatrace as metrics.”

and

"Example queries

- SELECT COUNT(\*) FROM DAILY\_PROCESSED\_JOBS
- SELECT DEPARTMENT, EMPLOYEE\_COUNT FROM DEPARTMENTS"

So, I’m pretty confident that it’ll suit your needs!

Do check the documentation there on the Hub, as it is very helpful not just on Installation but also Configuration and getting it up & running to your desired use-case!

Hope this helps 😉

---

<div class="post-metadata">

**Author:** ![Breno](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/breno/32/22199_2.png) [@Breno](https://community.dynatrace.com/u/Breno)\
**Post date:** [October 31, 2022, 5:24pm UTC](https://community.dynatrace.com/t/ingestion-the-result-of-a-query-in-a-database/37082/3 "2022-10-31T17:24:07Z")

</div>

Hi,&nbsp;[@PedroDeodato](https://community.dynatrace.com/user/40725)

Thank you!
