Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Need to extract parts of text on Qlik Load using regex (my database is microsoft SQL, which does not support regex). Found a post on how to do this in Qlik:
http://www.qlikfix.com/2010/10/18/regular-expressions-in-the-load-script/#X
However I can not load the qvw file into qlik sense (as this is a desktop file), when I have signed up for a free trial to convert this file I get an error "failed to upload file" (probably because it was designed for qlik in 2015). I found an old link to the desktop install file (3.2), however this crashes on load.
Any ideas on how to use regex to load a substring in Qlik (need actual regex not index,left,mid functions). Or could someone convert the qvw file into a qvd file for me?
Thanks, Marius
Thank you for the replies.
The answer in short is that regex is not possible using qlik sense. That is a surprising as it has so many powerful features. Should be pretty easy for Qlik to add this and I would consider this a standard tool in programming.
...need actual regex not index,left,mid functions...
Thanks, Marius
I don't know what exactly you meant by above statement. As already explained in the blog by Barry that it is achieved using VBScript (since qlik doesn't have it natively), you have to just call this function in qlikview script. Unfortunately you can't just simply call such foreign functions in qlik sense script. But there is option - you probably have to use a server-side plugin before you can use that. I never tried that using qlik sense though, so can't put more light on it.
If your regex isn't very complex it might be not too difficult to replace it with native Qlik features and the whole approach might be also faster to develop (and later also within the run-time in the case the dataset is rather large) as to implement any external script/macro/tool solution. The Qlik string-functions are quite powerful and there are more than just left/right/mid/index and especially in combination with a classical mapping and/or the use of mapsubstring() should the most things be possible.
Of course this needs more efforts as if you could just copy & paste an existing regex-logic and the above mentioned approach won't result in an universal regex-solution else in a rather specific one but if you had done it once and are a bit familiar with the logic and syntax it's not so complicated to copy and adjust the approach by the next time (if any needed).
- Marcus
Thank you for the replies.
The answer in short is that regex is not possible using qlik sense. That is a surprising as it has so many powerful features. Should be pretty easy for Qlik to add this and I would consider this a standard tool in programming.
You can have a look in the Ideas area of Community, if no existing post, you can add a new one there to request consideration of the feature.
https://community.qlik.com/t5/Ideas/idb-p/qlik-ideas
Regards,
Brett