rogerio-faria / qdevops

App to easily automate Qlik Sense operations
http://qdevops.desq.com/
9 stars 2 forks source link

Export/Edit/Import - Master Dimensions/Measures #4

Closed bugsysiegals closed 2 years ago

bugsysiegals commented 3 years ago

I've exported Master Dimensions/Measures to a text file, find/replace, save, and import; however, all the items were renamed. I figured perhaps they need to be deleted before import but I've hundreds of items and would prefer to mass delete. Is this true? If so, what's the syntax for mass delete?

rogerio-faria commented 3 years ago

Ok, well, you can solve this using one of: 1 - use the masterdims command and flag 'true' to the 'update' parameter, check the command help

Command: d:|masterdims:

Import and Export Master Dimensions from a Qlik Sense App to/from a file.
Parameters:
    -option = 'import' or 'export'
    -appid = Qlik Sense AppId to apply the command.
    -file = The file that stores/saves the objects Metadata.
    -update = If 'true' will update the Dimensions with same name

Usage: -d=option,appid,file,update

2 - You can, before import, delete previous masters with the command -clearallobjs, using: qdevops -u=<SERVER> -clearallobjs=masterdimensions,<APP> -masterdims=import,<APP>,<FILE.TXT>,true

Please, return to me if that solved your issue. If not , let me understand more, with the commands you used, and check if there's a way to help you more efficiently!

Thanks fot the issue

bugsysiegals commented 3 years ago

Thanks for the quick reply.

I've run "qdevops -help" but it does not give any detailed help with specific command syntax as you've presented ... how do I get those details?

I've run the following command but overwrites names with names such as 00308125-b1c2-47d4-a670-dc9f01e441a6 qdevops -u=desktop -m=import,C:\Users\QlikSense\Documents\Qlik\Sense\Apps\Dashboard.qvf,measures.txt,true

I've then tried to clear first using ... qdevops -u=desktop -clearallobjs=mastermeasures,C:\Users\QlikSense\Documents\Qlik\Sense\Apps\Dashboard.qvf -m=import,C:\Users\QlikSense\Documents\Qlik\Sense\Apps\Dashboard.qvf,measures.txt,true

and this command results in ... Location connected AsDirectConnectionToPersonalEdition! Hub openned! Removing mastermeasures from: Dashboard Removed: PWGzZz Removed: 0ad51e64-3b3a-4a59-b94b-d37ad0ef374d Removed: 1d62adf4-200f-496f-ac81-0449b875bfa7 Removed: 496423e5-605d-4bab-b60f-a2f73309cd03 Removed: fbe6744d-6783-4aec-b2b3-436321870b6a Removed: RhdpL Error openning the App. App already open in different mode [1009]:App already open in different mode(C:\Users\QlikSense\Documents\Qlik\Sense\Apps\Dashboard.qvf)

bugsysiegals commented 3 years ago

FWIW - I ran -clearallobjs and -m=import commands separately and they worked without this error; however, the application did not retain the original names.

bugsysiegals commented 3 years ago

Any ideas why the “true” flag is not overwriting the master item name? I’ve 300+ Master Items which need to be updated and do not wish to do this manually so I really hope you can help me get this working.

FWIW - I’m using the latest Desktop version of Qlik Sense.

rogerio-faria commented 3 years ago

To see one command detalis type: qdevops -h=<CMD> The error App already open in different mod generaly occurs when in desktop or on server, the app is openned in 'Edit Script Mode' or 'Manage Data'. When running qdevops is better to close app, then run it. About the MasterItens name, I will check, maybe is a bug.

bugsysiegals commented 3 years ago

Thanks, the error was happening when opening Desktop without opening any application and just showing the hub. I believe I tried with the application closed but it didn't work because I've prompt to authenticate to my company when opening Qlik Sense. Nonetheless, in case anybody else has this issue, I was able to make it work by doing the commands separately.

Thanks for checking on the renaming, it's terrible that find/replace isn't a standard operation within Qlik Sense especially when you have this many measures.