Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
otavio_marco
New Contributor III

Remove all data After run VBScript

Hello guys ...

everything okay?

Could reply my question?

It is this: every day I run the script to load information from my database. After the end of the run, I use a macro (using vbscript) to extract a table (which I created) to csv and finalized qvw.

My big problem is that the data is saved in qvw, leaving it heavy for a next run.

I wonder if I have to remove all information after running the macro ...

Thanks to all: D

12 Replies
Not applicable

Re: Remove all data After run VBScript

Hi Marco ,

I believe, you don't need a Macro to store the table data into CSV. You can store the table data csv into by using STORE command like below:

STORE TABLENAME into TABLENAME.csv (txt) ;

If you want to improve your reload time, please implement Incremental load. Please go through the below link for reference.

Incremental Load

otavio_marco
New Contributor III

Re: Remove all data After run VBScript

Hello dathu.qv,

thanks for this tip. but i guess my problem is other.

After run script my "calculated tables" are updated. Succeeding, run macro for exporting this table in csv file.

My problem is clear all data after run this macro.

See you later!

Not applicable

Re: Remove all data After run VBScript

I believe, you can add the Clear All option at the end of the Macro script.?

Are you executing the Macro in the script or Post Reload trigger ?

Please add the "Clear All" action on the Post Reload trigger so it will clear all the selections.

otavio_marco
New Contributor III

Re: Remove all data After run VBScript

Hi....

Actually, i need to drop all tables after macro...Is the same if i open qvw without data..

Employee
Employee

Re: Remove all data After run VBScript

Why don´t just do this?

Store yourtable into file.csv(txt);

drop table yourtable;

otavio_marco
New Contributor III

Re: Remove all data After run VBScript

Hi Clever....

Because my table is a chart (straight table)..

I need to export this table calculated after running the script, so I used macro.

Is there another way to do this?

morris70
Valued Contributor

Re: Remove all data After run VBScript

I am not sure if it is possible to do this as I don't think you can go back into the script to do a drop table.

As I understand you want to complete a reload then export a straight table (with all the calculations made) and then trigger a drop table from the script. How much data do you need, do you need to load all the data into the .qvw or is it possible to only load the latest data for example last week or month?

otavio_marco
New Contributor III

Re: Remove all data After run VBScript

Hello Nills...

that's right...

I reload ever 1 month... But my qvws contains approximately 1GB.. so i need clean then after macro...

but if don't have other way, i'll continue using this method.

Not applicable

Re: Remove all data After run VBScript

Hi Marco, How much calculations are doing in the straight table.

I believe all these calculations will be done in the script level and make one required table by using join or concatenate.

Community Browser