XuQianJin-Stars commented on a change in pull request #2831:
URL: https://github.com/apache/iceberg/pull/2831#discussion_r671086236



##########
File path: site/docs/jdbc.md
##########
@@ -0,0 +1,48 @@
+<!--
+ - Licensed to the Apache Software Foundation (ASF) under one or more
+ - contributor license agreements.  See the NOTICE file distributed with
+ - this work for additional information regarding copyright ownership.
+ - The ASF licenses this file to You under the Apache License, Version 2.0
+ - (the "License"); you may not use this file except in compliance with
+ - the License.  You may obtain a copy of the License at
+ -
+ -   http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing, software
+ - distributed under the License is distributed on an "AS IS" BASIS,
+ - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ - See the License for the specific language governing permissions and
+ - limitations under the License.
+ -->
+
+# Iceberg JDBC Integration
+
+## JDBC Catalog
+
+Iceberg supports using a table in a relational database to manage Iceberg 
tables through JDBC.
+The database that JDBC connects to must support atomic transaction to allow 
the JDBC catalog implementation to 
+properly support atomic Iceberg table commits and read serializable isolation.
+
+### Configurations
+
+Because each database and database service provider might require different 
configurations,
+the JDBC catalog allows arbitrary configurations through:
+
+| Property             | Default                           | Description       
                                     |
+| -------------------- | --------------------------------- | 
------------------------------------------------------ |
+| uri                  |                                   | the JDBC 
connection string |
+| jdbc.<property_key\> |                                   | any key value 
pairs to configure the JDBC connection | 
+
+For example, you can start a Spark session with a MySQL JDBC connection using 
the following configurations:

Review comment:
       Is it possible to add here to operate from the jdbc api level?
   ```
   static final String JDBC_DRIVER = "com.mysql.cj.jdbc.Driver";
   static final String DB_URL = "jdbc:mysql://localhost:3306/test";
   
   Class.forName(JDBC_DRIVER);
   Map<String, String> properties = new HashMap<>();
   properties.put(CatalogProperties.URI, DB_URL);
   properties.put(JdbcCatalog.PROPERTY_PREFIX + "user", USER);
   properties.put(JdbcCatalog.PROPERTY_PREFIX + "password", PASSWORD);
   
   properties.put(CatalogProperties.WAREHOUSE_LOCATION, WAREHOUSE_LOCATION);
   JdbcCatalog catalog = new JdbcCatalog();
   Configuration conf = new Configuration();
   catalog.setConf(conf);
   catalog.initialize("test_jdbc_catalog", properties);
   ```




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

Reply via email to