Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Mahamed_Qlik
Specialist
Specialist

Wildmatch and ** returning 0

Hi All,

 

I am facing high reload time issue using wildmatch function in backend script in below :

if(wildmatch(Attribute, '*DATE*') or wildmatch(Attribute, '*date*') or wildmatch(Attribute, '*Date*'),
date(floor([Attribute Value]),'MM/DD/YYYY'),
if(wildmatch(Attribute, '*prem*') or wildmatch(Attribute, '*PREM*') or wildmatch(Attribute, '*Prem*'),
text(num([Attribute Value],'$#,##0.00')),
text([Attribute Value]))) as [Attribute Value],

 

It is taking 1hr to reload and if i skip this wildmatch then it taked hardly 10 mins.

Can you please how I can fix this issue and what I can user instead of wildmatch in script

17 Replies
sunny_talwar

May be try to simplify it to this

Pick(WildMatch(Upper(Attribute), '*DATE*', '*PREM*') + 1,
  Text([Attribute Value]),
  Date(Floor([Attribute Value]), 'MM/DD/YYYY'),
  Text(Num([Attribute Value], '$#,##0.00'))
) as [Attribute Value],
Mahamed_Qlik
Specialist
Specialist
Author

Thanks for sharing , I will try and let you know.
But I still have one query that you are also using wild-match function then how it will help to reduce reload time
sunny_talwar

I am not sure if the WildMatch is the problem or if is the problem.... I have suggested to remove the if and test.

Mahamed_Qlik
Specialist
Specialist
Author

Okay. I will user it and watch the result and also let you know.
Thanks.
Mahamed_Qlik
Specialist
Specialist
Author

Hi

 

It is still taking of time to reload.

sunny_talwar

Is this happening while loading from a qvd or any other source?

Mahamed_Qlik
Specialist
Specialist
Author

loading from QVD only
sunny_talwar

So, that is the issue.... create this new field before you create the qvd and then bring in this as a field and that should resolve your issue... The problem is that by creating this, you are breaking the optimized load. And this has nothing to do with this complicated calculation, just add 0 as Dummy and the optimized load will break

Mahamed_Qlik
Specialist
Specialist
Author

I am sorry but I not getting you.
I have already created qvd and we loading this QVD in data model level and in there we are doing this trasformation to the field