Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reading QVDs from multiple directories

Hello,

I am trying to read similar QVDs from multiple directories using a FOR...EACH...NEXT but somehow its not working for me. Below is the directory structure:

Tables (root directory) -> Batch_A, Batch_B and Batch_C (sub directories)

Each of the above sub directory has following QVDs: Names.qvw, Fact_Sales.qvw and Fact_Commissions.qvw

I am trying to read Names.qvw from all three sub directories as below:


Set DataFileDir=" 'Tables' ";

FOR EACH Dir in dirlist ($(DataFileDir) &' \ ')
NAMES: LOAD * FROM [$(Dir)] NAMES.qvd (qvd);
NEXT Dir


But the above code is reading the data expected. Any help will be appreciated.



Thanks

4 Replies
martin59
Specialist II
Specialist II

Try this :


NAMES:
LOAD * FROM $(Dir)NAMES.qvd (qvd);


Not applicable
Author

I tried $(Dir), but still same issue.

Thanks

Not applicable
Author

did u try removing the spaces(before and after) in the first variable used for root dir?

Not applicable
Author

yes, the spaces are removed