All Products
Search
Document Center

Simple Log Service:Configure a data conversion rule of the Transpose Rows and Columns type for a table

Last Updated:Oct 28, 2024

You can configure a data conversion rule of the Transpose Rows and Columns type for a table on a dashboard to transform the table layout and optimize data analysis. This further facilitates data import and export.

Prerequisites

Step 1: Query and analyze data

  1. Log on to the Simple Log Service console. In the Projects section, click the project you want.

  2. In the left-side navigation pane, click Log Storage. In the Logstores list, click the logstore you want.

    image

  3. Enter a query statement in the search box and click Last 15 Minutes to specify a query time range.

    For example, you can enter the following query statement to query the paths to imported files and the number of imported files:

    * | select split_part(request_uri,'?',1) as path, count(1) as count group by split_part(request_uri,'?',1) order by count desc limit 10

Step 2: Add a table

  1. In the left-side navigation pane, choose Dashboard > Dashboards. In the dashboard list, click the dashboard you want. In the upper-right corner of the dashboard page, click Edit. In edit mode, click Add > Add Chart.

    image

  2. On the General Configurations tab, click the Table Pro icon in the Chart Types section. On the Search & Analysis tab, select Logstore (SQL) and choose the logstore you want, and enter the query statement. Select a time range, such as Last 15 Minutes, and click OK.

    image

Step 3: Configure a data conversion rule of the Transpose Rows and Columns type

On the Edit Chart page, click the Data Conversion tab. Click Add Conversion and select Transpose Rows and Columns from the drop-down list that appears. Then, set the Select Data Source parameter to A. This way, the rows and columns in the table that displays the results of Query Statement A are transposed.

image