Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can we use Commandline to Reduce Data in a QVW file?

Hi,
There is a requirement to open a qvw, reduce Data and save it using Command prompt. Can it be done without using macro?

Regards,

Dawar

5 Replies
tresesco
MVP
MVP

You can reduce to no data using the /nodata parameter.

/nodata - open document without data (all objects and script and macros, no records)


But that's it, no more flexibility.

Not applicable
Author

\nodata i believe will remove the variables and table structure too.. I dont want that to happen. Just a normal reduce data that we usually do from File option in UI..Also, don't want to reload the file.

Thanks

marcus_sommer

You could try this with a vbs-batch, like:

Option Explicit

Dim QA, QD, apppath, param1, newdoc  

apppath = "C:\test.qvw"

set QA = CreateObject("QlikTech.QlikView")

set QD = QA.ActiveDocument.GetApplication

set newdoc = QD.OpenDoc(apppath, "","")

      

newdoc.Fields("AnyField").Select "AnyValue" 'maybe a dummy-field within a loosen table

newdoc.ReduceData

newdoc.SaveAs "C:\test_Reduced.qvw"

newdoc.CloseDoc

QD.Quit   

- Marcus

trdandamudi
Master II
Master II

I think the below link should help....

Remove data from qvw with command line

jhamard
Partner - Contributor III
Partner - Contributor III

Vote for my idea : 😉