{"id":66927,"date":"2022-11-22T16:03:26","date_gmt":"2022-11-22T16:03:26","guid":{"rendered":"https:\/\/merikebi.warrenmyers.com\/?p=66927"},"modified":"2022-11-22T16:03:26","modified_gmt":"2022-11-22T16:03:26","slug":"answer-by-warren-for-splunk-create-value-on-table-with-base-search-and-eval-from-lookup","status":"publish","type":"post","link":"https:\/\/merikebi.warrenmyers.com\/?p=66927","title":{"rendered":"Answer by warren for Splunk create value on table with base search and eval from lookup"},"content":{"rendered":"<p><a href=\"https:\/\/docs.splunk.com\/Documentation\/Splunk\/latest\/SearchReference\/lookup\" rel=\"nofollow noreferrer\"><code>lookup<\/code><\/a> will always run, always outputting the fields you tell it to &#8211; <em>even if they are null<\/em><\/p>\n<p>And therein lies the key:<\/p>\n<pre><code>| rename user_email AS email\n| lookup identity_ad email OUTPUTNEW bunit memberOf identity first last\n| where isnotnull(bunit)\n<\/code><\/pre>\n<p>Will skip all of the entries that didn&#8217;t return a <code>bunit<\/code> field<\/p>\n<p>If you only want to keep those that don&#8217;t exist in the lookup table, do it this way:<\/p>\n<pre><code>| where isnull(bunit)\n<\/code><\/pre>\n<p>from User warren &#8211; Stack Overflow https:\/\/stackoverflow.com\/questions\/74527429\/splunk-create-value-on-table-with-base-search-and-eval-from-lookup\/74535462#74535462<br \/>\nvia <a href=\"https:\/\/ifttt.com\/?ref=da&#038;site=wordpress\">IFTTT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>lookup will always run, always outputting the fields you tell it to &#8211; even if they are null And therein lies the key: | rename user_email AS email | lookup identity_ad email OUTPUTNEW bunit memberOf identity first last | where isnotnull(bunit) Will skip all of the entries that didn&#8217;t return a bunit field If you &hellip;<br \/><a href=\"https:\/\/merikebi.warrenmyers.com\/?p=66927\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">Answer by warren for Splunk create value on table with base search and eval from lookup<\/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-66927","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\/66927","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=66927"}],"version-history":[{"count":1,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/66927\/revisions"}],"predecessor-version":[{"id":66928,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/66927\/revisions\/66928"}],"wp:attachment":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=66927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=66927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=66927"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fkeyring_services&post=66927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}