Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey everyone,
I was looking a qlikview where the script was wrtitten by someone who left the company.
There is something that makes me feel a bit confused 😕
In the first tab, there is this piece of code :
left join (tableA)
field1,
field2
resident OneTable;
To me, we use resident to use a table we have previously loaded in the script but here, I cannot find 'OneTable' anywhere in the script. (I used CTRL + F) How is it possible ?
Might there be a hidden part of the script ?*
Thanks for your help
Hi Laura,
The table could be inserted into the programmation in a different way. In my script (also scripted mainly by someone else), the 'call' function is sometimes used to create a table.With this function, you do manipulate data, but you don't see it in your script. This is because the actual script for the call is found elsewhere.
e.g.
CALL ScanFolderTrain ('$(vFolderSourceData)\TXT\');
will do
sub ScanFolderTrain( Root)
for each FileExtension in 'txt'
for each FoundFile in filelist( Root & '*nmbsoutput_*.' & FileExtension)
Filelist:
LOAD
MOAR_ID,
MOAR_SUB_ID,
MORO_ID,
Origin,
Destination,
TrackNr,
TrainKey,
Trainnummer,
From,
To,
From_ptCar,
To_ptCar,
Hour as Hour,
Departure,
Arrival,
Duration,
Penalty,
FROM [$(FoundFile)] (txt)
// WHERE TrackNr >0;
;
next FoundFile
next FileExtension
//DROP Field Day, Hour;
end sub
And the ScanFolderTrain is a .QVS file that sits in a library folder.
In this example, the table Filelist is made.
In my script, the command is followed by a rename command for the filelist table, and that is how I can trace back. In yours, this may not be done, but the table may reside in memory untill used.
Hope this helps...
Johan
check.. if there is any Binary Load statement available.
Hi Laura,
The table could be inserted into the programmation in a different way. In my script (also scripted mainly by someone else), the 'call' function is sometimes used to create a table.With this function, you do manipulate data, but you don't see it in your script. This is because the actual script for the call is found elsewhere.
e.g.
CALL ScanFolderTrain ('$(vFolderSourceData)\TXT\');
will do
sub ScanFolderTrain( Root)
for each FileExtension in 'txt'
for each FoundFile in filelist( Root & '*nmbsoutput_*.' & FileExtension)
Filelist:
LOAD
MOAR_ID,
MOAR_SUB_ID,
MORO_ID,
Origin,
Destination,
TrackNr,
TrainKey,
Trainnummer,
From,
To,
From_ptCar,
To_ptCar,
Hour as Hour,
Departure,
Arrival,
Duration,
Penalty,
FROM [$(FoundFile)] (txt)
// WHERE TrackNr >0;
;
next FoundFile
next FileExtension
//DROP Field Day, Hour;
end sub
And the ScanFolderTrain is a .QVS file that sits in a library folder.
In this example, the table Filelist is made.
In my script, the command is followed by a rename command for the filelist table, and that is how I can trace back. In yours, this may not be done, but the table may reside in memory untill used.
Hope this helps...
Johan
That's it Johan ! Thanks a lot !
I did have a $(Include=pathway\file.txt) at the beginning of the script.
Have a good day
Glad I could help you. Enjoy your day as well.