Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey,
TO use incremental load for newly added rows how can i get modification time of table ?? So that i can compare it with LAst Execution Time of table and get the updated results or newly added rows only.
Please help.
Thanx.
You could use filetime() - see here a similar post: Optimization of time reload.
- Marcus
Hey marcus ,
I can not find any fulltime().
Can you tell me where it is ??
OR if you can tell me how to use it and compare with last execution time ??
Please hlp.
Thanx.
filetime() not fulltime ... you will find some explanations by the file-functions within the help.
- Marcus
Hey,
I created a column using filetime as:
FileTime()as Modified_time;
Now i want to compare Modified_time with LAstExecTIme() , but Modified_time is not being shown as column.
My COde is :
-------------------------------------
Directory;
LOAD * , FileTime()as Modified_time
FROM
[Disaster_Data\Copy of Disaster.xlsx]
(ooxml, embedded labels, table is Disaster) where Modified_time >= $(LastExecTime); // Here Modified_time is showing error as not assumned to be a column.
Concatenate
LOAD Id,
StartDate,
EndDate,
Country,
Type,
Sub_Type,
Name,
Killed,
Injured,
Year
FROM
disaster1.qvd (qvd) WHERE NOT Exists(Id);
STORE Disaster INTO C:\Users\nikhil.garg\Desktop\disaster1.qvd;
----------------------------------------------------------------------------------------------------
WHat to do ??
Please help.
Thanx.
Hi Nikhil,
It's not a column until you fully create it. Try this instead:
Directory;
LET vModifiedTime = FileTime(Disaster_Data\Copy of Disaster.xlsx);
LOAD *
FROM [Disaster_Data\Copy of Disaster.xlsx] (ooxml, embedded labels, table is Disaster)
where vModifiedTime >=$(LastExecTime)
;
//****REST OF YOUR SCRIPT***
JV
HEy,
I tried the way u did but it is giving me error :
My script is :
----------------------------------------------------------------------------------
Directory;
LET vModifiedTime = FileTime('C:\Users\nikhil.garg\Desktop\Disaster_Data\[Copy of Disaster.xlsx]');
LOAD *
FROM
[Disaster_Data\Copy of Disaster.xlsx]
(ooxml, embedded labels, table is Disaster) where vModifiedTime >= $(LastExecTime);
Concatenate
LOAD Id,
StartDate,
EndDate,
Country,
Type,
Sub_Type,
Name,
Killed,
Injured,
Year
FROM
disaster1.qvd (qvd) WHERE NOT Exists(Id);
------------------------------------------------------------------------------------------
Error is :
Hi,
Please try this:
...
(ooxml, embedded labels, table is Disaster) where $(vModifiedTime) >= $(LastExecTime);
Add vModifiedTime between $( )
JV
Hey,
THanx . I added $() and now it works but now it is giving another error of garbage statement:
Please help.
I can't debug an app like this. Can you please attach your app and your sample xml so I can work on it? You can put only one like of data