Connect to DataV-Board 6.0

更新时间:
复制 MD 格式

After adding a Tablestore data source in the DataV console, you can visualize Tablestore data with DataV.

Prerequisites

  • Complete the following operations in the Resource Access Management (RAM) console:

    • Create a RAM user and grant this user permissions to manage Tablestore (AliyunOTSFullAccess) and DataV (AliyunDataVFullAccess). For more information, see Create a RAM user and Grant permissions to a RAM user.

      Warning

      Leaking your Alibaba Cloud account's AccessKey pair can compromise all your resources. To reduce this risk, use a RAM user's AccessKey pair to perform operations.

    • Create an AccessKey pair for the RAM user. For more information, see Create an AccessKey pair.

  • Complete the following operations in the Tablestore console:

  • Complete the following operation in the DataV console:

    Activate DataV. For more information, see Activate DataV.

Background

DataV is a data visualization tool that converts raw data into dynamic, interactive charts. For more information, see What is DataV? After you connect your Tablestore data to DataV, you can create a dashboard to display your data in real time.

Notes

  • This feature applies only to the wide column model. For more information, see Wide column model.

  • DataV supports only Tablestore data tables and secondary index tables as data sources.

Step 1: Add a Tablestore data source

  1. Log on to the DataV console.

  2. Optional: In the upper-right corner of the page, click Return to classic console.

    Note
    • If you are on the old version of the configuration page (the button in the upper-right corner of the page is Enter new version), you do not need to perform this operation.

    • Some parameters differ between the new console and the classic console. We recommend using the new console. For more information, see Connect to DataV-Board 7.0.

  3. On the Data Sources tab, select Data Sources, and then click Add Source.

  4. In the Type list, select TableStore.

    Enter the Name, AccessKey ID, AccessKey Secret, and Public endpoint, and then click OK.

  5. Configure the parameters for the Tablestore data source. For more information, see the following table.

    Parameter

    Description

    Name

    The display name of the data source.

    AccessKey ID

    The AccessKey ID of the Alibaba Cloud account or RAM user that has permissions to access Tablestore.

    AccessKey Secret

    The AccessKey Secret of the Alibaba Cloud account or RAM user that has permissions to access Tablestore.

    Public endpoint

    The endpoint of the Tablestore instance that you want to access. For more information, see Endpoints.

  6. Click OK.

    DataV automatically adds the data source to your list of data sources.

