Skip to main content

clicksource

Description

Allows retrieving data from a Clickhouse database.

Syntax

clicksource <db_name.table_name> [qsize=<int>]

Required Arguments

  • db_name.table_name
    • Syntax: <string>
    • Description: To access Clickhouse, it's important to specify both the database name and the table name within it. If only the table name is specified, the default database will be used.

Optional Arguments

  • qsize — the maximum number of data records to be retrieved
    • Syntax: qsize=<int>
    • Unit of measurement: units
    • Default value: 1,000,000

Connection Configuration

All connection settings are stored in settings.yml.

sme:
dbs:
clickhouse_connection_string: jdbc:clickhouse://127.0.0.1:9000

Query Examples

Example #1
clicksource 'hr.employee_list'
| search status="Terminated"
| fields user_name
Example #2
 clicksource accessLogs
| search [ clicksource 'hr.employee_list'
| search status="Terminated"
| fields user_name
| format ]