Skip to content

Datasets

Datasets are SQL-based data sources that power blocks and visualizations in the Analytics module. A dataset defines a query that retrieves and transforms data from your database, making it available for charts, tables, and reports.

The Datasets module provides:

  • SQL Query Editor - Define custom queries to retrieve data
  • Column Detection - Automatic identification of column types (numeric, text, date)
  • Security Groups - Control which users can access the data
  • OData Exposure - Make datasets available to external tools via OData v4
  • Reusability - Use the same dataset across multiple blocks

Navigate to Settings > Data Management > Datasets to view and manage datasets.

Screenshot: Datasets in the settings navigation

The main view displays all datasets in your company.

Screenshot: Datasets list view

ColumnDescription
NameDataset name (click to edit)
ODataCheckmark indicates OData access is enabled
DescriptionDataset description

Use the search box in the header to filter datasets by name or description. The list updates as you type.

  1. Click the Add button in the header
  2. Enter the required information
  3. Write your SQL query
  4. Optionally configure security groups and OData access
  5. Click Save

Screenshot: New dataset form

FieldRequiredDescription
Dataset NameYesUnique name to identify the dataset
DescriptionYesExplain what data this dataset provides
QueryYesSQL query that retrieves the data
Security GroupsNoControl which users can access this dataset

The query field accepts standard SQL syntax. Your query should:

  • Return the columns needed for visualizations
  • Include appropriate filtering and aggregation
  • Use meaningful column aliases
SELECT
DATE(created_date) as order_date,
COUNT(*) as order_count,
SUM(total_amount) as revenue
FROM order_header
WHERE created_date >= NOW() - INTERVAL '30 days'
GROUP BY DATE(created_date)
ORDER BY order_date DESC

When you save a dataset, the system executes a sample query to detect column types:

TypeDetectionExample Values
NumericNumbers, decimals42, 3.14, 1000.50
TextStrings, identifiers"John Doe", "ORD-001"
DateDate/time patterns2024-01-15, Jan 15, 2024

Column types determine:

  • Available aggregation options in blocks
  • Filter input types (text search, date picker, numeric range)
  • Display formatting options

Click a dataset name to open the edit panel.

Screenshot: Dataset edit panel

When saving, the system validates your query by executing it with LIMIT 1. Common validation errors:

ErrorCauseSolution
Syntax errorInvalid SQLCheck query syntax
Table not foundTypo in table nameVerify table exists
Column not foundInvalid column referenceCheck column names
Query returned no resultsEmpty data or filter too restrictiveAdjust WHERE clause

Use Save As to create a copy of a dataset with modifications:

  1. Make changes to the dataset
  2. Click Save As
  3. Enter a new name
  4. The new dataset is created and selected

This is useful for creating variations of a query without modifying the original.

Assign security groups to control access to sensitive data.

Screenshot: Security groups selection

Access Rules:

  • Users in any assigned security group can access the dataset
  • Users without matching groups cannot see blocks using this dataset
  • Empty security groups = accessible to all users

Enable OData to expose the dataset to external tools like Excel, Power BI, or custom applications.

Screenshot: OData configuration section

  1. Open the dataset for editing
  2. Toggle Enable OData Access on
  3. The endpoint URL is generated automatically
  4. Copy the endpoint URL for use in external tools

The endpoint follows this format:

https://your-domain.com/odata/{dataset-slug}

For versioned datasets:

https://your-domain.com/odata/{dataset-slug}_v2

OData endpoints require Basic Authentication. Share the endpoint URL along with your API credentials with authorized users.

  1. Open the dataset for editing
  2. Click the Delete button (trash icon)
  3. Confirm the deletion
Dataset
├── Used by → Block(s)
│ └── Displayed on → Dashboard(s)
├── Security Groups → User access
└── OData Registry → External access

Before modifying or deleting a dataset, consider:

  • Which blocks reference this dataset
  • Which dashboards display those blocks
  • External tools connected via OData
  • Be specific - Select only needed columns, not SELECT *
  • Filter early - Apply WHERE clauses to limit data at the source
  • Aggregate wisely - Use GROUP BY for summary data
  • Use aliases - Give columns clear, readable names
  • Order results - Include ORDER BY for predictable output
  • Index key columns - Ensure filtered/joined columns are indexed
  • Limit date ranges - Use parameters or hardcoded limits for large tables
  • Avoid subqueries - Use JOINs when possible for better performance
  • Test with production data - Verify query performance with realistic data volumes
  • Apply security groups - Restrict access to sensitive financial or personal data
  • Use row-level filtering - Include WHERE clauses that filter by organization or user context
  • Audit regularly - Review security group assignments periodically
  • Limit OData exposure - Only enable OData for datasets that need external access
  • Use descriptive names: Daily Order Summary not orders_v2
  • Include the time range if applicable: Last 30 Days Revenue
  • Indicate aggregation level: Monthly Sales by Product
  • Prefix with category for organization: Finance - AR Aging
ErrorCauseSolution
”Invalid Query”SQL syntax errorCheck for typos, missing commas, or quotes
”Query returned no results”No matching dataVerify date ranges and filter conditions
”Column not found”Referenced column doesn’t existCheck table schema for correct names
”Permission denied”Database access issueContact administrator
IssueSolution
Block shows “No data”Verify dataset query returns results
Wrong data displayedCheck query logic and block configuration
Slow loadingOptimize query with indexes and limits
Block not visibleVerify user has security group access
IssueSolution
401 UnauthorizedCheck Basic Auth credentials
404 Not FoundVerify OData is enabled and endpoint URL is correct
Empty resultsCheck that query returns data
TimeoutOptimize query for faster execution