Data Lake Compute allows you to query and analyze data in an external table. Currently supported data sources include MySQL、EMR Hive(COS)、EMR Hive(HDFS)、EMR Hive(CHDFS)、PostgreSQL、SQL Server、ClickHouse and TCHouse-D. You can add and manage other data sources in the Data Lake Compute console. This document uses Tencent Cloud TCHouse-D as an example.
Prerequisites
Creating a Network Connection
1. Log in to the DLC console and select the service region. 2. Click Network Connection Configuration in the left sidebar to create a new network connection. Select Cross-Source as the network configuration type, select New Network Configuration as the instance source, select Tencent Cloud TCHouse-D as the data source type, select the Tencent Cloud TCHouse-D instance you want to query, select Standard Spark Engine in the data engine binding area, and save the configuration. If the connection status displays as normal, the creation succeeds. Adding a Data Catalog
1. Log in to the DLC console, and select the service region. A login user needs to have the permission to view data catalog. Solution 1: Go to the Data Exploration page, hover over "+" next to the database and table, and click Create data catalog. 2. After selecting Tencent Cloud TCHouse-D as the data source type, select the corresponding instance to associate with.
3. Enter verification information of the data source and click Next and then Confirm. When the creation status of the data catalog displays as successful, you can query and perform other operations in data exploration.
Managing Data
Currently, Data Lake Compute allows you to view the database information of and preview data in external tables.
Solution 1: View on the Data Exploration Page
1. Log in to the Data Lake Compute console and select the service region. You need to have the permission to view data tables. 2. Go to the Data Exploration page, select the data catalog to be queried, move the pointer over a database name to display a menu, select Basic Info, and view the basic database information in the displayed pop-up window. Solution 2: View on the Data Management Page
1. Log in to the DLC console, and select the service region. A login user needs to have the permission to view data tables. 2. Go to the Data Exploration page. You can go to the details page to view database and table information based on the data catalog name. Previewing data in a data table
1. Log in to the Data Lake Compute console and select the service region. You need to have the permission to view data tables. 2. Go to the Data Exploration page. Hover over the database name. A menu is displayed then click Preview data. Then, you can run a SQL statement to query and display data in the data table. Note:
You need to select the data engine bound to the VPC network configuration of the data source to query.