ADB ClickHouse Connector installation
To install ADB ClickHouse Connector, follow the steps:
-
Install the PXF and ADB ClickHouse Connector services in an ADB cluster. For information on how to add services to ADB clusters, see Add services.
-
On the ADB master host, verify that the PXF configuration file (/var/lib/pxf/conf/pxf-profiles.xml) contains the
Tkh_clickhouse:textprofile.<profiles> <profile> <name>Tkh_clickhouse:text</name> <description>Clickhouse</description> <plugins> <accessor>io.arenadata.tkh.pxf.TkhFdwAccessor</accessor> <resolver>io.arenadata.tkh.pxf.TkhResolver</resolver> </plugins> </profile> </profiles>NOTEThe directory where PXF configuration files are located is defined by the
PXF_BASEenvironment variable. The default value is /var/lib/pxf. The value can be changed with the Use custom PXF_BASE option in the configuration parameters of the PXF service. -
To check that the new extensions
gptkh,pxf_fdw,tkh_fdware available, use thepsqlmeta-command\dx:\dxThe output contains the
gptkh,pxf_fdw,tkh_fdwextensions:List of installed extensions Name | Version | Schema | Description -----------------------------+---------+------------+---------------------------------------------------------------- adb_fdw | 1.0 | public | foreign-data wrapper for remote ADB servers arenadata_toolkit | 1.8 | public | extension is used for manipulation of objects created by adb-bundle dblink | 1.1 | public | connect to other PostgreSQL databases from within a database gp_parallel_retrieve_cursor | 1.0 | pg_catalog | Retrieve results of cursor in parallel gptkh | 0.14 | public | gptkh kadb_fdw | 0.16 | kadb | Kafka-ADB foreign data wrapper plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language pxf | 2.1 | public | Extension which allows to access unmanaged data pxf_fdw | 1.0 | public | PXF Foreign Data Wrapper for Greengage tkh_fdw | 1.0 | public | ClickHouse Foreign Data Wrapper for Greenplum (10 rows) -
You can also check that the new
tkh_fdwforeign data wrapper is available using the following SQL query against thepg_catalog.pg_foreign_data_wrappersystem table:SELECT * FROM pg_catalog.pg_foreign_data_wrapper WHERE fdwname='tkh_fdw';Result:
fdwname | fdwowner | fdwhandler | fdwvalidator | fdwacl | fdwoptions ---------+----------+------------+--------------+--------+---------------------------------------------------------------- tkh_fdw | 10 | 16880 | 16879 | | {protocol=tkh_clickhouse,"mpp_execute=all segments",format=text} (1 row)