Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

berryandcherry6
Contributor II

Rules or ways to be followed while scripting in data load editor

I know guys this is a silly question, but i need to know the ways followed for better data modeling in qlik sense.

While i scripting in data modeling i encountered

1.)sync error

2.)looping error

3.)syntax error

4.)No error but getting model disconnected from some tables.

First three where able to recognize and load it. But third because of model disconnected from some part of tables,i "just" made it to get connected by same column in model and disconnected tables.

But after this even all the tables are connected to one other,and datas are present with respect to those values. I get some issues.issues like repeation of datas.

Can please help me on this understanding of Scripting and modeling in qliksense and why those issues i get even after model are connected to each other.

Regards,

Supriya

10 Replies

Re: Rules or ways to be followed while scripting in data load editor

Let's start with these three rules:

  1. Qlik Sense is case sensitive with regards to field names. That means that SALES, sales, Sales and SaLeS are four different fields as far as Qlik Sense is concerned.
  2. Tables are associated (that means connected) using the common field names of the tables. If two tables contain a field Sales then the field Sales will be used to associate the two tables. If two tables share multiple fields (because they have the same case sensitive name in both tables) then those tables will be associated using those multiple fields as the key. In that case you get a synthetic key.
  3. There should always be only one path between two tables. If there are two or more paths to get from one table to another table in the data model then you have a loop and will get loosely coupled tables (and unpredictable behavior).

talk is cheap, supply exceeds demand
berryandcherry6
Contributor II

Re: Rules or ways to be followed while scripting in data load editor

Hi gwassenaar ,

Thank you for your reply,

According to third point,every table have to be connected to other table with single path so i could retrieve data.

In my attached sample i have connected every table but you can see that for every client_id ,user_id getting repeated. Why is it happening like that?every client has different user_id.

Re: Rules or ways to be followed while scripting in data load editor

Check your source data. The data comes from the rcdb.useractivitylog table. Apparently that table contains multiple records for each user_id value with different client_id values and different status values. Since it's a log table there are probably records for a lot of different times and/or dates.


talk is cheap, supply exceeds demand
berryandcherry6
Contributor II

Re: Rules or ways to be followed while scripting in data load editor

Hi,

Now i have chosen different table called 'clientuser'  for client_id and BATCHMETADATA for user_id.

In  clientuser table  has different client_id and for user_id i have taken BATCHMETADATA.

Even now user_id is getting repeated.check my attached file

Please help me on this.

Re: Rules or ways to be followed while scripting in data load editor

I don't see any difference between the two .qvf files you posted.


talk is cheap, supply exceeds demand
berryandcherry6
Contributor II

Re: Rules or ways to be followed while scripting in data load editor

HI,

PLease look at this attached sample

Re: Rules or ways to be followed while scripting in data load editor

Looks fine to me. If you don't understand your data model then first try to understand the data model of the source database and how records in different tables are related to each other.


talk is cheap, supply exceeds demand
berryandcherry6
Contributor II

Re: Rules or ways to be followed while scripting in data load editor

Hi sir,

can you please explain how it is fine, I am not getting it.   tables what i am using those dont have repeated values of user_id

please check below image,in that user id is only two. Then the data has to show for those user_id with client_id.i mean it has to show only two rows of data. How could different client can have same user_id.User_id is unique.

Capture.PNG

berryandcherry6
Contributor II

Re: Rules or ways to be followed while scripting in data load editor

Hi gwassenaar ,

Can you please look into this attached file, i am getting repeated values i still dont know why it is happening.

And i am sure that User table is having unique user_id.If it is happening like this then how could i make it to display client_id for that particular  details. or how could i avoid it to get repeated?

Please help me in this.

Thanks,

Supriya

Community Browser