Good morning Dynatrace community, for this project, the ‘Generic DB Query Plugin’ extension was implemented to connect to a standard SAP HANA database ‘VBAK’, with the sole purpose of counting the number of times a record is repeated in the database.
“Example of a database taken from an internet image.”
For the columns in this database, the following queries were executed:
SELECT COUNT(AUDAT) AS CANTIDAD, AUDAT
FROM xxxxxx.VBAK
where ERNAM='APL_USRPI'
and AUART='ZB2B'
and AUDAT='01/01/2024'
GROUP BY AUDAT
SELECT COUNT(AUDAT) AS CANTIDAD, AUDAT
FROM xxxxxx.VBAK
WHERE ERNAM='APL_USRPI'
AND AUART='ZNAC'
AND AUDAT>='01/01/2024'
GROUP BY AUDAT
SELECT COUNT(AUDAT) AS CANTIDAD, AUDAT
FROM XXXXX.VBAK
WHERE ERNAM ='CNX_ERP_CPI'
AND AUART ='ZB2C'
AND AUDAT>='01/01/2024'
GROUP BY AUDAT
With the goal of bringing me the total number of times the condition is met and thus being able to know that total of records and maintaining control, but the result it yields is the number of times the system goes and performs the query.
With the following configuration in the query in Data Explorer.
custom.db.query:splitBy("dt.entity.custom_device",query_name,column):count:sort(value(avg,descending)):limit(20)
custom.db.query.statistics.query.rows:splitBy("dt.entity.custom_device",query_name):count:sort(value(avg,descending)):limit(20)
SpoilerThe ‘rows’ query was performed in an attempt to establish a relationship between the number of columns versus the records.
Within a time period of 15 minutes, this is the result it yields for me.
I’ve explored all possible forms in the query, but still feel that something isn’t right. I hope to find help, thank you.
“Example of expected results.”



