<?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: Dynamically rewrite SPL query in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Dynamically-rewrite-SPL-query/m-p/746877#M11935</link>
    <description>&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;So dashboard is indeed a good solution.&lt;/P&gt;&lt;P&gt;But I’m looking for a solution that will also work on the search itself.&lt;/P&gt;</description>
    <pubDate>Sat, 24 May 2025 06:52:30 GMT</pubDate>
    <dc:creator>eldarg</dc:creator>
    <dc:date>2025-05-24T06:52:30Z</dc:date>
    <item>
      <title>Dynamically rewrite SPL query</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Dynamically-rewrite-SPL-query/m-p/746861#M11933</link>
      <description>&lt;P&gt;Hi, I'm trying to rewrite a given query and then execute it.&lt;/P&gt;&lt;P&gt;I need to do some complex lookups which can't be done with a regular macro then I thought about having a python command that will fetch the query and reconstruct it.&lt;/P&gt;&lt;P&gt;The issue I'm having is how to execute the new query?&lt;/P&gt;&lt;P&gt;I've tried with the SDK but the run time is much higher + the results return to the statistics page.&lt;/P&gt;&lt;P&gt;I've tried to inject the query into a field and then use map but it also wasn't successful.&lt;/P&gt;&lt;P&gt;Any idea that works? Maybe something I didn't try or whether if you know that one of that methods should work.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 16:45:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Dynamically-rewrite-SPL-query/m-p/746861#M11933</guid>
      <dc:creator>eldarg</dc:creator>
      <dc:date>2025-05-23T16:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically rewrite SPL query</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Dynamically-rewrite-SPL-query/m-p/746876#M11934</link>
      <description>&lt;P&gt;You can do something along these lines in a SimpleXML dashboard by creating a search which generates the query you want to run and save the result to a token, and then have another panel which uses that token as its search query.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 23:19:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Dynamically-rewrite-SPL-query/m-p/746876#M11934</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-05-23T23:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically rewrite SPL query</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Dynamically-rewrite-SPL-query/m-p/746877#M11935</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;So dashboard is indeed a good solution.&lt;/P&gt;&lt;P&gt;But I’m looking for a solution that will also work on the search itself.&lt;/P&gt;</description>
      <pubDate>Sat, 24 May 2025 06:52:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Dynamically-rewrite-SPL-query/m-p/746877#M11935</guid>
      <dc:creator>eldarg</dc:creator>
      <dc:date>2025-05-24T06:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically rewrite SPL query</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Dynamically-rewrite-SPL-query/m-p/746881#M11937</link>
      <description>What is an issue which you try to solve? Just a issue not how you have planned to solve it!</description>
      <pubDate>Sat, 24 May 2025 10:32:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Dynamically-rewrite-SPL-query/m-p/746881#M11937</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2025-05-24T10:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically rewrite SPL query</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Dynamically-rewrite-SPL-query/m-p/746887#M11938</link>
      <description>&lt;P&gt;+1 on&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214410"&gt;@isoutamo&lt;/a&gt; 's question. The underlying problem is what's important. Because sometimes you can simply use a subsearch to render it to a set of search conditions but sometimes it isn't enough and really the only reliable way to dynamically construct and run a search is the map command. Creating the whole search with a subsearch (especially if you wanted to return a multi-staged SPL or a search starting with a command other than search) generally doesn't work.&lt;/P&gt;</description>
      <pubDate>Sat, 24 May 2025 19:35:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Dynamically-rewrite-SPL-query/m-p/746887#M11938</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-05-24T19:35:32Z</dc:date>
    </item>
  </channel>
</rss>

