MisterRaindrop commented on code in PR #107:
URL: https://github.com/apache/cloudberry-pxf/pull/107#discussion_r3084615239
##########
docs/content/jdbc_pxf_mysql.html.md.erb:
##########
@@ -145,14 +145,23 @@ This procedure will typically be performed by the
Greenplum Database administrat
Perform the following procedure to create a PXF external table that references
the `names` MySQL table that you created in the previous section, and reads the
data in the table:
-1. Create the PXF external table specifying the `jdbc` profile. For example:
+1. Create the PXF foreign table specifying the `jdbc` profile. For example:
Review Comment:
this is external table,no foreign table
##########
docs/content/jdbc_pxf_mysql.html.md.erb:
##########
@@ -77,27 +77,27 @@ Perform the following steps to create a MySQL table named
`names` in a database
You must create a JDBC server configuration for MySQL, download the MySQL
driver JAR file to your system, copy the JAR file to the PXF user configuration
directory, synchronize the PXF configuration, and then restart PXF.
-This procedure will typically be performed by the Greenplum Database
administrator.
+This procedure will typically be performed by the Apache Cloudberry
administrator.
-1. Log in to the Greenplum Database coordinator host:
+1. Log in to the Apache Cloudberry coordinator host:
``` shell
$ ssh gpadmin@<coordinator>
```
1. Download the MySQL JDBC driver and place it under `$PXF_BASE/lib`. If you
[relocated $PXF_BASE](about_pxf_dir.html#movebase), make sure you use the
updated location. You can download a MySQL JDBC driver from your preferred
download location. The following example downloads the driver from Maven
Central and places it under `$PXF_BASE/lib`:
- 1. If you did not relocate `$PXF_BASE`, run the following from the
Greenplum coordinator:
+ 1. If you did not relocate `$PXF_BASE`, run the following from the
Cloudberry coordinator:
```shell
gpadmin@gcoord$ cd /usr/local/pxf-gp<version>/lib
Review Comment:
gpadmin@coordinator$?
##########
docs/content/jdbc_pxf.html.md.erb:
##########
@@ -251,18 +270,28 @@ You can override certain properties in a JDBC server
configuration for a specifi
| QUERY_TIMEOUT | jdbc.statement.queryTimeout |
| DATE_WIDE_RANGE | jdbc.date.wideRange |
-Example JDBC connection strings specified via custom options:
-
-``` pre
-&JDBC_DRIVER=org.postgresql.Driver&DB_URL=jdbc:postgresql://pgserverhost:5432/pgtestdb&USER=pguser1&PASS=changeme
-&JDBC_DRIVER=com.mysql.jdbc.Driver&DB_URL=jdbc:mysql://mysqlhost:3306/testdb&USER=user1&PASS=changeme
+For foreign tables:
+```sql
+CREATE SERVER "pgserver" FOREIGN DATA WRAPPER jdbc_pxf_fdw
+ OPTIONS (
+ jdbc_driver 'org.postgresql.Driver',
+ db_url 'jdbc:postgresql://pgserverhost:5432/pgtestdb',
+ user 'pxfuser1',
+ pass 'changeme'
+ );
+CREATE USER MAPPING FOR CURRENT_USER SERVER "pgserver";
+CREATE FOREIGN TABLE pxf_pgtbl(name varchar, age int)
+ SERVER "pgserver"
+ OPTIONS (resource 'public.forpxf_table1');
```
-For example:
-<pre>CREATE EXTERNAL TABLE pxf_pgtbl(name text, orders int)
- LOCATION
('pxf://public.forpxf_table1?PROFILE=jdbc<b>&JDBC_DRIVER=org.postgresql.Driver&DB_URL=jdbc:postgresql://pgserverhost:5432/pgtestdb&USER=pxfuser1&PASS=changeme</b>')
-FORMAT 'CUSTOM' (FORMATTER='pxfwritable_export');</pre>
+For external tables:
+```sql
+CREATE EXTERNAL TABLE pxf_pgtbl(name text, orders int)
+ LOCATION
('pxf://public.forpxf_table1?PROFILE=jdbc&JDBC_DRIVER=org.postgresql.Driver&DB_URL=jdbc:postgresql://pgserverhost:5432/pgtestdb&USER=pxfuser1&PASS=changeme')
+FORMAT 'CUSTOM' (FORMATTER='pxfwritable_export');</pre>
Review Comment:
</pre>?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]