This article describes how to configure PXF for accessing a Teradata database
[gpadmin@cdw lib]$ cd ${PXF_BASE}/lib
[gpadmin@cdw lib]$ ls -ltr total 5960 -rw-r--r-- 1 gpadmin gpadmin 4036257 Feb 23 2022 ojdbc8.jar -rw-r--r-- 1 gpadmin gpadmin 1159293 Feb 23 2022 terajdbc4.jar -rw-r--r-- 1 gpadmin gpadmin 898868 Mar 1 2022 sqljdbc42.jar drwxr--r-- 2 gpadmin gpadmin 6 Mar 4 2024 native
[gpadmin@cdw lib]$ cd $PXF_BASE}/servers/ [gpadmin@cdw servers]$ ls -ltr total 4 drwxr-xr-x 2 gpadmin gpadmin 44 Feb 25 2022 qdw_test drwxr--r-- 2 gpadmin gpadmin 198 Mar 4 2024 default drwxr-xr-x 2 gpadmin gpadmin 4096 Dec 3 20:01 tera_test
[gpadmin@cdw tera_test]$ cat jdbc-site.xml <property> <name>jdbc.driver</name> <value>com.teradata.jdbc.TeraDriver</value> <description>Class name of the JDBC driver</description> </property> <property> <name>jdbc.url</name> <value>jdbc:teradata://FQDN-of-Teradata-hostname/DATABASE=DBname,SSLMODE=ALLOW,TMODE=TERA,LOGMECH=LDAP,DBS_PORT=PortNumber</value> <description>The URL that the JDBC driver can use to connect to the database</description> </property> <property> <name>jdbc.user</name> <value>teradata user</value> <description>User name for connecting to the database</description> </property> <property> <name>jdbc.password</name> <value>xxxxxxxxx</value> <description>Password for connecting to the database</description> </property> [gpadmin@cdw tera_test]$
gpdb=# \dx List of installed extensions Name | Version | Schema | Description ---------+---------+------------+------------------------------------------------- plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language pxf | 2.1 | public | Extension which allows to access unmanaged data (2 rows) gpdb=# grant select on protocol pxf to user01; GRANT gpdb=# grant insert on protocol pxf to user01; GRANT
[gpadmin@cdw tera_test]$ pxf cluster sync Syncing PXF configuration files from coordinator host to standby coordinator host and 8 segment hosts... [gpadmin@cdw tera_test]$ pxf cluster stop Stopping PXF on coordinator host, standby coordinator host, and 8 segment hosts... PXF stopped successfully on 10 out of 10 hosts [gpadmin@cdw tera_test]$ pxf cluster start Starting PXF on coordinator host, standby coordinator host, and 8 segment hosts... PXF started successfully on 10 out of 10 hosts [gpadmin@cdw tera_test]$
gpdb=# \d tera_btest External table "public.tera_btest" Column | Type | Modifiers --------+------+----------- eff_dt | text | src_id | text | Type: readable Encoding: UTF8 Format type: text Format options: delimiter ' ' null '\N' escape '\' External options: {} External location: pxf://SCHEMA.TABLE?PROFILE=JDBC&SERVER=tera_test Execute on: all segments gpdb=# select * from tera_btest;
See Example: Reading From and Writing to a PostgreSQL Table in the Greenplum documentation for further information.