config
Reads Tenzir’s configuration file.
config() -> record
Description
Section titled “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
Section titled “Examples”Provide a name mapping in the config file
Section titled “Provide a name mapping in the config file”flags: de: 🇩🇪 us: 🇺🇸
let $flags = config().flagsfrom ( {country: "de"}, {country: "us"}, {country: "uk"},)select flag = $flags.get(country, "unknown")
{flag: "🇩🇪"}{flag: "🇺🇸"}{flag: "unknown"}