Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
chrisg
Partner - Creator III
Partner - Creator III

Load or Reload from folder

Hi,

i want to load excel-files from a folder - but i only want to load the new files in the folder.

Do you have any hints how to build up the script

many thx

best regards

Chris

Do or Do Not. There is no try!
1 Solution

Accepted Solutions
biester
Specialist
Specialist

Hi,

this is only a quick trial. Note that you must use partial reload because the table data have to be kept. An option would also be using qvd and incremental load. But as said this is only a quick shot.

Perhaps it helps a little,
Rgds,
Joachim

View solution in original post

20 Replies
biester
Specialist
Specialist

I'd say: the major issue is how you define "new" ??

Rgds,
Joachim

chrisg
Partner - Creator III
Partner - Creator III
Author


biester wrote:
I'd say: the major issue is how you define "new" ??
Rgds,
Joachim


sorry and thx: i am talking about additional files in the folder

Rgds

Chris

Do or Do Not. There is no try!
prieper
Master II
Master II

Hi,

as basic approach would suggest:

Read all files in the folder
Compare with a list of the previously loaded files
Load "new" files
Add them to the list of the loaded files (for the next run)

HTH
Peter

chrisg
Partner - Creator III
Partner - Creator III
Author


Peter Rieper wrote:
Compare with a list of the previously loaded files
Load "new" files
Add them to the list of the loaded files (for the next run)
<div></div>


can you give me a hind how to do this?

thx

Chris

Do or Do Not. There is no try!
Not applicable

If QV ischeduled to reload everyday, the script can be set to load "new" file by using file date = system date. This will pick up the file in the folder on the date of reloading.

Not applicable

Just think of another option, a flag(date) can be included within the file (in a field perhaps) for comparison purpose. If the flag(date) for file(s) in the folder > max flag(date) in existing data, then load the data into QV from the "new" file.

Hope this help.

chrisg
Partner - Creator III
Partner - Creator III
Author


jong wrote:
Compare with a list of the previously loaded files
Load "new" files
Add them to the list of the loaded files (for the next run)<div></div>


a code sniped for this would be very helpfullthx

Chris

Do or Do Not. There is no try!
biester
Specialist
Specialist

Hi,

I just wonder what should happen in a special case:

- You have Files A, B, C in your directory
- You read A,B and C in the first reload
- In the second reload you still have A,B and C - nothing should happen.
- File B is being deleted
- In the third reload also nothing happens
- File B is created again in the directory: What should happen ?

Rgds,
Joachim

P.S.: You look like Derrick 😉

chrisg
Partner - Creator III
Partner - Creator III
Author


biester wrote:
I just wonder what should happen in a special case:
- You have Files A, B, C in your directory
- You read A,B and C in the first reload

yes!


biester wrote:
- In the second reload you still have A,B and C - nothing should happen.

perfect


biester wrote:
- File B is being deleted
- In the third reload also nothing happens
- File B is created again in the directory: What should happen ?

nothing should happen!

Thx

Chris

Do or Do Not. There is no try!