Skip to main content
Version: v1

連結至 Hive

開始之前

在開始之前,請先了解如何在 Canner Enterprise 中連結資料來源

Step 1: 至 Data Sources 頁面

請點擊側欄的 Data Sources 至資料來源設定頁面

nav_to_data_source

Step 2: 創建資料來源

點擊右上方的 Create a Data Source,設定以下資訊在彈出表單中

1_connect_hive

2_connect_hive

  • Name: 資料庫名稱,供顯示使用,後續可作修改
  • Data Source Type: 資料庫類型,請選擇 Hive
  • URL: 請填入 <thrift>://<host>:<port> 的格式
  • Hadoop core-site.xml File: 上傳 core-site.xml 配置檔案
  • Hadoop hdfs-site.xml File: 上傳 hdfs-site.xml 配置檔案
  • Authentication Type: 選擇 None 或是 Kerberos 驗證方式,若選擇 Kerberos 驗證方式,需要上傳下方配置檔案
    • HDFS Client Principal: 填入例如 nn/hadoop.docker.com@EXAMPLE.COM 格式
    • Metastore Service Princial: 填入例如 nn/hadoop.docker.com@EXAMPLE.COM 格式
    • Metastore Client Princial: 填入例如 nn/hadoop.docker.com@EXAMPLE.COM 格式
    • Hive Metastore Keytab File: 上傳 Hive Metastore Keytab 配置檔案
    • HDFS Keytab File: 上傳 Hive Metastore Keytab 配置檔案
    • Kerberos Config File: 上傳 HDFS Keytab 配置檔案
  • Enable View: 若開啟,將會同步來自 Hive Metastore 的 View
  • Explore Timeout: 若 Hive 中含有的 Table 數量較大,建議調高此參數,讓 Explore 可執行較久

Step 3: 完成建立

Submit 送出後,稍後片刻會跳回列表頁面,並可看到 Hive 出現在資料來源在列表中。

3_connect_hive_success