<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Generic DB Query Plugin SAP HANA in Extensions</title>
    <link>https://community.dynatrace.com/t5/Extensions/Generic-DB-Query-Plugin-SAP-HANA/m-p/233609#M3902</link>
    <description>&lt;P&gt;Hello Carlos,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;&lt;SPAN&gt;'Generic DB Query Plugin' extension is deprecated. The new extension 2.0:&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/extend-dynatrace/extensions20/data-sources/sql" target="_blank"&gt;https://docs.dynatrace.com/docs/extend-dynatrace/extensions20/data-sources/sql&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please check this example:&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/extend-dynatrace/extensions20/data-sources/sql/sap-hana-monitoring" target="_blank" rel="noopener"&gt;https://docs.dynatrace.com/docs/extend-dynatrace/extensions20/data-sources/sql/sap-hana-monitoring&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Query example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;      - subgroup: disk_size_ratio
        query: SELECT D.DATABASE_NAME as DATABASE_NAME, D.HOST as HOST, SUM(T.TABLE_SIZE)/(SELECT TOP 1 ALLOCATION_LIMIT from SYS.M_HOST_RESOURCE_UTILIZATION) as SizeRatio FROM SYS.M_DATABASE D, SYS.M_TABLES T GROUP BY D.DATABASE_NAME, D.HOST;
        dimensions:
          - key: database
            value: col:DATABASE_NAME
          - key: host
            value: col:HOST
        metrics:
          - key: sap.hana.db.disk_size_usage
            value: col:SizeRatio&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jan 2024 13:16:31 GMT</pubDate>
    <dc:creator>Miguel_RinconG</dc:creator>
    <dc:date>2024-01-08T13:16:31Z</dc:date>
    <item>
      <title>Generic DB Query Plugin SAP HANA</title>
      <link>https://community.dynatrace.com/t5/Extensions/Generic-DB-Query-Plugin-SAP-HANA/m-p/233589#M3901</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;"Example of a database taken from an internet image."&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="carlos_carreno_0-1704710227578.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/16653iC181E574DE084264/image-size/medium?v=v2&amp;amp;px=400" role="button" title="carlos_carreno_0-1704710227578.png" alt="carlos_carreno_0-1704710227578.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For the columns in this database, the following queries were executed:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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&amp;gt;='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&amp;gt;='01/01/2024'
