Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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

So, what I am trying to say is that create this new field before you create a qvd.... for example

Table:
LOAD FieldA,
FieldB,
....,
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]
FROM XYZ;

STORE Table into XYZ.qvd (qvd);

and now load from your qvd with Attribute Value already fixed in it....

Mahamed_Qlik
Specialist
Specialist
Author

Table:
LOAD FieldA,
FieldB,
....,
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]
FROM XYZ.qvd;

This is my script.
sunny_talwar

Did you try changing it to what I mentioned 🙂

Mahamed_Qlik
Specialist
Specialist
Author

Yes...It is still taking the same time. 😞
sunny_talwar

What is the new script? Can you share both the scripts you use to create the qvd and then the script you use to load the qvd?

Mahamed_Qlik
Specialist
Specialist
Author

see below is the script.

The comments line is creating issue. Just below it I put yours but that is again giving me same result

LOAD
Key,
factkey,
Attribute,
// 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],
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],
if(len(num([Attribute Value],'###,###,###,###,###'))>0,[Attribute],null()) as [Attribute Num],
num([Attribute Value],'###,###,###,###,###') as [Attribute Value Num]
FROM
$(vQVDPath)Fact.qvd(qvd);
sunny_talwar

Are you having difficulty understand my suggestion? I don't even think you are even trying to do what I have proposed.

Mahamed_Qlik
Specialist
Specialist
Author

Yes I got it, you mean to say that I should create this new field at the time of QVD store.
But, I am storing this QVD at ETL so dont you think it will good practice to do such transformation in ETL script ?