parse_dirpath()

Returns the head of the path similarly to Python's os.path.dirname. separator options: system, both_slash (default), forward_slash, backslash

Reference: DuckDB 1.3.2

Arguments & returns

2 overloads

parse_dirpath(string)

Scalar
Overload link string Returns
#01 VARCHAR VARCHAR

parse_dirpath(string, separator)

Scalar
Overload link stringseparator Returns
#02 VARCHARVARCHAR VARCHAR

Example

parse_dirpath example
SQL
Haybarn WASM 2.0.0-rc12 · In your browser

Engine example · Run to view results.

Catalog examples

SELECT
  parse_dirpath('path/to/file.csv', 'system');