Extracting Data from NPrinting 16 NSQ file for conversion to NP17
I have received multiple requests for some functionality that allows us to seamlessly convert from NP16 to NP17. Due to the very different nature of the repositories between the two versions it seems that there is unlikely to be a 'one click' solution to moving across. However, I have experimented with reading some of the data out of an NSQ file, such as users, groups and filters so that we can make use of the import functionality in v17 to streamline a move across. This import functionality is covered at the following link at help.qlik.com. If you're using a version later than 17.2 then be sure to update that in the top right hand corner.
So, how will this post help?
The following steps will allow you to extract the following from your NSQ project files (you'll know what these are if you're using NP16):
These outputs can then be used to help populate (with some manual changes) the import file as identified above. It is still a manual process but this will save a lot of time in compiling the lists of users, groups and filters that are in your complicated NSQ files.
Steps to get it working...
Make a copy of your NSQ file (VERY IMPORTANT!!)
Change the document extension on the file from '.nsq' to '.xml'
Open in a text editor (I used notepad++ in this example screenshot)
Delete text and characters on first line to leave only this: <?xml version="1.0" encoding="UTF-8"?>
save this file.
Download the QlikView file attached to this post
Edit the QlikView file for the following... (unfortunately this is quite manual and is possibly the reason there isn't a more global approach).
in edit script on the Main tab, update the vFileLocation variable in the script with your file location and name (your XML file that is).
On the Original XML tab (Note this is after the [>>>> EXIT SCRIPT <<<<] tab on purpose), review the content as to how the keys in this Original XML have been used in the 'NSQ as XML' tab.
These key references will need to be updated as those in your NSQ file will be different
Create a new tab again after the [>>>> EXIT SCRIPT <<<<] tab and load in the data from your XML file.
The table structure will be the same but the key field labels may not be. You will need to manually update the [NSQ to XML] tab with the new references where necessary (there are not that many so it should only take a few minutes).
Please note there is an unusual join in the L4 tables that I have coded around to ensure we could get the filters information.
Okay... Now you're ready to reload, review the data in QlikView and export to Excel to help populate the import file.
Hope this helps and feel free to offer suggestions for improvements as this was a quick hack to get the information I needed.