Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
I have an app with several tables inside of it.
t1:
Load *
From t1.qvd;
t2:
Load *
From t2.qvd;
...
t22:
Load *
From t222.qvd;
I need to create new table inside the app that will contain the liast of the all tables name ans timestamps what each of these tables was start loading and finished. I tried to so it via the script below, but I getting only one and the same timestamp for all tables. What am I doing wrong?
t1:
Load *
From t1.qvd;
t2:
Load *
From t2.qvd;
...
t22:
Load *
From t222.qvd;
For t = 0 to NoOfTables() - 1
Tables:
Load
Now() as ReloadStart,
$(t) as id,
TableName($(t)) as Table,
TableNumber(TableName($(t))) + 1 as TableNo,
NoOfRows(TableName($(t))) as TableRows,
Now() as ReloadEnd
Autogenerate 1;
Next t;
Hi Peony,
You can try this:
Timestamps:
Load * Inline [
StartTime, EndTime
];
For each File in FieldValueList('ToBeLoadedQVDs')
let vStartTime = Now();
t1:
Load
*
From $(File).qvd;
let vEndTime = Now();
Concatenate(Timestamps)
Load * Inline [
StartTime, EndTime
$(vStartTime),$(vEndTime)
];
NEXT
Jordy
Climber
Hi Peony,
You can try this:
Timestamps:
Load * Inline [
StartTime, EndTime
];
For each File in FieldValueList('ToBeLoadedQVDs')
let vStartTime = Now();
t1:
Load
*
From $(File).qvd;
let vEndTime = Now();
Concatenate(Timestamps)
Load * Inline [
StartTime, EndTime
$(vStartTime),$(vEndTime)
];
NEXT
Jordy
Climber
Hi JordyWegman.
Thank you fir your reply. Unfortunatly, I don't understand from where I should take 'ToBeLoadedQVDs'. Could you please explain?
Of course, that is the list of all your files (QVDs, XLSXs etc.). Below I show you a way how you can create this:
You can choose a way that @jagan created in his post. Fill in your location in the Call ScanFolder('here'); and change the FileExtension to the files you want to check (qvd, xlsx etc.)
Set vConcatenate = ;
FileList:
LOAD
'' AS ToBeLoadedQVDs
AUTOGENERATE 0;
sub ScanFolder(Root)
for each FileExtension in 'qvw'
for each FoundFile in filelist( Root & '\*.' & FileExtension)
FileList:
LOAD '$(FoundFile)' as ToBeLoadedQVDs
AUTOGENERATE 1;
Set vConcatenate = Concatenate;
next FoundFile
next FileExtension
for each SubDirectory in dirlist( Root & '\*' )
call ScanFolder(SubDirectory)
next SubDirectory
end sub
Call ScanFolder('C:\Jagan\QV Dashboards\QV Production Dashboards') ;
Jordy
Climber
Got it! Thank you very very much for help!