Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Moritz
Contributor III
Contributor III

Craft a binary load with sampled data

Hi,

I'm pulling in various associated tables from another app, with help of a binary load.

While the "Sample" command works for single tables, i don't see this working for a binary load.

How would I create my own binary source with only a small sample of the data in the original app?

 

Labels (2)
2 Solutions

Accepted Solutions
pedrobergo
Employee
Employee

Hi @Moritz 

You cannot add SAMPLE prefix to BINARY because it is a hard copy from in-memory tables of an app, but you can add a load resident.

NoConcatenate
Sample XX
Load * Resident [Table];

Drop Table [Table];

[],

Pedro

 

View solution in original post

Moritz
Contributor III
Contributor III
Author

Thanks, Pedro!

edit: this worked great!
As I have plenty of tables in this app, I'd need to loop through all of them.
The code below worked for me:

Binary [path];
FOR i = 0 to NoOfTables() - 1
LET vTableName = TableName(i);
NoConcatenate
Sample 0.01
LOAD * Resident
[$(vTableName)];
Drop
Table [$(vTableName)];
NEXT

 

Thanks!

 

View solution in original post

2 Replies
pedrobergo
Employee
Employee

Hi @Moritz 

You cannot add SAMPLE prefix to BINARY because it is a hard copy from in-memory tables of an app, but you can add a load resident.

NoConcatenate
Sample XX
Load * Resident [Table];

Drop Table [Table];

[],

Pedro

 

Moritz
Contributor III
Contributor III
Author

Thanks, Pedro!

edit: this worked great!
As I have plenty of tables in this app, I'd need to loop through all of them.
The code below worked for me:

Binary [path];
FOR i = 0 to NoOfTables() - 1
LET vTableName = TableName(i);
NoConcatenate
Sample 0.01
LOAD * Resident
[$(vTableName)];
Drop
Table [$(vTableName)];
NEXT

 

Thanks!