Tkhemali connector 1.X installation

To install Tkhemali connector 1.X, follow the steps:

  1. Make sure that PXF and Tkhemali services are installed. For information on how to add services to ADB clusters, see Add services.

  2. Add the new custom profile TKH to the PXF configuration file /var/lib/pxf/conf/pxf-profiles.xml on Master. To edit the file, you can use the vi or vim command:

    $ sudo vi /var/lib/pxf/conf/pxf-profiles.xml

    The content of the changed file can look as follows. In our case, the file does not contain other profiles:

                <!-- distribution parameters -->
                <mapping option="distribution" property="clickhouse.distribution"/>
                <mapping option="url" property="clickhouse.dist.simple.url"/>
                <mapping option="gp_url" property=""/>
                <mapping option="gp_user" property=""/>
                <mapping option="gp_password" property=""/>
                <mapping option="gp_request" property=""/>
                <!-- common parameters -->
                <mapping option="send_delay" property="clickhouse.send.delay"/>
                <mapping option="lines_batch_size" property="clickhouse.lines.batch.size"/>
                <mapping option="bytes_batch_size_mb" property="clickhouse.bytes.batch.size.mb"/>
                <!-- connection and query parameters -->
                <mapping option="send_compressed" property="clickhouse.connection.decompress"/>
                <mapping option="insert_distributed_sync" property="clickhouse.connection.insert_distributed_sync"/>

    The directory, where PXF configuration files are located, is defined by the $PXF_BASE environment variable. The default value is /var/lib/pxf. The path may differ in your environment.

  3. Login under the default user name gpadmin. All the commands listed in the subsequent steps should be performed on Master:

    $ sudo su - gpadmin
  4. Synchronize the PXF configuration to all hosts in the ADB cluster:

    $ pxf cluster sync

    The result:

    Syncing PXF configuration files from master host to standby master host and 2 segment hosts...
    PXF configs synced successfully on 3 out of 3 hosts
  5. Restart PXF:

    $ pxf cluster restart

    The result:

    Restarting PXF on master host, standby master host, and 2 segment hosts...
    PXF restarted successfully on 4 out of 4 hosts
  6. Connect to the database via psql (or any other client program):

    $ psql adb
  7. To check that the new extension gptkh is available, use the psql meta-command \dx:


    The output contains the gptkh extension:

                                          List of installed extensions
       Name    | Version |   Schema   |                             Description
     dblink    | 1.1     | public     | connect to other PostgreSQL databases from within a database
     diskquota | 2.2     | public     | Disk Quota Main Program
     gptkh     | 0.14    | public     | gptkh
     kadb_fdw  | 0.16    | kadb       | Kafka-ADB foreign data wrapper
     plpgsql   | 1.0     | pg_catalog | PL/pgSQL procedural language
     postgis   | 2.5.4   | public     | PostGIS geometry, geography, and raster spatial types and functions
     pxf       | 2.0     | public     | Extension which allows to access unmanaged data
    (7 rows)
Found a mistake? Seleсt text and press Ctrl+Enter to report it