Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to ignore missing field?

Colleagues, good day!
Can you give an advice please, how we can ignore missing field in Table loading statement?

For example, i have this one:

Test:

Load * Inline

[A, B, C];

Final:

load

A,

B,

C,

D

resident Test;

Drop table Test;

How to ignore D field missing and to load A, B, C without fails?

Thanks.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You can't. Do try to load non-existing fields. It will not work.

If you want to load all the fields from table Test the do LOAD * RESIDENT Test;

That will work even if you don't know which fields table Test does or does not have.


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
Gysbert_Wassenaar

You can't. Do try to load non-existing fields. It will not work.

If you want to load all the fields from table Test the do LOAD * RESIDENT Test;

That will work even if you don't know which fields table Test does or does not have.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Can you show me please how to do that?

swuehl
MVP
MVP

Gysbert alread showed it using LOAD * RESIDENT Test;

But don't forget to use NOCONCATENATE when using LOAD * RESIDENT ...

Test:

Load * Inline [

A, B, C

1,2,3 // just to add a record

];

Final:

NOCONCATENATE

load

*

resident Test;

Drop table Test;

swuehl
MVP
MVP

But can you describe what the use case for this is? Maybe there is a different but better solution.

Anonymous
Not applicable
Author

i need to understand, in what way (maybe through the variable) i can check if table exist some field

swuehl
MVP
MVP

You can make use of the table functions:

Table functions ‒ QlikView