Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
markgraham123
Specialist
Specialist

Load files from folder

All,

I'm trying to only load files which have 9 am Timestamp.

I tried below code - but this did not help.

Load *

FROM

[..\TEST\*9 AM*.qvd]

(qvd);

Here is the example:

Demand Master 2017-09-05  8 AM
Demand Master 2017-09-05  9 AM
Demand Master 2017-09-05  10 AM
Demand Master 2017-09-05  11 AM
Demand Master 2017-09-06  8 AM
Demand Master 2017-09-06  9 AM
Demand Master 2017-09-06  10 AM

Demand Master 2017-09-06  11 AM

Any help is highly appreciated!

1 Solution

Accepted Solutions
Anil_Babu_Samineni

If you notice, I've created resident copy load from all filenames which you need to set up same thing? Highlighted 3 lines where you need to write code

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

10 Replies
vkish16161
Creator III
Creator III

You can try the FileBaseName() function.

Something like this:

where Wildmatch(filebasename (lib://Insert your coneection path here),'*9 AM*')

vkish16161
Creator III
Creator III

Is this Qlik Sense or View?

Anil_Babu_Samineni

May be this?

Sample:

LOAD FileName() as FileName, SubField(FileName(), ' ', -2) as Field;

NoConcatenate

LOAD * Resident Sample Where Match(Field,9);

DROP Table Sample;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
markgraham123
Specialist
Specialist
Author

Anil,

I got all the file names i wanted.

how do i use that field now to load data from it.

Please advise!

Anil_Babu_Samineni

It's there in my code which fieldname called "Field"

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
markgraham123
Specialist
Specialist
Author

yes.

I'm trying to use that "Field" in the from statement.

But not working.

Anil_Babu_Samineni

What you have tried, please post script

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
markgraham123
Specialist
Specialist
Author

Sorry for the confusion.

"FileName" field has all the filenames i wanted.

Now, i wanted to load * from those files.

Anil_Babu_Samineni

If you notice, I've created resident copy load from all filenames which you need to set up same thing? Highlighted 3 lines where you need to write code

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful