All Products
Search
Document Center

ApsaraDB for HBase:Data query

Last Updated:Mar 28, 2026

ApsaraDB for HBase (Lindorm) provides two interfaces for querying and managing table data from the cluster management system: Data query (Compatible with HBase) for GUI-based row lookups and edits, and SQL Executor for running SQL statements against Lindorm tables. You can also use HBase Shell to create Get and Scan queries.

Jump to:

Prerequisites

Before you begin, make sure you have:

Limitations

  • Lindorm returns up to 100 entries per query to protect data security.

  • The ROW field is equivalent to RowKey in Lindorm. Both the ROW and qualifier fields are of type varbinary.

  • If a qualifier field does not belong to a column family, specify a column family for it.

  • ROW and COL are reserved fields in SQL. Enclose them in backticks (`) when used in queries. When you specify a column family for a qualifier field, you must also enclose the field in backticks.

Data query (Compatible with HBase)

The Data query (Compatible with HBase) module lets you query table details and add data to existing tables from a GUI.

Query existing data

Query existing data from both SQL tables and HBase tables.

  1. In the left-side navigation pane of the cluster management system, choose Data Query > Data query (Compatible with HBase).

  2. Set the namespace and Table name filter conditions.

  3. (Optional) Set additional filters: Filter column family, row key, start key, end key, and limit.

  4. Click Query. The existing data in the specified table is displayed.

Add data to HBase tables

Data can be added only to HBase tables, not SQL tables, through the cluster management system.

  1. Click Add.

  2. In the Add table data dialog box, set the following parameters.

    ParameterDescription
    row keyThe row key of the HBase table.
    ColThe column to add, including the column family. Format: <column family name:column name>. Example: f:name.
    TimestampThe timestamp for the entry. Only Unix timestamps are supported.
    ValueThe value of the data. For supported data types, see Basic data types.
  3. Click OK.

Modify existing data

Modify existing data in SQL tables or HBase tables.

  1. In the row you want to modify, click Edit in the Operation column.image.png

  2. In the Edit table data dialog box, update the timestamp and data value.

  3. Click OK to save the changes.

SQL Executor

Run SQL statements against Lindorm tables using the SQL Executor in Lindorm Insight.

  1. In the left-side navigation pane of the cluster management system, choose Data Query > SQL Executor.

  2. Select a namespace from the namespace drop-down list. The tables in that namespace are displayed on the right side of the page.

  3. (Optional) If you need to query varbinary data using a specific value, get the hexadecimal string for that value first. See Obtain hexadecimal strings.

  4. Enter a SQL statement in the editor. For example, to preview data in a table:

    SELECT * FROM `your_table` LIMIT 10;
  5. Click Execute.

To execute a SQL statement with a keyboard shortcut, press Ctrl+Enter on Windows or Command+Return on macOS.

Obtain hexadecimal strings

When filtering varbinary data by value or row key in a SQL query, use hexadecimal strings instead of plain text. The SQL Executor provides a built-in conversion tool.

For example, to query a row whose row key is r1, set the WHERE clause to WHERE rowkey='7321' in the SQL statement. The hexadecimal string of r1 is 7321.

To get the hexadecimal string for a value, use one of the following methods.

Method 1: Binary to hex string conversion field

  1. In the left-side navigation pane of the cluster management system, choose Data Query > SQL Executor.

  2. Select a namespace from the namespace drop-down list.

  3. Click Execute to view the table schema.

  4. Enter the string to convert in the Binary to hex string conversion field. The hexadecimal string appears at the top of the editor section.image.png

  5. Replace the condition value in your SQL statement with the hexadecimal string and click Execute. For example, if your original SQL statement is:

    SELECT * FROM task WHERE ROW = "xxxx1";

    The updated statement using the hexadecimal string 7878787831 is:

    SELECT * FROM task WHERE ROW = "7878787831";

Method 2: HexString switch

  1. In the left-side navigation pane of the cluster management system, choose Data Query > SQL Executor.

  2. Select a namespace from the namespace drop-down list.

  3. Turn on the HexString switch and click Execute. The execution results display the hexadecimal string for each value.

  4. Replace the condition value in your SQL statement with the corresponding hexadecimal string and click Execute.