Show contents 

Creating a Data Model > Building Data Model > Setting Up ClickHouse

Setting Up ClickHouse

ClickHouse is an open-code columnar DBMS that allows for executing analytical queries in real time based on structured big data.

NOTE. If ClickHouse is set up incorrectly, it may result in data model work restrictions.

Installing and Setting Up ClickHouse

Execute the following operations to set up ClickHouse:

  1. Create the clickhouse-odbc driver manually based on the resources corresponding to the used version of Linux OS.

  2. Install the clickhouse-client driver to a computer with installed BI server.

  3. Grant folder access permissions:

    • /var/lib/clickhouse/user_files

sudo chown www-data:www-data /var/lib/clickhouse/user_files

sudo chmod 755 /var/lib/clickhouse/

  1. Restart clickhouse-server:

sudo systemctl restart clickhouse-server

  1. Install the clickhouse-odbc driver to a computer with installed BI server.

  2. Install the clickhouse-client driver to a computer with installed BI server file.

    1. Download the clickhouse-client driver image from the remote repository:

docker pull yandex/clickhouse-server

    1. Start the container named ClickHouse, the default port 8123 and the specified "volume" directory:

docker run -d --name clickhouse -p 8123:8123 --volume=/path to %temp%/:/var/lib/clickhouse/user_files  yandex/clickhouse-server

After installing the clickhouse-odbc and clickhouse-client drivers execute the following settings:

  1. Create the Database image in the repository with connection to the ClickHouse server. A detailed description is given in the Connecting to Relational Databases section.

  2. Create a repository variable EXTRACT_DB. As a value, specify ID of the Database object.

  3. Create a service user in the repository who will have access to required objects (models), set the LoginLogin to Object Navigator and Read and Open All Objects privileges.

  4. Start the PP.Util utility under the www-data user in Astra Linux, Ubuntu or the apache user in CentOS, RED OS, Rocky Linux, ALT Linux. Next, save service user credentials. The example of command:

sudo -u www-data PP_NODISPLAY=1 /opt/foresight/fp10.x-biserver/bin/PP.Util /save_creds mb_defenition /DEC login pass

Where:

After executing the command service user credentials are saved to the Metabases.xml file.

In case of error

See also:

Building Data Model