Finding missing values in a sequence

One Star

Finding missing values in a sequence

Hi all,
I have a sequence of numbers, there are some repeated values (which are fine) and some missing values
Incomplete Sequence (e.g.)
1
2
3
5
6
6
9
10
Is there an easy way in Talend that I can extract the values that are missing. So in the above example I need the values of 4, 7 and 8.
I am working on a mathematical solution (joining it with a complete sequence, finding the differences, then the differences of the differences) at the moment, but it seems quite a contrived way to do it, is there an easier way??
It needs to be able to deal with the duplicate values, and more than 1 missing value in a row.
Thanks in advance,
Nilan
One Star

Re: Finding missing values in a sequence

hi,
try an inner join with an input including all occurencies (as main)
(1
2
3
4
5
6
7
8
9
10
)
and your input as lookup in a tMap and activate "Catch lookup inner join reject"
One Star

Re: Finding missing values in a sequence

Hi Amany, thanks for the suggestion, I implemented it using tJoin rather than tMap (tmap just returned nulls for some reason) but got it working Smiley Happy

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch