Skip to main content


The read_file function reads the contents of a file specified by the given locator and executes at interpretation time. This instruction returns the content of the file in a string type. Please note that the files being read from must themselves be part of a Kurtosis package, as explained here.

# The Kurtosis locator of the file to read.
src = "LOCATOR",

For example:

# Reading a file from a remote package using an absolute locator
remote_contents = read_file(
src = "",

# Reading a file from inside the same package using a relative locator
local_contents = read_file(
src = "./file.txt",