Skip to main content

Dataset syntax

(This feature is currently in active development. Please reach out if you want to become beta tester)


Please note that the dataset file has the extension .dataset.aml. Its full name is dataset_name.dataset.aml.

Dataset syntax definition

Dataset syntax defines the Dataset inside a project which will be then deployed to production as Ready-to-explore Dataset for end users to explore and get insights.

The syntax of Dataset includes 4 main components

  • Dataset metadata: dataset labels, descriptions, owners
  • Data Source reference: users' exploration activities will
  • Data models included
  • Relationship

Dataset syntax

import 'path/to/model_a.model.aml' { model_a }
import 'path/to/model_b.model.aml' { model_b }

Dataset dataset_name {
label: 'Dataset Label'
description: "Dataset description here"
owner: '[email protected]'

data_source_name: 'data_source_name'

models: [

relationships: [
// Relationship syntax go here

// relationship between model_a and model_b is many to one
rel(rel_expr: model_a.field_name > model_b.field_name, active: true, direction: 'two_way')

// relationship between model_a and model_b is one to one
rel(rel_expr: model_a.field_name - model_b.field_name, active: true, direction: 'two_way')



For more information about relationship syntax, please go to this doc

Parameter definition

Parameter nameDescription
importAdd other files to the current dataset file
datasetCreate Dataset
labelSpecifies how the dataset will appear in the Ready-to-explore Dataset
descriptionAdd dataset description
ownerDefine who should be in charge of managing the current dataset
data_source_nameSpecify the database that Holistics will execute the generated query against (in dataset)
relationshipsSpecify relationship and their configuration among added models
modelsSpecify which models will be used in the dataset

Dataset syntax example

import '../models/base-model/users.model.aml' { users }
import '../models/base-model/orders.model.aml' { orders }

Dataset raw_ecommerce {
label: 'Raw Ecommerce'
description: "This Dataset is about Ecommerce data nha"
owner: '[email protected]'

data_source_name: 'demodb'

models: [

relationships: [
// define relationship between orders and users is many to one
rel(rel_expr: orders.user_id >, active: true, direction: 'two_way')

The output