Creating a Data Model > Building Data Model > 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.
Execute the following operations to set up ClickHouse:
Create the clickhouse-odbc driver manually based on the resources corresponding to the used version of Linux OS.
Install the clickhouse-client driver to a computer with installed BI server.
Grant folder access permissions:
/var/lib/clickhouse/user_files
sudo chown www-data:www-data /var/lib/clickhouse/user_files
/var/lib/clickhouse/
sudo chmod 755 /var/lib/clickhouse/
Restart clickhouse-server:
sudo systemctl restart clickhouse-server
Install the clickhouse-odbc driver to a computer with installed BI server.
Install the clickhouse-client driver to a computer with installed BI server file.
Download the clickhouse-client driver image from the remote repository:
docker pull yandex/clickhouse-server
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:
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.
Create a repository variable EXTRACT_DB. As a value, specify ID of the Database object.
Create a service user in the repository who will have access to required objects (models), set the Login, Login to Object Navigator and Read and Open All Objects privileges.
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:
mb_defenition. Repository identifier.
login. Service user name
pass. Service user password.
After executing the command service user credentials are saved to the Metabases.xml file.
See also: