World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#4760] Improvement (docs): Correct errors in the Trino connector document (#4763)
Yuhui3493c006aab6
diff --git a/docs/trino-connector/catalog-hive.md b/docs/trino-connector/catalog-hive.mdindex 60b2e247e5..72e70d3fd2 100644--- a/docs/trino-connector/catalog-hive.md+++ b/docs/trino-connector/catalog-hive.md@@ -91,7 +91,7 @@ statement.Users can use the following example to create a schema with properties:```sql-CREATE SCHEMA "metalake.catalog".dbname+CREATE SCHEMA catalog.dbnameWITH (location = 'hdfs://hdfs-host:9000/user/hive/warehouse/dbname');@@ -196,7 +196,7 @@ Query 20231017_082503_00018_6nt3n, FINISHED, 1 node```The `gravitino` catalog is a catalog defined By Trino catalog configuration.-The `test.hive_test` catalog is the catalog created by you in Gravitino.+The `hive_test` catalog is the catalog created by you in Gravitino.Other catalogs are regular user-configured Trino catalogs.### Creating tables and schemasdiff --git a/docs/trino-connector/catalog-iceberg.md b/docs/trino-connector/catalog-iceberg.mdindex 4a06267caf..62eac9f47a 100644--- a/docs/trino-connector/catalog-iceberg.md+++ b/docs/trino-connector/catalog-iceberg.md@@ -25,7 +25,7 @@ To use Iceberg, you need:Users can create a schema through Apache Gravitino Trino connector as follows:```SQL-CREATE SCHEMA "metalake.catalog".schema_name+CREATE SCHEMA catalog.schema_name```## Table operations@@ -38,7 +38,7 @@ allowing null values, and adding comments. The Gravitino Trino connector does noThe following example shows how to create a table in the Iceberg catalog:```shell-CREATE TABLE "metalake.catalog".schema_name.table_name+CREATE TABLE catalog.schema_name.table_name(name varchar,salary int@@ -71,12 +71,11 @@ Iceberg schema does not support properties.Users can use the following example to create a table with properties:```sql-CREATE TABLE "metalake.catalog".dbname.tablename+CREATE TABLE catalog.dbname.tablename(name varchar,salary int) WITH (- format = 'TEXTFILE',KEY = 'VALUE',...);@@ -147,7 +146,7 @@ Query 20231017_082503_00018_6nt3n, FINISHED, 1 node```The `gravitino` catalog is a catalog defined By Trino catalog configuration.-The `test.iceberg_test` catalog is the catalog created by you in Gravitino.+The `iceberg_test` catalog is the catalog created by you in Gravitino.Other catalogs are regular user-configured Trino catalogs.### Creating tables and schemas@@ -158,7 +157,7 @@ Create a new schema named `database_01` in `test.iceberg_test` catalog.CREATE SCHEMA iceberg_test.database_01;```-Create a new table named `table_01` in schema `"test.iceberg_test".database_01`.+Create a new table named `table_01` in schema `iceberg_test.database_01`.```sqlCREATE TABLE iceberg_test.database_01.table_01@@ -182,7 +181,7 @@ INSERT INTO iceberg_test.database_01.table_01 (name, salary) VALUES ('ice', 12);Insert data into the table `table_01` from select:```sql-INSERT INTO iceberg_test.database_01.table_01 (name, salary) SELECT * FROM "test.iceberg_test".database_01.table_01;+INSERT INTO iceberg_test.database_01.table_01 (name, salary) SELECT * FROM iceberg_test.database_01.table_01;```### Querying data@@ -190,7 +189,7 @@ INSERT INTO iceberg_test.database_01.table_01 (name, salary) SELECT * FROM "testQuery the `table_01` table:```sql-SELECT * FROM "test.iceberg_test".database_01.table_01;+SELECT * FROM iceberg_test.database_01.table_01;```### Modify a table@@ -198,19 +197,19 @@ SELECT * FROM "test.iceberg_test".database_01.table_01;Add a new column `age` to the `table_01` table:```sql-ALTER TABLE "test.iceberg_test".database_01.table_01 ADD COLUMN age int;+ALTER TABLE iceberg_test.database_01.table_01 ADD COLUMN age int;```Drop a column `age` from the `table_01` table:```sql-ALTER TABLE "test.iceberg_test".database_01.table_01 DROP COLUMN age;+ALTER TABLE iceberg_test.database_01.table_01 DROP COLUMN age;```Rename the `table_01` table to `table_02`:```sql-ALTER TABLE "test.iceberg_test".database_01.table_01 RENAME TO "test.iceberg_test".database_01.table_02;+ALTER TABLE iceberg_test.database_01.table_01 RENAME TO iceberg_test.database_01.table_02;```### Drop@@ -218,13 +217,13 @@ ALTER TABLE "test.iceberg_test".database_01.table_01 RENAME TO "test.iceberg_tesDrop a schema:```sql-DROP SCHEMA "test.iceberg_test".database_01;+DROP SCHEMA iceberg_test.database_01;```Drop a table:```sql-DROP TABLE "test.iceberg_test".database_01.table_01;+DROP TABLE iceberg_test.database_01.table_01;```## HDFS username and permissionsdiff --git a/docs/trino-connector/catalog-mysql.md b/docs/trino-connector/catalog-mysql.mdindex 6cbd6ea43d..131aabdbee 100644--- a/docs/trino-connector/catalog-mysql.md+++ b/docs/trino-connector/catalog-mysql.md@@ -95,7 +95,7 @@ Query 20231017_082503_00018_6nt3n, FINISHED, 1 node```The `gravitino` catalog is a catalog defined By Trino catalog configuration.-The `test.mysql_test` catalog is the catalog created by you in Gravitino.+The `mysql_test` catalog is the catalog created by you in Gravitino.Other catalogs are regular user-configured Trino catalogs.### Creating tables and schemas@@ -155,7 +155,7 @@ ALTER TABLE mysql_test.database_01.table_01 DROP COLUMN age;Rename the `table_01` table to `table_02`:```sql-ALTER TABLE mysql_test.database_01.table_01 RENAME TO "test.mysql_test".database_01.table_02;+ALTER TABLE mysql_test.database_01.table_01 RENAME TO mysql_test.database_01.table_02;```### DROPdiff --git a/docs/trino-connector/catalog-postgresql.md b/docs/trino-connector/catalog-postgresql.mdindex 9ce2876ff5..83968f55fb 100644--- a/docs/trino-connector/catalog-postgresql.md+++ b/docs/trino-connector/catalog-postgresql.md@@ -95,7 +95,7 @@ Query 20231017_082503_00018_6nt3n, FINISHED, 1 node```The `gravitino` catalog is a catalog defined By Trino catalog configuration.-The `test.postgresql_test` catalog is the catalog created by you in Gravitino.+The `postgresql_test` catalog is the catalog created by you in Gravitino.Other catalogs are regular user-configured Trino catalogs.### Creating tables and schemas@@ -106,7 +106,7 @@ Create a new schema named `database_01` in `postgresql_test` catalog.CREATE SCHEMA postgresql_test.database_01;```-Create a new table named `table_01` in schema `"test.postgresql_test".database_01`.+Create a new table named `table_01` in schema `postgresql_test.database_01`.```sqlCREATE TABLE postgresql_test.database_01.table_01@@ -127,7 +127,7 @@ INSERT INTO postgresql_test.database_01.table_01 (name, salary) VALUES ('ice', 1Insert data into the table `table_01` from select:```sql-INSERT INTO postgresql_test.database_01.table_01 (name, salary) SELECT * FROM "test.postgresql_test".database_01.table_01;+INSERT INTO postgresql_test.database_01.table_01 (name, salary) SELECT * FROM postgresql_test.database_01.table_01;```### Querying data@@ -155,7 +155,7 @@ ALTER TABLE postgresql_test.database_01.table_01 DROP COLUMN age;Rename the `table_01` table to `table_02`:```sql-ALTER TABLE postgresql_test.database_01.table_01 RENAME TO "test.postgresql_test".database_01.table_02;+ALTER TABLE postgresql_test.database_01.table_01 RENAME TO postgresql_test.database_01.table_02;```### Dropdiff --git a/docs/trino-connector/development.md b/docs/trino-connector/development.mdindex 509a44a0f5..6b1fb79ffe 100644--- a/docs/trino-connector/development.md+++ b/docs/trino-connector/development.md@@ -70,15 +70,53 @@ then you can see the `gravitino-trino-connecor` source files and directories in</properties><dependencies>++ <!--+ You can switch to the snapshot version as you like, for example,+ if you want to use the jar of latest main branch,+ you can execute the following command to install Gravitino `client-java-runtime` jar locally.+ ./gradlew publishToMavenLocal+ -->+ <dependency>+ <groupId>org.apache.gravitino</groupId>+ <artifactId>catalog-common</artifactId>+ <version><GRAVITINO_VERSION></version>+ <exclusions>+ <exclusion>+ <groupId>io.dropwizard.metrics</groupId>+ <artifactId>metrics-core</artifactId>+ </exclusion>+ <exclusion>+ <groupId>io.netty</groupId>+ <artifactId>netty</artifactId>+ </exclusion>+ <exclusion>+ <groupId>org.apache.logging.log4j</groupId>+ <artifactId>log4j-core</artifactId>+ </exclusion>+ </exclusions>+ </dependency>++ <dependency>+ <groupId>org.apache.gravitino</groupId>+ <artifactId>client-java-runtime</artifactId>+ <version><GRAVITINO_VERSION></version>+ </dependency>+<dependency><groupId>io.airlift</groupId><artifactId>json</artifactId></dependency>+ <dependency>+ <groupId>io.airlift.resolver</groupId>+ <artifactId>resolver</artifactId>+ <version>1.6</version>+ </dependency>+<dependency><groupId>io.trino</groupId>- <artifactId>trino-spi</artifactId>- <scope>provided</scope>+ <artifactId>trino-client</artifactId></dependency><dependency>@@ -87,8 +125,14 @@ then you can see the `gravitino-trino-connecor` source files and directories in</dependency><dependency>- <groupId>io.trino</groupId>- <artifactId>trino-client</artifactId>+ <groupId>joda-time</groupId>+ <artifactId>joda-time</artifactId>+ </dependency>++ <dependency>+ <groupId>org.apache.commons</groupId>+ <artifactId>commons-collections4</artifactId>+ <version>4.4</version></dependency><dependency>@@ -97,50 +141,51 @@ then you can see the `gravitino-trino-connecor` source files and directories in</dependency><dependency>- <groupId>com.fasterxml.jackson.core</groupId>- <artifactId>jackson-annotations</artifactId>- <scope>provided</scope>+ <groupId>org.codehaus.plexus</groupId>+ <artifactId>plexus-xml</artifactId>+ <version>4.0.2</version></dependency><dependency>- <groupId>io.trino</groupId>- <artifactId>trino-jdbc</artifactId>+ <groupId>org.slf4j</groupId>+ <artifactId>slf4j-api</artifactId>+ <version>2.0.9</version></dependency><dependency>- <groupId>org.apache.commons</groupId>- <artifactId>commons-collections4</artifactId>- <version>4.4</version>+ <groupId>org.apache.logging.log4j</groupId>+ <artifactId>log4j-slf4j2-impl</artifactId>+ <version>2.22.0</version></dependency><dependency>- <groupId>org.slf4j</groupId>- <artifactId>slf4j-api</artifactId>- <version>1.7.32</version>+ <groupId>org.apache.logging.log4j</groupId>+ <artifactId>log4j-api</artifactId>+ <version>2.22.0</version></dependency><dependency>- <groupId>org.slf4j</groupId>- <artifactId>slf4j-simple</artifactId>- <version>2.0.9</version>+ <groupId>org.apache.logging.log4j</groupId>+ <artifactId>log4j-core</artifactId>+ <version>2.22.0</version></dependency>- <!--- You can switch to the snapshot version as you like, for example,- if you want to use the jar of latest main branch,- you can execute the following command to install Gravitino `client-java-runtime` jar locally.- ./gradlew publishToMavenLocal- --><dependency>- <groupId>org.apache.gravitino</groupId>- <artifactId>client-java-runtime</artifactId>- <version>0.5.1</version>+ <groupId>com.fasterxml.jackson.core</groupId>+ <artifactId>jackson-annotations</artifactId>+ <scope>provided</scope></dependency><dependency>- <groupId>org.apache.gravitino</groupId>- <artifactId>bundled-catalog</artifactId>- <version>0.5.1</version>+ <groupId>io.opentelemetry</groupId>+ <artifactId>opentelemetry-api</artifactId>+ <scope>provided</scope>+ </dependency>++ <dependency>+ <groupId>io.trino</groupId>+ <artifactId>trino-spi</artifactId>+ <scope>provided</scope></dependency></dependencies>