All Products
Search
Document Center

ApsaraDB for SelectDB:Retrieve and analyze data

Last Updated:Dec 02, 2024

Retrieval and Analysis is a tool that allows you to efficiently and accurately extract valid information from large amounts of data in a database by using SQL statements. This tool can be used for various data-driven tasks such as business decision-making, report generation, and trend analysis. This topic describes how to use the Retrieval and Analysis tool of ApsaraDB for SelectDB.

Prerequisites

  • An ApsaraDB for SelectDB instance is created. For more information, see Create an instance.

  • The version of the instance is 3.0.7 or later.

Procedure

  1. Log on to the ApsaraDB for SelectDB console.

  2. In the top navigation bar, select the region in which the instance that you want to manage resides.

  3. In the left-side navigation pane, click Instances. On the Instances page, find the instance and click its ID to go to the Instance Details page.

  4. Click Data Development and Management in the upper-right corner.

    Note

    If you use the tools of Data Development and Management for the first time, a message appears and prompts you to add the public IP address of your machine to the IP address whitelist named webui_whitelist of the instance. Read the message and click OK.

  5. Select Retrieval and Analysis from the drop-down list.

    Note

    If you use Retrieval and Analysis for the first time and have not logged on to the WebUI system, the WebUI logon page appears.

    • You can use the admin account to log on to the WebUI system.

    • If you do not know or forget the password of the admin account, you can reset the password. For more information, see Reset the password of an account.

  6. On the Search Analysis page, perform the following operations based on your business requirements:

    • Query information based on SQL statements or keywords:

      1. In the upper part of the page, configure the parameters that are described in the following table to specify filter conditions.

        Parameter

        Required

        Description

        Example

        Cluster

        Yes

        The cluster that you want to query.

        test_cluster

        Table

        Yes

        The table that you want to query.

        doris_audit_log_tbl__

        Search

        No

        The search type and search condition. Valid values:

        SQL: queries information based on an SQL statement.

        Note
        • Enter a WHERE clause without the WHERE keyword.

        • Format: <Field> <Operator> <Expected value>.

        • Example: query_id = '10395c322a5a4ea0-b4b33576728f116e'.

        Search: queries information based on a keyword.

        • Select SQL as the search type.

        • Enter the following search condition: query_id = '10395c322a5a4ea0-b4b33576728f116e'.

        Time

        Yes

        • Time Field: the time field.

          Note

          The drop-down list displays the fields whose data type is DATETIME in the specified table.

        • Time Range: the time range to query.

          Note
          • The default value specifies 1 hour ahead of the current time.

          • To customize the time range, click the Time Range drop-down list. In the Time Range dialog box, select a time range as needed and click Confirm.

        • Select time as the time field.

        • Select the following time range: 2024-06-19 12:10:27 to 2024-06-19 13:10:27.

      2. In the upper-right corner of the page, click Query.

        Note

        A query result set consists of a column chart and a data detail table.

    • Specify a table field as a filter condition: In the upper-left corner of the page, click the + icon next to Filter. In the dialog box that appears, configure the Field Name, Operator, and Value parameters. If you want to name the filter condition, turn on Custom Label, enter a value, and then click Confirm.

    • Add a field to the data detail table in the query result set: In the left-side pane, click Available Fields, move the pointer over the field that you want to add, and then click the image icon.

      Note
      • By default, the data detail table in the query result set displays the time and _source fields.

      • After you add a field to the data detail table, the _source field is hidden. To query the content of the _source field, find a data entry and click the image icon to the left of the data entry.

    • Remove a field from the data detail table in the query result set: In the left-side pane, click Selected Fields, move the pointer over the field that you want to remove, and then click the image icon.

      Note

      You cannot remove the time or _source field from the data detail table in the query result set.

Related API operations

ResetAccountPassword

DescribeSecurityIPList

ModifySecurityIPList

References

Create an instance

Reset the password of an account

Configure an IP address whitelist