Lindorm Distributed Processing System (LDPS) allows you to use the data warehousing capabilities of Hive. You can use Hive or Spark SQL to define data processing logic and develop jobs. This topic describes how to use SQL to access data in Hive.

Prerequisites

LDPS is activated for the Lindorm instance. For more information, see Activate LDPS and modify the configurations.

Activate Hive Metastore

  1. Log on to the Lindorm console.
  2. In the upper-left corner of the page, select the region in which the instance is located.
  3. On the Instances page, click the ID of the instance that you want to manage or click Manage in the Actions column corresponding to the instance.
  4. In the left-side navigation pane, choose Compute Engine > Service Management.
  5. On the Hive Metastore tab, click Activate Now.
    Activate Hive Metastore

Examples

You can execute the following SQL statements to create a table named test, add data to the table, and query all data in the table. For more information about the SQL syntax, see SQL Reference.
USE spark_catalog;

CREATE TABLE test (id INT, name STRING, score DOUBLE);

INSERT INTO test VALUES (0, 'Jay', 90.8);

SELECT * FROM test;