Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm trying to build an incremental reload with max filetime however, I'm receiving the underlying error the whole time.
Do you guys probably know on how to deal with this?
LET AND MAXDATE CALCULATION:
MaxDate:
LOAD
max(Date([FileTime()],'DD-MM-YYYY HH:MM:SS')) as Max_Date
Resident Final;
LET Last_updated_date = peek('Max_Date',0,'Last_updated_date');
ERROR:
Syntax error Unexpected token: '08', expected nothing
Where FileTime() > 12-12-2018 >>>>>>08<<<<<<:12:36
Thanks in advance!
Ok, so your decimal symbol setting is a comma instead of a dot. Try replacing that comma with a dot.
LET Last_updated_date = Replace(peek('Max_Date',0,'Last_updated_date'), ',' , '.' );
The FileTime() function requires the filename for resident load. PFB syntax.
Syntax:
FileTime([ filename ])
Or FileTime() will be generated without filename parameter when data is read from file.
Example Result
LOAD *, FileTime( ) as X from abc.txt; | Will return the date and time of the last modification of the file (abc.txt) as a timestamp in field X in each record read. |
FileTime( 'xyz.xls' ) | Will return the timestamp of the last modification of the file xyz.xls. |
ERROR:
Syntax error Unexpected token: '08', expected nothing
Where FileTime() > 12-12-2018 >>>>>>08<<<<<<:12:36
Looks like you're using $(Last_updated_date) in your where clause: Where FileTime() > $(Last_updated_date). Since the variable value contains several spaces Qlik thinks you're trying specify multiple conditions in the where clause. But 08 is not an operator like AND or OR it throws an error. You can try Where FileTime() > '$(Last_updated_date)'. Or if that doesn't work use only the numeric value: Num(max([FileTime]))) as Max_Date
Ok, so your decimal symbol setting is a comma instead of a dot. Try replacing that comma with a dot.
LET Last_updated_date = Replace(peek('Max_Date',0,'Last_updated_date'), ',' , '.' );