The augmented medallion architecture - Gold layer

"Gold" layer

Published on : April 15, 2025

|   Lastly edited on : April 15, 2025

|   6 minutes read

Lirav DUVSHANI

Lirav DUVSHANI


The Gold layer - Where all the business rules are implemented

Gold Overview

Purpose of the layer

The main purpose of this layer is to provide accurate business oriented datasets, enabling decision-making.


The secondary purposes of this layer are to :

  • Centralized data governance : Enable the enforcement of a data governance on business rules and KPIs
  • Centralized reference : Act as a centralized repository of standard company data

Characteristics of the layer

  • Storage should be optimized for analytical use
    • The data should be stored in a query-friendly structures, including primary key definition, partitionning and indexing
  • Allowed Data Structures
    • Structured
  • Granularity of data
    • The data can be detailed and/or aggregated
  • Applies business logic
    • The data is transformed according to the business logic, such as grouping, summarizing and KPI calculation

Good practices

The gold layer contains usually a good part of the intelligence of the data platform with all the business rules and KPIs. This means that there can be a high level of complexity in the data pipelines. To ensure easy root cause analysis and to facilitate maintenance, it is advised to split all complex pipelines into smaller processes.

Standard transformations applied

  • Referential Data Management
    • Creation of complete referential with attributes and hierarchies
  • Business logic rules
    • KPI Calculation
    • Currency & Unit Conversion
    • Segmentation & Categorization
  • Aggregation & Summarization
    • Aggregate on business relevant axis

Examples

Creation of complete referential

The creation of complete referential is the fact to merge all the data related to a particular axis of analysis. In most cases, this is not mandatory, but it is useful to have the entire data of a referential available in a single location, e.g. a table.

Silver Table - Customer


Customer IDCustomer NameCustomer GroupSectorEarnings RangeBilling Currency
1Customer AB2B - DirectIndustry>100M#
2Customer BB2B - IndirectIT10-100M#
3Customer CB2B - IndirectRetail<100MEUR
4Customer DB2B - DirectRetail10-100MEUR
5Customer EB2C - DirectIndividual#EUR
6Customer FB2C - DirectIndividual#EUR
7Customer GB2C - DirectIndividual#EUR

Silver Table - Customer Group Hierarchy


Customer GroupCustomer Group Level 1
B2B - DirectB2B
B2B - IndirectB2B
B2B - IndirectB2B
B2B - DirectB2B
B2C - DirectB2C
B2C - DirectB2C
B2C - DirectB2C

Gold Table - Customer Complete referential


All the information is stored inside a single table for easier access to the data.

Customer IDCustomer NameCustomer GroupCustomer Group Level 1SectorEarnings RangeBilling Currency
1Customer AB2B - DirectB2BIndustry>100M#
2Customer BB2B - IndirectB2BIT10-100M#
3Customer CB2B - IndirectB2BRetail<100MEUR
4Customer DB2B - DirectB2BRetail10-100MEUR
5Customer EB2C - DirectB2CIndividual#EUR
6Customer FB2C - DirectB2CIndividual#EUR
7Customer GB2C - DirectB2CIndividual#EUR

Conversion of amounts and quantities

The conversion of amounts and quantities can be useful to provide comparable data.

In this example, on a list of purchase orders, we'll convert the billed amount into a company currency (EUR), using a currency conversion table parametrized in the parametrization layer.


Silver Table - Orders


Purchase Order IDCustomer NameProduct NameBilling DateBilling CurrencyBilled Amount
PO-1Customer 1Product A2025-01-03EUR10,02
PO-2Customer 2Product B2025-01-04USD35,99
PO-3Customer 2Product C2025-01-04GBP20,00
PO-4Customer 1Product A2025-02-04USD99,99

Parameter Table - Currency Conversion


From CurrencyTo CurrencyFrom DateTo DateConversion Rate
USDEUR2025-01-012025-01-310,9708
USDEUR2025-02-012025-02-280,9637
GBPEUR2025-01-012025-01-311,18421
GBPEUR2025-02-012025-02-281,20772

Gold Table - Orders


3 purchase orders were billed in a different currency as the company currency, which is EUR. A conversion of the billed amount is applied using the currency conversion parametrization table considering the billing date as the date of reference for currency conversion.


Purchase Order IDCustomer NameProduct NameBilling DateBilling CurrencyBilled AmountCompany CurrencyCompany Amount
PO-1Customer 1Product A2025-01-03EUR10,02EUR10,02
PO-2Customer 2Product B2025-01-04USD35,99EUR34,94
PO-3Customer 2Product C2025-01-04GBP20,00EUR23,68
PO-4Customer 1Product A2025-02-04USD99,99EUR96,36

Aggregation of data

The aggregation of data can be relevant to summarize data for analysis.

Usually, the aggregation is not the first step in the gold layer and thus the source tables for this logic are usually also in the gold layer.


In this example, the goal is to provide the quantity of cost linked to purchase orders by month (based on billing date), customer and product.


Gold Table - Orders


Purchase Order IDCustomer NameProduct NameBilling DateCompany CurrencyCompany Amount
PO-1Customer 1Product A2025-01-03EUR10,02
PO-2Customer 2Product B2025-01-04EUR34,94
PO-3Customer 2Product C2025-01-04EUR23,68
PO-4Customer 3Product C2025-01-12EUR152,00
PO-5Customer 2Product C2025-01-13EUR28,50
PO-6Customer 2Product C2025-02-01EUR28,50
PO-7Customer 2Product A2025-02-02EUR23,68
PO-8Customer 1Product A2025-02-04EUR96,36
PO-9Customer 2Product C2025-02-06EUR50,00
PO-10Customer 2Product C2025-02-08EUR45,55

Gold Table - Orders summary


MonthCustomer NameProduct NameCompany CurrencyCompany AmountAdditional Info.
2025-01Customer 1Product AEUR10,02PO-1
2025-01Customer 2Product BEUR34,94PO-2
2025-01Customer 2Product CEUR52,18PO-3 + PO-5
2025-01Customer 3Product CEUR152,00PO-4
2025-02Customer 2Product CEUR124,05PO-6 + PO-9 + PO-10
2025-02Customer 2Product AEUR23,68PO-7
2025-02Customer 1Product AEUR96,36PO-8



This article is part of a series of article describing the augmented medallion architecture.