World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#2989] improvement(docs): Simplify catalog name in Trino server (#2990)
Qi Yu354a9c2c5db5
diff --git a/docs/trino-connector/catalog-hive.md b/docs/trino-connector/catalog-hive.mdindex 70a9ef74e0..f86c9f8e13 100644--- a/docs/trino-connector/catalog-hive.md+++ b/docs/trino-connector/catalog-hive.md@@ -44,7 +44,7 @@ per catalog:Users can create a schema with properties through Gravitino Trino connector as follows:```SQL-CREATE SCHEMA "metalake.catalog".schema_name+CREATE SCHEMA catalog.schema_name```## Table operations@@ -57,7 +57,7 @@ allowing null values, and adding comments. The Gravitino connector does not suppThe following example shows how to create a table in the Hive catalog:```shell-CREATE TABLE "metalake.catalog".schema_name.table_name+CREATE TABLE catalog.schema_name.table_name(name varchar,salary int@@ -112,7 +112,7 @@ Reserved properties: A reserved property is one can't be set by users but can beUsers can use the following example to create a table with properties:```sql-CREATE TABLE "metalake.catalog".dbname.tabname+CREATE TABLE catalog.dbname.tabname(name varchar,salary int@@ -190,7 +190,7 @@ The results are similar to:gravitinojmxsystem- test.hive_test+ hive_test(4 rows)Query 20231017_082503_00018_6nt3n, FINISHED, 1 node@@ -202,24 +202,24 @@ Other catalogs are regular user-configured Trino catalogs.### Creating tables and schemas-Create a new schema named `database_01` in `test.hive_test` catalog.+Create a new schema named `database_01` in `hive_test` catalog.```sql-CREATE SCHEMA "test.hive_test".database_01;+CREATE SCHEMA hive_test.database_01;```Create a new schema using HDFS location:```sql-CREATE SCHEMA "test.hive_test".database_01 WITH (+CREATE SCHEMA hive_test.database_01 WITH (location = 'hdfs://hdfs-host:9000/user/hive/warehouse/database_01');```-Create a new table named `table_01` in schema `"test.hive_test".database_01` and stored in a TEXTFILE format, partitioning by `salary`, bucket by `name` and sorted by `salary`.+Create a new table named `table_01` in schema `hive_test.database_01` and stored in a TEXTFILE format, partitioning by `salary`, bucket by `name` and sorted by `salary`.```sql-CREATE TABLE "test.hive_test".database_01.table_01+CREATE TABLE hive_test.database_01.table_01(name varchar,salary int@@ -238,13 +238,13 @@ WITH (Insert data into the table `table_01`:```sql-INSERT INTO "test.hive_test".database_01.table_01 (name, salary) VALUES ('ice', 12);+INSERT INTO hive_test.database_01.table_01 (name, salary) VALUES ('ice', 12);```Insert data into the table `table_01` from select:```sql-INSERT INTO "test.hive_test".database_01.table_01 (name, salary) SELECT * FROM "test.hive_test".database_01.table_01;+INSERT INTO hive_test.database_01.table_01 (name, salary) SELECT * FROM hive_test.database_01.table_01;```### Querying data@@ -252,7 +252,7 @@ INSERT INTO "test.hive_test".database_01.table_01 (name, salary) SELECT * FROM "Query the `table_01` table:```sql-SELECT * FROM "test.hive_test".database_01.table_01;+SELECT * FROM hive_test.database_01.table_01;```### Modify a table@@ -260,19 +260,19 @@ SELECT * FROM "test.hive_test".database_01.table_01;Add a new column `age` to the `table_01` table:```sql-ALTER TABLE "test.hive_test".database_01.table_01 ADD COLUMN age int;+ALTER TABLE hive_test.database_01.table_01 ADD COLUMN age int;```Drop a column `age` from the `table_01` table:```sql-ALTER TABLE "test.hive_test".database_01.table_01 DROP COLUMN age;+ALTER TABLE hive_test.database_01.table_01 DROP COLUMN age;```Rename the `table_01` table to `table_02`:```sql-ALTER TABLE "test.hive_test".database_01.table_01 RENAME TO "test.hive_test".database_01.table_02;+ALTER TABLE hive_test.database_01.table_01 RENAME TO hive_test.database_01.table_02;```### DROP@@ -280,13 +280,13 @@ ALTER TABLE "test.hive_test".database_01.table_01 RENAME TO "test.hive_test".datDrop a schema:```sql-DROP SCHEMA "test.hive_test".database_01;+DROP SCHEMA hive_test.database_01;```Drop a table:```sql-DROP TABLE "test.hive_test".database_01.table_01;+DROP TABLE hive_test.database_01.table_01;```## HDFS config and permissionsdiff --git a/docs/trino-connector/catalog-iceberg.md b/docs/trino-connector/catalog-iceberg.mdindex 03903f9bd4..033e3d8938 100644--- a/docs/trino-connector/catalog-iceberg.md+++ b/docs/trino-connector/catalog-iceberg.md@@ -141,7 +141,7 @@ The results are similar to:gravitinojmxsystem- test.iceberg_test+ iceberg_test(4 rows)Query 20231017_082503_00018_6nt3n, FINISHED, 1 node@@ -156,13 +156,13 @@ Other catalogs are regular user-configured Trino catalogs.Create a new schema named `database_01` in `test.iceberg_test` catalog.```sql-CREATE SCHEMA "test.iceberg_test".database_01;+CREATE SCHEMA iceberg_test.database_01;```Create a new table named `table_01` in schema `"test.iceberg_test".database_01`.```sql-CREATE TABLE "test.iceberg_test".database_01.table_01+CREATE TABLE iceberg_test.database_01.table_01(name varchar,salary int@@ -177,13 +177,13 @@ salary intInsert data into the table `table_01`:```sql-INSERT INTO "test.iceberg_test".database_01.table_01 (name, salary) VALUES ('ice', 12);+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 "test.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 "test.iceberg_test".database_01.table_01;```### Querying datadiff --git a/docs/trino-connector/catalog-mysql.md b/docs/trino-connector/catalog-mysql.mdindex ce0b129818..0219b3e04c 100644--- a/docs/trino-connector/catalog-mysql.md+++ b/docs/trino-connector/catalog-mysql.md@@ -90,7 +90,7 @@ The results are similar to:gravitinojmxsystem- test.mysql_test+ mysql_test(4 rows)Query 20231017_082503_00018_6nt3n, FINISHED, 1 node@@ -105,13 +105,13 @@ Other catalogs are regular user-configured Trino catalogs.Create a new schema named `database_01` in `test.mysql_test` catalog.```sql-CREATE SCHEMA "test.mysql_test".database_01;+CREATE SCHEMA mysql_test.database_01;```-Create a new table named `table_01` in schema `"test.mysql_test".database_01`.+Create a new table named `table_01` in schema `mysql_test.database_01`.```sql-CREATE TABLE "test.mysql_test".database_01.table_01+CREATE TABLE mysql_test.database_01.table_01(name varchar,salary int@@ -123,13 +123,13 @@ salary intInsert data into the table `table_01`:```sql-INSERT INTO "test.mysql_test".database_01.table_01 (name, salary) VALUES ('ice', 12);+INSERT INTO mysql_test.database_01.table_01 (name, salary) VALUES ('ice', 12);```Insert data into the table `table_01` from select:```sql-INSERT INTO "test.mysql_test".database_01.table_01 (name, salary) SELECT * FROM "test.mysql_test".database_01.table_01;+INSERT INTO mysql_test.database_01.table_01 (name, salary) SELECT * FROM "test.mysql_test".database_01.table_01;```### Querying data@@ -137,7 +137,7 @@ INSERT INTO "test.mysql_test".database_01.table_01 (name, salary) SELECT * FROMQuery the `table_01` table:```sql-SELECT * FROM "test.mysql_test".database_01.table_01;+SELECT * FROM mysql_test.database_01.table_01;```### Modify a table@@ -145,19 +145,19 @@ SELECT * FROM "test.mysql_test".database_01.table_01;Add a new column `age` to the `table_01` table:```sql-ALTER TABLE "test.mysql_test".database_01.table_01 ADD COLUMN age int;+ALTER TABLE mysql_test.database_01.table_01 ADD COLUMN age int;```Drop a column `age` from the `table_01` table:```sql-ALTER TABLE "test.mysql_test".database_01.table_01 DROP COLUMN age;+ALTER TABLE mysql_test.database_01.table_01 DROP COLUMN age;```Rename the `table_01` table to `table_02`:```sql-ALTER TABLE "test.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 "test.mysql_test".database_01.table_02;```### DROP@@ -165,11 +165,11 @@ ALTER TABLE "test.mysql_test".database_01.table_01 RENAME TO "test.mysql_test".dDrop a schema:```sql-DROP SCHEMA "test.mysql_test".database_01;+DROP SCHEMA mysql_test.database_01;```Drop a table:```sql-DROP TABLE "test.mysql_test".database_01.table_01;+DROP TABLE mysql_test.database_01.table_01;```\ No newline at end of filediff --git a/docs/trino-connector/catalog-postgresql.md b/docs/trino-connector/catalog-postgresql.mdindex ac595b07af..66b03a92b3 100644--- a/docs/trino-connector/catalog-postgresql.md+++ b/docs/trino-connector/catalog-postgresql.md@@ -90,7 +90,7 @@ The results are similar to:gravitinojmxsystem- test.postgresql_test+ postgresql_test(4 rows)Query 20231017_082503_00018_6nt3n, FINISHED, 1 node@@ -102,16 +102,16 @@ Other catalogs are regular user-configured Trino catalogs.### Creating tables and schemas-Create a new schema named `database_01` in `test.postgresql_test` catalog.+Create a new schema named `database_01` in `postgresql_test` catalog.```sql-CREATE SCHEMA "test.postgresql_test".database_01;+CREATE SCHEMA postgresql_test.database_01;```Create a new table named `table_01` in schema `"test.postgresql_test".database_01`.```sql-CREATE TABLE "test.postgresql_test".database_01.table_01+CREATE TABLE postgresql_test.database_01.table_01(name varchar,salary int@@ -123,13 +123,13 @@ salary intInsert data into the table `table_01`:```sql-INSERT INTO "test.postgresql_test".database_01.table_01 (name, salary) VALUES ('ice', 12);+INSERT INTO postgresql_test.database_01.table_01 (name, salary) VALUES ('ice', 12);```Insert data into the table `table_01` from select:```sql-INSERT INTO "test.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 "test.postgresql_test".database_01.table_01;```### Querying data@@ -137,7 +137,7 @@ INSERT INTO "test.postgresql_test".database_01.table_01 (name, salary) SELECT *Query the `table_01` table:```sql-SELECT * FROM "test.postgresql_test".database_01.table_01;+SELECT * FROM postgresql_test.database_01.table_01;```### Modify a table@@ -145,19 +145,19 @@ SELECT * FROM "test.postgresql_test".database_01.table_01;Add a new column `age` to the `table_01` table:```sql-ALTER TABLE "test.postgresql_test".database_01.table_01 ADD COLUMN age int;+ALTER TABLE postgresql_test.database_01.table_01 ADD COLUMN age int;```Drop a column `age` from the `table_01` table:```sql-ALTER TABLE "test.postgresql_test".database_01.table_01 DROP COLUMN age;+ALTER TABLE postgresql_test.database_01.table_01 DROP COLUMN age;```Rename the `table_01` table to `table_02`:```sql-ALTER TABLE "test.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 "test.postgresql_test".database_01.table_02;```### Drop@@ -165,11 +165,11 @@ ALTER TABLE "test.postgresql_test".database_01.table_01 RENAME TO "test.postgresDrop a schema:```sql-DROP SCHEMA "test.postgresql_test".database_01;+DROP SCHEMA postgresql_test.database_01;```Drop a table:```sql-DROP TABLE "test.postgresql_test".database_01.table_01;+DROP TABLE postgresql_test.database_01.table_01;```\ No newline at end of filediff --git a/docs/trino-connector/configuration.md b/docs/trino-connector/configuration.mdindex cd1e4c6684..1b6bf02d8e 100644--- a/docs/trino-connector/configuration.md+++ b/docs/trino-connector/configuration.md@@ -6,9 +6,9 @@ license: "Copyright 2023 Datastrato Pvt Ltd.This software is licensed under the Apache License version 2."----| Property | Type | Default Value | Description | Required | Since Version |+| Property | Type | Default Value | Description | Required | Since Version ||-----------------------------------|---------|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|---------------|-| connector.name | string | (none) | The `connector.name` defines the name of Trino connector, this value is always 'gravitino'. | Yes | 0.2.0 |+| connector.name | string | (none) | The `connector.name` defines the type of Trino connector, this value is always 'gravitino'. | Yes | 0.2.0 || gravitino.metalake | string | (none) | The `gravitino.metalake` defines which metalake in Gravitino server the Trino connector uses. Trino connector should set it at start, the value of `gravitino.metalake` needs to be a valid name, Trino connector can detect and load the metalake with catalogs, schemas and tables once created and keep in sync. | Yes | 0.2.0 || gravitino.uri | string | http://localhost:8090 | The `gravitino.uri` defines the connection URL of the Gravitino server, the default value is `http://localhost:8090`. Trino connector can detect and connect to Gravitino server once it is ready, no need to start Gravitino server beforehand. | Yes | 0.2.0 |-| gravitino.simplify-catalog-names | boolean | true | The `gravitino.simplify-catalog-names` setting omits the metalake prefix from catalog names when set to true. If you set it to true, Trino will configure only one Graviton catalog. | NO | 0.5.0 |+| gravitino.simplify-catalog-names | boolean | true | The `gravitino.simplify-catalog-names` setting omits the metalake prefix from catalog names when set to true. | NO | 0.5.0 |diff --git a/docs/trino-connector/development.md b/docs/trino-connector/development.mdindex 1c7a7b167a..c1393e14c8 100644--- a/docs/trino-connector/development.md+++ b/docs/trino-connector/development.md@@ -249,6 +249,7 @@ gravitino.uri=http://localhost:8090# The name of the metalake to which the connector is connected, you need to change it according to your environmentgravitino.metalake=test+```- Trino configuration file: `config.properties````propertiesdiff --git a/docs/trino-connector/installation.md b/docs/trino-connector/installation.mdindex 707d1d3802..2fb44c53c3 100644--- a/docs/trino-connector/installation.md+++ b/docs/trino-connector/installation.md@@ -74,11 +74,13 @@ To configure Gravitino connector correctly, you need to put the following configconnector.name=gravitinogravitino.uri=http://gravitino-server-host:8090gravitino.metalake=test+gravitino.simplify-catalog-names=true```- The `gravitino.name` defines which Gravitino connector is used. It must be `gravitino`.- The `gravitino.metalake` defines which metalake are used. It should exist in the Gravitino server.- The `gravitino.uri` defines the connection information about Gravitino server. Make sure your container can access the Gravitino server.+- The `gravitino.simplify-catalog-names` setting omits the metalake prefix from catalog names when set to true.Full configurations for Gravitino connector can be seen [here](configuration.md)@@ -126,7 +128,7 @@ memorytpcdstpchsystem-test.jdbc-mysql+jdbc-mysql```-The catalog named 'test.jdbc-mysql' is the catalog that you created by gravitino server, and you can use it to access the mysql database like other Trino catalogs.+The catalog named 'jdbc-mysql' is the catalog that you created by gravitino server, and you can use it to access the mysql database like other Trino catalogs.diff --git a/docs/trino-connector/supported-catalog.md b/docs/trino-connector/supported-catalog.mdindex b578e668a5..158002c469 100644--- a/docs/trino-connector/supported-catalog.md+++ b/docs/trino-connector/supported-catalog.md@@ -75,7 +75,7 @@ The result is like:```testname | provider | properties--------------+----------+-------------------------------------------------------------------------------------------------------------- test.gt_hive | hive | {gravitino.bypass.hive.metastore.client.capability.check=false, metastore.uris=thrift://trino-ci-hive:9083}+ gt_hive | hive | {gravitino.bypass.hive.metastore.client.capability.check=false, metastore.uris=thrift://trino-ci-hive:9083}```Example:diff --git a/docs/trino-connector/trino-connector.md b/docs/trino-connector/trino-connector.mdindex 1858d69596..648fc57903 100644--- a/docs/trino-connector/trino-connector.md+++ b/docs/trino-connector/trino-connector.md@@ -15,17 +15,14 @@ Once metadata such as catalogs, schemas, or tables are changed in Gravitino, Triabout 3~10 seconds.:::-The loading of Gravitino's catalogs into Trino follows the naming convention:+By default, the loading of Gravitino's catalogs into Trino follows the naming convention:```text-{metalake}.{catalog}+{catalog}```-Regarding `metalake` and `catalog`,-you can refer to [Create a Metalake](../manage-relational-metadata-using-gravitino.md#create-a-metalake), [Create a Catalog](../manage-relational-metadata-using-gravitino.md#create-a-catalog).-Usage in queries is as follows:```text-SELECT * from "metalake.catalog".dbname.tabname+SELECT * from catalog.dbname.tabname```