Forum Discussion

powerbiexpert22's avatar
powerbiexpert22
Icon for Impactful Individual rankImpactful Individual
25 days ago
Solved

Snowflake schema

i need to convert snowlfake schema into star schema, the only way i can think is by denormalizing tables however i am not sure which tables i should consider for denormalization, also is there any ot...
  • ShahRukhSameer's avatar
    25 days ago

    Hi powerbiexpert22​,

    You don't necessarily need to denormalize everything to get a star schema.

    I'd start with the fact table and define its grain first. Then look at the related tables and see which ones are mainly providing descriptive attributes.

    For example:

    FactSales
    → DimProduct
    → DimSubcategory
    → DimCategory

    could become a single DimProduct containing Product, Subcategory, Category, Brand, etc.

    The same can be done with other dimensions where it makes sense.

    You also don't have to physically change the Snowflake tables. You can keep the source schema as it is and create a dimensional layer using Snowflake views or your ETL/ELT process for Power BI.

    The main goal is to have simple relationships such as:

    DimProduct 1 → * FactSales
    DimCustomer 1 → * FactSales
    DimDate 1 → * FactSales

    I wouldn't flatten every table blindly, though. Tables with different grains or many-to-many relationships need to be handled separately to avoid duplicate rows and incorrect measures.

    If you share the table names/relationships, it would be easier to suggest exactly which ones I'd combine.