Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Create star schema

Hello.

Please see the attached file.

I have problems joining my tables to create a start schema, when I join table Donors with table Donor_Email and Donor_Cellphone. Count(DONOR_ID) returns way to many occurrences...

Is this the right way to perform a join to create star shema or what am I doing wrong?

Regards

Databyran

8 Replies
MVP
MVP

Re: Create star schema

Hi,

Note that Count() return the number of rows with any value in DONOR_ID. If one table has more than one record for the same value in the field DONOR_ID Count() will return the larger number.

Hope that helps.

Miguel

Not applicable

Re: Create star schema

probably script error

send a qvw file or part of the script

don't you think there are to many tables?Smiley Happy

Donor_Birthyear

Donor_HasEmail

Donor_PhoneNo

Donor_Emaila

Donor_Cellph

Donor_Zipcode

...

it could be one tableSmiley Happy

Not applicable

Re: Create star schema

Yes, i know. But is it "ok" to have several DONOR_ID since this is the key for a uniqe donor?

I can solve it by adding DISTINCT but i am wondering if it is okay to have the same DONOR_ID several times?

Regards

Databyran

Not applicable

Re: Create star schema

Yes, I know there is too many tables, thats why I want to join those tables.

Should I join all tables that have DONOR_ID in common?

Regards

Databyran

MVP
MVP

Re: Create star schema

Hi,

Yes, supposedly the DISTINCT will return the number of unique values in the field. Anyway, joining tables (or using mapping tables) to reduce the number of existing tables in the model and simpilfying will help.

Think of records where the DONOR_ID might be null, but not the other fields (probably mistakes when entering data).

Hope that helps.

Miguel

Not applicable

Re: Create star schema

It's up to you

I think you can link all the tables where each donor_id has only one value (cellno, edress, etc)

Not applicable

Re: Create star schema

Ok, so I am not able to get a "clean" star schema in this case because I have several tables where donor_id appers several times?

Regards

Databyran

Not applicable

Re: Create star schema

I didn't say you can'tSmiley Happy

it's up to you bacouse there are some pros and cons

data structure determines your "layout job"

Community Browser