Skip to main content

Explore data in Grafana

Last updated on October 24, 2024

Introduction

The AccelByte Intelligence Service (AIS) Grafana Dashboard comes with a query tool that you can use to perform ad hoc queries, providing a flexible and dynamic way to explore and understand your game data in greater depth.

This query tool is available on the Explore page in your AIS Grafana account.

Run query with builder

  1. In your AIS Dashboard, click on the Explore menu.
  2. On the Explore page, choose AIS data warehouse as your data source.
  3. To activate the filtering, grouping, and ordering in the Query Builder, turn on the Filter, Group, and Order toggles.
  4. Choose the Table from your database. For example, choose user_t.
  5. In the Column panel, select the column of the table. For example, choose namespace_t and fill the Alias with "NAMESPACE ID".
  6. Click on the the add (+) button in the Column panel to add another column, and then do the following:
    • Select * as the column.
    • Set COUNT as the Aggregation.
    • Fill in the the Alias with "Total user".
  7. In the Filter by column value panel, click on the add (+) button to add filtering, and then do the following:
    • Select ctime as the column filter.
    • Set >= as its operation
    • Set 2024-01-01 16:05:08 as the value.
  8. Click on + Group panel to add grouping setting, and then select namespace_id.
  9. In the Order by panel, do the following:
    • Set the order to COUNT(*).
    • Set the order style to DESC (descending).
    • Use 50 as the limit.
  10. Click on the Run Query button to view the results. Image shows AIS' Grafana dashboard query Builder

Run query with code

  1. In your AIS Dashboard, click on the Explore menu.
  2. On the Explore page, choose your choose AIS data warehouse as the data source.
  3. Click on the Code button.
  4. Fill the text box with this query:
    SELECT
    namespace_id AS "Namespace ID",
    COUNT(*) AS "Total user"
    FROM
    user_t
    GROUP BY
    namespace_id
    ORDER BY
    COUNT(*) DESC
    LIMIT
    50
  5. Click on the Run Query button to view the results.