All Products
Search
Document Center

Lindorm:Quick Start

Last Updated:Mar 28, 2026

Lindorm Compute Engine lets you run SQL queries against column store and wide table data. This guide shows you how to create a resource group, connect to it, and run your first SQL statement.

Choose the resource group type that fits your workload:

Resource group typeInterfaceBest for
OLAPMySQL-compatible SQLInteractive queries, high-concurrency analytics, low-latency responses
ETLSpark SQL (serverless)Batch transformations, complex computations, infrequent or offline jobs

Prerequisites

Before you begin, ensure that you have:

Use an OLAP resource group

An Online Analytical Processing (OLAP) resource group provides a MySQL-compatible interface. After creation, dedicated compute nodes are allocated for high-concurrency, low-latency analytical queries.

Step 1: Create an OLAP resource group

  1. Log on to the Lindorm console. Select the region of your instance in the upper-left corner. On the Instances page, click the instance ID or click View Instance Details in the Actions column.

  2. On the Instance Details page, go to the Configurations section and click Resource Groups in the Compute Engine column.

    Resource Groups entry point

  3. On the Resource Group Details page, click Create Resource Group and set the following parameters:

    ParameterDescription
    Resource Group TypeSelect OLAP.
    Resource Group NameLowercase letters and digits only; max 63 characters. Example: cg0
    Node SpecificationsSelect the compute node specifications.
    Working Nodes in JobNumber of worker nodes per job. Valid values: [4, 1024]. Default: 4
  4. Click OK.

    Resource group creation takes about 20 minutes.
  5. On the Resource Group Details page, wait until the status shows Running under Status and Description. Hover over the resource group name to get its Virtual Private Cloud (VPC) internal endpoint:

    jdbc:mysql://ld-bp1dv48fk0yg0****-olap-proxy-ldps.lindorm.aliyuncs.com:9030
  6. Configure the MySQL client, then connect to the OLAP resource group using your LindormTable username and password:

    mysql -hld-bp1dv48fk0yg0****-olap-proxy-ldps.lindorm.aliyuncs.com -P9030 -uroot -p

Step 2: Access data

The OLAP resource group uses two catalogs to identify data sources:

CatalogData sourceDefault
lindorm_columnarColumn store (Iceberg-compatible data lake)Yes — selected automatically when you connect via MySQL
lindorm_tableWide tables (LindormTable)No — switch explicitly with SET CATALOG lindorm_table;

Access column store data

Column store is a data lake built on columnar storage, compatible with the Iceberg ecosystem. Data is stored in the file engine of the Lindorm instance.

The lindorm_columnar catalog is selected by default. To switch to it explicitly, run:

SET CATALOG lindorm_columnar;

The following steps create a database, write data, and run sample queries.

  1. Create and use a database.

    -- Create a database.
    CREATE DATABASE olapdemo;
    
    -- Use the database.
    USE olapdemo;
  2. Create a table and write data.

    -- Create a table.
    CREATE TABLE test (id INT, name STRING) ENGINE = iceberg;
    
    -- Insert data.
    INSERT INTO test VALUES (0, 'Jay'), (1, 'Edison');
  3. Query data. Example 1 — filter by condition:

    SELECT id, name FROM test WHERE id != 0;

    Result:

    +------+--------+
    | id   | name   |
    +------+--------+
    |    1 | Edison |
    +------+--------+

    Example 2 — aggregate:

    SELECT count(distinct name) FROM test;

    Result:

    +----------------------+
    | count(DISTINCT name) |
    +----------------------+
    |                    2 |
    +----------------------+

    Example 3 — join:

    SELECT * FROM
      (SELECT id, name FROM test WHERE id != 0) t0
      JOIN
      (SELECT id, name FROM test WHERE id != 2) t1
      ON t0.id = t1.id;

    Result:

    +------+--------+------+--------+
    | id   | name   | id   | name   |
    +------+--------+------+--------+
    |    1 | Edison |    1 | Edison |
    +------+--------+------+--------+
  4. Clean up.

    DROP TABLE test;
    DROP DATABASE olapdemo;

