25.1 Multiactive Satellite
25.1 Multiactive Satellite
SATELLITES
THE CORRECT WAY.
Let’s say you get your customer’s data delivered in semi-structured XML-
files. Within it are several phone numbers in an array. But the metadata
doesn’t provide more information. So, the number, type, and order of the
records are unknown. When flattening the XML-file, you will receive as many
records as the number of tuples in the array as follows:
If you create a standard satellite out of these, only one row per customer
business key can be active at the same time. Otherwise, you would run into
a primary key violation having the same hash key and LDTS.
To avoid these problems, and also be able to query the active phone numbers
at any point in time, a “multi-active key” can be used. In case you don’t have a
multi-active key, you need to create your own one by adding a sub-sequence
number (per business key) into your current (Hash Key & LDTS) primary
Key.
Here, though, you have to pay close attention if the data changes in the next
load, For example, if the order of the phone numbers change , you cannot
assign a specific phone number to a sub-sequence (because this change of
order has made that pre-established sequence, will not be valid any more)
TYPES.
In case it is possible to define the type of codes and add them to the source
feed, the best approach is to add these, to the primary key of the Satellite.
Here, you rarely need to change types as well. In our example, we would
define types like ‘home’, ‘business’, ‘cell’ and ‘fax’ as shown in the next
figure. But remember, this must delivered by the source system. If not, you
have to use the sub-sequences.