Skip to main content

Glossary

Introduction

This glossary provides definitions for key terms used in the context of Sightfull syntax.

$ (dollar sign)

Operator $ is used as a prefix in order to call any semantic asset. For example, dimensions ($name), relationships ($owner.name), metrics ($metric__), periods ($period.end), macros ($macros.PERIOD_IN) etc.

metric__

A prefix used to call a metric within another metric definition.

- name: bookings_count
entity: opportunity
operation: count
filters:
- sql: $metric__bookings is not null

src__

A prefix used to call a source dimension (raw field) within a semantic mapping or a metric creation.

- name: name
type: string
sources:
- sql: $src__name
meta:
description: Opportunity's name

period

A prefix used to call a periodic value in metric creation according to the calculated period. For example, $period.start and $period.end will call the first date or the last date of the period respectively.

- name: opportunities_created_in_the_period
entity: opportunity
operation: count
filters:
- sql: $created_date between $period.start and $period.end

entities

A key in the semantic mapping yaml used to define an object. Under the "entities" section the following details are defined: name, metadata, data source, primary keys, relationships, dimensions.

dimensions

A key in the semantic mapping yaml used to define normalized fields. For example:

dimensions:
- name: id
type: string
sources:
- sql: $src__id
meta:
description: Object identifier

formula_metrics

Formula metrics are metrics created by combining results of multiple metrics using simple mathmetics operations such as addition (+), subtraction (-), multiplication (*) and division (/). In order to define a formula metric use the formula_metrics: key. Example:

formula_metrics:
- name: formula_metric_name
entity: opportunity
formula: $metric__metric_1 / $metric__metric_2

metrics

In order to define a metric use the metrics: key.

metrics:
- name: opportunities_created_in_the_period
entity: opportunity
operation: count
filters:
- sql: $created_date between $period.start and $period.end

relationships

A key in the semantic mapping yaml used to define relationships bettween objects. For example:

relationships:
- name: account
referenced_entity: account
type: many_to_one
meta:
description: Opportunity's Account
on: "$src__account_id = $account.src__id"