Datasets

Datasets: Preparing your Data

Datasets are the “middle layer” of Datalytics. While Data Sources connect to your raw data, Datasets allow you to clean, filter, and prepare that data so it’s ready for beautiful reports.

Why use Datasets?

Think of a Dataset as a custom view of your data. You might have a massive “Sales” table with 50 columns, but you only need 5 for your CEO’s report. A Dataset lets you:

  • Filter out noise: Only include the rows and columns you need.
  • Rename fields: Turn “cust_id_01” into “Customer Name” for easier reading.
  • Join Data: Combine tables (e.g., link “Product ID” in your sales table to a “Product Name” in your inventory table).

How to Create a Dataset

  1. Navigate to Datasets: Click the “Add Icon” icon in the sidebar.
  2. Click Add: Select “Create Dataset.”
  3. Choose your Source: Pick the Data Source you connected earlier.
  4. Select Tables: Choose which tables from your database you want to include.
  5. Define your View:
    • Add Calculations: Create new fields like “Total Profit” (Revenue - Cost).
    • Set Filters: (e.g., “Only show sales from the last 30 days”).
  6. Save and Name: Give your dataset a clear name like “Monthly Sales Performance.”

Technical Transformation Tips

For those who want more control, the Dataset layer supports:

  • Aggregations: Group data by day, month, or category automatically.
  • Joins: Support for Left, Right, and Inner joins between tables in the same source.

Expert Mode for Advanced Users

For users who need fine-grained control over their data transformations, Datalytics offers an Expert Mode.

  1. Enable Expert Mode: Locate the “Expert Mode” toggle in the top right section of the Dataset editor.
  2. Expert Query Editor (SQL): Once enabled, the standard interface is replaced with a code editor where you can write direct query pipelines.

Writing Advanced Queries

The Expert Query Editor allows you to use SQL aggregation pipelines. The basic structure for a query is:

This feature is ideal for complex transformations that go beyond the standard UI capabilities, allowing you to use the full power of pipeline-based data preparation.

Who uses this?

  • Technical Users: Set up the datasets once so that business users can build reports without worrying about the underlying database structure.