You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesión a prueba de IA

Antes: $249

Currency
$209
Suscríbete

Termina en:

1 Días
10 Hrs
42 Min
51 Seg

Modelado dimensional: identificación de dimensiones y métricas

14/26
Resources

How to identify relevant business questions?

In order to create an effective dimensional model, it is essential to start from well-defined business questions. A business question is one that asks the customer's or organization's needs, which we hope to solve with data. The more business questions we manage to formulate, the more information we will gather and the more robust and adequate model we will obtain to answer multiple situations.

What if we can't answer all the questions?

We will not always have the data needed to answer all the business questions. We may have to request permissions or the data may simply not exist. It is crucial to be transparent with the organization about current limitations and how they might be overcome in the future. In addition, it is essential to be clear about the vision of the model and its constraints to manage customer and internal team expectations.

How to identify dimensions and metrics?

Once the business questions have been formulated, the next step is to identify dimensions and metrics. Recall that the dimensions are the perspectives from which we want to analyze the metrics; the latter are the quantifiable aspects of the data.

Practical example: Sales analysis

Consider this business question, "How many units of each product have been sold to each customer in a given time?"

  • Measure or metric: Units sold.
  • Dimensions:
    • Product: Perspective to measure units sold.
    • Customer: Another relevant actor in the sale.
    • Time: Specifies the time frame of the analysis.

In this way, we identify that to know the units sold, the dimensions of product, time and customer are needed.

Example of contracting by area

Assume the question, "How much hiring has been done by area in a specific country?"

  • Measure or metric: Number of hires.
  • Dimensions:
    • Area: Specific space within the organization.
    • Country: Place where the hiring takes place.

The correct identification of dimensions and metrics allows us to create a model that provides useful answers for the business.

Practical examples of business question analysis

Let's look at another example to better understand how to work with business questions.

Discounts and net sales

Let's consider the question, "How much have the discounts and net sales been in quantities and values by month and day?"

  • Measures or metrics:

    • Sales quantities
    • Sales values
    • Discounts
    • Net sales: Calculated as values minus discounts.
  • Dimensions:

    • Time (month and day): allows you to break down sales into precise time.

Net sales growth

Another important question could be, "How much has net sales grown or declined as of the March 2013 cutoff for each salesperson?"

  • Indicators:

    • Net sales
    • Sales growth or decline.
  • Dimensions:

    • Time (month of March, year 2013).
    • Vendor: Additional dimension to include in the analysis.

Best-selling products and categories

To understand the market, we could ask, "What is the best-selling product per day, by category?"

  • Measurements:

    • Units sold
  • Dimensions:

    • Product
    • Time (day)
    • Category: It can be a dimension itself or a product attribute. If the number of categories is high, it is advisable to separate them.

Customer with the most purchases

Finally, when asked the question: "Who is the customer who has purchased the most units in the last year?", they are identified:

  • Measurements:

    • Units sold
  • Dimensions:

    • Customer: Key actor in the analysis.
    • Time (last year): Determines the period of study.

By clearly identifying the dimensions and metrics, we can design a well-structured data model that facilitates decision making based on deep and accurate analytics.

Contributions 1

Questions 3

Sort by:

Want to see more contributions, questions and answers from the community?

El **modelado dimensional** es una técnica de diseño de bases de datos utilizada principalmente en Data Warehousing para organizar y optimizar datos para análisis y consultas. Consiste en identificar las **dimensiones** y las **métricas (hechos)** clave, que permiten representar el negocio desde múltiples perspectivas. ## **Pasos para identificar dimensiones y métricas:** ### **1. Definir el objetivo del análisis:** * Identifica qué preguntas de negocio necesitas responder. * Ejemplo: "¿Cuáles son las ventas mensuales por región y producto?" ### **2. Identificar las métricas o hechos (Facts):** * **Definición:** Son los valores numéricos o medibles que representan eventos o transacciones del negocio. * **Ejemplos comunes:** * Ventas totales * Cantidad de productos vendidos * Costos operativos * Tiempo empleado en un proceso * Beneficios **Preguntas clave para identificar métricas:** * ¿Qué indicadores se quieren analizar o medir? * ¿Qué datos numéricos se calculan o resumen? ### **3. Identificar las dimensiones (Dimensions):** * **Definición:** Son las categorías descriptivas que contextualizan los hechos. Proporcionan las perspectivas desde las que se analizan las métricas. * **Ejemplos comunes:** * Fecha * Producto * Cliente * Región o Ubicación * Canal de venta **Preguntas clave para identificar dimensiones:** * ¿Qué contexto o perspectiva es relevante para analizar las métricas? * ¿Cómo se clasifica o agrupa la información? * ¿Qué información complementaria se necesita para entender los hechos? ### **4. Determinar la granularidad:** * **Granularidad:** Nivel de detalle al que los datos serán almacenados en la tabla de hechos. * **Ejemplos:** * Nivel de transacción individual (más granular) * Nivel agregado diario, mensual, o anual (menos granular) * Es fundamental definirlo al inicio, ya que afecta el diseño del modelo. ### **5. Diseñar las relaciones entre hechos y dimensiones:** * Establece relaciones entre las métricas y sus dimensiones a través de llaves foráneas. * Define cómo las dimensiones proporcionan el contexto para analizar los hechos. ## **Ejemplo práctico: Ventas en un supermercado** ### **Objetivo del análisis:** * Analizar las ventas por producto, cliente y región a lo largo del tiempo. ### **Identificación de métricas:** * Total de ventas (`importe_venta`) * Cantidad de productos vendidos (`cantidad_vendida`) * Descuentos aplicados (`descuento`) ### **Identificación de dimensiones:** * **Dim\_Fecha:** Día, mes, trimestre, año. * **Dim\_Producto:** Código, categoría, marca, precio. * **Dim\_Cliente:** ID del cliente, nombre, edad, género. * **Dim\_Ubicación:** País, ciudad, tienda. * **Dim\_Canal de Venta:** Tienda física, en línea. ### **Granularidad:** * **Nivel:** Una fila por cada transacción en cada tienda. ## **Modelo dimensional: Esquema Estrella** ### Tabla de hechos: `Fact_Ventas` FechaIDProductoIDClienteIDUbicacionIDCanalIDCantidad\_VendidaImporte\_VentaDescuento ### Tablas de dimensiones: 1. **Dim\_Fecha**FechaIDDíaMesAñoTrimestre 2. **Dim\_Producto**ProductoIDNombreCategoríaMarcaPrecio 3. **Dim\_Cliente**ClienteIDNombreEdadGénero 4. **Dim\_Ubicación**UbicacionIDPaísCiudadTienda 5. **Dim\_Canal**CanalIDCanal ## **Herramientas útiles para identificar dimensiones y métricas:** * **Entrevistas a usuarios clave:** Identifica las necesidades de análisis de los equipos de negocio. * **Revisión de reportes actuales:** Observa qué datos ya están siendo utilizados. * **Documentación de procesos:** Comprende los eventos clave que generan datos en la empresa. Este proceso asegura que el diseño del Data Warehouse esté alineado con las necesidades reales del negocio y optimizado para el análisis de datos.