All Products
Search
Document Center

ApsaraDB for HBase:Export full data to MaxCompute

Last Updated:Mar 28, 2026

Export all data from an HBase table to MaxCompute using Lindorm Tunnel Service (LTS). The export runs as a batch job and supports filtering by rowkey range, time range, and specific columns. Use this approach when you need a one-time or periodic full snapshot of an HBase table in MaxCompute for offline analytics.

Important

This feature is not available for LTS instances purchased after June 16, 2023. If your LTS instance was purchased before June 16, 2023, this feature remains available.

Prerequisites

Before you begin, ensure that you have:

  • LTS activated, with a username and password configured for the LTS web UI

  • An HBase data source added in LTS

  • A MaxCompute data source added in LTS

Supported versions

The following HBase deployment types are supported:

  • Self-managed HBase V1.x and HBase V2.x

  • Elastic MapReduce (EMR) HBase

  • ApsaraDB for HBase Standard Edition

  • ApsaraDB for HBase Performance-enhanced Edition (cluster mode)

  • Lindorm

Choose an export mode

LTS supports two export modes. Choose based on how you want the data structured in MaxCompute.

KV modeWide table mode
Output structureEach row in MaxCompute represents one KV pair in HBase (rowkey, version, op, family, qualifier, value)Each row in MaxCompute represents one HBase row, with selected columns mapped to MaxCompute columns
Column selectionNot required — all columns are exported automaticallyRequired — specify the columns to export using "cols"
Data typesValues are always stored as HexStringDefaults to HexString; supports explicit type mapping (string, int, long, short, decimal, double, float, boolean)
Use whenYou need raw cell-level data, including delete markersYou need a structured table for analytics

Create an export task

  1. Log on to the LTS web UI. In the left-side navigation pane, choose Data Export > Archive Full Data to MaxCompute.

  2. On the Lindorm/HBase archive to MaxCompute page, click create new job.

    create new job button

  3. Select the source cluster and the destination cluster, specify the table to export, and then click create.

    Task creation form

  4. Click the task name to monitor the export progress.

  5. After the export completes, log on to the MaxCompute console to query the data.

    MaxCompute query result

Configure export parameters

When creating a task, specify the export configuration as a JSON string after the table name. The general format is:

hbaseTable {"tableMode": "KVTable"}
hbaseTable {"tableMode": "wideTable", "cols": ["f1:a", "f1:b", "f1:c"]}
hbaseTable {"tableMode": "wideTable", "cols": ["f1:a|string", "f1:b|boolean"], "startTs": "20190101000000", "endTs": "20200101000000", "startKey": "a", "endKey": "z"}

To export to a MaxCompute table with a different name, use hbaseTable/odpsTable format:

hbaseTable/odpsTable {"tableMode": "KVTable"}
By default, the MaxCompute table name matches the HBase table name. Hyphens (-) and periods (.) in HBase table names are replaced with underscores (_).

Parameter reference

ParameterDescriptionDefaultApplies to
tableModeExport mode. Valid values: KVTable, wideTable.Both modes
colsColumns to export, in family:qualifier format. Append |type to specify the data type, for example, f1:a|string.Wide table mode only (required)
startKeyStart rowkey for the export range.Beginning of tableBoth modes
endKeyEnd rowkey for the export range.End of tableBoth modes
startTsStart timestamp for the time range, in yyyyMMddHHmmss format, for example, 20191001153000.Both modes
endTsEnd timestamp for the time range, in yyyyMMddHHmmss format.Both modes

Supported data types for `cols`: string, int, long, short, decimal, double, float, boolean. If no type is specified, values are exported as HexString (default: hex).

KV mode output

Input:

tablexxx {"tableMode": "KVTable"}

Response:

KV mode output in MaxCompute

Each row in the MaxCompute table represents one KV pair in HBase:

FieldDescription
rowkeyThe rowkey of the HBase row
versionThe version of the KV pair
opThe operation type. Valid values: Put, DeleteFamily, DeleteColumn
familyThe column family
qualifierThe column name
valueThe cell value, encoded as HexString

Wide table mode output

Input:

hbaseTable/odpsTable {"tableMode": "wideTable", "cols": ["cf1:string|string", "cf1:int|int", "cf1:double|double"]}

Specify the columns to export using "cols". Each entry maps an HBase column to a MaxCompute column. Append |type to specify the data type; omit it to use the default HexString format.

Response:

Wide table mode output in MaxCompute