<?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 eval and where function - it does not work if there is a dot in the field name. do I need to escape the dot? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/eval-and-where-function-it-does-not-work-if-there-is-a-dot-in/m-p/374153#M160503</link>
    <description>&lt;P&gt;because problem reported in &lt;A href="https://answers.splunk.com/answers/550668/in-data-model-root-transaction-why-does-splunk-nee.html"&gt;link text&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;In my transaction data set DataModel1.RootTransaction1, now there is a "RootTransaction1.Extracted1" field.&lt;/P&gt;

&lt;P&gt;I tried to run below query with "where" command (my use case does not allow me to use search command), and all do not work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| from datamodel:DataModel1.RootTransaction1 |where RootTransaction1.Extracted1 = "abc"
| from datamodel:DataModel1.RootTransaction1 |where "RootTransaction1.Extracted1" = "abc"
| from datamodel:DataModel1.RootTransaction1 |where RootTransaction1\.Extracted1 = "abc"
| from datamodel:DataModel1.RootTransaction1 |where "RootTransaction1\.Extracted1" = "abc"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The only way working is to rename the field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| from datamodel:DataModel1.RootTransaction1 |rename RootTransaction1.Extracted1 as Extracted1 |where Extracted1 = "abc"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but this is sub-optimal solution. How can I do eval and where with fields with dot in the middle?&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jun 2017 09:11:35 GMT</pubDate>
    <dc:creator>leonjxtan</dc:creator>
    <dc:date>2017-06-29T09:11:35Z</dc:date>
    <item>
      <title>eval and where function - it does not work if there is a dot in the field name. do I need to escape the dot?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-and-where-function-it-does-not-work-if-there-is-a-dot-in/m-p/374153#M160503</link>
      <description>&lt;P&gt;because problem reported in &lt;A href="https://answers.splunk.com/answers/550668/in-data-model-root-transaction-why-does-splunk-nee.html"&gt;link text&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;In my transaction data set DataModel1.RootTransaction1, now there is a "RootTransaction1.Extracted1" field.&lt;/P&gt;

&lt;P&gt;I tried to run below query with "where" command (my use case does not allow me to use search command), and all do not work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| from datamodel:DataModel1.RootTransaction1 |where RootTransaction1.Extracted1 = "abc"
| from datamodel:DataModel1.RootTransaction1 |where "RootTransaction1.Extracted1" = "abc"
| from datamodel:DataModel1.RootTransaction1 |where RootTransaction1\.Extracted1 = "abc"
| from datamodel:DataModel1.RootTransaction1 |where "RootTransaction1\.Extracted1" = "abc"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The only way working is to rename the field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| from datamodel:DataModel1.RootTransaction1 |rename RootTransaction1.Extracted1 as Extracted1 |where Extracted1 = "abc"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but this is sub-optimal solution. How can I do eval and where with fields with dot in the middle?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 09:11:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-and-where-function-it-does-not-work-if-there-is-a-dot-in/m-p/374153#M160503</guid>
      <dc:creator>leonjxtan</dc:creator>
      <dc:date>2017-06-29T09:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: eval and where function - it does not work if there is a dot in the field name. do I need to escape the dot?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-and-where-function-it-does-not-work-if-there-is-a-dot-in/m-p/374154#M160504</link>
      <description>&lt;P&gt;Put field name in single quotes to escape special character:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     | where 'RootTransaction1.Extracted1'="abc"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Jun 2017 09:28:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-and-where-function-it-does-not-work-if-there-is-a-dot-in/m-p/374154#M160504</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-06-29T09:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: eval and where function - it does not work if there is a dot in the field name. do I need to escape the dot?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-and-where-function-it-does-not-work-if-there-is-a-dot-in/m-p/374155#M160505</link>
      <description>&lt;P&gt;sorry to add more background on why my use case cannot use search.&lt;/P&gt;

&lt;P&gt;This is b/c I want to create an eval field from above Extracted1 field in data model UI, where I cannot rename the transaction field before I do eval...&lt;/P&gt;

&lt;P&gt;The code I put in the eval field setting is like below:&lt;BR /&gt;
    case(RootTransaction1.Extracted1="abc", "xyz",&lt;BR /&gt;
    true(),""123")&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 09:28:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-and-where-function-it-does-not-work-if-there-is-a-dot-in/m-p/374155#M160505</guid>
      <dc:creator>leonjxtan</dc:creator>
      <dc:date>2017-06-29T09:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: eval and where function - it does not work if there is a dot in the field name. do I need to escape the dot?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-and-where-function-it-does-not-work-if-there-is-a-dot-in/m-p/374156#M160506</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I might be missing something but if I'm not mistaken when you run FROM you can simply reference the fields by using their short name and not the full name as you would have to do when using tstats for instance.&lt;/P&gt;

&lt;P&gt;In your example, the following should just work fine:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| from datamodel:DataModel1.RootTransaction1  
|where Extracted1 = "abc"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And that might be the reason it's working fine when you use rename.&lt;BR /&gt;
PS: when using field names from within an eval you have to use single quotes instead of double quotes if they contain special characters.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 09:31:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-and-where-function-it-does-not-work-if-there-is-a-dot-in/m-p/374156#M160506</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2017-06-29T09:31:40Z</dc:date>
    </item>
  </channel>
</rss>

