<?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 splunk to create and view table metadata in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148132#M13209</link>
    <description>&lt;P&gt;Wouldn't what be easier, exactly? Creating a database input? I think at the level you're at right now, using the UI to help you as much as you can is your best bet. &lt;/P&gt;

&lt;P&gt;There aren't really tables in Splunk the way you're thinking about them. It's a &lt;STRONG&gt;very&lt;/STRONG&gt; different mindset than SQL. You can use the sourcetype to segregate your data into meaningful sections. It would probably work for you at this point to assign a different sourcetype to each table/view you input. (Over time, you might realize that you may get more performant searches if some tables/views were grouped together into a single sourcetype, but you can attack that problem later.)&lt;/P&gt;</description>
    <pubDate>Tue, 07 Oct 2014 12:47:37 GMT</pubDate>
    <dc:creator>aweitzman</dc:creator>
    <dc:date>2014-10-07T12:47:37Z</dc:date>
    <item>
      <title>Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148116#M13193</link>
      <description>&lt;P&gt;I am completely new to Splunk!&lt;/P&gt;

&lt;P&gt;I have a database where updates are performed in a very ad-hoc way: I delete records and insert a new record with the new values. I hook this up to another 'logging' database which records each insert/delete operation and the details of the affected record (e.g. the timestamp of the operation, the ID of the record, etc.) . I'd like to use splunk to group these update operations and view them - what field was changed when - , bearing in mind that I also do normal inserts and deletes. &lt;/P&gt;

&lt;P&gt;I am aware that you can input SQL and use splunk to present the data, but how do I go about almost creating a new field by itself?&lt;/P&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Table Customers:

Customer ID | Customer Name | Customer Address |
001 | John F | 213 Privet Drive
002 | Kyle A | 16 Gammon Road


Table Customers-History:

TIMESTAMP         | OPERATION | Customer ID | Customer Name | Customer Address
1-Dec-2010 09:52:1232| INSERT | 002       | Kyle A          | 10 Gammon Road
2-Dec-2010 09:54:9500| DELETE| 002         | Kyle A         | 10 Gammon Road
2-Dec-2010 09:54:9500| INSERT | 002         | Kyle A        | 16 Gammon Road
2-Dec-2010 09:55:9921| DELETE | 003         | Josh C        | 21 Drury Lane
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In the above example, the 2nd and 3rd logs of the Customers-History table show an edit operation. I want splunk to go through and record all the changes to the Customers table, automatically grouping up the edit operations as well. How should I do this?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2014 15:15:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148116#M13193</guid>
      <dc:creator>sjanwity</dc:creator>
      <dc:date>2014-10-01T15:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148117#M13194</link>
      <description>&lt;P&gt;What you want to do is quite doable, but if you're completely new to Splunk, then you should start with the &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchTutorial/WelcometotheSearchTutorial"&gt;tutorial&lt;/A&gt;. Your first order of business will be getting your logs into Splunk and ensuring that the fields that you want to appear are being extracted properly. Then your question about a search that will group update operations will be easier to answer.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2014 15:57:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148117#M13194</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2014-10-01T15:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148118#M13195</link>
      <description>&lt;P&gt;@aweitzman: sorry I should mention: I've already got the data into splunk, just unsure how to create the query.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2014 16:03:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148118#M13195</guid>
      <dc:creator>sjanwity</dc:creator>
      <dc:date>2014-10-01T16:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148119#M13196</link>
      <description>&lt;P&gt;If the data is already in Splunk, then can you please edit your post to include some sample records and field values? That will make it far easier to figure out how to create the query  you want.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2014 17:00:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148119#M13196</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2014-10-01T17:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148120#M13197</link>
      <description>&lt;P&gt;OK, now that you've supplemented your post with sample records, I noticed the "dbconnect" tag in your initial post. Since you're representing your data as tables rather than Splunk search results, it would appear that you are accessing this data entirely through &lt;CODE&gt;dbquery&lt;/CODE&gt; instead of importing your "logging" database data into Splunk and having it indexed there. Is that the case?&lt;/P&gt;

&lt;P&gt;I'm also unclear on what you mean by grouping. Do you just want the data from your logging database sorted by customer ID and time? Or something more than that?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2014 13:04:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148120#M13197</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2014-10-02T13:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148121#M13198</link>
      <description>&lt;P&gt;@aweitzman It seems I've completely misunderstood splunk...yes that is the case, I am viewing this table through dbquery. Yes I would like it imported on splunk, but my understanding was that I would use splunk to display this data first, then try to create a scheduler later to get data into splunk itself. I thought, though, that I could form a dbquery which indexes the database data automatically....is this not the case? &lt;/P&gt;

