🦊 Welcome to Kyuubi’s online documentation ✨, v1.7.0
logo

Admin Guide

  • Quick Start
    • Getting Started
    • Getting Started With Kyuubi on Kubernetes
    • Getting Started With Hive JDBC
  • Deploying Kyuubi
    • Deploy Kyuubi On Kubernetes
    • Integration with Hive Metastore
    • Kyuubi High Availability Guide
    • Kyuubi Migration Guide
    • Introduction to the Kyuubi Configurations System
    • Deploy Kyuubi engines on Yarn
    • Deploy Kyuubi engines on Kubernetes
    • The Share Level Of Kyuubi Engines
    • The TTL Of Kyuubi Engines
    • The Spark SQL Engine Configuration Guide
      • How To Use Spark Dynamic Resource Allocation (DRA) in Kyuubi
      • How To Use Spark Adaptive Query Execution (AQE) in Kyuubi
      • Solution for Big Result Sets
  • Security
    • Authentication
      • Configure Kyuubi to use Kerberos Authentication
      • Configure Kerberos for clients to Access Kerberized Kyuubi
      • Configure Kyuubi to use LDAP Authentication
      • Configure Kyuubi to Use JDBC Authentication
      • Configure Kyuubi to use Custom Authentication
    • Authorization
      • Spark AuthZ Plugin
        • Overview
        • Building
        • Installing
    • Kinit Auxiliary Service
    • Hadoop Credentials Manager
  • Monitoring
    • 1. Monitoring Kyuubi - Logging System
    • 2. Monitoring Kyuubi - Server Metrics
    • 3. Trouble Shooting
  • Tools
    • Kubernetes Tools Spark Block Cleaner
    • Managing kyuubi servers and engines Tool
    • Kyuubi Administer Tool

User Guide

  • Clients & APIs
    • JDBC Drivers
      • Kyuubi Hive JDBC Driver
      • Hive JDBC Driver
      • MySQL Connectors
      • Trino JDBC Driver
    • Command Line Interface(CLI)s
      • Kyuubi Beeline
      • Hive Beeline
      • Trino command line interface
    • Business Intelligence Tools and SQL IDEs
      • Apache Superset
      • Cloudera Hue
      • DataGrip
      • DBeaver
      • PowerBI
      • Tableau
    • ODBC Drivers
    • Thrift APIs
    • RESTful APIs and Clients
      • REST API v1
    • Web UI
    • Python
      • PyHive
      • PySpark
    • Client Commons
      • Client Configuration Guide
      • Logging
      • Configure Kerberos for clients to Access Kerberized Kyuubi
      • Advanced Features
        • Using Different Kyuubi Engines
        • Sharing and Isolation for Kyuubi Engines
        • Setting Time to Live for Kyuubi Engines
        • Enabling Kyuubi Engine Pool
        • Running Scala Snippets
        • Plan Only Execution Mode

Extension Guide

  • Extensions
    • Server Side Extensions
      • Configure Kyuubi to use Custom Authentication
      • Inject Session Conf with Custom Config Advisor
      • Configure Kyuubi to use Custom EventHandler
      • Manage Applications against Extra Cluster Managers
    • Engine Side Extensions
      • Extensions for Spark
        • Z-Ordering Support
        • Auxiliary Optimization Rules
        • Kyuubi Spark AuthZ Plugin
        • Auxiliary SQL Functions
        • Connectors for Spark SQL Query Engine
        • SQL Lineage Support
        • Hive Dialect Support
      • Extensions for Flink
        • Connectors For Flink SQL Query Engine
      • Extensions for Hive
        • Connectors for Hive SQL Query Engine
      • Extensions for Trino
        • Connectors For Trino SQL Engine

Connectors

  • Connectors
    • Connectors for Spark SQL Query Engine
      • Delta Lake
      • Delta Lake with Microsoft Azure Blob Storage
      • Hudi
      • Iceberg
      • Kudu
      • Hive
      • Flink Table Store
      • TiDB
      • TPC-DS
      • TPC-H
    • Connectors For Flink SQL Query Engine
      • Flink Table Store
      • Hudi
      • Iceberg
    • Connectors for Hive SQL Query Engine
      • Flink Table Store
      • Iceberg
    • Connectors For Trino SQL Engine
      • Flink Table Store
      • Hudi
      • Iceberg