GROUP BY AUDAT&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;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.&lt;/P&gt;&lt;P&gt;With the following configuration in the query in Data Explorer.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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)&lt;/LI-CODE&gt;&lt;LI-SPOILER&gt;The 'rows' query was performed in an attempt to establish a relationship between the number of columns versus the records.&lt;/LI-SPOILER&gt;&lt;P&gt;Within a time period of 15 minutes, this is the result it yields for me.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="carlos_carreno_1-1704710728986.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/16654i0DF4E5149948EF50/image-size/medium?v=v2&amp;amp;px=400" role="button" title="carlos_carreno_1-1704710728986.png" alt="carlos_carreno_1-1704710728986.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I've explored all possible forms in the query, but still feel that something isn't right. I hope to find help, thank you.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"Example of expected results."&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="carlos_carreno_3-1704711184761.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/16657iFEA74D362BA7E08D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="carlos_carreno_3-1704711184761.png" alt="carlos_carreno_3-1704711184761.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="carlos_carreno_4-1704711384797.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/16658i50F5054625559F71/image-size/medium?v=v2&amp;amp;px=400" role="button" title="carlos_carreno_4-1704711384797.png" alt="carlos_carreno_4-1704711384797.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 10:57:07 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Generic-DB-Query-Plugin-SAP-HANA/m-p/233589#M3901</guid>
      <dc:creator>carlos_carreno</dc:creator>
      <dc:date>2024-01-08T10:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Generic DB Query Plugin SAP HANA</title>
      <link>https://community.dynatrace.com/t5/Extensions/Generic-DB-Query-Plugin-SAP-HANA/m-p/233609#M3902</link>
      <description>&lt;P&gt;Hello Carlos,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;&lt;SPAN&gt;'Generic DB Query Plugin' extension is deprecated. The new extension 2.0:&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/extend-dynatrace/extensions20/data-sources/sql" target="_blank"&gt;https://docs.dynatrace.com/docs/extend-dynatrace/extensions20/data-sources/sql&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please check this example:&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/extend-dynatrace/extensions20/data-sources/sql/sap-hana-monitoring" target="_blank" rel="noopener"&gt;https://docs.dynatrace.com/docs/extend-dynatrace/extensions20/data-sources/sql/sap-hana-monitoring&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Query example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;      - subgroup: disk_size_ratio
        query: SELECT D.DATABASE_NAME as DATABASE_NAME, D.HOST as HOST, SUM(T.TABLE_SIZE)/(SELECT TOP 1 ALLOCATION_LIMIT from SYS.M_HOST_RESOURCE_UTILIZATION) as SizeRatio FROM SYS.M_DATABASE D, SYS.M_TABLES T GROUP BY D.DATABASE_NAME, D.HOST;
        dimensions:
          - key: database
            value: col:DATABASE_NAME
          - key: host
            value: col:HOST
        metrics:
          - key: sap.hana.db.disk_size_usage
            value: col:SizeRatio&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 13:16:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Generic-DB-Query-Plugin-SAP-HANA/m-p/233609#M3902</guid>
      <dc:creator>Miguel_RinconG</dc:creator>
      <dc:date>2024-01-08T13:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Generic DB Query Plugin SAP HANA</title>
      <link>https://community.dynatrace.com/t5/Extensions/Generic-DB-Query-Plugin-SAP-HANA/m-p/233625#M3904</link>
      <description>&lt;P&gt;The issue arises from the use of the&lt;STRONG&gt; :count &lt;/STRONG&gt;transformation.&lt;BR /&gt;&lt;BR /&gt;Count means "number of datapoints" reported, so you have 3 datapoints reported in that timeframe.&lt;BR /&gt;This is not a useful metric, you should use the actual metric value (with avg, sum, max, etc)&lt;BR /&gt;&lt;BR /&gt;If you strictly need to know the number of rows and doesn't care about the actual query value, use the metric &lt;STRONG&gt;custom.db.query.statistics.query.rows&lt;/STRONG&gt; instead.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 14:34:51 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Generic-DB-Query-Plugin-SAP-HANA/m-p/233625#M3904</guid>
      <dc:creator>david_lopes</dc:creator>
      <dc:date>2024-01-08T14:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Generic DB Query Plugin SAP HANA</title>
      <link>https://community.dynatrace.com/t5/Extensions/Generic-DB-Query-Plugin-SAP-HANA/m-p/233663#M3905</link>
      <description>&lt;P&gt;What I really need to measure is how many records that query retrieves. According to the conditions of the requested query, I wish to be sure that running that query and using the 'rows' measure would provide the actual data I need.&lt;/P&gt;&lt;P&gt;When selecting the time period, I want to know exactly how many records there are.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 20:37:16 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Generic-DB-Query-Plugin-SAP-HANA/m-p/233663#M3905</guid>
      <dc:creator>carlos_carreno</dc:creator>
      <dc:date>2024-01-08T20:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Generic DB Query Plugin SAP HANA</title>
      <link>https://community.dynatrace.com/t5/Extensions/Generic-DB-Query-Plugin-SAP-HANA/m-p/233767#M3914</link>
      <description>&lt;P&gt;Yes that is what customers use the extension for regularly&lt;BR /&gt;&lt;BR /&gt;You can use the `COUNT(*)` version of your query, in which case of course it returns a single row, but you can get the query value just fine (do not use the count transformation in the metric selector, like I mentioned)&lt;BR /&gt;&lt;BR /&gt;OR you can have a query that retrieves multiple rows and use the metric I mentioned above.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 13:47:35 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Generic-DB-Query-Plugin-SAP-HANA/m-p/233767#M3914</guid>
      <dc:creator>david_lopes</dc:creator>
      <dc:date>2024-01-09T13:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Generic DB Query Plugin SAP HANA</title>
      <link>https://community.dynatrace.com/t5/Extensions/Generic-DB-Query-Plugin-SAP-HANA/m-p/234489#M3934</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Thank you for the options. We've decided to go for extension 2.0 to be on the latest extensions right away and be able to adjust our queries there.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 15:02:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Generic-DB-Query-Plugin-SAP-HANA/m-p/234489#M3934</guid>
      <dc:creator>carlos_carreno</dc:creator>
      <dc:date>2024-01-16T15:02:22Z</dc:date>
    </item>
  </channel>
</rss>

