User-Defined Bucketization

This is an optional tag that permits one to specify multiple available bucketizations (e.g. HOURLY, DAILY) in the TLV definition. The user can select one of these bucketizations when they execute the TLV. UserDefinedBucketization is mutually exclusive with Bucketization - you can specify only one or the other.

<TLVList xmlns="http://www.onenetwork.com/Platform">
<TLV>
<Name>ColumnHierarchyTLV</Name>
<UserDefinedBucketization>
<Bucketization defaultBuckets="30" maxBuckets="60">DAILY</Bucketization>
<Bucketization defaultBuckets="4" maxBuckets="8" default="true">WEEKLY</Bucketization>
<Bucketization defaultBuckets="4" maxBuckets="8">MONTHLY</Bucketization>
</UserDefinedBucketization>
<SqlDef Name="DataSql" GroupName="TlvSqls"><![CDATA[
SELECT item, site, the_date, quantity FROM item_by_site
]]></SqlDef>
.....
.....
</TLV>
</TLVList>

For a TLV with UserDefinedBucketization, a Timeline field is displayed instead of the DateRange field. This field launches a popup that prompts for their preferred bucketization.

Along with the usual temporal bucketization types like DAY, MONTH, etc., a new bucketization type MIXED is also available. Using MIXED bucketization, the user can execute a TLV with multiple bucket types. See Mixed Bucketization for details.

Bucketization in UserDefinedBucketization has following attributes

  1. @defaultBuckets: Required. The number of buckets shown when the user chooses this bucketization. In the case of MIXED bucketization, it is the default number of buckets shown, but can be modified by the user.

  2. @maxBuckets: Required if MIXED bucketization is supported. This is the maximum number of buckets permitted for this bucket type in a MIXED timeline.

  3. @default: Optional. If true then this bucketization type is selected by default in the Timeline field. Can be true for only one Bucketization record.

For a TLV with UserDefinedBucketization , the bucketization on DMs is not used - it is ignored. Instead, each DM is displayed/aggregated as per User selected bucketization type in the Timeline field.