<?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: Using multiple timeframes in a single query with lookups in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Using-multiple-timeframes-in-a-single-query-with-lookups/m-p/220291#M185</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/55118"&gt;@PiotrG&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have just tried it out by executing following query:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;fetch dt.entity.host, from:now() -15m
| fieldsAdd key = 1
| lookup [fetch events, from:now()-180m, to:now()-175m | fieldsAdd key=1 | sort timestamp asc | fields timestamp,key], sourceField:key, lookupField:key, prefix:"withTF."
| lookup [fetch events | fieldsAdd key=1 | sort timestamp asc | fields timestamp,key], sourceField:key, lookupField:key, prefix:"withoutTF."
| fields from= now()-15m, withTF.timestamp, withoutTF.timestamp&lt;/LI-CODE&gt;
&lt;P&gt;If you don't specify the TF in the lookup, then the TF is inherited from the original query.&lt;/P&gt;
&lt;P&gt;Best,&lt;BR /&gt;Sini&lt;/P&gt;</description>
    <pubDate>Wed, 09 Aug 2023 14:00:23 GMT</pubDate>
    <dc:creator>sinisa_zubic</dc:creator>
    <dc:date>2023-08-09T14:00:23Z</dc:date>
    <item>
      <title>Using multiple timeframes in a single query with lookups</title>
      <link>https://community.dynatrace.com/t5/DQL/Using-multiple-timeframes-in-a-single-query-with-lookups/m-p/220287#M184</link>
      <description>&lt;DIV class="p-rich_text_section"&gt;Hey!&lt;/DIV&gt;
&lt;PRE class="c-mrkdwn__pre" data-stringify-type="pre"&gt;fetch dt.entity.host, from: now()-15m  //1
[...]
| lookup [ fetch events, from: now()-3h  //2
  ...]
| lookup [ timeframe, //3
  ...]
[rest of the main host query]&lt;/PRE&gt;
&lt;DIV class="p-rich_text_section"&gt;I'm wondering about the timeframes that would be used in this query.&lt;BR /&gt;1 is clear, I'm sure it will use last 15 minutes.&lt;BR /&gt;2 also seems clear, if it's alright to alter the timeframe within a lookup command&lt;BR /&gt;3 I'm not sure about, if no timeframe is provided in a lookup query does it inherit timeframe from the original query or will it use last set timeframe or is the behaviour completely different?&lt;BR /&gt;Thanks!&lt;/DIV&gt;</description>
      <pubDate>Thu, 10 Aug 2023 08:05:21 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Using-multiple-timeframes-in-a-single-query-with-lookups/m-p/220287#M184</guid>
      <dc:creator>PiotrG</dc:creator>
      <dc:date>2023-08-10T08:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using multiple timeframes in a single query with lookups</title>
      <link>https://community.dynatrace.com/t5/DQL/Using-multiple-timeframes-in-a-single-query-with-lookups/m-p/220291#M185</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/55118"&gt;@PiotrG&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have just tried it out by executing following query:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;fetch dt.entity.host, from:now() -15m
| fieldsAdd key = 1
| lookup [fetch events, from:now()-180m, to:now()-175m | fieldsAdd key=1 | sort timestamp asc | fields timestamp,key], sourceField:key, lookupField:key, prefix:"withTF."
| lookup [fetch events | fieldsAdd key=1 | sort timestamp asc | fields timestamp,key], sourceField:key, lookupField:key, prefix:"withoutTF."
| fields from= now()-15m, withTF.timestamp, withoutTF.timestamp&lt;/LI-CODE&gt;
&lt;P&gt;If you don't specify the TF in the lookup, then the TF is inherited from the original query.&lt;/P&gt;
&lt;P&gt;Best,&lt;BR /&gt;Sini&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 14:00:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Using-multiple-timeframes-in-a-single-query-with-lookups/m-p/220291#M185</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-08-09T14:00:23Z</dc:date>
    </item>
  </channel>
</rss>

