The Retrieval and Analysis tool lets you run SQL or keyword searches on your SelectDB tables directly from the console. Use it to:
Query data across clusters and tables with SQL conditions or free-text keywords
Filter results by time range and custom field conditions
Manage which columns appear in the result table
View raw record details from the
_sourcefield
Prerequisites
Before you begin, ensure that you have:
An ApsaraDB for SelectDB instance running version 3.0.7 or later. See Create an instance
Open Retrieval and Analysis
Log on to the ApsaraDB for SelectDB console.
In the top navigation bar, select the region where your instance resides.
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.
In the upper-right corner, click Data Development and Management.
The first time you open Data Development and Management, a prompt asks you to add your machine's public IP address to the webui_whitelist IP address whitelist. Click OK to proceed.
From the drop-down list, select Retrieval and Analysis.
The first time you open Retrieval and Analysis without an active WebUI session, the WebUI logon page appears. Log on with the admin account. If you don't know the password, see Reset the password of an account.
Query data
On the Search Analysis page, configure the following parameters and then click Query.
| Parameter | Required | Description | Example |
|---|---|---|---|
| Cluster | Yes | The cluster to query. | test_cluster |
| Table | Yes | The table to query. | doris_audit_log_tbl__ |
| Search | No | The search type and condition. Select SQL to filter with a WHERE clause (omit the WHERE keyword; format: <Field> <Operator> <Expected value>). Select Search to filter by keyword. | SQL: query_id = '10395c322a5a4ea0-b4b33576728f116e' |
| Time | Yes | Time Field: select a DATETIME field from the table. Time Range: set the query window (defaults to the past hour). To set a custom range, click the Time Range drop-down, select a range, and click Confirm. | Time field: time; range: 2024-06-19 12:10:27 to 2024-06-19 13:10:27 |
The result set includes a column chart and a data detail table.
Manage result columns
The data detail table shows the time and _source fields by default. Adding a field hides _source — to view the raw record, click the expand icon to the left of any row.
To add a field to the result table:
In the left-side pane, click Available Fields, hover over the field, and click the add icon.
To remove a field from the result table:
In the left-side pane, click Selected Fields, hover over the field, and click the remove icon. The time and _source fields cannot be removed.
Add a filter condition
In the upper-left corner, click the + icon next to Filter. Configure the Field Name, Operator, and Value parameters. To give the filter a name, turn on Custom Label, enter a label, and click Confirm.