![]() |
Consumption Analytics Documentation |
Each translation table entry consists of a value range (Low ID/High ID) and a target identifier value. Table content is tied to a date range so there can be multiple revisions of table data.
The following shows an example of a translation table called cc_table
:
Each entry in the table (numbered 1 through N) describes a translation rule.
The lowest matching identifier value that will trigger this translation rule. | |
The highest matching identifier value that will trigger this translation rule. | |
NOTE: Low and high ranges are based on the standard ASCII sorting format.
Selecting a Low ID specifies the low end of an input value. Selecting a High ID specifies the high end of the of an input value. Consider the account ID translation mapping in the cc_table
example:
If server1
and server2
are the input values (the origins of data being collected) in a delimited data collection job, we could have the following contents in the aggregate.ccr
file:
...,2,@feed,server2,host,ak-server1,... ...,2,@feed,server2,host,ca-server1,... ...,2,@feed,server2,host,co-server1,...
Then, during the transformation step, the CreateIdentifierFromTable‘s translateTitle
property uses the translation table titled cc_table
:
<bean class="com.cloudcruiser.batch.transform.CreateIdentifierFromTable"> <property name="active" value="true" /> <property name="translateTitle" value="cc_table" /> <property name="sourceIdentifier" value="host" /> ...
Using the cc_table
definition, when transformed, any identifier with a name of host
and a value beginning with a
, such as ak-server1
and ak-server2
, is mapped to account ID Customer A
because the first two characters of the host
values fall into the aa
to az
range. Any value beginning with c
, such as ca-server1
and co-server1
, is mapped to account ID Customer B
because the host
values fall into the ba
to zz
range.
Then, when transformed in the transformed.ccr
file, output identifiers Customer A and Customer B are mapped:
...,3,@acctid,Customer A,@feed,server2,host,ak-server1,... ...,3,@acctid,Customer B,@feed,server2,host,ca-server1,... ...,3,@acctid,Customer B,@feed,server2,host,co-server1,...
NOTE: Entries in the translation table are NOT case sensitive. During the collection step, processes such as CreateIdentifierFromTable will convert all input values to lowercase.
In the third and last row of the cc_table
example, the Low ID and High ID have no values:
A table entry with empty low and high IDs will match any input. This last entry of the translation table represents the default mapping.
You can leave the High ID empty. For example:
will be interpreted as follows :