After you add Table Store as a data source on the DataV console, you can visualize your Table Store data.
Prerequisites
-
Complete the following tasks in Resource Access Management (RAM):
-
Create a RAM user and grant it the
AliyunOTSFullAccessandAliyunDataVFullAccesspermissions. For more information, see Create a RAM user and Manage RAM user permissions.WarningAn AccessKey leak from your Alibaba Cloud account can compromise all your resources. To minimize risk, use the AccessKey of a RAM user for API operations.
-
Create an AccessKey for the RAM user. For more information, see Create an AccessKey.
-
-
Complete the following tasks in Table Store:
-
Activate Table Store and create an instance. For more information, see Activate Table Store and create an instance.
-
Create a data table. For more information, see Data table operations.
-
-
Complete the following task in DataV:
Activate the DataV service. For more information, see Activate the DataV-Board service.
Background
DataV Data Visualization (DataV) transforms raw data into a variety of dynamic visual charts. For more information, see DataV Data Visualization. After you connect your Table Store data to DataV, DataV can generate data dashboards that display the data in real time.
Usage notes
-
This feature applies only to the wide column model. For more information, see Wide column model.
-
Table Store data sources support only data tables or secondary indexes.
Step 1: Add a Table Store data source
-
Log on to the DataV console.
-
Optional: In the upper-right corner of the page, click Go to New Version.
Note-
Skip this step if the button in the upper-right corner is Back to Old Version.
-
Some parameters may differ between the new and old configuration pages. The new configuration page is recommended.
-
-
On the workbench page, in the left-side navigation pane, choose Feature Navigation > Data Preparation > Data Source.
-
On the Data Source page, click Add Data Source.
-
In the Type list, select TableStore.
Enter the Name, AK ID, AK Secret, and Internet endpoint, and then click OK. Ensure the database is running, accessible over the internet, not blocked by a firewall, and its domain name is resolvable.
-
The following table describes the parameters.
Parameter
Description
Name
The display name of the data source.
AK ID
The AccessKey ID of the Alibaba Cloud account or RAM user with permissions to access Table Store.
AK Secret
The AccessKey Secret of the Alibaba Cloud account or RAM user with permissions to access Table Store.
Internet
The service endpoint for the Table Store instance you want to access. For more information, see Endpoints.
-
-
Click OK.
The new data source automatically appears in the data source list.
Step 2: Configure the Table Store data source
-
Log on to the DataV console.
-
Optional: In the upper-right corner of the page, click Go to New Version.
Note-
Skip this step if the button in the upper-right corner is Back to Old Version.
-
Some parameters may differ between the new and old configuration pages. The new configuration page is recommended.
-
-
On the workbench page, hover over the data dashboard and click Edit.
ImportantIf you do not have any data dashboards on your workbench page, create one first. For more information, see Use a template to create a PC dashboard.
-
Configure the Table Store data source.
-
On the canvas editor page, click a component on the canvas.
NoteIf there are no components on the canvas, add one from the Widget Library tab on the left. For more information, see Canvas operations for components.
-
In the Component Configuration panel on the right, select Data Source.
-
In the Set Data Source section, set Data Source Type to TableStore.
-
From the Select Existing Data Source list, select your Table Store data source.
-
From the Select Operation list, select an operation.
The following operations are supported:
-
getRow: Corresponds to the GetRow API of Table Store. For more information, see GetRow API Reference. -
getRange: Corresponds to the GetRange API of Table Store. For more information, see GetRange API Reference. -
SQL: An SQL query operation.
-
-
In the Select Operation text box, enter the query statement.
getRow-
The query parameters must be a JSON object.
-
The
getRowoperation retrieves a single row of data by its primary key.The following shows the parameter format.
{ "table_name": "test", "rows": { "id": 1, "pk": "1", }, "columns": [ "id", "pk", "test" ] }Parameter
Description
table_name
The name of the Table Store data table to query.
rows
The primary key of the row.
ImportantWhen a data table has multiple primary key columns, the number and data types of the primary key columns that you specify must match those defined for the data table.
columns
The names of the columns to return.
getRange-
The query parameters must be a JSON object.
-
The
getRangeoperation retrieves data within a specified primary key range. The following shows the parameter format.{ "table_name": "test", "direction": "FORWARD", "columns": [ "id", "test" ], "range": { "limit": 4, "start": { "id": "InfMin" }, "end": { "id": "3" } } }Parameter
Description
table_nameThe name of the Table Store data table to query.
directionThe read direction.
-
If the value is FORWARD, the start primary key must be less than the end primary key. The returned rows are sorted by primary key in ascending order.
-
If the value is BACKWARD, the start primary key must be greater than the end primary key. The returned rows are sorted by primary key in descending order.
For example, a table has two primary keys A and B, where A<B. If you read [A, B) in the forward direction, the system returns rows whose primary key is greater than or equal to A and less than B, in ascending order. If you read [B, A) in the backward direction, the system returns rows whose primary key is greater than A and less than or equal to B, in descending order.
columnsThe set of columns to read. Column names can be primary key columns or attribute columns.
If you do not specify any columns, the operation returns the entire row.
If a row's primary key is within the read range but the row does not contain the specified columns, the row is not included in the result.
limitThe maximum number of rows to return. This value must be greater than 0.
Table Store stops the operation after returning the specified maximum number of rows, even if more data exists in the specified range.
startThe start and end primary keys for this range read. The start and end primary keys must be valid primary keys or virtual points composed of InfMin and InfMax. The number of columns in the virtual points must match the primary key schema.
InfMin indicates negative infinity. Any value of any type is greater than InfMin. InfMax indicates positive infinity. Any value of any type is less than InfMax.
ImportantWhen a data table has multiple primary key columns, the number and data types of the primary key columns that you specify must match those defined for the data table.
-
startspecifies the start primary key. If the row exists, it is always included in the response. -
endspecifies the end primary key. This boundary is exclusive and the row at this key is never included in the response.
end -
SQLUse custom SQL statements to query the required data.
-
-
Click View Data Response to check the returned data.
-
-
Preview and publish the data dashboard.
-
In the upper-right corner of the canvas editor, click Preview to preview the data dashboard.
-
In the upper-right corner of the canvas editor, click Publish to publish the data dashboard.
-
In the Publish dialog box, click Publish Screen.
-
Close the Published dialog box.
NoteAfter publishing the dashboard, the published content is locked. After each edit, you can use snapshot management to sync changes to the published version. You can also click Go to Snapshot Management to view the snapshots that you created.
-
-
Click the
icon next to the Share Link to copy the link. -
Open a browser and paste the copied link into the address bar to view the published data dashboard online.
-
Billing
Table Store
|
Billing method |
Compute capability |
|
Purchase reserved VCUs in advance based on the resource assessment results, or enable elastic compute and pay for the compute usage based on actual consumption. |
|
|
You are billed based on resources such as real-time read/write throughput and storage space, without the need to plan hardware capacity in advance. |
For more information, see Billing overview.
DataV
DataV is a subscription-based service, with a minimum billing cycle of one month. You can choose the edition and subscription duration that best fits your needs. For more information, see Product billing.
FAQ
Why does a GetRange query return data outside the specified range?
References
-
You can also visualize data by connecting to Grafana. This approach is recommended for time-series data from a time-series table. For instructions, see Connect to Grafana.
-
To migrate a DataV-Board 6.0 application to DataV-Board 7.0, use the Migrate to New Version feature. For instructions, see Migration feature.