config
Reads Tenzir's configuration file.
config() -> record
Descriptionβ
The config
function retrieves Tenzir's configuration, including values from
various tenzir.yaml
files, plugin-specific configuration files, environment
variables, and command-line options.
Note that the tenzir.secrets
, tenzir.token
and caf
options are omitted
from the returned record. The former to avoid leaking secrets, the latter as it
only contains internal performance-related that are developer-facing and should
not be relied upon within TQL.
Examplesβ
Provide a name mapping in the config fileβ
# /opt/tenzir/etc/tenzir/tenzir.yaml
flags:
de: π©πͺ
us: πΊπΈ
let $flags = config().flags
from (
{country: "de"},
{country: "us"},
{country: "uk"},
)
select flag = $flags.get(country, "unknown")
{flag: "π©πͺ"}
{flag: "πΊπΈ"}
{flag: "unknown"}