Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

chrisg
Contributor II

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

Tags (3)
1 Solution

Accepted Solutions
biester
Valued Contributor

AW:Load or Reload from folder

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

20 Replies
biester
Valued Contributor

AW:Load or Reload from folder

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

Rgds,
Joachim

chrisg
Contributor II

AW:Load or Reload from folder


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

prieper
Honored Contributor II

AW:Load or Reload from folder

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
Contributor II

AW:Load or Reload from folder


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

Not applicable

AW:Load or Reload from folder

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

Load or Reload from folder

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
Contributor II

Load or Reload from folder


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

biester
Valued Contributor

AW:Re: Load or Reload from folder

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
Contributor II

AW:Re: Load or Reload from folder


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

Community Browser