(+351) 21 24 10006  ·  info@bconcepts.pt
Carnaxide, Lisbon

How to create a Mini Conformed Dimension in Data Modeling (Kimball)

João Barros 28 de November de 2026 4 min read

This tutorial shows how to build a Mini Conformed Dimension in Data Modeling (Kimball) to share common attributes across multiple fact tables. The approach helps ensure consistency in analyses (conformed dimensions) without creating a very large dimension that harms performance.

Prerequisites

  • Basic knowledge of Kimball modeling and star schema.
  • SQL environment (e.g., SQL Server, PostgreSQL or Azure SQL) to create tables and load data.
  • Sample data: two fact tables with some attributes in common (e.g., produto_id, produto_categoria, fornecedor_id).

Step 1: Identify common attributes and the objective of the Mini Conformed Dimension

Start by analyzing the fact tables that need to share attributes. The objective of a Mini Conformed Dimension is to expose only the attributes that are actually shared (and stable) to reduce duplication and change control without creating a monolithic dimension.

Step 2: Define the dimension key and the essential attributes

Choose the natural key (e.g., produto_id) and create a surrogate key (produto_sk). Select only attributes needed for common analyses and filters; avoid volatile attributes.

CREATE TABLE dim_produto_miniconformed (
  produto_sk INT IDENTITY(1,1) PRIMARY KEY,
  produto_id VARCHAR(50) NOT NULL,
  produto_categoria VARCHAR(100),
  fornecedor_id VARCHAR(50),
  ultima_atualizacao DATETIME DEFAULT GETDATE(),
  CONSTRAINT ux_produto_id UNIQUE(produto_id)
);

Step 3: Extract and load initial data (simple ETL)

Extract distinct values from the sources of the fact tables and load them into the dimension. You should only insert unique entries per produto_id. If there is a conflict of attributes between sources, define a precedence rule.

INSERT INTO dim_produto_miniconformed (produto_id, produto_categoria, fornecedor_id)
SELECT DISTINCT produto_id, produto_categoria, fornecedor_id
FROM (
  SELECT produto_id, produto_categoria, fornecedor_id FROM fact_vendas
  UNION ALL
  SELECT produto_id, produto_categoria, fornecedor_id FROM fact_devolucoes
) src
WHERE produto_id IS NOT NULL
ON CONFLICT (produto_id) DO NOTHING; -- PostgreSQL exemplo

Step 4: Update fact tables to reference the Mini Conformed Dimension

Replace or add the surrogate key in the fact tables so they link to the dimension. Keep the original natural key in case you need to trace the source.

-- Exemplo: adicionar produto_sk à fact_vendas
ALTER TABLE fact_vendas ADD produto_sk INT;

UPDATE fv
SET produto_sk = dp.produto_sk
FROM fact_vendas fv
JOIN dim_produto_miniconformed dp ON fv.produto_id = dp.produto_id;

-- Opcional: criar índice para desempenho
CREATE INDEX ix_fact_vendas_produto_sk ON fact_vendas(produto_sk);

Step 5: Manage changes (lightweight SCD policy)

For a Mini Conformed Dimension a lightweight SCD policy is generally used: treat attribute changes according to analytical impact. For non-critical attributes, update in-place (SCD Type 1). For attributes that require history, keep a separate full dimension.

-- Exemplo simples SCD Type 1: actualização in-place
UPDATE dim_produto_miniconformed dp
SET produto_categoria = s.produto_categoria,
    fornecedor_id = s.fornecedor_id,
    ultima_atualizacao = GETDATE()
FROM (
  SELECT produto_id, MAX(produto_categoria) AS produto_categoria, MAX(fornecedor_id) AS fornecedor_id
  FROM staging_produtos
  GROUP BY produto_id
) s
WHERE dp.produto_id = s.produto_id
  AND (dp.produto_categoria <> s.produto_categoria OR dp.fornecedor_id <> s.fornecedor_id);

Step 6: Document and version the Mini Conformed Dimension

Record the list of fact tables that consume the dimension, the source precedence rule and the update policy. Maintain a manifest with the included attributes and the reasons (performance, frequency of use).

Verify the result

Confirm that the fact tables point to dim_produto_miniconformed via produto_sk, that there are no duplicates in the dimension and that filters/reporting return consistent values. Useful tests:

  • Count unique products in the dimension vs in the union of the fact tables.
  • Run reports by produto_categoria using the dimension and verify that aggregations match.
  • Check query times before/after (benefit of referencing the dimension).

Conclusion

A Mini Conformed Dimension enables sharing essential attributes across multiple fact tables, ensuring conformance and better performance without the complexity of a large dimension. Next steps: automate the update ETL and assess if some attributes require SCD Type 2 in a parallel system. Tip: start small and only add attributes to the conformed dimension when there is clear usage in reports.