Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
gauthamchilled
Creator
Creator

Authorization load taking long time

Hi,

I've implemented a complex authorization logic provided by Basics for complex authorization

I have five fields used in authorization load for section access and it is taking long time to  reload the dashboard.

Load Distinct * Where Exists([~AUTH KEY]);

Load Year,

'<ANY>' & '|' & '<ANY>' & '|' & '<ANY>' & '|' & '<ANY>' & '|' & '<ANY>' as [~AUTH KEY] ,

Country & '|' & Office & '|' & Region & '|' & Department & '|' &  Category as [AUTH KEY]

resident Fact;

I have 32 load statements like above with different key combinations.

Please help is there any way to sort out the long reload time to shorter? Thanks

Gautham

1 Solution

Accepted Solutions
Siva_Sankar
Master II
Master II

If you are not changing the section access file everyday, then there is no need to create Auth key everyday. You could try creating fresh Auth keys only when the new user is added or section access file is changed. Create a condition to check something like

Load  Date(filetime()) as ModifiedDate

FROM

SectionAccess.Xlsx;

Let vActualDate =Today();

Let VLastModifiedDate = peek ( 'ModifiedDate', 0 , ' tmp ');

if  $(VLastModifiedDate)=$(vActualDate)  Then

Full Reload to create keys

Else

Load from QVDs.

Hope it helps.

Regards,

Siva

View solution in original post

31 Replies
gauthamchilled
Creator
Creator
Author

Any suggestion or help?

stabben23
Partner - Master
Partner - Master

Hi Gautham,

how much is "long time"? in these case when use key combination you often reload the fact table With resident load.

To reload the fact table to get all possible combination will take some time and thats the only way.

How many rows in Your Fact table?

If you have Publisher you can use loop and reduce on the possible combinations and create documents from the Source file.

Without Your script it will be hard to find a way to optimize Your reloadtime.

avinashelite

what is the data size you have ?? and how the data is associated with that because I feel because of the combination its taking long time to calculate the key for linking the fact and section access table

jonathandienst
Partner - Champion III
Partner - Champion III

Looks like you are trying to create generic keys for section access. Did you read this Generic keys?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
gauthamchilled
Creator
Creator
Author

Yes, I followed the documents by HIC as i mentioned in my first post.

I have around 9 million records. When i analyzed the document log file, i found that it is taking time only for creating the keys.

sample load statement:

Load Distinct * Where Exists([~AUTH KEY]);

Load Year,

'<ANY>' & '|' & '<ANY>' & '|' & '<ANY>' & '|' & '<ANY>' & '|' & '<ANY>' as [~AUTH KEY] ,

Country & '|' & Office & '|' & Region & '|' & Department & '|' &  Category as [AUTH KEY]

resident Fact;

just wanted to sort out how i can reduce this time

jonathandienst
Partner - Champion III
Partner - Champion III

What happens if you move the where clause to the main body of that load?

Load Year,

'<ANY>' & '|' & '<ANY>' & '|' & '<ANY>' & '|' & '<ANY>' & '|' & '<ANY>' as [~AUTH KEY] ,

Country & '|' & Office & '|' & Region & '|' & Department & '|' &  Category as [AUTH KEY]

resident Fact

Where Exists([~AUTH KEY]);


Not sure if that will make much difference, though.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
gauthamchilled
Creator
Creator
Author

Let me try and update you.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Jonathan, I think you are on the right track as preceeding load is remarkable slow these days.

Gautham, what is the point of the Where Exists([~AUTH KEY])? It looks to me like it would keep all rows.

-Rob

gauthamchilled
Creator
Creator
Author

I just followed the instructions from HIC document on generic keys..it is mentioned to use exist key to load only keys that exist in fact table.. please point me if i am wrong.

Capture.JPG