I am trying to create multiple data sets each current data set as to split this by the number of months defined by a generate attribute attribute i have labeled "term" which works out the length of a contract and i want to expand this dataset having values that will be the same per a contract split across the entire contract period showing each month separately ie 2020/03/01-2021/02/28.
I have tried to create a loop but im not sure i have set it up correctly.
Please could anyone assist me.
<operator activated="true" class="generate_attributes" compatibility="9.10.000" expanded="true" height="82" name="Generate Attributes (13)" width="90" x="4534" y="544">
<list key="function_descriptions">
<parameter key="TERM" value="if(date_get(BEGIN_COV_DT,DATE_UNIT_YEAR)==(date_get(date_parse_custom(REPORTING_DT,"yyyy/MM/dd"),DATE_UNIT_YEAR) - 1),date_get(BEGIN_COV_DT,DATE_UNIT_MONTH)-(date_get(date_parse_custom(REPORTING_DT,"yyyy/MM/dd"),DATE_UNIT_MONTH)+1),if(date_get(BEGIN_COV_DT,DATE_UNIT_YEAR)==(date_get(date_parse_custom(REPORTING_DT,"yyyy/MM/dd"),DATE_UNIT_YEAR)),date_get(BEGIN_COV_DT,DATE_UNIT_MONTH)+(11-date_get(date_parse_custom(REPORTING_DT,"yyyy/MM/dd"),DATE_UNIT_MONTH)),""))"/>
</list>
<parameter key="keep_all" value="true"/>
</operator>
<operator activated="false" class="loop_examples" compatibility="9.10.000" expanded="true" height="82" name="Loop Examples" width="90" x="4400" y="442">
<parameter key="iteration_macro" value="example"/>
<process expanded="true">
<operator activated="false" class="concurrency:loop_attributes" compatibility="9.10.000" expanded="true" height="82" name="Loop Attributes (2)" width="90" x="514" y="187">
<parameter key="attribute_filter_type" value="all"/>
<parameter key="attribute" value=""/>
<parameter key="attributes" value=""/>
<parameter key="use_except_expression" value="false"/>
<parameter key="value_type" value="attribute_value"/>
<parameter key="use_value_type_exception" value="false"/>
<parameter key="except_value_type" value="time"/>
<parameter key="block_type" value="attribute_block"/>
<parameter key="use_block_type_exception" value="false"/>
<parameter key="except_block_type" value="value_matrix_row_start"/>
<parameter key="invert_selection" value="false"/>
<parameter key="include_special_attributes" value="false"/>
<parameter key="attribute_name_macro" value="loop_attribute"/>
<parameter key="reuse_results" value="false"/>
<parameter key="enable_parallel_execution" value="true"/>
<process expanded="true">
<operator activated="true" class="generate_attributes" compatibility="9.10.000" expanded="true" height="82" name="Generate Attributes (7)" width="90" x="179" y="34">
<list key="function_descriptions">
<parameter key="End_Cov_Date" value="date_add(date_parse_custom(BEGIN_COV_DT,+1,DATE_UNIT_MONTH))"/>
</list>
<parameter key="keep_all" value="true"/>
</operator>
<connect from_port="input 1" to_op="Generate Attributes (7)" to_port="example set input"/>
<connect from_op="Generate Attributes (7)" from_port="example set output" to_port="output 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="source_input 2" spacing="0"/>
<portSpacing port="sink_output 1" spacing="0"/>
<portSpacing port="sink_output 2" spacing="0"/>
</process>
</operator>
<operator activated="true" class="filter_examples" compatibility="9.10.000" expanded="true" height="103" name="Filter Examples (4)" width="90" x="179" y="34">
<parameter key="parameter_expression" value=""/>
<parameter key="condition_class" value="custom_filters"/>
<parameter key="invert_filter" value="false"/>
<list key="filters_list"/>
<parameter key="filters_logic_and" value="true"/>
<parameter key="filters_check_metadata" value="true"/>
</operator>
<operator activated="true" class="concurrency:loop_values" compatibility="9.10.000" expanded="true" height="82" name="Loop Values" width="90" x="313" y="34">
<parameter key="attribute" value="TERM"/>
<parameter key="iteration_macro" value="loop_value"/>
<parameter key="reuse_results" value="false"/>
<parameter key="enable_parallel_execution" value="true"/>
<process expanded="true">
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="source_input 2" spacing="0"/>
<portSpacing port="sink_output 1" spacing="0"/>
<portSpacing port="sink_output 2" spacing="0"/>
</process>
</operator>
<connect from_port="example set" to_op="Filter Examples (4)" to_port="example set input"/>
<connect from_op="Filter Examples (4)" from_port="example set output" to_op="Loop Values" to_port="input 1"/>
<connect from_op="Loop Values" from_port="output 1" to_port="example set"/>
<portSpacing port="source_example set" spacing="0"/>
<portSpacing port="sink_example set" spacing="0"/>
<portSpacing port="sink_output 1" spacing="0"/>
</process>
</operator>
<operator activated="true" class="order_attributes" compatibility="9.10.000" expanded="true" height="82" name="Reorder Attributes (18)" width="90" x="4668" y="544">
<parameter key="sort_mode" value="user specified"/>
<parameter key="attribute_ordering" value="REPORTING_DT|ENTITY_ID|INSURANCE_CONTRACT_ID|COVERAGE_CD|CEDED_FLG|CASHFLOW_TYPE_CD|CURRENCY_CD|INCURRED_CLAIM_DT|CASHFLOW_DT|ACQ_COSTS_AMT|ADM_COSTS_AMT|CLAIMS_AMT|ENTITY_FEE_AMT|GUAR_FV_CHNG_AMT|GUAR_FV_AMT|GUAR_PMT_AMT|PREM_AMT|PROVENUES_AMT|RE_COMM_AMT|RE_DEF_AMT|RSK_ADJ_AMT|SETTL_COSTS_AMT|UNDERL_FV_AMT|UNDERL_FV_CHNG_AMT|INVESTMENT_AMT"/>
<parameter key="use_regular_expressions" value="false"/>
<parameter key="handle_unmatched" value="append"/>
<parameter key="sort_direction" value="ascending"/>
</operator>
<operator activated="true" breakpoints="after" class="concurrency:loop_attributes" compatibility="9.10.000" expanded="true" height="82" name="Loop Attributes" width="90" x="4802" y="544">
<parameter key="attribute_filter_type" value="single"/>
<parameter key="attribute" value="TERM"/>
<parameter key="attributes" value=""/>
<parameter key="use_except_expression" value="false"/>
<parameter key="value_type" value="attribute_value"/>
<parameter key="use_value_type_exception" value="false"/>
<parameter key="except_value_type" value="time"/>
<parameter key="block_type" value="attribute_block"/>
<parameter key="use_block_type_exception" value="false"/>
<parameter key="except_block_type" value="value_matrix_row_start"/>
<parameter key="invert_selection" value="false"/>
<parameter key="include_special_attributes" value="false"/>
<parameter key="attribute_name_macro" value="loop_attribute"/>
<parameter key="reuse_results" value="true"/>
<parameter key="enable_parallel_execution" value="true"/>
<process expanded="true">
<operator activated="true" class="filter_examples" compatibility="9.10.000" expanded="true" height="103" name="Filter Examples (5)" width="90" x="45" y="34">
<parameter key="parameter_expression" value=""/>
<parameter key="condition_class" value="custom_filters"/>
<parameter key="invert_filter" value="false"/>
<list key="filters_list">
<parameter key="filters_entry_key" value="INSURANCE_CONTRACT_ID.equals.%{loop_attributes}"/>
</list>
<parameter key="filters_logic_and" value="true"/>
<parameter key="filters_check_metadata" value="true"/>
</operator>
<operator activated="true" class="concurrency:loop_values" compatibility="9.10.000" expanded="true" height="82" name="Loop Values (4)" width="90" x="246" y="34">
<parameter key="attribute" value="END_COV_DT"/>
<parameter key="iteration_macro" value="loop_value"/>
<parameter key="reuse_results" value="true"/>
<parameter key="enable_parallel_execution" value="false"/>
<process expanded="true">
<operator activated="true" class="generate_attributes" compatibility="9.10.000" expanded="true" height="82" name="Generate Attributes (8)" width="90" x="246" y="34">
<list key="function_descriptions">
<parameter key="End_Cov_Date" value="date_add(BEGIN_COV_DT,+1,DATE_UNIT_MONTH)"/>
</list>
<parameter key="keep_all" value="true"/>
</operator>
<connect from_port="input 1" to_op="Generate Attributes (8)" to_port="example set input"/>
<connect from_op="Generate Attributes (8)" from_port="example set output" to_port="output 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="source_input 2" spacing="0"/>
<portSpacing port="sink_output 1" spacing="0"/>
<portSpacing port="sink_output 2" spacing="0"/>
</process>
</operator>
<connect from_port="input 1" to_op="Filter Examples (5)" to_port="example set input"/>
<connect from_op="Filter Examples (5)" from_port="example set output" to_op="Loop Values (4)" to_port="input 1"/>
<connect from_op="Loop Values (4)" from_port="output 1" to_port="output 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="source_input 2" spacing="0"/>
<portSpacing port="sink_output 1" spacing="0"/>
<portSpacing port="sink_output 2" spacing="0"/>
</process>
</operator>