πŸ“Š Data Studio

Sentio Data Studio is a powerful analytics platform designed for users who need deeper insights and more flexible data analysis capabilities than standard dashboards offer. It provides a comprehensive environment for transforming raw blockchain data into meaningful insights, visualizations, and APIsβ€”all within your browser.

Key components of the Data Studio interface

Description

Functionality

β‘ 

Schema Panel

Browse available tables, saved queries, and views.

β‘‘

SQL Editor

Supports autocomplete, multiple tabs, and keyboard shortcuts (⌘/Ctrl + Enter to run).

β‘’

Run Controls

Configure row limits and view execution time metrics.

β‘£

Results Pane

Toggle between Table, Line, Bar, Area, Scatter, or Pie visualizations.

β‘€

Action Buttons

Save Query, Save View (Pro), Add to Dashboard, Create Endpoint.

β‘₯

AI Assistant

Seamlessly integrated, AI assistance extends beyond the dedicated 'Ask AI' panel, offering contextual suggestions and actions directly inline when you select text within the SQL editor.


1. Writing and Executing Your First Query

The core of Data Studio is its powerful SQL editor.

  • Explore Data: Before writing your query, you can preview table schemas and sample data directly in the Schema Panel (β‘  in the image below) on the left. This helps you understand the available fields and their content. Click on table or column names to auto-insert them into your query.

  • Write Your SQL: Use the SQL Editor (β‘‘) to compose your queries. It features syntax highlighting and autocomplete to streamline the process.

  • AI Assistance: Leverage the built-in AI Assistant (β‘₯) to:

    • Generate SQL queries from natural language descriptions.
    • Explain complex SQL logic.
    • Optimize query performance by identifying bottlenecks or suggesting improvements.

    Daily number of transfers over the last 30 days

    Recent transfers for a specific ERC20 token


2. Running Queries and Visualizing Results

As you refine your SQL, you can instantly see the impact.

SELECT
    date_trunc('day', timestamp)                 AS day,
    SUM(CAST(amount AS DECIMAL(38,18)))          AS total_volume,
    COUNT(DISTINCT from)                         AS unique_senders,
    COUNT(DISTINCT to)                           AS unique_receivers,
    COUNT(*)                                     AS transfers
FROM "Transfer"
GROUP BY
    date_trunc('day', timestamp)
ORDER BY
    day DESC;

πŸ’‘

Tip: Click on column names like timestamp, amount, from, and to in the Schema panel to auto-insert them into your query.

  • Execute your query by clicking the Run button or pressing ⌘/Ctrl + Enter
  • Review the tabular results to verify data accuracy
  • If the results aren't quite right, simply go back to the SQL editor pane above, modify your query, and click Run again. Repeat this cycle until the preview shows the exact data you need for your analysis.

3. Visualizing Query Results

  • Switch to your preferred visualization type (Line, Bar, etc.) to create charts.

  • Hover over data points to see detailed values without additional coding.

  • Directly integrate your query's visualization into a Sentio Dashboard for ongoing monitoring and analysis alongside other metrics.

4. Using Queries as Endpoints/APIs

Once your SQL query is finalized, Data Studio offers several ways to share or reuse your analysis (using the Action Buttons β‘€):

  • Create Endpoint: Transform your query into a live API endpoint. This generates a REST API URL that returns paginated JSON results, perfect for powering external applications, bots, or custom frontends. You can configure endpoint slugs, permissions (Public/Private), and default parameter values if your query uses variables (e.g., {{address}}).

  • Use SQL API: Unlike endpoints, using the SQL API requires passing SQL parameters with each request. Based on the parameters provided, you can dynamically query and retrieve the data you need in real-time.

5. Leveraging Advanced Features

  • Save Query (Free & Pro): Stores the SQL definition for personal use or work-in-progress.
  • Save View (Pro): Creates a materialized view from your SQL, storing pre-calculated results for faster future access. For a more detailed guide, please refer to ⚑ Materialized Views.
  • Export Results: Download the raw data from your query results table in formats like CSV for use in other tools or further offline analysis. (Note: Look for an "Export" button in the Results Pane).
  • Types of datasets: Beyond analyzing data from your own processed events and states, Sentio curates a series of datasets within the Schema Panel (β‘ ).

    • Curated Data: Access a growing library of valuable, pre-processed datasets covering various blockchain activities and protocols (e.g., decoded DEX trades, NFT metadata). These datasets, cleaned and maintained by the Sentio team, are listed under their respective chain tables in the Schema Panel.
    • Chain Data: Access fundamental blockchain data like transactions and blocks. This raw data is also listed under the respective chain tables in the Schema Panel.

These official and shared data sources are continuously updated and expanded. Keep an eye on the Schema Panel for new datasets to enrich your analysis! We also welcome you to share your valuable data.