Allows you to use a CSV Lookup File as data input for your query. Use this function to search the content of your .csv file.

readFile() should be used as the first function in your query (whether a primary query or subquery as part of a join).

ParameterTypeRequiredDefault ValueDescription
file[a]filerequired   File name to use as input.
includestringoptional[b]   Specifies the column names to read in the lookup file. If no argument is given, all columns are included.
limitnumberoptional[b]   Limits the number of rows returned. Use limit=N to preview the first N rows of the file.
  Minimum1 

[a] The parameter name file can be omitted.

[b] Optional parameters use their default value unless explicitly set.

Hide omitted argument names for this function

Show omitted argument names for this function

When using this function, the file should exist, either because the file has previously been uploaded (using Uploading Files) or included as part of an installed package.

When reading a file from a package, the package name should be specified in addition to the filename. For example:

logscale
readFile("falcon/investigate/logoninfo.csv")

For more information on referring to package resources, see Referencing Package Assets.

If you're aiming to preview the content of large files, we recommend always including the limit parameter to ensure optimal UI performance. However, when the file is utilized as data input for further manipulation, the limit parameter can be omitted.

readFile() Examples

Click + next to an example below to get the full details.

Preview Content in a Lookup File With readFile()

Preview content in a lookup file in the search portion of a repo without having to match the lookup against data

Preview Content in a Lookup File With readFile() and Filter With !join()

Preview content in a lookup file in the search portion of a repo and filter for specific data with the !join() function