Skip to content

Commit

Permalink
Merge pull request apache#4528 from hansva/main
Browse files Browse the repository at this point in the history
  • Loading branch information
hansva authored Nov 6, 2024
2 parents 2f35d97 + 4117fd9 commit 8811c7d
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 111 deletions.
188 changes: 98 additions & 90 deletions integration-tests/mdi/0011-data-grid-parent.hpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ limitations under the License.
-->
<pipeline>
<info>
<name>0030-data-grid-parent</name>
<name>0011-data-grid-parent</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
Expand All @@ -34,8 +34,6 @@ limitations under the License.
<created_date>2021/05/25 12:27:40.781</created_date>
<modified_user>-</modified_user>
<modified_date>2021/05/25 12:27:40.781</modified_date>
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
<is_key_private>N</is_key_private>
</info>
<notepads>
</notepads>
Expand Down Expand Up @@ -67,40 +65,48 @@ limitations under the License.
<method>none</method>
<schema_name/>
</partitioning>
<data>
<line>
<item>this;1;is;13/05/2021;10000000000000000</item>
<item>;</item>
</line>
<line>
<item>some;2;test;13/05/2021;10000000000000000</item>
<item>;</item>
</line>
<line>
<item>data;3;for;13/05/2021;10000000000000000</item>
<item>;</item>
</line>
<line>
<item>data;4;grid;13/05/2021;10000000000000000</item>
<item>;</item>
</line>
</data>
<fields>
<field>
<set_empty_string>N</set_empty_string>
<length>-1</length>
<name>dataLines</name>
<precision>-1</precision>
<currency/>
<set_empty_string>N</set_empty_string>
<name>dataLines</name>
<format/>
<group/>
<decimal/>
<type>String</type>
</field>
<field>
<set_empty_string>N</set_empty_string>
<length>-1</length>
<name>splitfield</name>
<precision>-1</precision>
<currency/>
<set_empty_string>N</set_empty_string>
<name>splitfield</name>
<format/>
<group/>
<decimal/>
<type>String</type>
</field>
</fields>
<data>
<line>
<item>this,1,is,13/05/2021,10000000000000000</item>
<item>,</item>
</line>
<line>
<item>some,2,test,13/05/2021,10000000000000000</item>
<item>,</item>
</line>
<line>
<item>data,3,for,13/05/2021,10000000000000000</item>
<item>,</item>
</line>
<line>
<item>data,4,grid,13/05/2021,10000000000000000</item>
<item>,</item>
</line>
</data>
<attributes/>
<GUI>
<xloc>128</xloc>
Expand Down Expand Up @@ -136,6 +142,7 @@ limitations under the License.
<schema_name/>
</partitioning>
<filename>${PROJECT_HOME}/0011-data-grid-child.hpl</filename>
<run_configuration/>
<source_transform>OUTPUT</source_transform>
<source_output_fields>
<source_output_field>
Expand Down Expand Up @@ -170,6 +177,7 @@ limitations under the License.
</source_output_field>
</source_output_fields>
<target_file/>
<create_parent_folder>N</create_parent_folder>
<no_execution>N</no_execution>
<stream_source_transform/>
<stream_target_transform/>
Expand Down Expand Up @@ -269,71 +277,6 @@ limitations under the License.
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<set_empty_string>N</set_empty_string>
<length>-1</length>
<name>name</name>
<precision>-1</precision>
<type>String</type>
</field>
<field>
<set_empty_string>N</set_empty_string>
<length>-1</length>
<name>type</name>
<precision>-1</precision>
<type>String</type>
</field>
<field>
<set_empty_string>N</set_empty_string>
<length>-1</length>
<name>format</name>
<precision>-1</precision>
<type>String</type>
</field>
<field>
<set_empty_string>N</set_empty_string>
<length>-1</length>
<name>length</name>
<precision>-1</precision>
<type>String</type>
</field>
<field>
<set_empty_string>N</set_empty_string>
<length>-1</length>
<name>precision</name>
<precision>-1</precision>
<type>String</type>
</field>
<field>
<set_empty_string>N</set_empty_string>
<length>-1</length>
<name>currency</name>
<precision>-1</precision>
<type>String</type>
</field>
<field>
<set_empty_string>N</set_empty_string>
<length>-1</length>
<name>decimal</name>
<precision>-1</precision>
<type>String</type>
</field>
<field>
<set_empty_string>N</set_empty_string>
<length>-1</length>
<name>group</name>
<precision>-1</precision>
<type>String</type>
</field>
<field>
<set_empty_string>N</set_empty_string>
<length>-1</length>
<name>setEmpty</name>
<precision>-1</precision>
<type>String</type>
</field>
</fields>
<data>
<line>
<item>field1</item>
Expand Down Expand Up @@ -391,6 +334,71 @@ limitations under the License.
<item>N</item>
</line>
</data>
<fields>
<field>
<length>-1</length>
<precision>-1</precision>
<set_empty_string>N</set_empty_string>
<name>name</name>
<type>String</type>
</field>
<field>
<length>-1</length>
<precision>-1</precision>
<set_empty_string>N</set_empty_string>
<name>type</name>
<type>String</type>
</field>
<field>
<length>-1</length>
<precision>-1</precision>
<set_empty_string>N</set_empty_string>
<name>format</name>
<type>String</type>
</field>
<field>
<length>-1</length>
<precision>-1</precision>
<set_empty_string>N</set_empty_string>
<name>length</name>
<type>String</type>
</field>
<field>
<length>-1</length>
<precision>-1</precision>
<set_empty_string>N</set_empty_string>
<name>precision</name>
<type>String</type>
</field>
<field>
<length>-1</length>
<precision>-1</precision>
<set_empty_string>N</set_empty_string>
<name>currency</name>
<type>String</type>
</field>
<field>
<length>-1</length>
<precision>-1</precision>
<set_empty_string>N</set_empty_string>
<name>decimal</name>
<type>String</type>
</field>
<field>
<length>-1</length>
<precision>-1</precision>
<set_empty_string>N</set_empty_string>
<name>group</name>
<type>String</type>
</field>
<field>
<length>-1</length>
<precision>-1</precision>
<set_empty_string>N</set_empty_string>
<name>setEmpty</name>
<type>String</type>
</field>
</fields>
<attributes/>
<GUI>
<xloc>128</xloc>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import lombok.Getter;
import lombok.Setter;
import org.apache.hop.core.Const;
import org.apache.hop.metadata.api.HopMetadataProperty;

@Getter
@Setter
public class DataGridDataMeta implements Cloneable {

@HopMetadataProperty(key = "item")
Expand Down Expand Up @@ -51,28 +55,8 @@ public DataGridDataMeta clone() {
return new DataGridDataMeta(this);
}

public List<String> getDatalines() {
return datalines;
}

public void setDatalines(List<String> datalines) {
this.datalines = datalines;
}

public String getInjectionDatalines() {
return injectionDatalines;
}

public void setInjectionDatalines(String injectionDatalines) {
this.injectionDatalines = injectionDatalines;
this.datalines = Arrays.asList(injectionDatalines.split(Const.NVL(splitter, ",")));
}

public String getSplitter() {
return splitter;
}

public void setSplitter(String splitter) {
this.datalines = Arrays.asList(injectionDatalines.split(Const.NVL(splitter, ",")));
this.splitter = splitter;
}
}

0 comments on commit 8811c7d

Please sign in to comment.