<?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: Convert single row with list of ids to a table and join it with another table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575250#M200452</link>
    <description>&lt;LI-CODE lang="markup"&gt;my search
| rex field=line ".*customerId\":(?&amp;lt;customer_id&amp;gt;[0-9]+)"
| dedup customer_id
| table customer_id 
| join type=left customer_id [ your other search
  | rex max_match=0 "(?&amp;lt;customer_id&amp;gt;\d+)"
  | mvexpand customer_id
  | table customer_id]&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 17 Nov 2021 11:43:59 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-11-17T11:43:59Z</dc:date>
    <item>
      <title>Convert single row with list of ids to a table and join it with another table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575246#M200448</link>
      <description>&lt;P&gt;I have this query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;my search

| rex field=line ".*customerId\":(?&amp;lt;customer_id&amp;gt;[0-9]+)"

| dedup customer_id

| table customer_id &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That returns multiple rows and generate a table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;customer_id
-----------
1
2
3
4
5&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also have another query&amp;nbsp; that returns a single row with&amp;nbsp;an array&amp;nbsp; of ids:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Synced accounts: [ 1, 3, 5 ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My questions are :&lt;/P&gt;&lt;P&gt;1) How can I convert the row from query 2 into a table with the ids&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) how can I do left join between the results ( that I will see on the table only the ids from query 2)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;customer_id
----------
1
3
5&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&amp;nbsp;&lt;/P&gt;&lt;P&gt;Elad&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 11:30:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575246#M200448</guid>
      <dc:creator>elad</dc:creator>
      <dc:date>2021-11-17T11:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Convert single row with list of ids to a table and join it with another table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575248#M200450</link>
      <description>&lt;P&gt;What do you mean by "array"?&lt;/P&gt;&lt;P&gt;And are you sure you want a left join? It looks&amp;nbsp; more like inner join.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 11:38:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575248#M200450</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-11-17T11:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Convert single row with list of ids to a table and join it with another table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575250#M200452</link>
      <description>&lt;LI-CODE lang="markup"&gt;my search
| rex field=line ".*customerId\":(?&amp;lt;customer_id&amp;gt;[0-9]+)"
| dedup customer_id
| table customer_id 
| join type=left customer_id [ your other search
  | rex max_match=0 "(?&amp;lt;customer_id&amp;gt;\d+)"
  | mvexpand customer_id
  | table customer_id]&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 17 Nov 2021 11:43:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575250#M200452</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-17T11:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Convert single row with list of ids to a table and join it with another table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575252#M200453</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;please see the example I provided:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Synced accounts: [ 1, 3, 5 ]&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Nov 2021 11:53:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575252#M200453</guid>
      <dc:creator>elad</dc:creator>
      <dc:date>2021-11-17T11:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: Convert single row with list of ids to a table and join it with another table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575253#M200454</link>
      <description>&lt;P&gt;But is it a single string value, a multivalued field, something else?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 11:56:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575253#M200454</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-11-17T11:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Convert single row with list of ids to a table and join it with another table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575264#M200457</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;thanks this was exactly what I was looking for.&amp;nbsp; But I have another issue now - the full row actually is something like :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Synced accounts: [1,3,5], Deleted accounts: [2,4]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I make the regex ignore the groups on the&amp;nbsp;deleted accounts list?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 13:24:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575264#M200457</guid>
      <dc:creator>elad</dc:creator>
      <dc:date>2021-11-17T13:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Convert single row with list of ids to a table and join it with another table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575265#M200458</link>
      <description>&lt;P&gt;Please see&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;SPAN&gt;answer - it does a group regex for the row and then convert it to multiple events with&amp;nbsp;mvexpand&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 13:23:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575265#M200458</guid>
      <dc:creator>elad</dc:creator>
      <dc:date>2021-11-17T13:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Convert single row with list of ids to a table and join it with another table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575266#M200459</link>
      <description>&lt;P&gt;You would have to do two rex&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "Synced accounts: \[(?&amp;lt;customer_ids&amp;gt;[^\]]+)\]"
| rex field=customer_ids max_match=0 "(?&amp;lt;customer_id&amp;gt;\d+)"&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 17 Nov 2021 13:24:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575266#M200459</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-17T13:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Convert single row with list of ids to a table and join it with another table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575288#M200465</link>
      <description>&lt;P&gt;Amazing thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 15:33:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-single-row-with-list-of-ids-to-a-table-and-join-it-with/m-p/575288#M200465</guid>
      <dc:creator>elad</dc:creator>
      <dc:date>2021-11-17T15:33:14Z</dc:date>
    </item>
  </channel>
</rss>

