v.20.12Improvement

Set Default Parameters for SOURCE(CLICKHOUSE) to Current Instance

Set default host and port parameters for SOURCE(CLICKHOUSE(...)) to current instance and set default user value to 'default'. #16997 (vdimir).
Set default host and port parameters for the SOURCE(CLICKHOUSE(...)) table function to the current ClickHouse instance and set the default user to 'default'.

Why it matters

This feature simplifies the usage of the SOURCE(CLICKHOUSE(...)) table function by automatically defaulting the connection parameters (host, port, and user) to the current ClickHouse server settings. It reduces the need for users to specify these parameters explicitly when querying data from the current instance, improving convenience and reducing configuration errors.

How to use it

When using the SOURCE(CLICKHOUSE(...)) table function, you can omit the host, port, and user parameters to connect to the current ClickHouse instance as user 'default'. For example:

SELECT * FROM SOURCE(CLICKHOUSE('query'))


will connect to the local ClickHouse server using the defaults without additional specification.