Lindorm OLAP node

Updated at:

The Lindorm OLAP node of DataWorks lets you develop and schedule Lindorm OLAP SQL tasks on a recurring basis. This topic describes the main process of developing a task by using a Lindorm OLAP node.

Background information

Lindorm is a distributed computing service based on a cloud-native architecture. It supports the open source computing model, is compatible with Spark interfaces, and deeply integrates the features of the Lindorm storage engine. Lindorm can use the underlying data storage characteristics and indexing capabilities to efficiently complete distributed jobs. It is suitable for scenarios such as processing massive amounts of data, interactive analytics, machine learning, and graph computing.

A Lindorm OLAP node runs on a Lindorm OLAP resource group and is suitable for interactive queries and aggregate analytics on massive amounts of data. Compared with a Lindorm Spark SQL node, a Lindorm OLAP node runs on a Lindorm OLAP resource group and does not support Spark parameters, which makes the node configuration simpler.

Prerequisites

  • (Optional. Required only for RAM users.) The RAM user that is used to develop the task is added to the corresponding workspace and granted the Development or Workspace Administrator role. Exercise caution when you grant this role because it has extensive permissions. For more information about how to add a member, see Add members to a workspace.

    Note

    If you use an Alibaba Cloud account, skip this step.

  • A Lindorm instance is created and bound to the DataWorks workspace. For more information, see Associate a Lindorm computing resource.

Create a Lindorm OLAP node

For more information about how to go to the node creation entry point, see Create a Lindorm OLAP node.

Develop a Lindorm OLAP node

When you write task code in the SQL editing area, you can use the ${variable_name} syntax to define a variable, and then assign a value to the variable in the Run Configuration or Scheduling Settings pane on the right side of the node editing page. The following sample code is used as an example.

-- Switch to the lake-mode columnar data source
SET CATALOG lindorm_columnar;

-- Create a database and a table
CREATE DATABASE etldemo;
USE etldemo;
CREATE TABLE test (id INT, name STRING) ENGINE = iceberg;

-- Insert data
INSERT INTO test VALUES (0, 'Jay'), (1, 'Edison');

-- Query data
SELECT id, name FROM test WHERE id != 0;

-- Run an aggregate query
SELECT count(distinct name) FROM test;

-- Clean up resources
DROP TABLE test;
DROP DATABASE etldemo;

For more information about Lindorm OLAP SQL operations, see SQL reference.

Debug a Lindorm OLAP node

  1. Configure the debugging properties.

    In the Run Configuration pane on the right side of the node, configure the Compute Resource and Lindorm Resource Group parameters, and the Resource Group parameter. The following table describes the parameters.

    Parameter

    Description

    Compute Resource

    Select the Lindorm computing resource that you bound.

    Lindorm Resource Group

    Select the OLAP resource group that you created in the Lindorm console.

    Resource Group

    Select a resource group that has passed the network connectivity test when you bound the Lindorm computing resource.

    Compute CU

    The node uses the default number of CUs. You do not need to change the value.

    Script Parameter

    When you configure the node content, you can define a variable by using the ${parameter_name} syntax. You must configure the Parameter name and Parameter Value in the Script Parameters section. When the task is run, the variable is dynamically replaced with the actual value. For more information, see Scheduling parameter sources and expressions.

  2. Debug and run the node.

    To run the node task, click Save, and then click Run.

What to do next

  • Configure node scheduling: If the node in the project directory requires periodic scheduling, you must configure the Scheduling Policy in the Scheduling Settings pane on the right side of the node.

  • Release a node: To run the task in the production environment, click the imageicon in the UI to start the release process and release the task to the production environment. A node in the project directory is scheduled on a recurring basis only after it is released to the production environment.

  • Data Map (Lindorm table data): You can go to Data Map to collect metadata about Lindorm.