Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
yashpace
Contributor III
Contributor III

Wildcard data load and Field not found error

Hi all,

I am trying to load 50 + QVD and few QVD's do not have one field 'FINAL_SALE' due to which -  when I try to load all QVD's using wildcard load I get "Field Not Found" error.

Is there a way to concatenate QVD's which do not have 'FINAL_SALE' field with new field 'FINAL_SALE' and null values for that field.

OrderDetails:

Load

ORDNUM,

ORDLIN,

DISPATCH_DATE,

FINAL_SALE

FINAL_SALEFROM [lib://QlikShare/UC_QLIK_ORDERDETAILS*.qvd]
(qvd) WHERE ([ORDQTY]>0) ;

Thanks in advance!

Yash

2 Replies
QlikTom
Employee
Employee

This may work.

  1. Create an empty table with 0 rows
  2. then use the Concatenate prefix to force contactination. 

 

OrderDetails:
// create empty table as concatenation target
LOAD 
    0 as ORDNUM,
    0 as ORDLIN,
    0 as DISPATCH_DATE,
    0 as FINAL_SALE
    0 as FINAL_SALE
FROM AUTOGENERATE 0;  //<--zero rows will be added to this table
//force concatenation
Concatenate(OrderDetails)             
Load
    ORDNUM,
    ORDLIN,
    DISPATCH_DATE,
    FINAL_SALE
FINAL_SALEFROM [lib://QlikShare/UC_QLIK_ORDERDETAILS*.qvd]
(qvd) WHERE ([ORDQTY]>0);

 

 
This logic was found elsewhere on the community here:
https://community.qlik.com/t5/Qlik-Sense-App-Development/Loading-Multiple-QVDs-with-wildcard/m-p/330...

There are other methods that involve creating more complex looping logic, but I would try this simple method first. 

hastiecraig
Contributor
Contributor

QlikTom's suggestion helped me out in this situation, however there was a small typo with the code on the AutoGenerate.

There shouldn't be a "FROM" and the "0" should be in brackets, i.e.:

LOAD 
    0 as ORDNUM,
    0 as ORDLIN,
    0 as DISPATCH_DATE,
    0 as FINAL_SALE
    0 as FINAL_SALE
AUTOGENERATE (0);