<?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: How to extract a field from IBM Informix schema with Splunk? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493179#M137550</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8006iE5FA8F0431505253/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
I’m using your rex but not work as expected! Screenshot attached.&lt;BR /&gt;
Any recommendation?&lt;/P&gt;</description>
    <pubDate>Mon, 25 Nov 2019 18:20:33 GMT</pubDate>
    <dc:creator>indeed_2000</dc:creator>
    <dc:date>2019-11-25T18:20:33Z</dc:date>
    <item>
      <title>How to extract a field from IBM Informix schema with Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493177#M137548</link>
      <description>&lt;P&gt;Hi, I have IBM Informix schema and want to extract data with Splunk from it like this:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;table name | Index     | Trigger&lt;BR /&gt;
grupo_oper | type_idx | upload&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Here is the sample schema:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;grant dba to "informix";

{ TABLE "informix".grupo_oper row size = 8 number of columns = 2 index size = 0 }
create table "informix".**grupo_oper**
  (
    cod_gru_operat integer,
    cod_operatoria integer
  );
revoke all on "informix".grupo_oper from "public";

create index "informix".**type_idx** on "informix".utility (type)
create trigger "informix".**upload** insert on "informix"

grant select on "informix".grupo_oper to "public" as "informix";
grant update on "informix".grupo_oper to "public" as "informix";
grant insert on "informix".grupo_oper to "public" as "informix";
grant delete on "informix".grupo_oper to "public" as "informix";
grant index on "informix".grupo_oper to "public" as "informix";

create procedure "informix".sgc_var_param_var( c char(30)) returning smallint;
-- created by valau
return 1;
end procedure;

grant  execute on "informix".sgc_var_param_var to "public" as "informix";
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any recommendation?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:07:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493177#M137548</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2020-09-30T03:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from IBM Informix schema with Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493178#M137549</link>
      <description>&lt;P&gt;Hi @mehrdad_2000,&lt;BR /&gt;
you could extract field using a regex like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?ms)create\s+table\s+\"\w+\"\.(?&amp;lt;table_name&amp;gt;\w*).*create\s+index\s+\"\w+\"\.(?&amp;lt;index&amp;gt;\w+).*create\s+trigger\s+\"\w+\"\.(?&amp;lt;trigger&amp;gt;\w+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That you can test at &lt;A href="https://regex101.com/r/DDgdkG/1"&gt;https://regex101.com/r/DDgdkG/1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 13:32:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493178#M137549</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-11-25T13:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from IBM Informix schema with Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493179#M137550</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8006iE5FA8F0431505253/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
I’m using your rex but not work as expected! Screenshot attached.&lt;BR /&gt;
Any recommendation?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 18:20:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493179#M137550</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2019-11-25T18:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from IBM Informix schema with Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493180#M137551</link>
      <description>&lt;P&gt;I’m using your rex but not work as expected in splunk!&lt;BR /&gt;
Screenshot attached.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/storage/attachments/277637-0a21677e-2094-499e-bdd9-afadb94f3ee2.jpeg"&gt;https://answers.splunk.com/storage/attachments/277637-0a21677e-2094-499e-bdd9-afadb94f3ee2.jpeg&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Any recommendation?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 18:21:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493180#M137551</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2019-11-25T18:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from IBM Informix schema with Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493181#M137552</link>
      <description>&lt;P&gt;Hi @mehrdad_2000,&lt;BR /&gt;
in regex101 the above regex is working!&lt;BR /&gt;
now in Splunk, please, try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?ms)\".*create table \"\w+\"\.(?&amp;lt;table_name&amp;gt;\w+).*create index \"\w+\"\.(?&amp;lt;index&amp;gt;\w+).*create trigger \"\w+\"\.(?&amp;lt;trigger&amp;gt;\w+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 09:52:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493181#M137552</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-11-26T09:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from IBM Informix schema with Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493182#M137553</link>
      <description>&lt;P&gt;try this but not work!&lt;BR /&gt;
Any recommendation?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/opt/logs/file.sql"  | rex (?ms)\".*create table \"\w+\"\.(?&amp;lt;table_name&amp;gt;\w+).*create index \"\w+\"\.(?&amp;lt;index&amp;gt;\w+).*create trigger \"\w+\"\.(?&amp;lt;trigger&amp;gt;\w+) | table table_name, index, trigger
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Nov 2019 10:12:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493182#M137553</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2019-11-26T10:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from IBM Informix schema with Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493183#M137554</link>
      <description>&lt;P&gt;Hi @mehrdad_2000,&lt;BR /&gt;
please try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/opt/logs/file.sql" 
| rex "(?ms)\".*create table \"\w+\"\.(?&amp;lt;table_name&amp;gt;\w+).*create index \"\w+\"\.(?&amp;lt;index&amp;gt;\w+).*create trigger \"\w+\"\.(?&amp;lt;trigger&amp;gt;\w+)"
| table table_name index trigger
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 10:16:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493183#M137554</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-11-26T10:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from IBM Informix schema with Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493184#M137555</link>
      <description>&lt;P&gt;nope! it just give me same result!&lt;BR /&gt;
