Getting Data In

Can I access a CSV lookup with a Python script?

coenvandijk
New Member

Hello,

I have a custom search (written in Python). From my Python script I would like to use/access a CSV lookup. Is this possible? Or should I read the whole CSV into a Python dictionary and let my script do the lookup?

Thanks in advance!
Coen

0 Karma

jangid
Builder

Using REST API definitely you can not access CSV lookup. Now you have two option either use KV Store instead of CSV or use your second option read CSV file.

0 Karma

DalJeanis
SplunkTrust
SplunkTrust

Haven't done one yet, so take this for what it's worth... whether or not it's possible, your second option is the most direct route. Rocking back and forth would increase complexity and reduce maintainability.

0 Karma
.conf21 Now Fully Virtual!
Register for FREE Today!

We've made .conf21 totally virtual and totally FREE! Our completely online experience will run from 10/19 through 10/20 with some additional events, too!