Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
¿Is there any way to make the in the script to load the first 100 rows from all the tables?
thank you
Maybe you should be using RecNo ‒ QlikView and limit the values
Hi,
you can use select statement like select top 100 or load statement
table:
First 100 Load
*
From table.csv;
If you enable debug-mode you can set a row limit of 100 which applies to all tables.
To access debug mode select "Debug" from the script editor File Menu
i was looking instead of the debugger to write 'something' on the script.
Use First statement, see help on how to
In the script you can use the FIRST N prefix before the load where N is an integer, but the first limit only applies to the next table being loaded, so you would have to add FIRST before each table.
Table1:
First 1000
load ... from ... ;
Table2:
First 500
load ... from ...;
Using the Limit in Debug mode applies the limit to ALL tables in the script.
first ..... in a variable
SET vFirst = First 100; // for test
//SET vFirst = ;
$(vFirst)
load 1 as f1
autogenerate 1000;
$(vFirst)
load 1 as f2
autogenerate 1000;
And as an extension of Massimo's technique, consider creating a document variable vDebug that enables all debug and testing measures. You can then do something like this:
IF len(trim(vDebug)) > 0 THEN
SET vFirst = FIRST 100;
SET vDebug = 1;
END IF
Table:
$(vFirst)
LOAD 1 AS F1
AUTOGENERATE 1000;
IF vDebug = 1 THEN
STORE Table INTO [.\Table.qvd] (qvd); // For inspection
END IF
:
LET vFirst=;
EXIT Script;
or define a variable with parameters to embed or disable a dynamic STORE of every table you want to inspect.
Best,
Peter