Skip to main content

LookupCSV

This Script is part of the Common Scripts Pack.#

Parses a CSV and looks for a specific value in a specific column, returning a dict of the entire matching row. If no column value is specified, the entire CSV is read into the context.

Script Data#


NameDescription
Script Typepython3
Tagsfile, csv, Utility
Cortex XSOAR Version5.0.0

Inputs#


Argument NameDescription
entryIDEntryID of CSV file.
header_rowCSV file has a header row.
columnColumn to search for value in, if not specified, entire CSV is parsed into the context.
valuevalue to search for
add_header_rowExtra row, in CSV format, to function as header if original does not contain headers

Outputs#


PathDescriptionType
LookupCSV.ResultList of result objects; either a list of dicts (with header_row) or a list of lists (no header row)Unknown
LookupCSV.FoundResultBoolean, for whether the result was found in the CSV or not.Unknown
LookupCSV.SearchValueThe value that was searched.Unknown