Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

resident

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

1 Solution

Accepted Solutions
puttemans
Specialist
Specialist

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

View solution in original post

4 Replies
PradeepReddy
Specialist II
Specialist II

check.. if there is any Binary Load  statement available.

puttemans
Specialist
Specialist

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

Not applicable
Author

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

puttemans
Specialist
Specialist

Glad I could help you. Enjoy your day as well.