Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

Star schema

Hi All,

HIC

marcowedel

I have  single table in my data model .

Now my user want it as  Perfect star schema  

example;  I have  Order ,product,branch    three dimensions and measures too,

so user want see  the datamodel  with  facts as fact table and  dimensions as dimension tables separate and

the schema should look like start schema with single fact and surrounded by dimension table.

so how can I separate the data model from single table ?

Thanks

sony

7 Replies
soniasweety
Master
Master
Author

Hi Bala Bhaskar

any idea?

fabdulazeez
Partner - Creator III
Partner - Creator III

Use multiple resident loads to create dimension table

bwisealiahmad
Partner - Specialist
Partner - Specialist

Hi,

What would be your fact here? Is it your Order Quantity and Value?

I made an example if that is your measures.

  1. Determine measure columns and keys needed to connect dimension tables.
  2. Connect dimension tables and bring in the describing columns you want to describe your facts.

Here is an example with order measures as fact and I added the rest of the tables as a dimension. I made the dimension tables loaded distinctly as you only need each value once there.

Fact:

LOAD

     Prodcut_ID,

     BranchID,

     OrderID,

     OrderQty,

     OrderValue

FROM

(ooxml, embedded labels, table is Sheet1);

DIM_Product:

LOAD Distinct

     Prodcut_ID,

     Productname,

     ProductQty,

     Productvalue,

     Prodcutcategory,

     ProductType

FROM

(ooxml, embedded labels, table is Sheet1);

DIM_Branch:

LOAD Distinct

     BranchID,

     BranchQty,

     BranchName,

     BranchValue,

     BranchCategory,

     BranchType

FROM

(ooxml, embedded labels, table is Sheet1);

DIM_Order:

LOAD Distinct

     OrderID,

     OrderName,

     OrderCategory,

     OrrdetType

FROM

(ooxml, embedded labels, table is Sheet1);

Capture.PNG

Best,

Ali A

soniasweety
Master
Master
Author

can you exaplin more or sample is attached

soniasweety
Master
Master
Author

thanks ali...

so now I have 8 rows of data.... for example

I need to  increase that data to  100 times    it means 800 rows I want to populate  how can I achieve that?

bwisealiahmad
Partner - Specialist
Partner - Specialist

Hi,

Not sure what you mean by populate?

I've used the data you gave as an example so now you have to apply the same logic to your full dataset.

Best,

Ali A

balabhaskarqlik

May be something like this:

Load

          *,

          AutoNumber(RowNo(),WeekDayNo) as Sequence

From ABC;

OR

LOAD *,

        AutoNumber(RecNo(),AutonumberHash128(AddressNumber,WeekNo,WeekDayNo)) as Sequence

FROM ABC;