Access wide table data

The OLAP resource group can query LindormTable data using its dedicated compute nodes. Only read operations are supported — you cannot create tables or write data to LindormTable through the OLAP resource group.

Switch to the wide table catalog before querying:

SET CATALOG lindorm_table;

If you already have a wide table, skip to the query steps. Otherwise, connect to LindormTable and create a sample table:

-- Create a database.
CREATE DATABASE test;

-- Use the database.
USE test;

-- Create a table and insert two rows.
CREATE TABLE tb (id varchar, name varchar, address varchar, primary key(id, name));
UPSERT INTO tb (id, name, address) VALUES ('001', 'Jack', 'hz');
UPSERT INTO tb (id, name, address) VALUES ('002', 'Edison', 'bj');

In the MySQL command-line interface (CLI) connected to the OLAP resource group, run the following steps.

  1. Switch the data source and select the database.

    -- Switch to the wide table catalog.
    SET CATALOG lindorm_table;
    
    -- Use the test database.
    USE test;
  2. Query wide table data. Example 1 — retrieve rows:

    SELECT * FROM tb LIMIT 5;

    Result:

    +------+--------+---------+
    | id   | name   | address |
    +------+--------+---------+
    | 001  | Jack   | hz      |
    | 002  | Edison | bj      |
    +------+--------+---------+

    Example 2 — count rows:

    SELECT count(*) FROM tb;

    Result:

    +----------+
    | count(*) |
    +----------+
    |        2 |
    +----------+

Use an ETL resource group

An extract, transform, and load (ETL) resource group provides a serverless Spark SQL interface. Resources are allocated on demand and released automatically. This makes it suitable for infrequent queries, batch transformations, and offline reporting.

Step 1: Activate the resource group

  1. Log on to the Lindorm console. Select the region of your instance in the upper-left corner. On the Instances page, click the instance ID or click View Instance Details in the Actions column.

  2. On the Instance Details page, go to the Configurations section and click Resource Groups in the Compute Engine column.

    Resource Groups entry point

  3. On the Resource Group Details page, click Create Resource Group and set the following parameters:

    ParameterDescription
    Resource Group TypeSelect ETL.
    Resource Group NameLowercase letters and digits only; max 63 characters. Example: cg0
    Daily Resource QuotaMaximum CU hours the resource group can consume per day (unit: CU*Hour). Default: 100000. Set to 0 for no limit.
    Important

    Jobs are immediately deleted if this limit is exceeded. For production workloads, set this to 0 to avoid unexpected job termination.

    Maximum CPU coresMaximum CPU cores for the resource group. Valid values: [100, 100000].
    Maximum memoryMaximum memory for the resource group. Valid values: [400 GB, 1000000 GB]. There is no default value.
    Authorize usersUsers allowed to access the resource group. Default: * (all users).
  4. Click OK to create the resource group.

Step 2: Set up the environment

Run the following steps on an Elastic Compute Service (ECS) instance in the same VPC as your Lindorm instance.
  1. Install Java Development Kit (JDK) 1.8 or later.

  2. Download the Spark package and decompress it.

  3. Set the SPARK_HOME environment variable to the directory where you decompressed the package.

    export SPARK_HOME=/path/to/spark/
  4. Edit $SPARK_HOME/conf/beeline.conf and configure the following parameters:

    ParameterDescription
    endpointJava Database Connectivity (JDBC) URL of the Lindorm compute engine. See View endpoints.
    userLindormTable username.
    passwordLindormTable password.
    shareResourceWhether to share compute resources across sessions for the same user. Default: true.
    compute-groupName of the ETL resource group. Default: default.
  5. Go to $SPARK_HOME/bin and start the interactive session:

    Idle sessions are released automatically after 4 hours. To monitor running jobs, access the Spark UI using the cluster URL shown in the startup output.
    ./beeline

    A successful connection displays:

    Welcome to Lindorm Distributed Processing System (LDPS) !!!
    Initializing environment. It might take minutes ...
    Environemnt prepared. You may visit your jdbc cluster by below url:
    http://alb-boqak6zfns5gzx****.cn-hangzhou.alb.aliyuncsslb.com/proxy/75ce76086b61470da7046bd4c2b7****
    Please note -- you are sharing this JDBC cluster between SQL sessions from the same user.
    The cluster will be released by auto if idle for 4 hours.
    You may also kill it manually by visiting above web url and clicking 'kill' in tab of 'Query Engine'
    lindorm-beeline>