&lt;P&gt;By 'grouping' I mean, have splunk see that the insert-delete operations are actually edit operations and present the information as such. For example on the data above splunk would show 2 records of 'changes' for Customer 'Kyle A': an insert on 1-Dec-2010 9:52 and an edit on 2-Dec-2010 9:54&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2014 13:36:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148121#M13198</guid>
      <dc:creator>sjanwity</dc:creator>
      <dc:date>2014-10-02T13:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148122#M13199</link>
      <description>&lt;P&gt;No, you can only use &lt;CODE&gt;dbquery&lt;/CODE&gt; to get data out of your database, not into Splunk. To get your database data into Splunk, you need to configure a database input. See this page for details: &lt;A href="http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Configuredatabasemonitoring"&gt;http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Configuredatabasemonitoring&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;As for your grouping, what you want is to be able to take the DELETE-INSERT combination and interpret it as a single EDIT action, correct? If so, that can be done in Splunk using the &lt;CODE&gt;transaction&lt;/CODE&gt; command. You would define a transaction as something that starts with a DELETE, ends with INSERT, has the same Customer ID value, and happens within a very short timespan. So something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;main search goes here 
| transaction "Customer ID"  maxspan=1s maxevents=2 startswith="DELETE" endswith="INSERT"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See here for more details: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Transaction"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Transaction&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2014 13:58:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148122#M13199</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2014-10-02T13:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148123#M13200</link>
      <description>&lt;P&gt;@aweitzman My key is a compound key though (it has to get ID and transaction time so it doesn't mistake seperate independent insert-deletes as edits). When trying your snippet out I get a command="dbquery", A database error occurred: ORA-00933: SQL command not properly ended when appending the code to the end. Am I missing something? When you say 'main search goes here' what do you mean?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2014 15:33:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148123#M13200</guid>
      <dc:creator>sjanwity</dc:creator>
      <dc:date>2014-10-02T15:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148124#M13201</link>
      <description>&lt;P&gt;By "main search goes here" I mean the search to pull your table into the Splunk search context. Like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbquery search-to-get-the-Customers-History-table
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The &lt;CODE&gt;transaction&lt;/CODE&gt; command isn't part of your SQL query. It's a Splunk command designed to manipulate the data in Splunk. So what I meant was something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbquery search-to-get-the-Customers-History-table | transaction "Customer ID" maxspan=1s maxevents=2 startswith="DELETE" endswith="INSERT"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note the pipe between the &lt;CODE&gt;dbquery&lt;/CODE&gt; clause and the &lt;CODE&gt;transaction&lt;/CODE&gt; clause. It's to take the results of your first search (the &lt;CODE&gt;dbquery&lt;/CODE&gt; part, where you get stuff out of your SQL database) and use it as the basis for manipulation by the second part (the &lt;CODE&gt;transaction&lt;/CODE&gt; part, to extract the DELETE-INSERT pairs).&lt;/P&gt;

&lt;P&gt;You really should read the tutorial.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2014 16:43:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148124#M13201</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2014-10-02T16:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148125#M13202</link>
      <description>&lt;P&gt;@aweitzman I did, just abit confused how the db connector works! I know the searches and the search commands but I am completely unsure as to how to use it on the db connector context. I thought at first that the dbconnector is a seperate app where you can simply combine SQL and splunk syntax together and it'll automatically help you query your database then display the data (with the data being stored on splunk as  an interim), but I think from your messages this is not the case?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2014 08:48:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148125#M13202</guid>
      <dc:creator>sjanwity</dc:creator>
      <dc:date>2014-10-03T08:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148126#M13203</link>
      <description>&lt;P&gt;You understand things perfectly. You use the &lt;CODE&gt;dbquery&lt;/CODE&gt; command for your SQL syntax to get some results, and then you pipe those results through Splunk commands.&lt;/P&gt;

&lt;P&gt;However, I must note I informed you incorrectly about &lt;CODE&gt;transaction&lt;/CODE&gt;. I just realized that since &lt;CODE&gt;dbquery&lt;/CODE&gt; returns a table rather than events, &lt;CODE&gt;transaction&lt;/CODE&gt; won't work. (However, that just means your search should get you 0 results rather than an error.)&lt;/P&gt;

&lt;P&gt;What that means for you is that your ultimate solution here is going to involve creating a database input, so that all of your logs are in Splunk natively. Then you'll be able to work on the data using the &lt;CODE&gt;transaction&lt;/CODE&gt; command to get the answers you want.&lt;/P&gt;

&lt;P&gt;(Just to be clear, using &lt;CODE&gt;dbquery&lt;/CODE&gt; to get a table and then piping it through a Splunk command to get another table, or a chart, will work with many, many Splunk commands, but &lt;CODE&gt;transaction&lt;/CODE&gt; is not one of them. Unfortunately, &lt;CODE&gt;transaction&lt;/CODE&gt; is the capability you're asking for in your question, so you'll need to go the database input route to solve that problem.)&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2014 15:03:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148126#M13203</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2014-10-03T15:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148127#M13204</link>
      <description>&lt;P&gt;By "creating a database input", which tutorial topic should I be looking at, and do you mean through dbconnect or native splunk? I'm confused because I don't know whether this is from a dbconnector perspective or a native splunk perspective (in fact I think that's the root of my problem - I jumped right into dbconnect before trying to understand splunk itself, so now I don't know what is unique to which perspective...)&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2014 08:45:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148127#M13204</guid>
      <dc:creator>sjanwity</dc:creator>
      <dc:date>2014-10-06T08:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148128#M13205</link>
      <description>&lt;P&gt;Database inputs are a dbconnect concept. Look here: &lt;A href="http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Configuredatabasemonitoring"&gt;http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Configuredatabasemonitoring&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;That said, understanding Splunk itself is key, especially understanding the ways in which it differs from SQL. In any Splunk setup there is native Splunk data you can see by doing the search &lt;CODE&gt;index=_internal&lt;/CODE&gt;. Exercise the concepts you learned in the tutorial by spending some time doing searches on this data to better "get" it, and then apply what you know about dbconnect to bring more data into the system to work with.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2014 12:48:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148128#M13205</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2014-10-06T12:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148129#M13206</link>
      <description>&lt;P&gt;I think I've gotten the data in - I've posted a screenshot of my dbconnect app and a sample code sql query I tried (with meaningful data blotted out, sorry!): &lt;A href="http://pbrd.co/1q4a4Sa"&gt;http://pbrd.co/1q4a4Sa&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;What would my next steps be - use transactions? Note that a data model has already been built&lt;BR /&gt;
Would this task be easier editing the splunk config files rather than on the dbconnector itself?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2014 16:51:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148129#M13206</guid>
      <dc:creator>sjanwity</dc:creator>
      <dc:date>2014-10-06T16:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148130#M13207</link>
      <description>&lt;P&gt;Your picture shows you doing a database query within the DB Connect app, which appears to be the functional equivalent of running &lt;CODE&gt;dbquery&lt;/CODE&gt; from the search box. So this will not help you.&lt;/P&gt;

&lt;P&gt;Once you have created a database input as described in the link above, you should be able to search your data entirely within Splunk, without using &lt;CODE&gt;dbquery&lt;/CODE&gt; or the Database Query part of the DB Connect app. Once this is established, you should be able to run regular Splunk commands (like &lt;CODE&gt;transaction&lt;/CODE&gt;) on the raw events and get useful responses.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2014 17:07:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148130#M13207</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2014-10-06T17:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148131#M13208</link>
      <description>&lt;P&gt;Oh alright, I think I understand now...&lt;/P&gt;

&lt;P&gt;Wouldn't this be easier defining in the config files, and if so, I'm guessing on outputs.conf? Also, if I get the data into splunk, how do I search by a specific table? Or will that be indexed as one of the fields, i.e. sourcetype?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2014 17:26:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148131#M13208</guid>
      <dc:creator>sjanwity</dc:creator>
      <dc:date>2014-10-06T17:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148132#M13209</link>
      <description>&lt;P&gt;Wouldn't what be easier, exactly? Creating a database input? I think at the level you're at right now, using the UI to help you as much as you can is your best bet. &lt;/P&gt;

&lt;P&gt;There aren't really tables in Splunk the way you're thinking about them. It's a &lt;STRONG&gt;very&lt;/STRONG&gt; different mindset than SQL. You can use the sourcetype to segregate your data into meaningful sections. It would probably work for you at this point to assign a different sourcetype to each table/view you input. (Over time, you might realize that you may get more performant searches if some tables/views were grouped together into a single sourcetype, but you can attack that problem later.)&lt;/P&gt;</description>
      <pubDate>Tue, 07 Oct 2014 12:47:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148132#M13209</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2014-10-07T12:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148133#M13210</link>
      <description>&lt;P&gt;Thanks for all your help so far! I've gotten the data in splunk and gotten transactions to work. My splunking adventure is almost complete, however the data is not displaying as I want it, though. I've also changed the output abit: I think it is better to see the &lt;STRONG&gt;changes on a field&lt;/STRONG&gt; as well as grouping update events. My transaction command is currently&lt;BR /&gt;
    transaction TYPE_NAME FIELD_NAME OBJECT_KEY&lt;BR /&gt;
but it's not displaying the data as I want.&lt;/P&gt;

&lt;P&gt;Currently the data is displayed like this: &lt;BR /&gt;
&lt;A href="http://i.stack.imgur.com/RZwib.jpg" target="_blank"&gt;http://i.stack.imgur.com/RZwib.jpg&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;But in reality the database is this:&lt;BR /&gt;
&lt;A href="http://i.stack.imgur.com/ulV2A.jpg" target="_blank"&gt;http://i.stack.imgur.com/ulV2A.jpg&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;As you can see, the initial insert has completely disappeared and the last delete as well. &lt;/P&gt;

&lt;P&gt;Why is the last delete event and initial insert event missing? It should group the insert and delete event that occured on 11-May-11 but if I use &lt;CODE&gt;maxspan&lt;/CODE&gt; then the initial insert and subsequent delete becomes a seperate event. How should I do this, and how do I make splunk rename the INSERT-DELETE event to an UPDATE?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:50:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148133#M13210</guid>
      <dc:creator>sjanwity</dc:creator>
      <dc:date>2020-09-28T17:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148134#M13211</link>
      <description>&lt;P&gt;The last delete and initial insert are missing because they're not part of your defined transactions. If you want to include them, add &lt;CODE&gt;keeporphans=true&lt;/CODE&gt; to your &lt;CODE&gt;transaction&lt;/CODE&gt; command.&lt;/P&gt;

&lt;P&gt;As for renaming the event, create a new field based on the contents of the &lt;CODE&gt;OPERATION&lt;/CODE&gt; field and use that instead. Add the following to the end of your search:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| eval TOTALOPERATION=if(OPERATION=="INSERT" AND OPERATION=="DELETE","UPDATE",OPERATION)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This creates a new field &lt;CODE&gt;TOTALOPERATION&lt;/CODE&gt; which contains either &lt;CODE&gt;UPDATE&lt;/CODE&gt; if your original &lt;CODE&gt;OPERATION&lt;/CODE&gt; value contains both &lt;CODE&gt;INSERT&lt;/CODE&gt; and &lt;CODE&gt;DELETE&lt;/CODE&gt;, or the original value of the &lt;CODE&gt;OPERATION&lt;/CODE&gt; field if it doesn't. (I know it seems strange to test for equality against two different values in the same logical operation, but it works in Splunk because the field is multivalued.)&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2014 16:56:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148134#M13211</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2014-10-09T16:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using splunk to create and view table metadata</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148135#M13212</link>
      <description>&lt;P&gt;Thanks for the &lt;CODE&gt;TOTALOPERATION&lt;/CODE&gt;field, it worked nicely! However &lt;CODE&gt;keeporphans&lt;/CODE&gt; is still returning me this result:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://i.stack.imgur.com/ulV2A.jpg"&gt;http://i.stack.imgur.com/ulV2A.jpg&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;My transaction command is currently &lt;CODE&gt;| transaction TYPE_NAME FIELD_NAME OBJECT_KEY keeporphans=true |&lt;/CODE&gt;, am I doing something wrong?&lt;/P&gt;

&lt;P&gt;It's also not showing the operation on records which were changed multiple times: &lt;BR /&gt;
&lt;A href="http://i.stack.imgur.com/NgaHw.jpg"&gt;http://i.stack.imgur.com/NgaHw.jpg&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Oct 2014 09:36:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-splunk-to-create-and-view-table-metadata/m-p/148135#M13212</guid>
      <dc:creator>sjanwity</dc:creator>
      <dc:date>2014-10-10T09:36:23Z</dc:date>
    </item>
  </channel>
</rss>

