Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Yandex DataLens
    • Overview
    • Formula syntax
    • Neuroanalyst for creating calculated fields
      • All Functions
        • Overview
        • DB_CALL_AGG_FLOAT
        • DB_CALL_AGG_INT
        • DB_CALL_AGG_STRING
        • DB_CALL_ARRAY_FLOAT
        • DB_CALL_ARRAY_INT
        • DB_CALL_ARRAY_STRING
        • DB_CALL_BOOL
        • DB_CALL_FLOAT
        • DB_CALL_INT
        • DB_CALL_STRING
        • DB_COLUMN
      • Function Availability
    • Parameters
  • DataLens Gallery
  • Audit Trails events
  1. Calculated fields
  2. Function reference
  3. Native functions
  4. DB_COLUMN

DB_COLUMN

Written by
Yandex Cloud
Updated at November 18, 2026
View in Markdown

SyntaxSyntax

DB_COLUMN( column_name )

DescriptionDescription

Warning

The availability and behavior of native functions depends on your database type and version.

It is recommended to use native functions only if there is no supported DataLens function (composition of functions) that can achieve the required result.

Returns a native database column by its name. Supported column names and their result types are defined by the connector.

The argument column_name must be a constant string with one of the values supported by the connector. For ClickHouse, all results have type String and the supported values are:
"_table", "_partition_id", "_file", "_path".

Unlike DB_CALL_* formulas, this formula emits a column reference, not a function call. On ClickHouse, virtual-column availability depends on the table engine and server version: _partition_id belongs to the MergeTree family, _table to the Merge engine/table function, and _file / _path to File/S3.

Argument types:

  • column_name — String

Return type: String

Note

Only constant values are accepted for the arguments (column_name).

ExamplesExamples

DB_COLUMN("_partition_id") -- ClickHouse MergeTree: virtual partition id
DB_COLUMN("_table") -- ClickHouse Merge: source table name
DB_COLUMN("_file") -- ClickHouse File/S3: source file name
DB_COLUMN("_path") -- ClickHouse File/S3: source file path

Data source supportData source support

ClickHouse 21.8.

Was the article helpful?

Previous
DB_CALL_STRING
Next
Overview
© 2026 Direct Cursus Technology L.L.C.