Other Usage

Why sistats doesn't work after lookup?

maayan
Path Finder

Hi,

I wrote a report that merge the result with lookup table to add fields (like machineName). the lookup table contain the field,source.
then, I do sistats as the following:

index=....search query... 
| lookup lk_table_name.csv source AS source
| sistats values(*) as * by TimeStamp,source

if I write sistats command after the lookup command the new fields from the lookup table disappear. 

if i write the sistats before the lookup command everything is ok but then i have other problem when i try to parse the summary index:
index=summary search_name="query_SummaryIndex_Main"
| stats values(*) as * by TimeStamp,source

what should i do? why sistats doesnt work after lookup?


thanks,
Maayan

Labels (2)
0 Karma
1 Solution

maayan
Path Finder

stupid solution but works- write stats before and after lookup:

| stats values(*) as * by TimeStamp,source

| lookup mylookup_table.csv source AS source

| stats values(*) as * by TimeStamp,source

View solution in original post

0 Karma

maayan
Path Finder

stupid solution but works- write stats before and after lookup:

| stats values(*) as * by TimeStamp,source

| lookup mylookup_table.csv source AS source

| stats values(*) as * by TimeStamp,source

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...