Skip to main content

Reports: Studio

How to use Superset in Swaarm - query your data with SQL Lab, explore available datasets, build charts and graphs, and create custom dashboards.

Updated today

Superset gives you direct access to your Swaarm data for custom reporting and visualisation. You can query any dataset using SQL, build charts and graphs from the results, and organise them into custom dashboards.

Go to Reports → Studio in the Swaarm menu - this opens Superset in a new tab.


Querying data in SQL Lab

  1. In Superset, click SQL → SQL Lab in the top navigation

  2. Select a table from the See Table Schema dropdown to explore its structure

  3. Write your query in the editor and click Run

  4. Click CSV to export results

⚠️ Some tables - especially clicks — can contain very large volumes of data. Always use a WHERE clause to filter by date range, offer, or publisher, and add a LIMIT to avoid timeouts. We recommend a maximum of 10,000 rows for click queries.

Available datasets

Table

What it contains

activity

User activity data

ad_keywords

Ad keyword data

advertisers

Advertiser records

bid_requests

Bid request data

click_redirections

Click redirection logs

clicks

Full click log

discarded_clicks

Clicks that were discarded

discarded_impressions

Impressions that were discarded

evaluated_postbacks

Postbacks that have been attributed successfully - the primary source for conversion data

impressions

Impression log

lead_forwarding_results

Results from lead forwarding

leads

Lead data

offers

Offer records

publisher_contacts

Publisher contact information

publishers

Publisher records

users

User data


Example queries

  • Click log for a specific offer and publisher

SELECT * FROM clicks WHERE offer_id = '12345'   AND publisher_id = '54321'   AND time BETWEEN '2026-01-01 00:00:00' AND '2026-01-02 00:00:00' LIMIT 10000
  • Conversions per offer for a date range

SELECT offer_offerId , count() AS conversions FROM evaluated_postbacks 
WHERE time BETWEEN '2026-01-01 00:00:00' AND '2026-01-31 23:59:59'
AND status_state = 'APPROVED' GROUP BY offer_offerId
ORDER BY conversions DESC LIMIT 100
  • Clicks per landing page

SELECT offer_lpId, count() AS clicks FROM clicks WHERE offer_id = '12345'   AND time BETWEEN '2026-01-01 00:00:00' AND '2026-01-31 23:59:59' GROUP BY offer_lpId ORDER BY clicks DESC
  • Discarded clicks by reason

SELECT failedRules, count() AS total FROM discarded_clicks WHERE time BETWEEN '2026-01-01 00:00:00' AND '2026-01-31 23:59:59' GROUP BY failedRules ORDER BY total DESC

ℹ️ For ClickHouse SQL syntax and available functions, see the ClickHouse documentation →


Building charts

You can create charts directly from your query results or from any dataset.

  1. Go to Charts → + Chart

  2. Select a dataset and a visualisation type (bar chart, line chart, pie chart, table, etc.)

  3. Configure the dimensions, metrics, and filters

  4. Click Save

Example 1 - Profit per day (line chart)

A simple daily profit trend for the current month.

Dataset: evaluated_postbacks Chart type: Line chart

Setup:

  • Time Column: time

  • Time Grain: Day

  • Time Range: Month to date

  • Metrics: Click + Drop columns/metrics here or click → the metric editor opens → select the Custom SQL tab → type SUM(offer_weGetStd) - SUM(offer_theyGetStd) → click the pencil icon to rename it Profit → click Save

  • Filters: status_state IN APPROVED

ℹ️ Check here how to add metric with an operation.

The result shows a day-by-day profit curve so you can spot dips or spikes quickly.

Example 2 - Daily performance by offer and publisher

Paid events per day filtered by a specific offer and publisher - useful for monitoring campaign volume month to date.

Dataset: evaluated_postbacks Chart type: Line chart

Setup:

  • Time Column: time

  • Time Grain: Day

  • Time Range: Last Month

  • Metrics: Click + Drop columns/metrics here or click → select COUNT(*) to count rows

  • Filters:

    • status_state in APPROVED

    • offer_offerId = [your offer ID]

    • click_publisher_id = [your publisher ID]*

ℹ️ Check here how to add metric with an operation.

The result shows the number of paid events per day for that offer/publisher combination, with each day of the month along the time axis.

Example 3 - Revenue per offer (bar chart)

Compare total revenue across all offers for the current month.

Dataset: evaluated_postbacks Chart type: Bar chart

Setup:

  • Time Column: time

  • Time Range: Last Month

  • Metrics: Click + Drop columns/metrics here or clickSimple tab → select offer_weGetStd → set aggregation to SUM → rename to Revenue → click Save

  • Dimensions: offer_offerId

  • Filters: status_state = APPROVED

  • Sort by SUM(weget) descending

ℹ️ Check here how to add metric with an operation.


Example 4 - Conversions by publisher (table)

A ranked table of publishers by conversion count with revenue and costs.

Dataset: evaluated_postbacks Chart type: Table

Setup:

  • Time Column: time

  • Time Range: Last Month

  • Metrics:

    • COUNT(*)

    • offer_weGetStdSUM

    • offer_thyeGetStdSUM

  • Dimensions: click_publisher_id

  • Filters: status_state = APPROVED

  • Sort by COUNT(*) descending

ℹ️ Check here how to add metric with an operation.

How to add a metric with an operation

  1. Click + Drop columns/metrics here or click in the Metrics field - the metric editor opens

  2. The editor has three tabs: Saved, Simple, and Custom SQL

  3. For a simple aggregation (e.g. SUM of revenue):

    • Select the Simple tab

    • Choose the column (e.g. offer_weGetStd)

    • Select the aggregate function: AVG, COUNT, COUNT_DISTINCT, MAX, MIN, SUM.

    • Click the pencil icon next to "My metric" to rename it (e.g. Revenue)

    • Click Save

  4. For a custom formula (e.g. profit = revenue minus costs):

    • Select the Custom SQL tab

    • Type your expression - e.g. SUM(offer_weGetStd) - SUM(offer_theyGetStd)

    • Click the pencil icon to rename it (e.g. Profit)

    • Click Save


Building dashboards

Saved charts can be combined into custom dashboards for a persistent reporting view.

  1. Go to Dashboards → + Dashboard

  2. Enter a name and click Save

  3. Click Edit Dashboard to enter edit mode

  4. Drag and drop saved charts onto the canvas

  5. Resize and arrange as needed

  6. Click Save to publish

Example - Daily Performance Dashboard

A useful starting point for an AM's daily check-in:

  • Profit per day line chart - SUM(weget) - SUM(theyget) by day, Month to Date

  • Revenue per day line chart - SUM(weget) by day, Month to Date

  • Costs per day line chart - SUM(theyget) by day, Month to Date

  • Publisher conversion table - ranked by conversion count with revenue and costs

Add filters at the dashboard level so you can switch between offers or date ranges without rebuilding each chart individually.


Related articles

Did this answer your question?