Querying a Galaxy Schema in data warehouse

I have a galaxy schema that looks like this galaxy schema

what I want to extract from this schema is data from dim1, dim 2, fact1 and dim 4. I have written this code but I am not sure if it is correct. lets suppose that dim1 has d1 value, dim2 d2 , fact1 f1 and so one and their primary keys are dim1id, dim2id and so one.

My code: **

select d1,d2,f1, d4 
from fact1
join dim1 on fact1.dim1id=dim1.dim1id
join dim 2 on fact1. dim2id=dim2.dim2id
join fact2 on fact2.dim2id=dim2.dim2id
join dim4 on fact2.dim4id=dim4.dim4id

**



Comments

Popular posts from this blog

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations