10 Mar 2025
08:19 PM
- last edited on
11 Mar 2025
07:54 AM
by
MaciejNeumann
Hi There,
I am working on migration task on our Custom DB Query written in python on Dynatrace managed using extension 1.0 to Extension 2.0 - SQL Data Source. Though it is successful, I wasn't able to define it as group and sub-group in our scenario. Seeking for a help in what SQL query should I define in the group level, in case I re-define 2nd, 3rd and 4th group in below example as a sub-group. Such that I can make use of same extension up to 100 metrics. Otherwise, I will be limited to 10 metrics only (assume if only one metric defined against each sql query in a group and no sub-group exist). Note, where possible I tried to merge multiple queries into one single queries. In below example, assume I cannot merge queries into one single sql statement. I do make use of dimension and multiple keys where possible. These queries are specific to application tables and not any generic that can be used across the database or server.
Thanks and Regards,
Darshan Doshi
Solved! Go to Solution.
19 Dec 2025 11:17 AM
Hi Darshan,
If all your queries are completely unrelated, I think you should be able to do something like this:
- group: my_group
subgroups:
- subgroup: test
ingest: metrics
query: SELECT value FROM table
metrics:
- key: mykey
value: col:value
and have 10 subgroups on each of your 10 groups, so 100 queries in total.
Group level queries can be useful if you want to extract the same dimension for all the queries in the subgroup. For example, on our Oracle DB extension, we use a group level query like this:
- group: Instance
query: >
SELECT DISTINCT DATABASE_TYPE FROM GV$INSTANCE
dimensions:
- key: database.type
value: col:DATABASE_TYPE
subgroups:
...
to have the database.type dimension as part of every metric extracted from the subgroup.
Featured Posts