Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

url_* session settings

These settings are available in system.settings and are autogenerated from source.

url_base

Version history
VersionDefault valueComment
26.5New setting to specify the base URL for resolving relative URLs in the url table function and URL table engine.

The base URL used to resolve relative URLs in the url table function and the URL table engine.

When set, relative URLs are resolved as follows:

  • Path-relative URL (e.g. data.csv): merged with the base URL path per RFC 3986. Everything after the last / in the base path is replaced by the relative URL, so a trailing slash matters: https://example.com/dir/ + data.csv = https://example.com/dir/data.csv, but https://example.com/dir + data.csv = https://example.com/data.csv. If the base has no path (e.g. https://example.com), a / is inserted: https://example.com/data.csv. Dot segments (./ and ../) in the relative URL are normalized: https://example.com/dir/ + ../a.csv = https://example.com/a.csv.
  • Host-relative URL (e.g. /test/data.csv): resolved against the base URL’s scheme and host.
  • Scheme-relative URL (e.g. //other.com/test/data.csv): resolved using the base URL’s scheme.
  • Query-only reference (e.g. ?x=1): appended to the base URL path (replacing any existing query/fragment).
  • Fragment-only reference (e.g. #frag): appended to the base URL, preserving any query string (replacing any existing fragment).
  • Empty reference: returns the base URL without fragment.
  • If the base URL is only a scheme (e.g. file://), a path-relative URL is appended to it directly: file:// + data.csv = file://data.csv, which for the file:// scheme means a path relative to the user_files directory (the current directory for clickhouse-local). Dot segments are kept as-is in this case, so the target engine resolves them against its own base directory.

For example, if url_base is https://example.com/def/, then:

  • data.csv resolves to https://example.com/def/data.csv
  • /test/data.csv resolves to https://example.com/test/data.csv
  • //other.com/test/data.csv resolves to https://other.com/test/data.csv

url_wildcard_max_directories_to_read

Type
UInt64
Default
100000
Version history
VersionDefault valueComment
26.7100000New setting to limit the number of directories read when expanding wildcards in the `url` table function.

Maximum number of directories that can be traversed while expanding URL wildcards from index pages.

Navigation