# classic entity to smartscape functions conversion

**URL:** <https://community.dynatrace.com/t/classic-entity-to-smartscape-functions-conversion/55217>\
**Category:** Dashboarding\
**Tags:** dql, dynatrace-managed, smartscape, services-classic, grail, services, dashboards\
**Created:** [March 9, 2026, 3:47pm UTC](https://community.dynatrace.com/t/classic-entity-to-smartscape-functions-conversion/55217 "2026-03-09T15:47:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![R928492](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@R928492](https://community.dynatrace.com/u/R928492)\
**Post date:** [March 9, 2026, 3:47pm UTC](https://community.dynatrace.com/t/classic-entity-to-smartscape-functions-conversion/55217/1 "2026-03-09T15:47:59Z")

</div>

```markup
timeseries {
    count = sum(
        dt.service.request.count,
        scalar: true,
        filter: {
            (
                in(
                    dt.entity.service,
                    classicEntitySelector(
                        "type(service),entityName.equals(\"serviceA - Site 1\")"
                    )
                )
            )
            OR
            (
                in(
                    dt.entity.service,
                    classicEntitySelector(
                        "type(service),entityName.equals(\"serviceA - Site 2\")"
                    )
                )
            )
        }
    )}

```

Until now i was using the above DQL to get the count of requests for a particular services and show it on the dashboard. But now i am getting a warning

**Classic entity functions are deprecated. Please use Smartscape functions instead.**

**The dt.entity.\* fields are deprecated. Please use dt.smartscape.\*.**

Can someone help me get the count as per new standards so that i don’t get this warning on my dashboard

---

<div class="post-metadata">

**Author:** ![t\_pawlak](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/t_pawlak/32/14991_2.png) [@t\_pawlak](https://community.dynatrace.com/u/t_pawlak)\
**Post date:** [March 13, 2026, 2:06pm UTC](https://community.dynatrace.com/t/classic-entity-to-smartscape-functions-conversion/55217/2 "2026-03-13T14:06:10Z")

</div>

Hi, you can at least simplify the query and remove the need for classicEntitySelector(…) by filtering directly on the service name:

```markup
timeseries {
  count = sum(
    dt.service.request.count,
    scalar: true,
    filter: {
      entityName(dt.entity.service) == "serviceA - Site 1"
      OR
      entityName(dt.entity.service) == "serviceA - Site 2"
    }
  )
}

```

This keeps the same logic and is much easier to read.

 ![scalar.jpg](https://global.discourse-cdn.com/dynatrace/original/2X/9/9fce51623b86dc0990d41b2f7246d0f11637b534.jpeg)

That said, it still uses dt.entity.service, so it may not fully remove the deprecation warning. From what I can see, Smartscape is the target model, but for this specific metric/filter combination there doesn’t seem to be a clean 1:1 replacement yet. Smartscape entities expose both id and id\_classic, which suggests some service metrics still rely on the classic entity dimension today.&nbsp;So the simplified version above is probably the most practical option for now, even if the warning remains.

---

<div class="post-metadata">

**Author:** ![R928492](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@R928492](https://community.dynatrace.com/u/R928492)\
**Post date:** [March 13, 2026, 2:14pm UTC](https://community.dynatrace.com/t/classic-entity-to-smartscape-functions-conversion/55217/3 "2026-03-13T14:14:59Z")

</div>

Thanks for the suggestion on simplifying the query . Will rely on this for now while exploring a better option with no warnings.

---

<div class="post-metadata">

**Author:** ![t\_pawlak](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/t_pawlak/32/14991_2.png) [@t\_pawlak](https://community.dynatrace.com/u/t_pawlak)\
**Post date:** [March 13, 2026, 2:38pm UTC](https://community.dynatrace.com/t/classic-entity-to-smartscape-functions-conversion/55217/4 "2026-03-13T14:38:48Z")

</div>

yeah,  
I tried a Smartscape-based approach as well, for example:

```markup
smartscapeNodes "SERVICE"
| filter name == "astroshop-frontend" or name == "CustomerFrontendREST"
| fields name, id_classic
| join [
    timeseries count = sum(dt.service.request.count), by:{dt.entity.service}
  ],
  on: { left[id_classic] == right[dt.entity.service] },
  fields: { count = count }
| fields name, count

```

And I recived this:

 ![smart_metrics.jpg](https://global.discourse-cdn.com/dynatrace/original/3X/d/6/d6087c89e45a5f8c24c095a9a6e2b7848aa2cee9.jpeg)

It works, but it still relies on dt.entity.service on the metric side, so the warning remains.  
That makes me think the metric dimension for dt.service.request.count is still tied to the classic entity model, even if Smartscape can already be used to resolve the services. Dynatrace documents Smartscape nodes with both id and id\_classic, which suggests this kind of bridge is still needed in some cases.  
[Smartscape on Grail](https://docs.dynatrace.com/docs/platform/grail/smartscape-on-grail)&nbsp;  
So at least for now, a pure Smartscape-only rewrite does not seem to be available for this specific metric/filter combination.  
Because of that, the simplified version with:

```markup
entityName(dt.entity.service) == ...

```

is probably still the most practical option, even if the warning stays

---

<div class="post-metadata">

**Author:** ![qfwfq](https://avatars.discourse-cdn.com/v4/letter/q/8e8cbc/32.png) [@qfwfq](https://community.dynatrace.com/u/qfwfq)\
**Post date:** [September 30, 2026, 8:09pm UTC](https://community.dynatrace.com/t/classic-entity-to-smartscape-functions-conversion/55217/5 "2026-09-30T20:09:44Z")

</div>

Perhaps using getNodeName get what you are looking for. Something like this

 ![qfwfq_0-1790798957526.png](https://global.discourse-cdn.com/dynatrace/original/3X/c/a/ca847b85cdc1d848c509da461c337bbca756e20f.png)
