Available: readFile() v1.130.0
The readFile()
function is available from
v1.130.0
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).
Parameter | Type | Required | Default Value | Description |
---|---|---|---|---|
file [a] | file | required | File name to use as input. | |
include | string | optional[b] | Specifies the column names to read in the lookup file. If no argument is given, all columns are included. | |
limit | number | optional[b] | Limits the number of rows returned. Use limit=N to preview the first N rows of the file. | |
Minimum | 1 | |||
[b] Optional parameters use their default value unless explicitly set. |
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:
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