Any recommendation?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 11:17:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493184#M137555</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2019-11-26T11:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from IBM Informix schema with Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493185#M137556</link>
      <description>&lt;P&gt;Hi @mehrdad_2000,&lt;BR /&gt;
build you regex step by step:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;at first run the main search,&lt;/LI&gt;
&lt;LI&gt;then use the rex command and build a simple regex (not the full regex), e.g.  | rex "(?ms)\".*create (?\w+)&lt;/LI&gt;
&lt;LI&gt;then add step by step all the parts of your regex until the full regex, e.g.  | rex "(?ms)\".*create table \"(?\w+)&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;I followed this way to create the last version of my regex.&lt;BR /&gt;
The problem is in quotes so you have to find them and escape all.&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 11:31:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493185#M137556</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-11-26T11:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from IBM Informix schema with Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493186#M137557</link>
      <description>&lt;P&gt;in field extraction of Splunk I try different way, it seems , they work separately like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?ms)\".*create table \"\w+\"\.(?&amp;lt;table_name&amp;gt;\w+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but when I add next it will be mess up!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?ms)\".*create table \"\w+\"\.(?&amp;lt;table_name&amp;gt;\w+).*create index \"\w+\"\.(?&amp;lt;index&amp;gt;\w+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Nov 2019 11:37:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493186#M137557</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2019-11-26T11:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from IBM Informix schema with Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493187#M137558</link>
      <description>&lt;P&gt;Hi @mehrdad_2000,&lt;BR /&gt;
if the first regex is working, you can create three different field extractions.&lt;BR /&gt;
Before the field extraction, you can test them using the rex command.&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 11:45:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493187#M137558</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-11-26T11:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from IBM Informix schema with Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493188#M137559</link>
      <description>&lt;P&gt;another problem is when create table does not match row with each other, e.g.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;table name | Index    | Trigger
grupo_oper |           | 
           |            | upload
           | type_idx     | 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Nov 2019 12:02:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493188#M137559</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2019-11-26T12:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from IBM Informix schema with Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493189#M137560</link>
      <description>&lt;P&gt;Hi @mehrdad_2000,&lt;BR /&gt;
This should be another question, anyway could you share your search?&lt;BR /&gt;
Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 12:26:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493189#M137560</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-11-26T12:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from IBM Informix schema with Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493190#M137561</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
|  eval _raw="grant dba to \"informix\";

 { TABLE \"informix\".grupo_oper row size = 8 number of columns = 2 index size = 0 }
 create table \"informix\".grupo_oper
   (
     cod_gru_operat integer,
     cod_operatoria integer
   );
 revoke all on \"informix\".grupo_oper from \"public\";

 create index \"informix\".type_idx on \"informix\".utility (type)
 create trigger \"informix\".upload insert on \"informix\"

 grant select on \"informix\".grupo_oper to \"public\" as \"informix\";
 grant update on \"informix\".grupo_oper to \"public\" as \"informix\";
 grant insert on \"informix\".grupo_oper to \"public\" as \"informix\";
 grant delete on \"informix\".grupo_oper to \"public\" as \"informix\";
 grant index on \"informix\".grupo_oper to \"public\" as \"informix\";

 create procedure \"informix\".sgc_var_param_var( c char(30)) returning smallint;
 -- created by valau
 return 1;
 end procedure;

 grant  execute on \"informix\".sgc_var_param_var to \"public\" as \"informix\";"

 | rename COMMENT AS "Everything above generates sample event data; everything below is your solution."

 | rex max_match=0 "create (?&amp;lt;object&amp;gt;\S+)[^\.]+\.(?&amp;lt;value&amp;gt;\S+)"
 | eval _raw = mvzip(object, value, "=")
 | kv
 | table table index trigger
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Nov 2019 20:57:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493190#M137561</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-27T20:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from IBM Informix schema with Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493191#M137562</link>
      <description>&lt;P&gt;sure here is another post with more details and screenshot. &lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/786478/create-table-from-database-schema.html?minQuestionBodyLength=80"&gt;https://answers.splunk.com/answers/786478/create-table-from-database-schema.html?minQuestionBodyLength=80&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 19:08:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493191#M137562</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2019-11-28T19:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from IBM Informix schema with Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493192#M137563</link>
      <description>&lt;P&gt;Hi @mehrdad_2000&lt;/P&gt;

&lt;P&gt;My name is Anam Siddique and I am the Community Content Specialist for Splunk Answers. &lt;/P&gt;

&lt;P&gt;If any of the answers worked for you for this part of the question, please go ahead and accept them.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 19:55:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493192#M137563</guid>
      <dc:creator>Anam</dc:creator>
      <dc:date>2019-12-02T19:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from IBM Informix schema with Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493193#M137564</link>
      <description>&lt;P&gt;Hi Anam,&lt;BR /&gt;
Unfortunately non of the answers resolve issue!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 19:26:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-IBM-Informix-schema-with-Splunk/m-p/493193#M137564</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2019-12-03T19:26:01Z</dc:date>
    </item>
  </channel>
</rss>

