Skip to main content
Version: 0.83.5


The read_file function reads the contents of a file specified by the given locator, and requires that the Starlark script is part of a package. read_file executes at interpretation time so the file contents won't be displayed in the preview.

# 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",