Data Explorer
Query and analyze data from your automations. Run SQL-like queries, export results, and build reports.
What Is Data Explorer?
Data Explorer lets you:
- Query data generated by your automations
- Analyze run history and patterns
- Export data for external analysis
- Build ad-hoc reports
Running Queries
Basic Query
- Go to Setup → Explorer
- Write your query in the editor
- Click Run or press
Ctrl+Enter
SELECT * FROM automation_runs
WHERE status = 'success'
LIMIT 100
Query Editor Features
Available Tables
Automation Data
Example: Run Statistics
SELECT
automation_name,
COUNT(*) as total_runs,
SUM(CASE WHEN status = 'success' THEN 1 ELSE 0 END) as success,
SUM(CASE WHEN status = 'failed' THEN 1 ELSE 0 END) as failed,
AVG(duration_ms) as avg_duration
FROM automation_runs
WHERE created_at > NOW() - INTERVAL '7 days'
GROUP BY automation_name
ORDER BY total_runs DESC
Business Data
Your automations can store custom data:
Example: Custom Records
SELECT
data->>'customer_name' as customer,
data->>'order_total' as total,
created_at
FROM records
WHERE schema = 'orders'
AND created_at > '2024-01-01'
ORDER BY created_at DESC
Query Syntax
Filtering
-- Exact match
WHERE status = 'success'
-- Pattern matching
WHERE automation_name LIKE 'order%'
-- Multiple values
WHERE status IN ('success', 'pending')
-- Date ranges
WHERE created_at BETWEEN '2024-01-01' AND '2024-01-31'
-- Null checks
WHERE error_message IS NOT NULL
Aggregations
-- Count
SELECT COUNT(*) FROM automation_runs
-- Sum
SELECT SUM(data->>'amount') FROM records
-- Average
SELECT AVG(duration_ms) FROM automation_runs
-- Group by
SELECT status, COUNT(*)
FROM automation_runs
GROUP BY status
JSON Data
Access nested JSON fields:
-- Extract value
data->>'customer_name'
-- Extract nested value
data->'address'->>'city'
-- Filter by JSON value
WHERE data->>'status' = 'active'
Saving Queries
Save for Later
- Write your query
- Click Save Query
- Enter a name and description
- Access from Saved Queries tab
Share with Team
- Open a saved query
- Click Share
- Select team members
- They can view and run the query
Exporting Results
Export Formats
Export Steps
- Run your query
- Click Export
- Choose format
- Download file
Large Exports
For queries returning >10,000 rows:
- Click Export → Background Export
- Receive an email when ready
- Download from the link
Query Templates
Start with pre-built queries:
Run Success Rate
SELECT
DATE_TRUNC('day', created_at) as day,
COUNT(*) as total,
SUM(CASE WHEN status = 'success' THEN 1 ELSE 0 END)::float
/ COUNT(*) * 100 as success_rate
FROM automation_runs
WHERE created_at > NOW() - INTERVAL '30 days'
GROUP BY day
ORDER BY day
Slowest Automations
SELECT
automation_name,
AVG(duration_ms) as avg_duration,
MAX(duration_ms) as max_duration
FROM automation_runs
WHERE status = 'success'
AND created_at > NOW() - INTERVAL '7 days'
GROUP BY automation_name
ORDER BY avg_duration DESC
LIMIT 10
Error Analysis
SELECT
error_type,
COUNT(*) as occurrences,
MAX(created_at) as last_occurred
FROM run_errors
WHERE created_at > NOW() - INTERVAL '7 days'
GROUP BY error_type
ORDER BY occurrences DESC
Performance Tips
Query Optimization
- Always use
LIMITduring development - Add
WHEREclauses to filter early - Use indexes (contact support for custom indexes)
- Avoid
SELECT *in production queries
Best Practices
Do
- Save frequently used queries
- Add comments explaining complex logic
- Use date filters to limit data
- Test with
LIMITfirst - Export large datasets in background
Avoid
SELECT *on large tables- Unbounded queries (no date filter)
- Complex JOINs without filters
- Running expensive queries repeatedly
Related Guides
- Dashboards → — Visualize query results
- Resources → — Store analyzed data