ADB ClickHouse Connector installation

To install ADB ClickHouse Connector, follow the steps:

  1. 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.

  2. On the ADB master host, verify that the PXF configuration file (/var/lib/pxf/conf/pxf-profiles.xml) contains the Tkh_clickhouse:text profile.

    <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>
    NOTE

    The directory where PXF configuration files are located is defined by the PXF_BASE environment 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.

  3. To check that the new extensions gptkh, pxf_fdw, tkh_fdw are available, use the psql meta-command \dx:

    \dx

    The output contains the gptkh, pxf_fdw, tkh_fdw extensions:

                                                   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)
  4. You can also check that the new tkh_fdw foreign data wrapper is available using the following SQL query against the pg_catalog.pg_foreign_data_wrapper system 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)
Found a mistake? Seleсt text and press Ctrl+Enter to report it