Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Script Execution Progress "-1 <<" lines fetched

The below script execution progress results displays a "-1" when fetching the rows to Left Join records to a table called TblMetrics.I have never seen this before.  What does the -1 refer to?  It results in one TblMetrics but I am not sure what could be wrong.  So far, the data validation is looking good but I am concerned over the unknown.  This does not happen with any of my other Left Joins.
TblMetrics << Temp1 2,666,763 lines fetched
TblMetrics-1 << RefIAPEC2PilotPartners 51 lines fetched
Tags (2)
1 Solution

Accepted Solutions
kuba_michalik
Contributor III

Script Execution Progress "-1 <<" lines fetched

I think "TblMetrics-1" is a name of a temporary table during join (because of a TblName: label somewhere before the loadstatement, QlikView would like to name that table "TblMetrics", however, "TblMetrics" already exists, so it appends "-1" to the name). If it gets dropped after join and does not appear in the model, I wouldn't worry about it.

7 Replies
kuba_michalik
Contributor III

Script Execution Progress "-1 <<" lines fetched

I think "TblMetrics-1" is a name of a temporary table during join (because of a TblName: label somewhere before the loadstatement, QlikView would like to name that table "TblMetrics", however, "TblMetrics" already exists, so it appends "-1" to the name). If it gets dropped after join and does not appear in the model, I wouldn't worry about it.

Not applicable

Re: Script Execution Progress "-1 <<" lines fetched

Thank you. I haven’t seen this before. Maybe it is because there are too many resident tables, not sure what is going on

kuba_michalik
Contributor III

Re: Script Execution Progress "-1 <<" lines fetched

I just remembered where have I seen that - maybe there is one extra table label somewhere. Something like this:

TBL:

LOAD * INLINE [

    F1, F2

    1, A

    2, A

    3, B

    4, B

];

TBL:

Left Join (TBL)

LOAD * INLINE [

    F2, F3

    A, a value

    B, b value

];

Log:

TBL << INLF6E 4 lines fetched

TBL-1 << INLF6F 2 lines fetched

The second label is not necessary, but neither it does anything bad except making TBL-1 appear in log.

Not applicable

Re: Script Execution Progress "-1 <<" lines fetched

Thank you.  I just searched my script and I only found the TblMetrics: in there one time.  So far I am seeing no problems so guessing it is working fine.

MVP
MVP

Re: Script Execution Progress "-1 <<" lines fetched

Hi,

In addition to what Kuba aptly shows in the script, you may have tables without labels, and regardless the table is concatenated or joined, it may appear with the same name with the "-1", "-2" and so on if they are not labelled. That's why it's always a good practice to label each table you load, so you can check the log and see more clearly what happens when, although the resulting table name is different i.e: a JOIN.

In the example of Kuba, you simply change the second "TBL:" to "TBL2:" and you will see this in the log and in the progress window.

According to your original post, the LOAD that corresponds to the source table RefIAPEC2PilotPartners is not labelled, and I guess that the previous table labelled is TblMetrics, therefore the "-1" when the RefIAPEC2PilotPartners loads.

Hope that makes sense.

Miguel

Not applicable

Re: Script Execution Progress "-1 <<" lines fetched

Thank you Miguel.  I am curious why it doesn't do this with my other joins where i only label the table once before first load and I do not label the join loads.  The script progress does not add the -1 to each of these.  Any ideas?

Not applicable

Re: Script Execution Progress "-1 <<" lines fetched

QV seems to create an temporay table to store the results of the load statement before actually joining these results to the original table.

Typically, you won't assign a name to this temporary table, and QV uses the last table name to which data is loaded to / appended to.

However, QV won't concatenate to this table, and thus add the "-1" to create a unique table name (similar to NOCONCATENATE).

After the join this temporary table is dropped automatically.

To fix the output in the trace, I tend to assing a name to this temporary table... (above the join statement), as in:

[Table A]:

Load ....

;

[Table B]:

Load ...

;

[Table A Temporary Join Table]:     // To make trace output more meaningfull

LEFT JOIN ([TABLE A])

Load ....

Resident [Table B]

;

Community Browser