Step 3: Access data

All examples below use Spark SQL in the lindorm-beeline> session. The lindorm_columnar catalog is selected by default. Use SET CATALOG to switch between data sources.

Access column store data

Column store is a data lake built on columnar storage, compatible with the Iceberg ecosystem. Data is stored in the file engine of the Lindorm instance. You can use Spark SQL to write and query this data.

The lindorm_columnar catalog is selected by default. To switch to it explicitly, run:

SET CATALOG lindorm_columnar;

The following steps create a database, write data, and run sample queries.

  1. Create and use a database.

    -- Create a database.
    CREATE DATABASE etldemo;
    
    -- Use the database.
    USE etldemo;
  2. Create a table and write data.

    -- Create a table.
    CREATE TABLE test (id INT, name STRING);
    
    -- Insert data.
    INSERT INTO test VALUES (0, 'Jay'), (1, 'Edison');
  3. Query data. Example 1 — filter by condition:

    SELECT id, name FROM test WHERE id != 0;

    Result:

    +------+--------+
    | id   | name   |
    +------+--------+
    |    1 | Edison |
    +------+--------+

    Example 2 — aggregate:

    SELECT count(distinct name) FROM test;

    Result:

    +----------------------+
    | count(DISTINCT name) |
    +----------------------+
    |                    2 |
    +----------------------+

    Example 3 — join:

    SELECT * FROM
      (SELECT id, name FROM test WHERE id != 0) t0
      JOIN
      (SELECT id, name FROM test WHERE id != 2) t1
      ON t0.id = t1.id;

    Result:

    +------+--------+------+--------+
    | id   | name   | id   | name   |
    +------+--------+------+--------+
    |    1 | Edison |    1 | Edison |
    +------+--------+------+--------+
  4. Clean up.

    DROP TABLE test;
    DROP DATABASE etldemo;

Access wide table data

Spark SQL connections in an ETL resource group can query LindormTable data using elastic compute resources. Data Definition Language (DDL) statements — such as CREATE TABLE or DROP TABLE — are not supported for LindormTable through this connection. Use it for queries and computations only.

Switch to the wide table catalog before querying:

SET CATALOG lindorm_table;

If you already have a wide table, skip to the query steps. Otherwise, connect to LindormTable and create a sample table:

-- Create a database.
CREATE DATABASE test;

-- Use the database.
USE test;

-- Create a table and insert two rows.
CREATE TABLE tb (id varchar, name varchar, address varchar, primary key(id, name));
UPSERT INTO tb (id, name, address) VALUES ('001', 'Jack', 'hz');
UPSERT INTO tb (id, name, address) VALUES ('002', 'Edison', 'bj');

In the lindorm-beeline session, run the following steps.

  1. Switch the data source and select the database.

    -- Switch to the wide table catalog.
    SET CATALOG lindorm_table;
    
    -- Use the test database.
    USE test;
  2. Query wide table data. Example 1 — retrieve rows:

    SELECT * FROM tb LIMIT 5;

    Result:

    +------+--------+---------+
    | id   | name   | address |
    +------+--------+---------+
    | 001  | Jack   | hz      |
    | 002  | Edison | bj      |
    +------+--------+---------+

    Example 2 — count rows:

    SELECT count(*) FROM tb;

    Result:

    +-----------+
    | count(1)  |
    +-----------+
    | 2         |
    +-----------+

What's next

  • View endpoints — find the JDBC URL and connection details for your resource group

  • Spark UI — monitor running Spark jobs in your ETL resource group