Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
andreyfcdk91
New Contributor III

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

Re: How to ignore missing field?

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
6 Replies

Re: How to ignore missing field?

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
andreyfcdk91
New Contributor III

Re: How to ignore missing field?

Can you show me please how to do that?

MVP
MVP

Re: How to ignore missing field?

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;

MVP
MVP

Re: How to ignore missing field?

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

andreyfcdk91
New Contributor III

Re: How to ignore missing field?

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

MVP
MVP

Re: How to ignore missing field?

You can make use of the table functions:

Table functions ‒ QlikView

Community Browser