Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
RamBoopalam
Contributor II
Contributor II

Trying to extract delta data from the table using the Unix Epoch Time

In a table column in oracle it has Unix Epoch time, want to extract one day older data (delta data). How do I filter in Qlik Replicate in the filter condition having Epoch Time.  Please advise

 

We have a table in Source and it has column which stores the time in Unix Timestamp (Epoch) and I want to get the delta data from the table, basically 
 
Today = 1653652800000 - 5/27/2022

$LAST_REFRESH >= ( 1653566400000 - Epoch Time for 5/26/2022)
Ideally the above has to be in Filter condition for Source
$LAST_REFRESH >= (SYSDATE- 1 of Epoch Time value)

 How can we dynamically extract the data on a daily basis? Please let me know.

1 Solution

Accepted Solutions
RamBoopalam
Contributor II
Contributor II
Author

Thanks a ton John, it worked. Really appreciate your help

RamBoopalam_0-1654002369524.png

 

.

View solution in original post

6 Replies
Michael_Litz
Support
Support

Hi RamBoopalam,

I see that you have opened a support case for this and I will take and work it with you.

Today = 1653652800000 - 5/27/2022

$LAST_REFRESH >= ( 1653566400000 - Epoch Time for 5/26/2022)
Ideally the above has to be in Filter condition for Source
$LAST_REFRESH >= (SYSDATE- 1 of Epoch Time value)

 How can we dynamically extract the data on a daily basis? Please let me know.

Thanks,
Michael

Steve_Nguyen
Support
Support

here is an article on timestamp filter that may help :

https://community.qlik.com/t5/Knowledge/Filter-for-last-90-days-of-data-in-Qlik-Replicate/ta-p/18807...

 

Help users find answers! Don't forget to mark a solution that worked for you! If already marked, give it a thumbs up!
RamBoopalam
Contributor II
Contributor II
Author

Hi Steve,

Thanks a ton for the quick response, but in my case, the source table.columns which i am trying to extract has Epoch (Unix Time in Seconds) than date.
 
LAST_REFRESH  is the field in Source and it's datatype is Numeric (19,0)
 
E.g.
Today = 1653652800000 - 5/27/2022

$LAST_REFRESH >= ( 1653566400000 - Epoch Time for 5/26/2022)
Ideally the above has to be in Filter condition for Source
$LAST_REFRESH >= (SYSDATE- 1 of Epoch Time value)

john_wang
Support
Support

Hello @RamBoopalam , copy @Steve_Nguyen @Michael_Litz ,

There should be many different expressions to present 'yesterday' (only date part, means from 0 hour 0 min 0 sec) by Unix Epoch. Because your data contains milliseconds part, one sample for  (SYSDATE- 1 of Epoch Time value) is:

(strftime('%s', date('now','localtime')) - 86400)*1000

Additional comments: 1 day = 86400 seconds; Convert to milliseconds by multiplied by 1000.

The screen copy of the demo:

john_wang_0-1653791062082.png

 

Hope this helps.

Regards,

John.

 

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
RamBoopalam
Contributor II
Contributor II
Author

Thanks a ton John, it worked. Really appreciate your help

RamBoopalam_0-1654002369524.png

 

.

john_wang
Support
Support

Glad to hear that @RamBoopalam , thanks for your feedback.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!