DB_CALL_FLOAT
Syntax
DB_CALL_FLOAT( db_function_name [ , arg_1 [ , arg_2 [ , ... ] ] ] )
Description
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.
Calls a native database function by its name. Native function should return a value of type Fractional number. The function is executed for every row in the dataset (non-aggregated).
The first argument db_function_name must be a constant string with the name of the database function to call. All subsequent arguments are passed to the native function in the same order as written in the formula and can be of any type, including types that are not currently supported by DataLens.
The function name must contain only alphanumeric characters, underscore and colon characters.
Argument types:
db_function_name—Stringarg_1—Anyarg_2—Any
Return type: Fractional number
Note
Only constant values are accepted for the arguments (db_function_name).
Examples
DB_CALL_FLOAT("sign", -5.0) = -1.0 -- ClickHouse: sign of -5.0 is -1.0
DB_CALL_FLOAT("sign", 5.0) = 1.0 -- ClickHouse: sign of 5.0 is 1.0
DB_CALL_FLOAT("log10", 100.0) = 2.0 -- ClickHouse: log10 of 100.0 is 2.0
Data source support
ClickHouse 21.8, Microsoft SQL Server 2017 (14.0), MySQL 5.7, Oracle Database 12c (12.1), PostgreSQL 9.3, Trino, YDB.