# Help with integration to "Custom database extension"

**URL:** <https://community.dynatrace.com/t/help-with-integration-to-custom-database-extension/46877>\
**Category:** Extensions\
**Tags:** databases, extensions\
**Created:** [July 29, 2024, 8:03pm UTC](https://community.dynatrace.com/t/help-with-integration-to-custom-database-extension/46877 "2024-07-29T20:03:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tsagredo](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@tsagredo](https://community.dynatrace.com/u/tsagredo)\
**Post date:** [July 29, 2024, 8:03pm UTC](https://community.dynatrace.com/t/help-with-integration-to-custom-database-extension/46877/1 "2024-07-29T20:03:30Z")

</div>

Hello, I need help with the configuration of the yaml file. After integrating to the 2.0 extension for Postgres queries, the result is not as expected.

To begin with, my select query is performed on several columns and its result is multiple records as in the image below.

 ![tsagredo_3-1722282803453.png](https://global.discourse-cdn.com/dynatrace/original/3X/7/6/76924b9d05dae4f3f10775430c58c39aa32bbfc8.png)

This is my YAML file

 ![tsagredo_5-1722282937175.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/2/42844868725c5dfb70fd17946bf6fb955cfc9a0e.png)

![tsagredo_6-1722282956843.png](https://global.discourse-cdn.com/dynatrace/original/2X/2/23907d66776f3e9f735278d27e5821884078bcf5.png)

The metrics obtained are the following:

 ![tsagredo_8-1722283037822.png](https://global.discourse-cdn.com/dynatrace/original/2X/f/f79ee70faffb7b6219f848962bbed667a08ca1a5.png)

The need is to see all the records and not a single value (the result appears to be the sum of the number of records for the column).

The “fantasy name” column does not show records.

 ![tsagredo_9-1722283123252.png](https://global.discourse-cdn.com/dynatrace/original/1X/a6928fd8e7ed79bbb607947f1cd5399952630226.png)

What modifications should I make to my yaml file to create this type of records?

---

<div class="post-metadata">

**Author:** ![Tom\_sSeroteRoos](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@Tom\_sSeroteRoos](https://community.dynatrace.com/u/Tom_sSeroteRoos)\
**Post date:** [July 30, 2024, 5:41am UTC](https://community.dynatrace.com/t/help-with-integration-to-custom-database-extension/46877/2 "2024-07-30T05:41:35Z")

</div>

Not exactly sure what the query in your yaml file is supposed to return since it seems to be different than the one you have in the first screenshot. However, here’s a couple of considerations:

When you use _ingest:_ _metric_ in the yaml definition, you will be ingesting a **metric timeseries** for each of your metric key you specify. As such, you need to make sure that whatever columns you specify there return numbers and not strings (those would be better used as dimension values).

In your query you are defining _nombre\_canal_, _codigo\_respuesta_ and _nombre\_fantasia_ as dimensions. I would guess that those don’t really correspond to the values you want to have on a timeseries, but rather to dimensions.

Again, I’m guessing a bit here, but if you are trying to get _cantidad_ per _nombre\_canal, codigo\_respuesta, nombre\_fantasia_ and _stat\_name_ then it makes more sense to have _cantidad_&nbsp;as your only metric and all the other ones as dimensions (also, make sure that both the dimensions and the metrics you specify show as columns in the query. Right now, you seem to be missing _stat\_name_ from your query).

Be aware though, that if you have a very high number of possible dimension values this approach can lead to a very high DDU consumption. If that’s the case, then maybe it makes sense to ingest these records as logs instead and then use some DQL on a dashboard/notebook to do aggregations and analysis?

To ingest logs from an extension you simply have to specify _ingest: logs_ instead of _ingest: metrics_ and then define the _attributes_ instead of _metrics_ and _dimensions_. If you download the official Postgres extension or Oracle extension from the Dynatrace Hub and ctrl+f the extension.yaml file for _ingest: logs_ you can find an example of how it’s done (as of the time of writing this post).
