Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
julioarriaga
Creator II
Creator II

How do I drop all tables after a Binary Load?

Hi everybody,

I am creating a small txt file from a huge binary model file and I wish to drop all the information of the binary after the txt is generated, so my application has a manageable size. Right now I can't improve the model to make it smaller.

Thanks in advance.

My sample code is the next one (the Set section was ommitted for the sake of clarity):

Capture1.PNG

1 Solution

Accepted Solutions
fkeuroglian
Partner - Master
Partner - Master

Hi Julio

You can drop your tables only using the DROP TABLE function

After load binary and create your txt, put

Drop table TableName1,TableName2,TableNamexxxx;

Good luck

View solution in original post

3 Replies
fkeuroglian
Partner - Master
Partner - Master

Hi Julio

You can drop your tables only using the DROP TABLE function

After load binary and create your txt, put

Drop table TableName1,TableName2,TableNamexxxx;

Good luck

mikeqlikcloud
Contributor
Contributor

Hi

A dynamic way to drop all tables:

Let myvar = NoOfTables() ;

//Returns the number of tables previously loaded.

FOR x=0 to myvar  ;

if not isnull(TableName( 0 )) then

Let locTable = TableName( 0 ) ;

drop table $(locTable);

end if

next ;

Not applicable

One thing to be aware of is the subtle distinction between

DROP TABLE X, Y, Z;

vs

DROP TABLE X;

DROP TABLE Y;

DROP TABLE Z;

The first one above on a single line is more efficient.  Should only be applicable/noticeable for very large data models, but something to be aware of.