# DQL snippit code reuse

**URL:** <https://community.dynatrace.com/t/dql-snippit-code-reuse/44112>\
**Category:** DQL\
**Tags:** dql\
**Created:** [February 14, 2024, 1:53am UTC](https://community.dynatrace.com/t/dql-snippit-code-reuse/44112 "2024-02-14T01:53:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keith\_Harding](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@Keith\_Harding](https://community.dynatrace.com/u/Keith_Harding)\
**Post date:** [February 14, 2024, 1:53am UTC](https://community.dynatrace.com/t/dql-snippit-code-reuse/44112/1 "2024-02-14T01:53:43Z")

</div>

Hi,

In Splunk SPL is their equivalent of DQL.

In Splunk I can save a piece of code (maybe just a line or several) as a “macro” and then reuse that in other code just by referencing it in other code.&nbsp; Meaning if I change the macro in future it changes everywhere that it is used.

Can a similar thing be done in Dynatrace?

Thanks

---

<div class="post-metadata">

**Author:** ![sujit\_k\_singh](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@sujit\_k\_singh](https://community.dynatrace.com/u/sujit_k_singh)\
**Post date:** [February 21, 2024, 10:26pm UTC](https://community.dynatrace.com/t/dql-snippit-code-reuse/44112/2 "2024-02-21T22:26:22Z")

</div>

[@Keith\_Harding](https://community.dynatrace.com/user/67263)&nbsp; Dynatrace doesn’t have the exact concept of macros as in Splunk.&nbsp;But&nbsp; Dynatrace has a RESTful API that allows you to automate many tasks.
