Visualize Soracom Query Results in Soracom Lagoon

You can visualize Soracom Query results in Soracom Lagoon 3. In this guide, we'll visualize the results that were generated in Display Session Creation Trend for the Last 24 Hours.

Prerequisites

Step 1: Create a New Dashboard and Panel

  1. Log in to the Lagoon console and click Dashboards icon > New > New Dashboard.

    https://g-v3.lagoon.soracom.io

    New Dashboard menu in Lagoon console

    A new dashboard named "New dashboard" will be created.

  2. Click Add a new panel.

    https://g-v3.lagoon.soracom.io

    Add new panel button in dashboard

    A panel will be created and the "Edit Panel" screen will appear.

    https://g-v3.lagoon.soracom.io

    Edit Panel screen interface

  3. Select Soracom Query from the Query tab.

    https://g-v3.lagoon.soracom.io

    Soracom Query selection in Query tab

  4. Enter the SQL query.

    For details on the query, refer to Display Session Creation Trend for the Last 24 Hours and generate it by asking the SQL Assistant in the User Console.

    https://g-v3.lagoon.soracom.io

    SQL query input field with session data query

The maximum character limit for SQL queries is 3,000 characters.

If your SQL query exceeds 3,000 characters, an error will be thrown. If you have exceeded the limit, reduce the number of characters in your SQL query within the allowable amount.

  1. Click Run (Shift+Enter) to execute the SQL query.

    As indicated on the button, you can also execute the query by pressing the Shift key and Enter key simultaneously.

    https://g-v3.lagoon.soracom.io

    Apply button to execute the query

API calls for Soracom Query are counted

When executing Soracom Query from Soracom Lagoon, the number of API calls to Soracom Query are counted towards the total. Some Soracom Query plans have a limit on the number of API calls, or incur fees based on the number of API calls executed. For further details, refer to View Usage

Note that the time range specified in your SQL query, may be limited time range set in the Panel

The time range of data that can be retrieved by your SQL query is governed by the time range set in the Panel.

Example: If the SQL query is written to retrieve values for the past 2 hours, but the time range in the Panel is set to 1 hour, only values for 1 hour will be retrieved.

Note that You won't incur Harvest Data export charges when retrieving data from SORACOM Harvest Data using Soracom Query.

Even if you've enabled the Harvest Data retention period extension option, there are no data export fees when querying Soracom Harvest Data with Soracom Query.

Step 2: Set the Panel Title

By default, "Panel Title" is displayed.

  1. Click All > Panel options and enter "Session Creation Count Trend for the Last 24 Hours" in the Title field.

    https://g-v3.lagoon.soracom.io

    Panel title configuration field

Step 3: Save the Dashboard

  1. Click Apply on the "Edit Panel" screen.

    https://g-v3.lagoon.soracom.io

    Legend configuration options

    You'll return to the Dashboard screen.

  2. Click the Save dashboard button.

    https://g-v3.lagoon.soracom.io

    Save dashboard dialog

    The Save dashboard screen will appear.

  3. Enter a name for the Dashboard (e.g., Session Creation Count Trend Dashboard) in the Dashboard name field and click Save.

    https://g-v3.lagoon.soracom.io

    Final dashboard with session trend chart

    The Dashboard will be saved.