# How to escape "\`" within "\`"?

**URL:** <https://community.dynatrace.com/t/how-to-escape-within/54642>\
**Category:** DQL\
**Tags:** dql, gen3\
**Created:** [January 15, 2026, 2:37am UTC](https://community.dynatrace.com/t/how-to-escape-within/54642 "2026-01-15T02:37:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hillman](https://avatars.discourse-cdn.com/v4/letter/h/439d5e/32.png) [@Hillman](https://community.dynatrace.com/u/Hillman)\
**Post date:** [January 15, 2026, 2:37am UTC](https://community.dynatrace.com/t/how-to-escape-within/54642/1 "2026-01-15T02:37:41Z")

</div>

The background of my question come from another post when I try to retrieve data from remote tenant and display in chart.&nbsp; (I am not able to include the post link here as the forum keep throwing error and remove the link and the code block below)

A nice person has suggested a workaround for it:

```markup
import { credentialVaultClient } from "@dynatrace-sdk/client-classic-environment-v2";

async function fetchRemoteDql(credentialId, url, query) {
  const { token } = await credentialVaultClient.getCredentialsDetails({ id: credentialId });

  const response = await fetch(url, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Accept: "application/json",
      Authorization: `Bearer ${token}`,
    },
    body: JSON.stringify({
      query,
      requestTimeoutMilliseconds: 60000,
      enablePreview: true,
    }),
  });

  if (!response.ok) throw new Error(`HTTP ${response.status} ${response.statusText}`);
  return (await response.json()).result;
}

export default async function () {
  const credentialId = "CREDENTIALS_VAULT-XXXXXXX"; // your vault entry on the *local* env
  const url =
    "https://{environmentid}.apps.dynatrace.com/platform/storage/query/v1/query:execute";
  const query = `
MY_DQL
  `.trim();

  return await fetchRemoteDql(credentialId, url, query);
}

```

However, my DQL also contains “`” which cause the query to crash during execution.

```markup
confluent_kafka_server_received_bytes = avg(confluent_kafka_server_received_bytes, filter: { in(`dt.entity.prometheus:confluent_kafka_cluster`, classicEntitySelector("type(prometheus:confluent_kafka_cluster),entityName.equals(\"cluster_name\")")) }), by: { `dt.entity.prometheus:confluent_kafka_cluster` }
| fieldsAdd entityName(`dt.entity.prometheus:confluent_kafka_cluster`)
| sort arrayAvg(confluent_kafka_server_received_bytes) desc

```

Is there any way to escape the “`” within “`”?

---

<div class="post-metadata">

**Author:** ![Hillman](https://avatars.discourse-cdn.com/v4/letter/h/439d5e/32.png) [@Hillman](https://community.dynatrace.com/u/Hillman)\
**Post date:** [January 15, 2026, 2:40am UTC](https://community.dynatrace.com/t/how-to-escape-within/54642/2 "2026-01-15T02:40:26Z")

</div>

The link to the original post is in here:  
[Solved: How to retrieve data from another tenant and display in chart through DQL - Dynatrace Community](https://community.dynatrace.com/post/292254#M2979)
