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: 
sifatnabil
Specialist
Specialist

Applymap with time range

Hi,

I have data from an Oracle database, where there is a field called MSG_DATE_TIME which is of data type = "timestamp (6) with local time zone".

When the main table updates with a new row, the mapping table updates immediately after, with a few milliseconds delay, like 5 milliseconds. I want to map the FIXING_STATE, so the mapping load would be like this:

mapstate:

MAPPING LOAD

     MSG_DATE_TIME & ' ' & DESCRIPTION,

     FIXING_STATE

Resident mappingtable;

The problem is that the MSG_DATE_TIME in the main table and mapping table lag by 5 milliseconds. How can the mapping be done such that the applymap statement can accommodate the 5 millisecond lag time?

The logic would be something like this:

applymap('mapstate',MSG_DATE_TIME within 5 milliseconds & ' ' & DESCRIPTION)

Thanks.   

1 Solution

Accepted Solutions
MarcoWedel

maybe you could use intervalmatch instead of mapping load / applymap.

View solution in original post

3 Replies
MarcoWedel

maybe you could use intervalmatch instead of mapping load / applymap.

kuba_michalik
Partner - Specialist
Partner - Specialist

If the corresponding updates to both tables maintain their relative order, you could sequentially number records in each table ordered by timestamp and use that instead of timestamps for matching records. Using ranges would make me nervous about overlaps, althouth that depends on frequency of updates vs lag period.

Not applicable

Rahman, May be you can remove the milliseconds from both dates and do apply map if possible.

Otherwise, use the IntervelMatch instead of applymap.