You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ya...@apache.org on 2022/07/27 09:05:47 UTC

[incubator-kyuubi] branch master updated: [KYUUBI #3082] Add iceberg connector doc for Trino SQL Engine

This is an automated email from the ASF dual-hosted git repository.

yao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new 60cb4bd09 [KYUUBI #3082] Add iceberg connector doc for Trino SQL Engine
60cb4bd09 is described below

commit 60cb4bd09fd2745e17401002899fca4228378f81
Author: Luning Wang <wa...@gmail.com>
AuthorDate: Wed Jul 27 17:05:39 2022 +0800

    [KYUUBI #3082] Add iceberg connector doc for Trino SQL Engine
    
    ### _Why are the changes needed?_
    
    Add iceberg connector doc for Trino SQL Engine.
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
    
    Closes #3130 from deadwind4/iceberg-trino-doc.
    
    Closes #3082
    
    2f11524c [Luning Wang] [KYUUBI #3082] Add iceberg connector doc for Trino SQL Engine
    
    Authored-by: Luning Wang <wa...@gmail.com>
    Signed-off-by: Kent Yao <ya...@apache.org>
---
 docs/connector/index.rst             |  5 ++
 docs/connector/trino/iceberg.rst     | 92 ++++++++++++++++++++++++++++++++++++
 docs/connector/{ => trino}/index.rst | 21 ++------
 3 files changed, 100 insertions(+), 18 deletions(-)

diff --git a/docs/connector/index.rst b/docs/connector/index.rst
index b04aa878b..f7911e6fe 100644
--- a/docs/connector/index.rst
+++ b/docs/connector/index.rst
@@ -35,3 +35,8 @@ This section describes the connectors available for different kyuubi engines to
     :maxdepth: 2
 
     hive/index
+
+.. toctree::
+    :maxdepth: 2
+
+    trino/index
diff --git a/docs/connector/trino/iceberg.rst b/docs/connector/trino/iceberg.rst
new file mode 100644
index 000000000..6fc09bc95
--- /dev/null
+++ b/docs/connector/trino/iceberg.rst
@@ -0,0 +1,92 @@
+.. 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`_
+==========
+
+Apache Iceberg is an open table format for huge analytic datasets.
+Iceberg adds tables to compute engines including Spark, Trino, PrestoDB, Flink, Hive and Impala
+using a high-performance table format that works just like a SQL table.
+
+.. tip::
+   This article assumes that you have mastered the basic knowledge and operation of `Iceberg`_.
+   For the knowledge about Iceberg not mentioned in this article,
+   you can obtain it from its `Official Documentation`_.
+
+By using kyuubi, we can run SQL queries towards Iceberg which is more
+convenient, easy to understand, and easy to expand than directly using
+Trino to manipulate Iceberg.
+
+Iceberg Integration
+-------------------
+
+To enable the integration of kyuubi trino sql engine and Iceberg through Catalog APIs, you need to:
+
+- Setting the Trino extension and catalog :ref:`configurations`
+
+.. _configurations:
+
+Configurations
+**************
+
+To activate functionality of Iceberg, we can set the following configurations:
+
+.. code-block:: properties
+
+   connector.name=iceberg
+   hive.metastore.uri=thrift://localhost:9083
+
+Iceberg Operations
+------------------
+
+Taking ``CREATE TABLE`` as a example,
+
+.. code-block:: sql
+
+   CREATE TABLE orders (
+     orderkey bigint,
+     orderstatus varchar,
+     totalprice double,
+     orderdate date
+   ) WITH (
+     format = 'ORC'
+   );
+
+Taking ``SELECT`` as a example,
+
+.. code-block:: sql
+
+   SELECT * FROM new_orders;
+
+Taking ``INSERT`` as a example,
+
+.. code-block:: sql
+
+   INSERT INTO cities VALUES (1, 'San Francisco');
+
+Taking ``UPDATE`` as a example,
+
+.. code-block:: sql
+
+   UPDATE purchases SET status = 'OVERDUE' WHERE ship_date IS NULL;
+
+Taking ``DELETE FROM`` as a example,
+
+.. code-block:: sql
+
+   DELETE FROM lineitem WHERE shipmode = 'AIR';
+
+.. _Iceberg: https://iceberg.apache.org/
+.. _Official Documentation: https://trino.io/docs/current/connector/iceberg.html#
diff --git a/docs/connector/index.rst b/docs/connector/trino/index.rst
similarity index 67%
copy from docs/connector/index.rst
copy to docs/connector/trino/index.rst
index b04aa878b..5d33f863e 100644
--- a/docs/connector/index.rst
+++ b/docs/connector/trino/index.rst
@@ -13,25 +13,10 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 
-Connectors
-==========
-
-This section describes the connectors available for different kyuubi engines to access data from various data sources.
-
-.. note:: Is your connector missing?
-   `Report an feature request <https://kyuubi.apache.org/issue_tracking.html>`_ or help us document it.
-
-.. toctree::
-    :maxdepth: 2
-
-    spark/index
-
-.. toctree::
-    :maxdepth: 2
-
-    flink/index
+Connectors For Trino SQL Engine
+=====================================
 
 .. toctree::
     :maxdepth: 2
 
-    hive/index
+    iceberg
\ No newline at end of file