Skip to content
Legacy docs for Tenzir v5.x. For the latest Tenzir v6 series, visit docs.tenzir.com. Migrating from v5? Read the Tenzir v6 migration guide.

Extracts the parent directory from a file path.

parent_dir(x:string) -> string

The parent_dir function returns the parent directory path of the given file path, excluding the file name.

Extract the parent directory from a file path

Section titled “Extract the parent directory from a file path”
from {x: parent_dir("/path/to/log.json")}
{x: "/path/to"}

Last updated: