![]() |
Consumption Analytics Documentation |
For large tables with hundreds or thousands of entries, it might be more efficient to use flat files instead of the Cloud Cruiser UI because you can automate their maintenance with an external application or script. Another reason to use a flat file table is that you can provide a single pattern to match rather than a range of values.
NOTE: There are no revisions for a flat file translation table. Comparisons are made against the contents of the file at the time a job runs.
Flat file translation tables use the following comma-delimited format where pattern
is an exact pattern to match:
pattern,lowId,highId,targetValue
You must include either a pattern
or both lowId
and highId
against which to compare input values. If both are provided, pattern
takes precedence and the low and high values are not used. You can use an asterisk in a pattern as a wildcard to represent multiple characters. For example:
abc
matches only "abc" abc*
matches any value starting with "abc," such as “abcdef”Using the cc_table
example described in Using translation tables, its entries in a CSV file would be represented as:
To use a flat file translation table, in your batch job include the lookupFile
propertyof an applicable transform processor to reference the file rather than the translateTitle
property to reference a table maintained in the Cloud Cruiser UI. For example:
<bean class="com.cloudcruiser.batch.transform.CreateIdentifierFromTable"> <property name="active" value="true" /> <property name="lookupFile" value="file:${env.usageDir}/cc_table.csv"/> <property name="sourceIdentifier" value="host" /> ...
(c) Copyright 2017-2020 Hewlett Packard Enterprise Development LP