Step 2: Configure the Tablestore data source

  1. Log on to the DataV console.

  2. Optional: In the upper-right corner of the page, click Go back to the old version.

    Note
    • If you are already on the old version configuration page (the button in the upper-right corner is Enter New Version), you do not need to perform this operation.

    • Some parameters differ between the new console and the classic console. We recommend using the new console. For more information, see Connect to DataV-Board 7.0.

  3. On the Projects page, create a visualization project or select an existing one.

    • To use an existing visualization project, find the project and click Edit on its card to open the editor.

    • If you are new to DataV or the existing projects do not meet your needs, create a new project.

      Note

      This topic uses a PC project as an example.

      1. Click PC.

      2. In the list of PC templates, select a template and click Create Project.

        DataV allows you to create a visualization application from a template or a blank canvas.

      3. In the Create Project dialog box, enter a name and select a group for your visualization project, and then click Create.

  4. Configure the Tablestore data source.

    1. On the canvas editor page, click a widget on the canvas.

      Note

      If there are no widgets on the canvas, add one first. For more information, see Asset management (Enterprise Edition).

    2. In the widget configuration panel on the right, click the fig_data Data icon.

    3. On the Data tab, click Configure Data Source.

    4. In the Set Data Source section, set Data Source Type to TableStore.

    5. From the Select an Existing Data Source list, choose your Tablestore data source.

    6. From the Select Action list, select an operation.

      The following operations are supported:

      • getRow: corresponds to the GetRow API of Tablestore. For more information, see GetRow API reference.

      • getRange: corresponds to the GetRange API of Tablestore. For more information, see GetRange API reference.

      • SQL: a SQL query operation.

    7. In the Select Action editor, enter a query.

      getRow

      • The query parameters must be a JSON object.

      • The getRow operation reads a single row of data based on its primary key.

        The following sample code 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 to query.

        rows

        The primary key of the row.

        Important

        If the table has multiple primary key columns, the number and data types of the columns you specify must match those of the data table.

        columns

        The names of the columns to return.

      getRange

      • The query parameters must be a JSON object.

      • The getRange operation reads data within a specified primary key range. The following sample code shows the parameter format.

        {
            "table_name": "test",
            "direction": "FORWARD",
            "columns": [
                "id",
                "test"
            ],
            "range": {
                "limit": 4,
                "start": {
                    "id": "InfMin"
                },
                "end": {
                    "id": "3"
                }
            }
        }

        Parameter

        Description

        table_name

        The name of the table to query.

        direction

        The direction in which to read the rows.

        • FORWARD: The start key must be less than the end key. The returned rows are sorted in ascending order of the primary key.

        • BACKWARD: The start key must be greater than the end key. The returned rows are sorted in descending order of the primary key.

        For example, assume a table contains two primary key values, A and B, where A is less than B. If you read in ascending order from [A, B), rows with a primary key greater than or equal to A and less than B are returned. If you read in descending order from [B, A), rows with a primary key greater than A and less than or equal to B are returned.

        columns

        The columns to read. Column names can be primary key columns or attribute columns.

        If you do not specify any columns, Tablestore 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 result does not include that row.

        limit

        The maximum number of rows to return. This value must be greater than 0.

        Tablestore stops the operation after returning the specified maximum number of rows, even if there is more data within the range.

        start

        The start and end primary keys for the range read. The start and end keys must be either valid primary keys or virtual points composed of InfMin and InfMax. The number of columns in the virtual points must match the number of primary key columns.

        InfMin represents negative infinity and is smaller than any other value. InfMax represents positive infinity and is larger than any other value.

        Important

        If the table has multiple primary key columns, the number and data types of the columns you specify must match those of the data table.

        • start: The starting primary key. If this row exists, the result includes it.

        • end: The ending primary key. The result never includes this row, regardless of whether it exists.

        end

      SQL

      Query data using custom SQL statements.

    8. Click Preview Data Response to view the returned data.

  5. Preview and publish the dashboard.

    1. In the upper-right corner of the canvas editor, click the yulan icon to preview the visualization application.

    2. In the upper-right corner of the canvas editor, click the fabu icon to publish the dashboard.

      1. In the Publish dialog box, click Publish Project.

      2. Close the Published dialog box.

        Note

        After publishing, the content is locked. You can use snapshot management to quickly update the published content with your latest edits. You can also click Manage Snapshots to view the created snapshots.

      3. Click the figcopy copy icon next to the Sharing URL.

        This option is on the Sharing URL tab of the Publish panel. The link format is https://datav.aliyuncs.com/share/xxx.

      4. Open a browser and paste the copied link into the address bar to view the published dashboard online.

Billing

Tablestore

Billing method

Description

VCU mode (reserved mode)

Pre-purchase reserved VCUs based on resource assessment, or enable elastic capacity and pay for the computing performance you consume.

CU mode (pay-as-you-go mode)

You are billed for resources such as real-time read/write throughput and storage space, without needing to plan hardware resource consumption in advance.

For more information, see Billing overview.

DataV

DataV is billed on a subscription basis, with a minimum purchase period of one month. You can choose the edition and subscription duration. For more information, see Pricing.

FAQ

Why does the GetRange operation return data that is outside the specified range?

Related documents

  • You can also use Grafana to visualize data. Connect to Grafana if you need to display data from a time series table in a TimeSeries model. For more information, see Connect to Grafana.

  • If you want to migrate DataV-Board 6.0 visualization applications to DataV-Board 7.0, you can use the Migrate to New Version feature. For more information, see the migration feature.