How to create new Rows data based on split character values in Column data
Vanlal
New Altair Community Member
I have data like as below
How do i generate new rows based on the column which has , on them
Name | Subject | Grade |
John | Eng,Math | A,B |
Clarice | Eng,Science | O,B |
Kennedy | Math | O |
Kevin | Eng | A |
How do i generate new rows based on the column which has , on them
Name | Subject | Grade |
John | Eng | A |
John | Math | B |
Clarice | Eng | O |
Clarice | Science | B |
Kennedy | Math | O |
Kevin | Eng | A |
Tagged:
0
Best Answer
-
Hi,you want to use Split+DePivot as operators.
Best,Martin5
Answers
-
Hi,you want to use Split+DePivot as operators.
Best,Martin5 -
<div><?xml version="1.0" encoding="UTF-8"?><process version="9.6.000"></div><div> <context></div><div> <input/></div><div> <output/></div><div> <macros/></div><div> </context></div><div> <operator activated="true" class="process" compatibility="9.6.000" expanded="true" name="Process"></div><div> <parameter key="logverbosity" value="init"/></div><div> <parameter key="random_seed" value="2001"/></div><div> <parameter key="send_mail" value="never"/></div><div> <parameter key="notification_email" value=""/></div><div> <parameter key="process_duration_for_mail" value="30"/></div><div> <parameter key="encoding" value="SYSTEM"/></div><div> <process expanded="true"></div><div> <operator activated="true" class="retrieve" compatibility="9.6.000" expanded="true" height="68" name="Retrieve resulttest" width="90" x="45" y="34"></div><div> <parameter key="repository_entry" value="//Local Repository/data/resulttest"/></div><div> </operator></div><div> <operator activated="true" class="split" compatibility="9.6.000" expanded="true" height="82" name="Split" width="90" x="179" y="34"></div><div> <parameter key="attribute_filter_type" value="all"/></div><div> <parameter key="attribute" value=""/></div><div> <parameter key="attributes" value=""/></div><div> <parameter key="use_except_expression" value="false"/></div><div> <parameter key="value_type" value="nominal"/></div><div> <parameter key="use_value_type_exception" value="false"/></div><div> <parameter key="except_value_type" value="file_path"/></div><div> <parameter key="block_type" value="single_value"/></div><div> <parameter key="use_block_type_exception" value="false"/></div><div> <parameter key="except_block_type" value="single_value"/></div><div> <parameter key="invert_selection" value="false"/></div><div> <parameter key="include_special_attributes" value="false"/></div><div> <parameter key="split_pattern" value=","/></div><div> <parameter key="split_mode" value="ordered_split"/></div><div> </operator></div><div> <operator activated="true" class="de_pivot" compatibility="9.6.000" expanded="true" height="82" name="De-Pivot" width="90" x="313" y="34"></div><div> <list key="attribute_name"></div><div> <parameter key="Subject" value="Subject.*"/></div><div> <parameter key="Grade" value="Grade.*"/></div><div> </list></div><div> <parameter key="index_attribute" value="id"/></div><div> <parameter key="create_nominal_index" value="false"/></div><div> <parameter key="keep_missings" value="false"/></div><div> </operator></div><div> <connect from_op="Retrieve resulttest" from_port="output" to_op="Split" to_port="example set input"/></div><div> <connect from_op="Split" from_port="example set output" to_op="De-Pivot" to_port="example set input"/></div><div> <connect from_op="De-Pivot" from_port="example set output" to_port="result 1"/></div><div> <portSpacing port="source_input 1" spacing="0"/></div><div> <portSpacing port="sink_result 1" spacing="0"/></div><div> <portSpacing port="sink_result 2" spacing="0"/></div><div> </process></div><div> </operator></div><div></process></div>
It is working now .. Thank you0