Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save $200. Learn More
Highlighted
soniasweety
Valued Contributor III

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
Highlighted
soniasweety
Valued Contributor III

Re: Star schema

Hi Bala Bhaskar

any idea?

Highlighted
Partner
Partner

Re: Star schema

Use multiple resident loads to create dimension table

Highlighted
Partner
Partner

Re: Star schema

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

Highlighted
soniasweety
Valued Contributor III

Re: Star schema

can you exaplin more or sample is attached

Highlighted
soniasweety
Valued Contributor III

Re: Star schema

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?

Highlighted
Partner
Partner

Re: Star schema

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

Highlighted
balabhaskarqlik
Honored Contributor

Re: Star schema

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;