LOAD CSV functions

LOAD CSV functions can be used to get information about the file that is processed by the LOAD CSV clause.

The functions described on this page are only useful when run on a query that uses LOAD CSV. In all other contexts they will always return null.

linenumber()

linenumber() returns the line number that LOAD CSV is currently using.

Syntax:

linenumber()

Returns:

INTEGER

Considerations:

null will be returned if this function is called without a LOAD CSV context.

If the CSV file contains headers, the headers will be linenumber 1 and the 1st row of data will have a linenumber of 2.

file()

file() returns the absolute path of the file that LOAD CSV is using.

Syntax:

file()

Returns:

STRING

Considerations:

null will be returned if this function is called without a LOAD CSV context.