Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Not applicable

Possible to check file size before load?

I am trying to load a set of XML extracts that we receive every night, however we receive empty 'shells' if no new data has been entered in the system. So what happens is we have 1KB files sitting on the server being ran and causing an error during the load. Other than setting the error mode to zero, I'd like to set up a parameter of: if the file >= 3KB, load, if not, skip.

Has anyone done this or something similar?

1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Re: Possible to check file size before load?

Take a look at the filesize( 'xyz.xls' ) function in Help.

LET vSize = filesize(myfile);

IF '$(vSize') > 3000 THEN

  LOAD * FROM myfile;

ENDIF

-Rob

View solution in original post

2 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Possible to check file size before load?

Take a look at the filesize( 'xyz.xls' ) function in Help.

LET vSize = filesize(myfile);

IF '$(vSize') > 3000 THEN

  LOAD * FROM myfile;

ENDIF

-Rob

View solution in original post

Highlighted
Not applicable

Re: Possible to check file size before load?

Perfect!