Skip to main content
Version: v5.0

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"}

See also​

env, secret