Example
In the example below, the DPA module depends on the PTA module.
Sample TLV in PTA:
<
TLVList
xmlns
=
"http://www.onenetwork.com/Platform"
>
<
TLV
public
=
"true"
>
<
Name
>SampleTLVInjection</
Name
>
<
Bucketization
>DAILY</
Bucketization
>
<
BucketsPerPage
>7</
BucketsPerPage
>
<
SqlDef
Name
=
"DummySql"
GroupName
=
"TlvSqls"
>
<![CDATA[
SELECT the_date, quantity, the_string FROM(
SELECT sysdate the_date, 20 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 1) the_date, 20 quantity, 'B' the_string FROM dual union all
SELECT (sysdate + 2) the_date, 20 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 3) the_date, 20 quantity, 'B' the_string FROM dual union all
SELECT (sysdate + 4) the_date, 20 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 5) the_date, 20 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 6) the_date, 20 quantity, 'B' the_string FROM dual
)
]]>
</
SqlDef
>
<
SqlDef
Name
=
"DMDdummySql"
GroupName
=
"TlvSqls"
>
<![CDATA[
SELECT the_date, quantity, the_string FROM(
SELECT sysdate the_date, 50 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 1) the_date, 50 quantity, 'B' the_string FROM dual union all
SELECT (sysdate + 2) the_date, 50 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 3) the_date, 50 quantity, 'B' the_string FROM dual union all
SELECT (sysdate + 4) the_date, 50 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 5) the_date, 50 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 6) the_date, 50 quantity, 'B' the_string FROM dual
)
]]>
</
SqlDef
>
<
SqlDef
Name
=
"DMEdummySql"
GroupName
=
"TlvSqls"
>
<![CDATA[
SELECT the_date, quantity, the_string FROM(
SELECT sysdate the_date, 60 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 1) the_date, 60 quantity, 'B' the_string FROM dual union all
SELECT (sysdate + 2) the_date, 60 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 3) the_date, 60 quantity, 'B' the_string FROM dual union all
SELECT (sysdate + 4) the_date, 60 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 5) the_date, 60 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 6) the_date, 60 quantity, 'B' the_string FROM dual
)
]]>
</
SqlDef
>
<
Filters
>
<
CustomFilterField
>
<
FieldRef
category
=
"PDF"
levelType
=
"Undefined"
>
<
FieldName
>DateRange</
FieldName
>
</
FieldRef
>
<
Hidden
>false</
Hidden
>
<
Editable
>true</
Editable
>
<
Type
>DATE_RANGE</
Type
>
<
Optional
>false</
Optional
>
<
DateRangeMapping
fromSqlName
=
"DATE_RANGE_START"
toSqlName
=
"DATE_RANGE_END"
/>
</
CustomFilterField
>
<
CustomFilterField
>
<
FieldRef
category
=
"PDF"
levelType
=
"Undefined"
>
<
FieldName
>String</
FieldName
>
</
FieldRef
>
<
Hidden
>false</
Hidden
>
<
Editable
>true</
Editable
>
<
Type
>STRING</
Type
>
<
Optional
>true</
Optional
>
<
SimpleMapping
sqlName
=
"STRING"
/>
</
CustomFilterField
>
<
CustomFilterField
>
<
FieldRef
category
=
"PDF"
levelType
=
"Undefined"
>
<
FieldName
>StringEnumeration</
FieldName
>
</
FieldRef
>
<
Hidden
>false</
Hidden
>
<
Editable
>true</
Editable
>
<
Type
>STRING_ENUMERATION</
Type
>
<
Optional
>true</
Optional
>
<
EnumerationValues
>
<
Value
>Monthly</
Value
>
<
Value
>Weekly</
Value
>
<
Value
>Daily</
Value
>
</
EnumerationValues
>
<
SimpleMapping
sqlName
=
"STRING_ENUMERATION"
/>
</
CustomFilterField
>
<
CustomFilterField
>
<
FieldRef
category
=
"PDF"
levelType
=
"Undefined"
>
<
FieldName
>Integer</
FieldName
>
</
FieldRef
>
<
Hidden
>false</
Hidden
>
<
Editable
>true</
Editable
>
<
Type
>INTEGER</
Type
>
<
Optional
>true</
Optional
>
<
SimpleMapping
sqlName
=
"INTEGER"
/>
</
CustomFilterField
>
<
CustomFilterField
>
<
FieldRef
category
=
"PDF"
levelType
=
"Undefined"
>
<
FieldName
>Date</
FieldName
>
</
FieldRef
>
<
Hidden
>false</
Hidden
>
<
Editable
>true</
Editable
>
<
Type
>DATE</
Type
>
<
Optional
>true</
Optional
>
<
SimpleMapping
sqlName
=
"DATE"
/>
</
CustomFilterField
>
<
DateRange
start
=
"$NULL$"
end
=
"$NULL$"
/>
</
Filters
>
<
ColumnHierarchy
/>
<
DM
bucketization
=
"DAILY"
>
<
Name
>DMA</
Name
>
<
DisplayName
>DM A</
DisplayName
>
<
SqlDefName
>DummySql</
SqlDefName
>
<
SqlQuantityField
levelType
=
"Undefined"
>
<
FieldName
>quantity</
FieldName
>
</
SqlQuantityField
>
<
SqlDateField
levelType
=
"Undefined"
>
<
FieldName
>the_date</
FieldName
>
</
SqlDateField
>
</
DM
>
<
DM
bucketization
=
"DAILY"
>
<
Name
>DMD</
Name
>
<
DisplayName
>DM D</
DisplayName
>
<
SqlDefName
>DMDdummySql</
SqlDefName
>
<
SqlQuantityField
levelType
=
"Undefined"
>
<
FieldName
>quantity</
FieldName
>
</
SqlQuantityField
>
<
SqlDateField
levelType
=
"Undefined"
>
<
FieldName
>the_date</
FieldName
>
</
SqlDateField
>
</
DM
>
<
DM
bucketization
=
"DAILY"
>
<
Name
>DME</
Name
>
<
DisplayName
>DM E</
DisplayName
>
<
SqlDefName
>DMEdummySql</
SqlDefName
>
<
SqlQuantityField
levelType
=
"Undefined"
>
<
FieldName
>quantity</
FieldName
>
</
SqlQuantityField
>
<
SqlDateField
levelType
=
"Undefined"
>
<
FieldName
>the_date</
FieldName
>
</
SqlDateField
>
</
DM
>
<
Customizable
/>
</
TLV
>
</
TLVList
>
Sample TLV Injection in DPA:
File Name: PTA.SampleTLVInjection.tlvInject
<
TLVInjection
xmlns
=
"http://www.onenetwork.com/Platform"
>
<
TLVName
>PTA.SampleTLVInjection</
TLVName
>
<
SqlDef
Name
=
"AdditionalDummySql"
GroupName
=
"TlvSqls"
>
<![CDATA[
SELECT the_date, quantity, the_string FROM(
SELECT sysdate the_date, 30 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 1) the_date, 30 quantity, 'B' the_string FROM dual union all
SELECT (sysdate + 2) the_date, 30 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 3) the_date, 30 quantity, 'B' the_string FROM dual union all
SELECT (sysdate + 4) the_date, 30 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 5) the_date, 30 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 6) the_date, 30 quantity, 'B' the_string FROM dual
)
where ${filterIfNotNull:THE_STRING, THE_STRING = $THE_STRING$}
]]>
</
SqlDef
>
<
SqlDef
Name
=
"ChildDMDummySql"
GroupName
=
"TlvSqls"
>
<![CDATA[
SELECT the_date, quantity, the_string FROM(
SELECT sysdate the_date, 40 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 1) the_date, 40 quantity, 'B' the_string FROM dual union all
SELECT (sysdate + 2) the_date, 40 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 3) the_date, 40 quantity, 'B' the_string FROM dual union all
SELECT (sysdate + 4) the_date, 40 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 5) the_date, 40 quantity, 'A' the_string FROM dual union all
SELECT (sysdate + 6) the_date, 40 quantity, 'B' the_string FROM dual
)
where ${filterIfNotNull:THE_STRING, THE_STRING = $THE_STRING$}
]]>
</
SqlDef
>
<
FilterAdditions
>
<
CustomFilterField
>
<
FieldRef
category
=
"PDF"
levelType
=
"Undefined"
>
<
FieldName
>TheString</
FieldName
>
</
FieldRef
>
<
Editable
>true</
Editable
>
<
Type
>STRING</
Type
>
<
Optional
>true</
Optional
>
<
SimpleMapping
sqlName
=
"THE_STRING"
/>
</
CustomFilterField
>
</
FilterAdditions
>
<
AdditionalDM
bucketization
=
"DAILY"
>
<
Name
>DMB</
Name
>
<
DisplayName
>Additional DM B (DeptTestA)</
DisplayName
>
<
SqlDefName
>AdditionalDummySql</
SqlDefName
>
<
SqlQuantityField
levelType
=
"Undefined"
>
<
FieldName
>quantity</
FieldName
>
</
SqlQuantityField
>
<
SqlDateField
levelType
=
"Undefined"
>
<
FieldName
>the_date</
FieldName
>
</
SqlDateField
>
</
AdditionalDM
>
<
AdditionalDM
bucketization
=
"DAILY"
>
<
Name
>DMC</
Name
>
<
DisplayName
>Additional DM C (DeptTestA)</
DisplayName
>
<
SqlDefName
>ChildDMDummySql</
SqlDefName
>
<
SqlQuantityField
levelType
=
"Undefined"
>
<
FieldName
>quantity</
FieldName
>
</
SqlQuantityField
>
<
SqlDateField
levelType
=
"Undefined"
>
<
FieldName
>the_date</
FieldName
>
</
SqlDateField
>
</
AdditionalDM
>
<
AdditionalComputedDM
bucketization
=
"DAILY"
>
<
Name
>AddDandE</
Name
>
<
DisplayName
>Additional Computed DM (DeptTestA)</
DisplayName
>
<
Depends
>DMD</
Depends
>
<
Depends
>DME</
Depends
>
<
Computation
>
a = timeline.dataMeasures["DMD"].getBucket(bucket.startDate);
b = timeline.dataMeasures["DME"].getBucket(bucket.startDate);
return (a.value + b.value)
</
Computation
>
</
AdditionalComputedDM
>
<
DMChild
parent
=
"DMA"
child
=
"DMC"
/>
</
TLVInjection
>