Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
CostinMarzea
Partner - Contributor
Partner - Contributor

tDynamoDBInput_1 filter expression with Global Variable date type or Long

Hi,

It is a simple filter expression with updated_at column > max(last run)

I've created GlobalVar to get max(last date updated) in dwh layer, so data type is Datetime2 19 positions "yyyy-MM-dd HH:mm:ss" with the value :

2021-02-09 11:27:59

also I've created A string GlobalVar to get max(last date updated) as original string in dwh layer, so data type is String with the value "

1612862879.914776

the updated_at column in the source is String 100 which consist of epoch date time conversion with the value i.e.

"1611885640.620273"

I convert the string to long and then to Date using those commands :

  1. row3.UPDATED_AT==null?-1:Long.parseLong(StringHandling.TRIM(row3.UPDATED_AT.substring(0,10))) 
  2. out5.UPDATED_AT_long==-1

?TalendDate.parseDate("yyyy-MM-dd HH:mm:ss","1900-01-01 HH:mm:ss",true)

:new java.util.Date(out5.UPDATED_AT_long*1000) 

I created 2 Global mac just in case:

((Date) globalMap.get("max_date")) 2021-02-09 11:27:59

((String) globalMap.get("max_updated_at")) 1612862879.914776

I need assistance please how to use it in tDynamoDBinput_1

in filter expression or in advanced filter expression , and please dont forget that the column in the source comes in String Type

Thank you

Labels (4)
0 Replies