cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help with integration to "Custom database extension"

tsagredo
Participant

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

 

 

This is my YAML file

tsagredo_5-1722282937175.png

tsagredo_6-1722282956843.png

The metrics obtained are the following:

tsagredo_8-1722283037822.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

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

 

1 REPLY 1

TomásSeroteRoos
Dynatrace Helper
Dynatrace Helper

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 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).

Featured Posts