You can translate the question and the replies:

How to convert @LASTCACHEREFRESH to long type as YYMMDDHHMMSS?

My source is DB2 and the last updated field type is long as YYMMDDHHMMSS formate. I want to use the full cache-> incremental query->condition to retrive the changed data, how to do it?
18-04-2017 09:27:00 -0400

3 Answers

Hi, I tried the same and these are the steps I followed: 1. I created a new table in the database. 2. In VDP I created a connection to the database, imported the previous table as a base view and I setup the full cache with incremental mode with the option the **Baseview->Options->Cache.** 3. In the condition part I selected the field name which was recently updated (in my case count_no of field type long) *** countno>'@LASTCACHEREFRESH'*** So now, when executing the view, the “@LASTCACHEREFRESH” is replaced with the timestamp of the last time the cache was executed successfully. To know how Incremental mode works with cache kindly read the* “Incremental Mode” *section of the *Virtual DataPort Administration Guide*. If your view doesn’t meet all the above conditions or is a derived view you could read the section* “Loading the Cache Incrementally”* in the *Virtual DataPort Administration Guide.* Hope this helps.
Denodo Team
20-04-2017 08:59:13 -0400
Thank you for your reply. My question is how to compare a long field(YYMMDDHHMMSS) with a timestamp fied in the SQL? I think I may need to convert “@LASTCACHEREFRESH" into a long field with YYMMDDHHMMSS format
 Edited on: 27-06-2018 03:23:21 -0400
@LASTCACHEDATE is a string that represents the timestamp following the format defined in the i18n of the view. For example, if your i18n is us\_pst, then the format is MMM d, yyyy h:mm:ss a. You can check the format of your i18n by executing in the VQL shell the following command: DESC MAP i18n \<i18n name\> Once you have the format, you can use something like this in the Incremental cache condition: formatdate('yyyyMMddHHmmss', to\_date('MMM d, yyyy h:mm:ss a', '@LASTCACHEREFRESH'))
Denodo Team
11-04-2018 15:40:38 -0400
You must sign in to add an answer. If you do not have an account, you can register here