Kyuubi Insider

  • Overview
    • Architecture
    • Kyuubi v.s. HiveServer2
    • Kyuubi v.s. Spark Thrift JDBC/ODBC Server (STS)

Contributing

  • Develop Tools
    • Building Kyuubi
    • Building a Runnable Distribution
    • Building Kyuubi Documentation
    • Running Tests
    • Debugging Kyuubi
    • Developer Tools
    • IntelliJ IDEA Setup Guide
  • Community
    • Contributing to Apache Kyuubi
    • Collaborators
    • Kyuubi Release Guide

Appendix

  • Appendixes
    • 1. Terminologies
Version 1.7.0
  • repository
  • suggest edit
  • .rst
  • Flink Table Store Integration
    • Dependencies
    • Configurations
  • Flink Table Store Operations

Flink Table Store

  • Flink Table Store Integration
    • Dependencies
    • Configurations
  • Flink Table Store Operations

Flink Table Store#

Flink Table Store is a unified storage to build dynamic tables for both streaming and batch processing in Flink, supporting high-speed data ingestion and timely data query.

Tip

This article assumes that you have mastered the basic knowledge and operation of Flink Table Store. For the knowledge about Flink Table Store not mentioned in this article, you can obtain it from its Official Documentation.

By using Kyuubi, we can run SQL queries towards Flink Table Store which is more convenient, easy to understand, and easy to expand than directly using Hive to manipulate Flink Table Store.

Flink Table Store Integration#

To enable the integration of kyuubi flink sql engine and Flink Table Store, you need to:

  • Referencing the Flink Table Store dependencies

  • Setting the environment variable configurations

Dependencies#

The classpath of kyuubi hive sql engine with Iceberg supported consists of

  1. kyuubi-hive-sql-engine-1.7.0_2.12.jar, the engine jar deployed with Kyuubi distributions

  2. a copy of hive distribution

  3. flink-table-store-hive-connector-<flink-table-store.version>_<hive.binary.version>.jar (example: flink-table-store-hive-connector-0.4.0_3.1.jar), which can be found in the Installation Table Store in Hive

In order to make the Hive packages visible for the runtime classpath of engines, we can use one of these methods:

  1. You can create an auxlib folder under the root directory of Hive, and copy flink-table-store-hive-connector-0.4.0_3.1.jar into auxlib.

  2. Execute ADD JAR statement in the Kyuubi to add dependencies to Hive’s auxiliary classpath. For example:

ADD JAR /path/to/flink-table-store-hive-connector-0.4.0_3.1.jar;

Warning

The second method is not recommended. If you’re using the MR execution engine and running a join statement, you may be faced with the exception org.apache.hive.com.esotericsoftware.kryo.kryoexception: unable to find class.

Warning

Please mind the compatibility of different Flink Table Store and Hive versions, which can be confirmed on the page of Flink Table Store multi engine support.

Configurations#

If you are using HDFS, make sure that the environment variable HADOOP_HOME or HADOOP_CONF_DIR is set.

Flink Table Store Operations#

Flink Table Store only supports only reading table store tables through Hive. A common scenario is to write data with Flink and read data with Hive. You can follow this document Flink Table Store Quick Start to write data to a table store table and then use Kyuubi Hive SQL engine to query the table with the following SQL SELECT statement.

Taking Query Data as an example,

SELECT a, b FROM test_table ORDER BY a;

Taking Query External Table as an example,

CREATE EXTERNAL TABLE external_test_table
STORED BY 'org.apache.flink.table.store.hive.TableStoreHiveStorageHandler'
LOCATION '/path/to/table/store/warehouse/default.db/test_table';

SELECT a, b FROM test_table ORDER BY a;

previous

Connectors for Hive SQL Query Engine

next

Iceberg

By Apache Kyuubi Community
© Copyright 2023 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.