# Custom Query Extension 2.0. Can I borrow yours?

**URL:** <https://community.dynatrace.com/t/custom-query-extension-2-0-can-i-borrow-yours/43008>\
**Category:** Extensions\
**Tags:** oracle, extensions\
**Created:** [December 4, 2023, 1:40pm UTC](https://community.dynatrace.com/t/custom-query-extension-2-0-can-i-borrow-yours/43008 "2023-12-04T13:40:04Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [December 4, 2023, 1:40pm UTC](https://community.dynatrace.com/t/custom-query-extension-2-0-can-i-borrow-yours/43008/1 "2023-12-04T13:40:04Z")

</div>

Hi community, good day to all.

I just got the update that the current [Custom Query DB](https://www.dynatrace.com/hub/detail/custom-database-queries/?query=custom+que&filter=all) is now deprecated, and we are supposed to [create our own using 2.0 framework](https://www.dynatrace.com/hub/detail/custom-database-extension/).

Before I start digging into this, has anyone here in community that has already played with this and has successfully queried an Oracle DB with this 2.0?

Can you share your code so I can modify it to my own case?

Thanks!!!

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [December 4, 2023, 2:26pm UTC](https://community.dynatrace.com/t/custom-query-extension-2-0-can-i-borrow-yours/43008/2 "2023-12-04T14:26:34Z")

</div>

The easiest way to draw inspiration for a data source is to grab the ones on the hub. If you go to any extension tile on the public hub and click on release notes you can download any extension there and see the yaml. The Oracle extension is built using the Oracle data source.

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [December 4, 2023, 3:09pm UTC](https://community.dynatrace.com/t/custom-query-extension-2-0-can-i-borrow-yours/43008/3 "2023-12-04T15:09:45Z")

</div>

[@Mike\_L](https://community.dynatrace.com/user/11520),

Strangely, for this one, there are no Release notes:

> **[Custom database extension monitoring & observability | Dynatrace Hub](https://www.dynatrace.com/hub/detail/custom-database-extension/)**
>
> Execute generic database queries and ingest metrics and logs to Dynatrace. Start your free trial today!

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [December 4, 2023, 3:33pm UTC](https://community.dynatrace.com/t/custom-query-extension-2-0-can-i-borrow-yours/43008/4 "2023-12-04T15:33:46Z")

</div>

That one isn’t an extension. It is a tile that Dynatrace supports custom database queries through the sql datasource with links to the documentation on how to do it.

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [December 4, 2023, 6:16pm UTC](https://community.dynatrace.com/t/custom-query-extension-2-0-can-i-borrow-yours/43008/5 "2023-12-04T18:16:41Z")

</div>

Where do I see the download option here in release notes?  
Did not found neither in my extension config nor in the hub page:

 ![Screenshot 2023-12-04 144148.png](https://global.discourse-cdn.com/dynatrace/original/3X/c/d/cdb2ef8ec673c75f5d1e6c4f7751bc9a029cacd6.png)

 ![Screenshot 2023-12-04 144113.png](https://global.discourse-cdn.com/dynatrace/original/3X/f/6/f617097d171708dbac421d5bcb0fda88bf0591ca.png)

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [December 4, 2023, 6:49pm UTC](https://community.dynatrace.com/t/custom-query-extension-2-0-can-i-borrow-yours/43008/6 "2023-12-04T18:49:44Z")

</div>

It needs to be the public hub:&nbsp;[https://www.dynatrace.com/hub/detail/oracle-database/#release-notes](https://www.dynatrace.com/hub/detail/oracle-database/#release-notes)

---

<div class="post-metadata">

**Author:** ![carlos\_carreno](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/carlos_carreno/32/28820_2.png) [@carlos\_carreno](https://community.dynatrace.com/u/carlos_carreno)\
**Post date:** [January 19, 2024, 7:49pm UTC](https://community.dynatrace.com/t/custom-query-extension-2-0-can-i-borrow-yours/43008/7 "2024-01-19T19:49:35Z")

</div>

Good afternoon, I am in the process of migrating from version 1.0 to 2.0 of the Generic DB Query Plugin for the first time. I have gone through the documentation, but the steps to follow are still not clear to me. I have attempted to locate a comprehensive, step-by-step guide on how to create and deploy this extension. I’ve been navigating through VS Code, YAML files, and other tools, but it’s apparent that authentications and certificate validations are necessary. If there is a detailed configuration guide available or if someone happens to have one, it would be immensely helpful for guidance on this matter. The configuration of the YAML file appears to be crucial, and any support or insights from the community would be highly appreciated. Thank you very much.

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [February 29, 2024, 4:57pm UTC](https://community.dynatrace.com/t/custom-query-extension-2-0-can-i-borrow-yours/43008/8 "2024-02-29T16:57:03Z")

</div>

I was able to replicate the Custom Query DB extension from 1.0 to 2.0 after Dynatrace updated their docs.

Here are the pages I have used that helped me achieve this:

How to deploy your first extension using VSCode: [https://developer.dynatrace.com/extensions-v2/dynatrace-extensions-vscode/guides/getting-started/](https://developer.dynatrace.com/extensions-v2/dynatrace-extensions-vscode/guides/getting-started/)

Sample Yaml to run DB queries: [SQL data source reference — Dynatrace Docs](https://docs.dynatrace.com/docs/extend-dynatrace/extensions20/data-sources/sql/sql-reference)

It was quite simple to be fair. I have not yet tested in production, but at least now I have the proper guidance.

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [February 29, 2024, 5:34pm UTC](https://community.dynatrace.com/t/custom-query-extension-2-0-can-i-borrow-yours/43008/9 "2024-02-29T17:34:39Z")

</div>

In the next month or so we’re going to release an observability clinic Youtube video on how to do this as well. Good to hear that you managed yourself!

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [March 1, 2024, 8:29pm UTC](https://community.dynatrace.com/t/custom-query-extension-2-0-can-i-borrow-yours/43008/10 "2024-03-01T20:29:45Z")

</div>

Christmas came early 😊&nbsp;A step by step video just came out:

[![](https://global.discourse-cdn.com/dynatrace/original/3X/4/e/4eb12e9e93fd0cdedcd07d59496499a7c7c7ab77.jpeg "A Practical Guide to SQL Extensions with Dynatrace") ](https://www.youtube.com/watch?v=t9kHPKL9yKY)
