Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
optiknerd
Contributor II
Contributor II

Phantom Table that I don't load and can't erase from memory

I am getting a bizarre result from my load script.

A table that is not connected to any other table and which is not mentioned/loaded in my script, is appearing in Table Viewer.

A table of that name did exist in a previous version of the script but I have searched the entire script multiple times and am 100% sure that there is no table loaded with the name Data_Updates in my current version of the script.  ( I am ticking the search all tabs check box! when I search using Find/Replace)

I do have a QVD called Data_Updates.qvd but I do not have any table loaded with the name Data_Updates.

I have reloaded the script multiple times and the Data_Updates table never goes away.

My script is executing perfectly except for the last part where I am concatenating a table that contains the files that have

already been processed Data_Log.qvd with the files that have just been processed Data_Updates.qvd.

If ScriptErrorCount = 0 then

Load_Register:

LOAD Name, Extention, FileName, Size, FileTime

FROM Data\Data_Log.qvd (qvd);

Concatenate (Load_Register)

LOAD Name, Extention, FileName, Size, FileTime

FROM Data\Data_Updates.qvd (qvd);

Store Load_Register into Data\Data_Log.qvd (qvd);

Drop Table Load_Register;

End If

The script log file gives the following

2016-01-23 11:42:57 AM: 0993       If ScriptErrorCount = 0 then

2016-01-23 11:42:57 AM: 0995    Load_Register:

2016-01-23 11:42:57 AM: 0996    LOAD Name, Extention, FileName, Size, FileTime

2016-01-23 11:42:57 AM: 0997    FROM Data\Data_Log.qvd (qvd)

2016-01-23 11:42:57 AM:             5 fields found: Name, Extention, FileName, Size, FileTime, 3 lines fetched

2016-01-23 11:42:57 AM: 1000    Concatenate (Load_Register)

2016-01-23 11:42:57 AM: 1001    LOAD Name, Extention, FileName, Size, FileTime

2016-01-23 11:42:57 AM: 1002    FROM Data\Data_Updates.qvd (qvd)

2016-01-23 11:42:57 AM:              Error: Table not found

2016-01-23 12:00:47 PM: 1004    Store Load_Register into Data\Data_Log.qvd (qvd)

2016-01-23 12:00:47 PM:              Error: Table not found

2016-01-23 12:00:48 PM: 1006    Drop Table Load_Register

2016-01-23 12:00:48 PM:              Error: Table not found

2016-01-23 12:00:49 PM: 1008       End If

I have tried changing the name of the Load_Register table so that it is recognized on the concatenation.  Even with this error, there is no explanation for the phantom table.

I have created an load inline table then commented it out to see if I have some weird memory cache issue going on but it appears and then disappears when I reload after commenting it out of the script.

Has anyone experienced anything like this this?

I am using Personal Edition - 11.20 64bit on Windows 8

9 Replies
swuehl
MVP
MVP

Could you post your complete log file?

I assume you are loading a table Data_Updates before the table Load_Register, with same number and names of fields. Hence Load_Register will be auto-concatenated to Data_Updates.

optiknerd
Contributor II
Contributor II
Author

Hi.  Thanks for the rapid response.

I am attaching the log file.  I have checked it and the script and as far as I can tell I have never loaded a table called Data_Updates.

Just an FYI on the script and log.  It is an incremental load that deals with a recurring text file that has 6 tables embedded in it.  The text file changes length so it runs a routine to determine length to do the conditional deletes, then loads the tables in to QVDs with text string keys.  The QVDs are then loaded with the master keys converted using Autonumber.

The piece that is not working is supposed to concatenate the file with the list of text files that were already loaded before running the script with the file that has the list of text files that were new (ie updates).

Cheers,

Kevin

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Ah, some QlikView weirdness! In your Table View screenshot, have you found a table called Load_Register? It should exist, shouldn't it?

A table that has an obvious similarity to a previously loaded table will be autoconcatenated anyway, whether you specify a new label or not (one of my biggest long-time gripes with QlikView - the inconsequential part of it, that is - grrrr). As a result, the second table refuses to be concatenated to a non-existing table and - depending on the mood of QlikView and your actions - the to-be-concatenated table may be orphaned.

No big deal; life is what it is. Add the NOCONCATENATE prefix to the LOAD statement for Load_Register, reload and check your Table Viewer layout again.

Best,

Peter

swuehl
MVP
MVP

What about this part in your script:

NoConcatenate

2016-01-23 11:41:46 AM: 0912    Updates:

2016-01-23 11:41:46 AM: 0913     LOAD Name, Extention, FileName, Size, FileTime

2016-01-23 11:41:46 AM: 0914     FROM Data\Updated_Files_List.qvd (qvd) Where Not Exists(Name)

2016-01-23 11:41:46 AM:          5 fields found: Name, Extention, FileName, Size, FileTime, 3 lines fetched

2016-01-23 11:41:46 AM: 0916    Store Updates into Data\Data_Updates.qvd (qvd)

2016-01-23 11:41:46 AM: 0935    Let vNoOfUpdates = NoOfRows('Updates')

2016-01-23 11:41:46 AM: 0936    Set vUpdateSourceTable = 'Data\Data_Updates.qvd (qvd)'

2016-01-23 11:41:46 AM: 0938    Drop Tables Updates, Already_Loaded

2016-01-23 11:41:46 AM: 0940  end sub

2016-01-23 11:41:46 AM: 0979  If 3 > 0 then

2016-01-23 11:41:46 AM: 0981    Set vExecute = 'Yes'

2016-01-23 11:41:46 AM: 0983    Call LoadTextFiles (vUpdateSourceTable, vNoOfUpdates)

2016-01-23 11:41:46 AM: 0037      Load

2016-01-23 11:41:46 AM: 0038       *

2016-01-23 11:41:46 AM: 0039       From Data\Data_Updates.qvd (qvd)

2016-01-23 11:41:46 AM:            5 fields found: Name, Extention, FileName, Size, FileTime, 3 lines fetched


I think the last load of an unlabeled table will result in autolabeled table using the file name.

( I might be wrong, just enter an

Exit Script;

statement after the last  load and check the resulting data model.)

optiknerd
Contributor II
Contributor II
Author

Thanks Peter - I used your suggestion and swuehl's and together they worked.  At first I had some wacky results of the concatenation of the second file contents because for some reason it was qualifying both loads so I got a concatenated table that had 10 fields instead of 5.  I could not find the Qualify statement to spark this result but I added Unqualify just above the NoConcatenate you suggested I add and now it works like a charm.

Is the unrequested Qualify an undocumented feature you have run into, or do I not understand how Qualify works.  I had assumed that you needed to Qualify before each load statement but now am wondering if you turn Qualify on and have to put in an unqualify to stop it from qualifying subsequent tables.   Can you clarify??

Thanks again for your help!!!

optiknerd
Contributor II
Contributor II
Author

Hi swuehl,

I implemented both your and Peter's suggestion (see above) and it now works.

Thanks for your help!!

Cheers

KH

swuehl
MVP
MVP

QUALIFY statement is like a switch, it's affecting all subsequent LOAD or SELECT statements.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

And a QUALIFY never happens out-of-the-blue or by default. You really have to enable it.

[Edit] And yes, qualification is never switched off, except by you with a subsequent (in execution order) UNQUALIFY. If you leave it at the first QUALIFY *, all tables that follow will be quailified.

optiknerd
Contributor II
Contributor II
Author

Peter - and Swuehl

Thanks for clarification on Qualify.  I had moved stuff into a subroutine and there was a hanging Qualifier as a result.  Working like a charm now!