{"id":72923,"date":"2023-04-25T16:27:52","date_gmt":"2023-04-25T16:27:52","guid":{"rendered":"https:\/\/merikebi.warrenmyers.com\/?p=72923"},"modified":"2023-04-25T16:27:52","modified_gmt":"2023-04-25T16:27:52","slug":"answer-by-warren-for-splunk-coalesce-function","status":"publish","type":"post","link":"https:\/\/merikebi.warrenmyers.com\/?p=72923","title":{"rendered":"Answer by warren for Splunk Coalesce Function"},"content":{"rendered":"<p>The SPL you shared shows the <code>rename<\/code> <em>after<\/em> you attempt to <code>coalesce()<\/code>:<\/p>\n<pre><code>base search\n| eval test=coalesce(field1,field2)\n| rename &quot;space field 1&quot; AS field1, &quot;space field 2&quot; AS field2\n| table field1 field2 test\n<\/code><\/pre>\n<p>Pretty sure what you want is this:<\/p>\n<pre><code>base search\n| rename &quot;space field 1&quot; AS field1, &quot;space field 2&quot; AS field2\n| eval test=coalesce(field1,field2)\n| table field1 field2 test\n<\/code><\/pre>\n<p>from User warren &#8211; Stack Overflow https:\/\/stackoverflow.com\/questions\/76102751\/splunk-coalesce-function\/76103449#76103449<br \/>\nvia <a href=\"https:\/\/ifttt.com\/?ref=da&#038;site=wordpress\">IFTTT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The SPL you shared shows the rename after you attempt to coalesce(): base search | eval test=coalesce(field1,field2) | rename &quot;space field 1&quot; AS field1, &quot;space field 2&quot; AS field2 | table field1 field2 test Pretty sure what you want is this: base search | rename &quot;space field 1&quot; AS field1, &quot;space field 2&quot; AS field2 &hellip;<br \/><a href=\"https:\/\/merikebi.warrenmyers.com\/?p=72923\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">Answer by warren for Splunk Coalesce Function<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[991],"keyring_services":[],"class_list":["post-72923","post","type-post","status-publish","format-standard","hentry","category-blih","tag-stackexchange"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/72923","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=72923"}],"version-history":[{"count":1,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/72923\/revisions"}],"predecessor-version":[{"id":72924,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/72923\/revisions\/72924"}],"wp:attachment":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=72923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=72923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=72923"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fkeyring_services&post=72923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}