All Products
Search
Document Center

Data Management:Query data archived to OSS buckets or dedicated storage

Last Updated:Dec 12, 2023

This topic describes how to query data archived to Object Storage Service (OSS) buckets or dedicated storage. This topic also provides answers to FAQ.

Prerequisites

Data is archived to OSS buckets or dedicated storage before you can query archived data as an old user or new user.

Note
  • An old user refers to a user who used the data archiving feature before the archived data query feature was released on September 14, 2022.

  • A new user refers to a user who uses the data archiving feature after the archived data query feature is released.

Billing

You can query data archived to OSS buckets or dedicated storage free of charge during public preview.

Usage notes

  • Only the creator or stakeholders of a data archiving ticket can query archived data involved in the ticket.

  • You can use only logical data warehouses to query data archived to OSS buckets or logical data warehouses.

Query data archived to OSS buckets

  1. Log on to the DMS console V5.0.
  2. In the top navigation bar, click Solution. In the left-side navigation pane, click Data archiving.

    Note

    If you use the DMS console in simple mode, move the pointer over the 2022-10-21_15-25-22.png icon in the upper-left corner of the DMS console and choose All functions > Solution > Data archiving.

  3. On the Archive DataTickets page, set the View parameter to Archive View.

  4. Search for the data archiving ticket that you want to query. You can enter the ticket number, database name, or table name in the search box and click Search.

  5. Find the data archiving ticket that you want to query and click Query in the Operation column.

    Important

    If an OSS bucket in which archived data is stored is queried for the first time, you must log on to the OSS bucket by using the AccessKey ID and AccessKey secret of the OSS bucket. For more information about how to obtain an AccessKey pair, see Create an AccessKey pair.

  6. Optional. Enter the database account and password of the OSS bucket and click OK.

    Important

    Make sure that the database account and password that you enter are consistent with the AccessKey ID and AccessKey secret of the OSS bucket. Otherwise, the archived data stored in the OSS bucket cannot be queried.

  7. You are redirected to the Logical data warehouse page, and an SQL query statement is automatically filled in the command execution area.

    Note

    If you are redirected to a blank page, you do not have permissions on the logical data warehouse. In this case, join the DingTalk group whose ID is 24005004020 to apply for permissions.

  8. Click Execute. The query results are displayed on the Execution History tab that appears in the lower part of the SQLConsole page.

    Important

    By default, the system returns up to 20 queried data records. You can modify the limit to return more data records based on your business requirements.

Query data archived to dedicated storage

  1. Log on to the DMS console V5.0.
  2. In the top navigation bar, choose Solution > Data archiving.
  3. On the Archive DataTickets page, set the View parameter to Archive View.

  4. Search for the data archiving ticket that you want to view. You can enter the ticket number, database name, or table name in the search box and click Search.

  5. Find the data archiving ticket that you want to view and click Query in the Operation column.

  6. You are redirected to the Logical data warehouse page, and the data query SQL statement is automatically filled in the statement execution area.

    Note

    If you are redirected to a blank page, you do not have permissions on the logical data warehouse. In this case, join the DingTalk group whose ID is 24005004020 to apply for permissions.

  7. Click Execute. The query results are displayed on the Execution History tab that appears in the lower part of the page.

    Note

    By default, the system returns up to 20 queried data records. You can modify the limit to return more data records based on your business requirements.

FAQ

Q: Are tables in a logical database merged into one physical table when I query the archived data of the logical database?

A: Yes. When data in a logical database is archived, all tables in the logical database are merged into one physical database table. Therefore, on the Archive DataTickets page in Archive View mode, you can click a logical table to query all data of the tables in the logical database.

Q: Can I query archived data across two data archiving tickets?

A: Yes. Logical data warehouses in Data Management (DMS) allow you to query data archived to different OSS buckets or the same OSS bucket. To query archived data across data archiving tickets, go to the Logical data warehouse page, log on to the relevant OSS buckets, and then execute the LEFT JOIN, INNER JOIN, or RIGHT JOIN statements.

Q: If periodic archiving is configured for a data archiving ticket, am I able to query the data that is archived within a specific period of time?

A: Yes. If periodic archiving is configured for a data archiving ticket, data is archived within different periods of time based on the specified scheduling cycle. Therefore, you can query the data that is archived within the specified period of time based on the time when the data archiving task is created.