Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
vchuprina
New Contributor II

Increase speed of script

Hi All,

I want to implement incremental reload because we get a lot of files and it's take a lot of time to load all files each time.

In script I create table to load filetime,

Time:

LOAD

  Num(FileTime()) AS CreatedTime

From

[$(vFile)]

($(vExcel), no labels, table is [$(vSheetName)])

;

LET vTime = Peek('CreatedTime', 0, 'Time');

DROP Table Time;

but I can't understand why script checked each line in sheet, for example if file have 36.507 lines, script load all of them.

Untitled.png

Tags (1)
1 Solution

Accepted Solutions

Re: Increase speed of script

You're using a straight forward load statement with no restrictions so it will load run FileTime() once for every record. Try this instead:

Time:

FIRST 1

LOAD

  Num(FileTime()) AS CreatedTime

From

[$(vFile)]

($(vExcel), no labels, table is [$(vSheetName)])

;

LET vTime = Peek('CreatedTime', 0, 'Time');

DROP Table Time;


talk is cheap, supply exceeds demand
2 Replies

Re: Increase speed of script

You're using a straight forward load statement with no restrictions so it will load run FileTime() once for every record. Try this instead:

Time:

FIRST 1

LOAD

  Num(FileTime()) AS CreatedTime

From

[$(vFile)]

($(vExcel), no labels, table is [$(vSheetName)])

;

LET vTime = Peek('CreatedTime', 0, 'Time');

DROP Table Time;


talk is cheap, supply exceeds demand
vchuprina
New Contributor II

Re: Increase speed of script

Thank you, Gysbert. Now script works much more faster.

Community Browser