All Products
Search
Document Center

E-MapReduce:Use a Hive connector to read data from DLF tables

Last Updated:Mar 24, 2025

After you modify the configurations of a Hive connector, you can read data from Data Lake Formation (DLF) tables. This topic describes how to use a Hive connector to read data from DLF tables.

Prerequisites

A Presto cluster is created on the EMR on ACK page of the E-MapReduce (EMR) console. For more information, see Create a cluster.

Procedure

  1. Go to the catalog-hive.properties tab.

    1. Log on to the EMR console. In the left-side navigation pane, click EMR on ACK.

    2. On the EMR on ACK page, find the desired cluster and click Configure in the Actions column.

    3. On the Configure tab, click the catalog-hive.properties tab.

  2. Add configuration items.

    1. On the catalog-hive.properties tab, click Add Configuration Item.

    2. In the Add Configuration Item dialog box, add configuration items. The following table describes the configuration items.

      Configuration item

      Description

      hive.metastore

      Set the value to dlf.

      dlf.catalog.proxyMode

      Set the value to DLF_ONLY.

      dlf.catalog.akMode

      Set the value to EMR_AUTO.

      dlf.catalog.uid

      The ID of your Alibaba Cloud account.

      To obtain the ID of your Alibaba Cloud account, go to the Basic Information page.

      image

      dlf.catalog.endpoint

      The endpoint of DLF.

      We recommend that you set this configuration item to the virtual private cloud (VPC) endpoint of DLF. If you use the China (Hangzhou) region, set this configuration item to dlf-vpc.cn-hangzhou.aliyuncs.com.

      Note

      You can also set this configuration item to the public endpoint of DLF. If you use the China (Hangzhou) region, set this configuration item to dlf.cn-hangzhou.aliyuncs.com.

      dlf.catalog.region

      The ID of the region in which DLF is activated. Example: cn-hangzhou.

    3. Click OK.

    4. In the dialog box that appears, configure the Execution Reason parameter and click Save.

  3. Restart Presto.

    1. Click the Service Details tab.

    2. In the Components section, find the TrinoCoordinator and TrinoWorker components and click Restart in the Actions column.

      Restart

    3. In the dialog box that appears, configure the Execution Reason parameter and click OK.

    4. In the Confirm message, click OK.

      After you restart Presto, you can read data from DLF tables.