FANNG1 commented on code in PR #4284:
URL: https://github.com/apache/gravitino/pull/4284#discussion_r1695126958


##########
docs/flink-connector/flink-connector.md:
##########
@@ -0,0 +1,93 @@
+---
+title: "Apache Gravitino Flink connector"
+slug: /flink-connector/flink-connector
+keyword: flink connector federation query 
+license: "This software is licensed under the Apache License version 2."
+---
+
+## Overview
+
+The Apache Gravitino Flink connector implements the [Catalog 
Store](https://nightlies.apache.org/flink/flink-docs-release-1.18/docs/dev/table/catalogs/#catalog-store)
 to manage the catalogs under Gravitino. 
+This capability allows users to perform federation queries, accessing data 
from various catalogs through a unified interface and consistent access control.
+
+## Capabilities
+
+1. Supports [Hive catalog](flink-catalog-hive.md)
+2. Supports most DDL and DML SQLs.
+
+## Requirement
+
+* Flink 1.18
+* Scala 2.12
+* JDK 8 or 11 or 17
+
+## How to use it
+
+1. [Build](../how-to-build.md) or 
[download](https://mvnrepository.com/artifact/org.apache.gravitino/flink-connector)
 the Gravitino flink connector jar, and place it to the classpath of Flink.
+2. Configure the Flink configuration to use the Gravitino flink connector.
+
+| Property                                         | Type   | Default Value    
 | Description                                                          | 
Required | Since Version |
+|--------------------------------------------------|--------|-------------------|----------------------------------------------------------------------|----------|---------------|
+| table.catalog-store.kind                         | string | 
generic_in_memory | The Catalog Store name, it should set to `gravitino`.       
         | Yes      | 0.6.0         |
+| table.catalog-store.gravitino.gravitino.metalake | string | (none)           
 | The metalake name that flink connector used to request to Gravitino. | Yes   
   | 0.6.0         |
+| table.catalog-store.gravitino.gravitino.uri      | string | (none)           
 | The uri of Gravitino server address.                                 | Yes   
   | 0.6.0         |
+
+Set the flink configuration in flink-conf.yaml.
+```yaml
+table.catalog-store.kind=gravitino
+table.catalog-store.gravitino.gravitino.metalake=test
+table.catalog-store.gravitino.gravitino.uri=http://localhost:8080
+```
+Or you can set the flink configuration in the `TableEnvironment`.
+```java
+final Configuration configuration = new Configuration();
+configuration.setString("table.catalog-store.kind", "gravitino");
+configuration.setString("table.catalog-store.gravitino.gravitino.metalake", 
"test");
+configuration.setString("table.catalog-store.gravitino.gravitino.uri", 
"http://localhost:8080";);
+EnvironmentSettings.Builder builder = 
EnvironmentSettings.newInstance().withConfiguration(configuration);
+TableEnvironment tableEnv = 
TableEnvironment.create(builder.inBatchMode().build());
+```
+
+3. Execute the Flink SQL query. 
+
+There are only one catalog in the metalake `test`.

Review Comment:
   Suppose there is only one hive catalog with the name `hive` in the metalake 
`test`?



-- 
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]

Reply via email to