I have a ETL (pentaho) which give an excel file output from following steps.
Transformation 1:
created > DATEVALUE ORDER BY created ASC
)Now how can I read last row of the excel output (created column) value and store into text file? So I can make sure when the job re-run then SQL statement created date
is grater than text file stored value.
Transformation 1:
created > (get the value from text file) ORDER BY created ASC
)What would be the simplest way of achieving this?
You can save last row of the data stream, which matches to last row written to Excel, using a combination of Group by
and Text file output
which you can apped right after your Excel output
step:
Last value
in Type
column of Aggregates
tab. Take your date field as a Subject
and give it some Name
e.g. last_date
.last_date
into a file.You trasformation would then start by a step which reads the last_date
from file (Text file input
) and passes it to the Table input
step where it is used as a parameter of your SQL query.