Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I need total count of rows loaded during load script from all data sources.
This needs to be done, before any transformation, to show much data is loaded, and how much data is actually used.
Thanks in advance
After each source table load, retrieve the number of rows of your loaded resident table using the appropriate system function (I think it's called NoOfRows( TableName ) , but check the HELP).
You can add all rows up in a variable or load in a separate table with the table name, to get a more detailed meta data information table you can export or show.
Tab1: SELECT * from mytable1;
Tab2: SELECT * from mytable2;
t1: Load RowNo() as tot_Tab1 Resident Tab1;
t2: Load RowNo() as tot_Tab2 Resident Tab2;
Let vTot1 = Peek('tot_Tab1', -1, 't1');
Let vTot2 = Peek('tot_Tab2', -1, 't2');
Let vTot = $(vTot1) + $(vTot2);
Let me know ...
Let vTableCount = NoOfTables();
For i =1 to $(vTableCount)
let vTableName = TableName(i-1);
let vRowCount = NoOfRows('$(vTableName)');
RowCount:
Load * inline
[
TableName,RowCount
$(vTableName),$(vRowCount)
];
you can modify this logic to add all table counts into a variable
You are all right, but I just figured out what I exactly need.
My app is gathering the data about other applications, like size, category, name etc.
Now I need to show for each app, the number of rows that they load and the number that they actually use.
sorry for misdirection.
Here is the code,
DistributeTask:
LOAD ID,
Name,
Enabled,
[SourceDocument/FileName] as FileName,
[TaskCategories/TaskCategory/Name] as [TaskCategory/Name]
FROM [$(vFolder)\Tasks\*.xml](XmlSimple, Table is [DistributeTask])
Where Enabled = 'True';
LET DATA_COUNT1 = NoOfRows('DistributeTask');
sub DoDir (Root)
for each Ext in 'qvw'
for each File in filelist (Root&'\*.'&Ext)
Load '$(File)' as FileName,
FileSize('$(File)') as Size,
FileTime('$(File)') as FileTime
autogenerate 1;
next File
next Ext
for each Dir in dirlist (Root&'\*')
call DoDir (Dir)
next Dir
end sub
call DoDir ('\\10.145.73.78\qlikview\QlikView_Server_Nutzdaten\Projects')
//