Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Left join empty table results in Error: field not found

Hello everybody,

I'm rather new to Qlik so i'mreaching out to you maybe some of you can shed light on the following matter:

I've a Facts table and trying to  join some comments to it, like the following, but as you see on the last line of output, the join fails. Is this normal behavior when left joining an empty table?

temp:

LOAD

test.template_uid AS %template_uid,

test.month AS month,

test.comment AS temp_comment

(FROM [..\..\Datastore\Extract\test.qvd]

(qvd)

3 fields found: %template_uid, month, temp_comment,

0 lines fetched

Outer Join(Facts)

LOAD

%template_uid,

month,

temp_comment AS comment

RESIDENT temp

Error: Field not found - <%template_uid>

1 Solution

Accepted Solutions
kamal_sanguri
Specialist
Specialist

You actually don't need a resident load to do this.. Try below code and see, if you still get the same message

Outer Join(Facts)


temp:

LOAD

test.template_uid AS %template_uid,

test.month AS month,

test.comment AS temp_comment

FROM [..\..\Datastore\Extract\test.qvd]

(qvd);

View solution in original post

7 Replies
oknotsen
Master III
Master III

Could it be that you have a "QUALIFY *" statement somewhere before this piece of script? That would explain it.

May you live in interesting times!
Anonymous
Not applicable
Author

Nope, i don't, not in the script.

Can it be in the doc properties somewhere?

kamal_sanguri
Specialist
Specialist

You actually don't need a resident load to do this.. Try below code and see, if you still get the same message

Outer Join(Facts)


temp:

LOAD

test.template_uid AS %template_uid,

test.month AS month,

test.comment AS temp_comment

FROM [..\..\Datastore\Extract\test.qvd]

(qvd);

Anonymous
Not applicable
Author

Wow, Thank you,

I don't understand the difference, but when I applied your technique, the join works!

Anonymous
Not applicable
Author

Can you maybe also explain the difference?

kamal_sanguri
Specialist
Specialist

So, what are you doing is Loading a table renaming few fields and then doing a resident load again to join, however renaming of fields and joining can be done in one go.

see this:

TableA:

Load aKey as key,

        F1,

        F2

From

xxxxxxxx

Outer Join

TableB:

Load bKey as key,

        F1,

        F2

From

xxxxxxxx

we are renaming the fields to make them join. Hope this will clear your doubts.

Anonymous
Not applicable
Author

kamal_sanguri‌, i understand that, but why when doing the resident load, the join says: 'field not found',

and when doing the join directly from the source file, the join works? what is the difference?