This is an automated email from the ASF dual-hosted git repository.

hansva pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/main by this push:
     new 2cf44e48dc additional metadata injection sample #2237 (#3942)
2cf44e48dc is described below

commit 2cf44e48dc673714ecd2cfbeecf2867d08fa10a3
Author: Bart Maertens <[email protected]>
AuthorDate: Thu May 16 12:09:58 2024 +0200

    additional metadata injection sample #2237 (#3942)
    
    * ignore .swp files
    
    * additional metadata injection sample. #2237
    
    * added missing apache header. #2237
---
 .gitignore                                         |   3 +-
 .../src/main/samples/files/person-info-1.csv       |   6 +
 .../src/main/samples/files/person-info-2.csv       |   6 +
 .../process-files-with-mdi-template.hpl            | 203 +++++++
 .../metadata-injection/process-files-with-mdi.hpl  | 638 +++++++++++++++++++++
 5 files changed, 855 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index ba7ec57828..93a8f5c2e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,6 +17,7 @@ bin
 routes.yml
 *.tgf
 .vscode
+.swp
 
 rebel.xml
 rebel-remote.xml
@@ -54,4 +55,4 @@ integration-tests/spreadsheet/files/exel-multi-part_3.xlsx
 integration-tests/spreadsheet/files/exel-multi-part_4.xlsx
 integration-tests/json/output
 integration-tests/mdi/files/excelwriter-mdi-test.xlsx
-integration-tests/spreadsheet/files/sample-file-append.xlsx
\ No newline at end of file
+integration-tests/spreadsheet/files/sample-file-append.xlsx
diff --git 
a/plugins/transforms/metainject/src/main/samples/files/person-info-1.csv 
b/plugins/transforms/metainject/src/main/samples/files/person-info-1.csv
new file mode 100644
index 0000000000..64e141c3ed
--- /dev/null
+++ b/plugins/transforms/metainject/src/main/samples/files/person-info-1.csv
@@ -0,0 +1,6 @@
+First name,Last name,Address,Email,Country,Zip
+Ralph,Padilla,"571-1430 Vulputate, 
Rd.",[email protected],Chile,35528
+Colton,Cobb,3010 Ligula. Av.,[email protected],Austria,9351-5888
+Orlando,Sheppard,622-8030 Litora St.,[email protected],Russian 
Federation,134388
+Fiona,Fleming,Ap #913-8067 Sociis Rd.,[email protected],Austria,28748
+Tatum,Chen,"P.O. Box 390, 3345 Eleifend 
Av.",[email protected],Austria,28555
diff --git 
a/plugins/transforms/metainject/src/main/samples/files/person-info-2.csv 
b/plugins/transforms/metainject/src/main/samples/files/person-info-2.csv
new file mode 100644
index 0000000000..e3c19659f5
--- /dev/null
+++ b/plugins/transforms/metainject/src/main/samples/files/person-info-2.csv
@@ -0,0 +1,6 @@
+Street Address 1,Country Name,Postal/Zip,Name Last,Name First,Email 
Address,Day Of Birth 
+Ap #253-2158 Iaculis Av.,South 
Africa,54760,Barry,Elton,[email protected],1993-08-13
+Ap #143-6408 Id 
Rd.,Netherlands,54655,Hodge,Gray,[email protected],1984-06-10
+9730 Mi St.,Philippines,423468,Hicks,Zenaida,[email protected],1972-04-12
+Ap #335-4745 Eu 
Street,Nigeria,6011,Vargas,Pamela,[email protected],2001-07-26
+Ap #669-7751 Placerat Avenue,Costa 
Rica,5424,Jennings,Rhoda,[email protected],1989-01-22
diff --git 
a/plugins/transforms/metainject/src/main/samples/metadata-injection/process-files-with-mdi-template.hpl
 
b/plugins/transforms/metainject/src/main/samples/metadata-injection/process-files-with-mdi-template.hpl
new file mode 100644
index 0000000000..14148e4a95
--- /dev/null
+++ 
b/plugins/transforms/metainject/src/main/samples/metadata-injection/process-files-with-mdi-template.hpl
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>template-file-input</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description/>
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <parameters>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2024/05/07 09:54:50.069</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2024/05/07 09:54:50.069</modified_date>
+  </info>
+  <notepads>
+  </notepads>
+  <order>
+    <hop>
+      <from>Text file input</from>
+      <to>Select values</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Select values</from>
+      <to>Text file output</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>Select values</name>
+    <type>SelectValues</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <select_unspecified>N</select_unspecified>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>464</xloc>
+      <yloc>176</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Text file input</name>
+    <type>TextFileInput2</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <accept_filenames>N</accept_filenames>
+    <passing_through_fields>N</passing_through_fields>
+    <accept_field/>
+    <accept_transform_name/>
+    <separator>;</separator>
+    <enclosure>"</enclosure>
+    <enclosure_breaks>N</enclosure_breaks>
+    <escapechar/>
+    <header>Y</header>
+    <nr_headerlines>1</nr_headerlines>
+    <footer>N</footer>
+    <nr_footerlines>1</nr_footerlines>
+    <line_wrapped>N</line_wrapped>
+    <nr_wraps>1</nr_wraps>
+    <layout_paged>N</layout_paged>
+    <nr_lines_per_page>80</nr_lines_per_page>
+    <nr_lines_doc_header>0</nr_lines_doc_header>
+    <noempty>Y</noempty>
+    <include>N</include>
+    <include_field/>
+    <rownum>N</rownum>
+    <rownumByFile>N</rownumByFile>
+    <rownum_field/>
+    <format>mixed</format>
+    <encoding/>
+    <length/>
+    <add_to_result_filenames>Y</add_to_result_filenames>
+    <file>
+      <type>CSV</type>
+      <compression>None</compression>
+    </file>
+    <filters>
+    </filters>
+    <fields>
+    </fields>
+    <limit>0</limit>
+    <error_ignored>N</error_ignored>
+    <skip_bad_files>N</skip_bad_files>
+    <file_error_field/>
+    <file_error_message_field/>
+    <error_line_skipped>N</error_line_skipped>
+    <error_count_field/>
+    <error_fields_field/>
+    <error_text_field/>
+    <schema_definition/>
+    <bad_line_files_destination_directory/>
+    <bad_line_files_extension>warning</bad_line_files_extension>
+    <error_line_files_destination_directory/>
+    <error_line_files_extension>error</error_line_files_extension>
+    <line_number_files_destination_directory/>
+    <line_number_files_extension>line</line_number_files_extension>
+    <date_format_lenient>Y</date_format_lenient>
+    <date_format_locale>en_US</date_format_locale>
+    <shortFileFieldName/>
+    <pathFieldName/>
+    <hiddenFieldName/>
+    <lastModificationTimeFieldName/>
+    <uriNameFieldName/>
+    <rootUriNameFieldName/>
+    <extensionFieldName/>
+    <sizeFieldName/>
+    <attributes/>
+    <GUI>
+      <xloc>256</xloc>
+      <yloc>176</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Text file output</name>
+    <type>TextFileOutput</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <schema_definition/>
+    <separator>;</separator>
+    <enclosure>"</enclosure>
+    <enclosure_forced>N</enclosure_forced>
+    <enclosure_fix_disabled>N</enclosure_fix_disabled>
+    <header>Y</header>
+    <footer>N</footer>
+    <format>DOS</format>
+    <compression>None</compression>
+    <encoding/>
+    <endedLine/>
+    <fileNameInField>N</fileNameInField>
+    <fileNameField/>
+    <create_parent_folder>Y</create_parent_folder>
+    <file>
+      <name>file</name>
+      <servlet_output>N</servlet_output>
+      <do_not_open_new_file_init>Y</do_not_open_new_file_init>
+      <extention>txt</extention>
+      <append>N</append>
+      <split>N</split>
+      <haspartno>N</haspartno>
+      <add_date>N</add_date>
+      <add_time>N</add_time>
+      <SpecifyFormat>N</SpecifyFormat>
+      <date_time_format/>
+      <add_to_result_filenames>Y</add_to_result_filenames>
+      <pad>N</pad>
+      <fast_dump>N</fast_dump>
+      <splitevery/>
+    </file>
+    <fields>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>672</xloc>
+      <yloc>176</yloc>
+    </GUI>
+  </transform>
+  <transform_error_handling>
+  </transform_error_handling>
+  <attributes/>
+</pipeline>
diff --git 
a/plugins/transforms/metainject/src/main/samples/metadata-injection/process-files-with-mdi.hpl
 
b/plugins/transforms/metainject/src/main/samples/metadata-injection/process-files-with-mdi.hpl
new file mode 100644
index 0000000000..90eabd3ade
--- /dev/null
+++ 
b/plugins/transforms/metainject/src/main/samples/metadata-injection/process-files-with-mdi.hpl
@@ -0,0 +1,638 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>process-files-with-mdi</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description/>
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <pipeline_status>0</pipeline_status>
+    <parameters>
+      <parameter>
+        <name>PRM_TYPE</name>
+        <default_value>1</default_value>
+        <description/>
+      </parameter>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2024/05/07 09:56:06.810</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2024/05/07 09:56:06.810</modified_date>
+  </info>
+  <notepads>
+    <notepad>
+      <backgroundcolorblue>210</backgroundcolorblue>
+      <backgroundcolorgreen>136</backgroundcolorgreen>
+      <backgroundcolorred>15</backgroundcolorred>
+      <bordercolorblue>250</bordercolorblue>
+      <bordercolorgreen>231</bordercolorgreen>
+      <bordercolorred>200</bordercolorred>
+      <fontbold>N</fontbold>
+      <fontcolorblue>250</fontcolorblue>
+      <fontcolorgreen>231</fontcolorgreen>
+      <fontcolorred>200</fontcolorred>
+      <fontitalic>N</fontitalic>
+      <fontname>.AppleSystemUIFont</fontname>
+      <fontsize>13</fontsize>
+      <height>170</height>
+      <xloc>118</xloc>
+      <yloc>52</yloc>
+      <note>This sample pipelines reads person information from 2 files with 
different layouts.
+The data is written to a unified file format through metadata injection. 
+
+To run this sample, run this pipeline with the default PRM_TYPE value of 1, 
then run it again with 2 as the parameter value. 
+This will read ${PROJECT_HOME}/files/person-info-1.csv and 
${PROJECT_HOME}/files/person-info-2.csv respectively. 
+
+The unified output file is written to 
${PROJECT_HOME}/output/unified-person-data.csv.
+
+To learn more about metadata injection: 
https://hop.apache.org//manual/latest/pipeline/metadata-injection.html
+</note>
+      <width>749</width>
+    </notepad>
+  </notepads>
+  <order>
+    <hop>
+      <from>Get file names</from>
+      <to>File Metadata</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>File Metadata</from>
+      <to>ETL metadata injection</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>File Metadata</from>
+      <to>keep filename</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>keep filename</from>
+      <to>sort unique filename</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>sort unique filename</from>
+      <to>ETL metadata injection</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>File Metadata</from>
+      <to>rename fields</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>rename fields</from>
+      <to>keep fields</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>keep fields</from>
+      <to>field position</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>field position</from>
+      <to>sort fields</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>sort fields</from>
+      <to>ETL metadata injection</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>ETL metadata injection</name>
+    <type>MetaInject</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    
<filename>${PROJECT_HOME}/metadata-injection/process-files-with-mdi-template.hpl</filename>
+    <run_configuration>local</run_configuration>
+    <source_transform/>
+    <source_output_fields>    </source_output_fields>
+    <target_file/>
+    <create_parent_folder>Y</create_parent_folder>
+    <no_execution>N</no_execution>
+    <stream_source_transform/>
+    <stream_target_transform/>
+    <mappings>
+      <mapping>
+        <target_transform_name>Text file input</target_transform_name>
+        <target_attribute_key>FIELD_PRECISION</target_attribute_key>
+        <target_detail>Y</target_detail>
+        <source_transform>File Metadata</source_transform>
+        <source_field>precision</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file input</target_transform_name>
+        <target_attribute_key>SEPARATOR</target_attribute_key>
+        <target_detail>N</target_detail>
+        <source_transform/>
+        <source_field>,</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file input</target_transform_name>
+        <target_attribute_key>FIELD_FORMAT</target_attribute_key>
+        <target_detail>Y</target_detail>
+        <source_transform>File Metadata</source_transform>
+        <source_field>mask</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file input</target_transform_name>
+        <target_attribute_key>FIELD_GROUP</target_attribute_key>
+        <target_detail>Y</target_detail>
+        <source_transform>File Metadata</source_transform>
+        <source_field>grouping_symbol</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file output</target_transform_name>
+        <target_attribute_key>OUTPUT_TRIM</target_attribute_key>
+        <target_detail>Y</target_detail>
+        <source_transform/>
+        <source_field>both</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file input</target_transform_name>
+        <target_attribute_key>FIELD_DECIMAL</target_attribute_key>
+        <target_detail>Y</target_detail>
+        <source_transform>File Metadata</source_transform>
+        <source_field>decimal_symbol</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file input</target_transform_name>
+        <target_attribute_key>FIELD_LENGTH</target_attribute_key>
+        <target_detail>Y</target_detail>
+        <source_transform>File Metadata</source_transform>
+        <source_field>length</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file input</target_transform_name>
+        <target_attribute_key>ENCLOSURE</target_attribute_key>
+        <target_detail>N</target_detail>
+        <source_transform/>
+        <source_field>"</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file output</target_transform_name>
+        <target_attribute_key>FILENAME</target_attribute_key>
+        <target_detail>N</target_detail>
+        <source_transform/>
+        <source_field>${PROJECT_HOME}/output/unified-person-data</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Select values</target_transform_name>
+        <target_attribute_key>FIELD_NAME</target_attribute_key>
+        <target_detail>Y</target_detail>
+        <source_transform>sort fields</source_transform>
+        <source_field>name</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file input</target_transform_name>
+        <target_attribute_key>ENCODING</target_attribute_key>
+        <target_detail>N</target_detail>
+        <source_transform/>
+        <source_field>UTF-8</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Select values</target_transform_name>
+        <target_attribute_key>FIELD_RENAME</target_attribute_key>
+        <target_detail>Y</target_detail>
+        <source_transform>sort fields</source_transform>
+        <source_field>name_new</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file input</target_transform_name>
+        <target_attribute_key>FIELD_TYPE</target_attribute_key>
+        <target_detail>Y</target_detail>
+        <source_transform>File Metadata</source_transform>
+        <source_field>type_1</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file output</target_transform_name>
+        <target_attribute_key>OUTPUT_FIELDNAME</target_attribute_key>
+        <target_detail>Y</target_detail>
+        <source_transform>sort fields</source_transform>
+        <source_field>name_new</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file output</target_transform_name>
+        <target_attribute_key>EXTENSION</target_attribute_key>
+        <target_detail>N</target_detail>
+        <source_transform/>
+        <source_field>csv</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file input</target_transform_name>
+        <target_attribute_key>FILE_TYPE</target_attribute_key>
+        <target_detail>N</target_detail>
+        <source_transform/>
+        <source_field>CSV</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file output</target_transform_name>
+        <target_attribute_key>OUTPUT_TYPE</target_attribute_key>
+        <target_detail>Y</target_detail>
+        <source_transform>sort fields</source_transform>
+        <source_field>type_1</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file input</target_transform_name>
+        <target_attribute_key>FILE_FORMAT</target_attribute_key>
+        <target_detail>N</target_detail>
+        <source_transform/>
+        <source_field>mixed</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file input</target_transform_name>
+        <target_attribute_key>HEADER_PRESENT</target_attribute_key>
+        <target_detail>N</target_detail>
+        <source_transform/>
+        <source_field>Y</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file output</target_transform_name>
+        <target_attribute_key>SEPARATOR</target_attribute_key>
+        <target_detail>N</target_detail>
+        <source_transform/>
+        <source_field>,</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file input</target_transform_name>
+        <target_attribute_key>FILENAME</target_attribute_key>
+        <target_detail>Y</target_detail>
+        <source_transform>sort unique filename</source_transform>
+        <source_field>filename</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file output</target_transform_name>
+        <target_attribute_key>ENCLOSURE</target_attribute_key>
+        <target_detail>N</target_detail>
+        <source_transform/>
+        <source_field>"</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file output</target_transform_name>
+        <target_attribute_key>APPEND</target_attribute_key>
+        <target_detail>N</target_detail>
+        <source_transform/>
+        <source_field>Y</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file input</target_transform_name>
+        <target_attribute_key>FIELD_NAME</target_attribute_key>
+        <target_detail>Y</target_detail>
+        <source_transform>File Metadata</source_transform>
+        <source_field>name</source_field>
+      </mapping>
+      <mapping>
+        <target_transform_name>Text file input</target_transform_name>
+        <target_attribute_key>NR_HEADER_LINES</target_attribute_key>
+        <target_detail>N</target_detail>
+        <source_transform/>
+        <source_field>1</source_field>
+      </mapping>
+    </mappings>
+    <attributes/>
+    <GUI>
+      <xloc>928</xloc>
+      <yloc>352</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>File Metadata</name>
+    <type>FileMetadataPlugin</type>
+    <description/>
+    <distribute>N</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <defaultCharset>ISO-8859-1</defaultCharset>
+    <delimiterCandidate>
+      <candidate>      </candidate>
+    </delimiterCandidate>
+    <delimiterCandidate>
+      <candidate>;</candidate>
+    </delimiterCandidate>
+    <delimiterCandidate>
+      <candidate>,</candidate>
+    </delimiterCandidate>
+    <enclosureCandidate>
+      <candidate>"</candidate>
+    </enclosureCandidate>
+    <enclosureCandidate>
+      <candidate>'</candidate>
+    </enclosureCandidate>
+    <fileNameField>filename</fileNameField>
+    <filenameInField>Y</filenameInField>
+    <limitRows>10000</limitRows>
+    <attributes/>
+    <GUI>
+      <xloc>288</xloc>
+      <yloc>352</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Get file names</name>
+    <type>GetFileNames</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <doNotFailIfNoFile>N</doNotFailIfNoFile>
+    <dynamic_include_subfolders>N</dynamic_include_subfolders>
+    <file>
+      <file_required>N</file_required>
+      <filemask>person-info-${PRM_TYPE}.csv</filemask>
+      <include_subfolders>N</include_subfolders>
+      <name>${PROJECT_HOME}/files</name>
+    </file>
+    <filefield>N</filefield>
+    <filter>
+      <filterfiletype>all_files</filterfiletype>
+    </filter>
+    <isaddresult>Y</isaddresult>
+    <limit>0</limit>
+    <raiseAnExceptionIfNoFile>N</raiseAnExceptionIfNoFile>
+    <rownum>N</rownum>
+    <attributes/>
+    <GUI>
+      <xloc>128</xloc>
+      <yloc>352</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>field position</name>
+    <type>ValueMapper</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <field_to_use>name_new</field_to_use>
+    <fields>
+      <field>
+        <source_value>first_name</source_value>
+        <target_value>1</target_value>
+      </field>
+      <field>
+        <source_value>last_name</source_value>
+        <target_value>2</target_value>
+      </field>
+      <field>
+        <source_value>primary_email</source_value>
+        <target_value>3</target_value>
+      </field>
+      <field>
+        <source_value>address_street</source_value>
+        <target_value>4</target_value>
+      </field>
+      <field>
+        <source_value>address_zip</source_value>
+        <target_value>5</target_value>
+      </field>
+      <field>
+        <source_value>address_country</source_value>
+        <target_value>6</target_value>
+      </field>
+    </fields>
+    <target_field>field_position</target_field>
+    <attributes/>
+    <GUI>
+      <xloc>720</xloc>
+      <yloc>464</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>keep fields</name>
+    <type>FilterRows</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <compare>
+      <condition>
+        <conditions>
+</conditions>
+        <function>IN LIST</function>
+        <leftvalue>name_new</leftvalue>
+        <negated>N</negated>
+        <operator>-</operator>
+        <value>
+          <isnull>N</isnull>
+          <length>-1</length>
+          <name>constant</name>
+          <precision>-1</precision>
+          
<text>first_name;last_name;address_stress;address_zip;address_country;primary_email</text>
+          <type>String</type>
+        </value>
+      </condition>
+    </compare>
+    <attributes/>
+    <GUI>
+      <xloc>560</xloc>
+      <yloc>464</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>keep filename</name>
+    <type>SelectValues</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <name>filename</name>
+      </field>
+      <select_unspecified>N</select_unspecified>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>400</xloc>
+      <yloc>256</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>rename fields</name>
+    <type>ValueMapper</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <field_to_use>name</field_to_use>
+    <fields>
+      <field>
+        <source_value>First name</source_value>
+        <target_value>first_name</target_value>
+      </field>
+      <field>
+        <source_value>Last name</source_value>
+        <target_value>last_name</target_value>
+      </field>
+      <field>
+        <source_value>Name First</source_value>
+        <target_value>first_name</target_value>
+      </field>
+      <field>
+        <source_value>Name Last</source_value>
+        <target_value>last_name</target_value>
+      </field>
+      <field>
+        <source_value>Address</source_value>
+        <target_value>address_street</target_value>
+      </field>
+      <field>
+        <source_value>Street Address 1</source_value>
+        <target_value>address_street</target_value>
+      </field>
+      <field>
+        <source_value>Country</source_value>
+        <target_value>address_country</target_value>
+      </field>
+      <field>
+        <source_value>Country Name</source_value>
+        <target_value>address_country</target_value>
+      </field>
+      <field>
+        <source_value>Zip</source_value>
+        <target_value>address_zip</target_value>
+      </field>
+      <field>
+        <source_value>Postal/Zip</source_value>
+        <target_value>address_zip</target_value>
+      </field>
+      <field>
+        <source_value>Email</source_value>
+        <target_value>primary_email</target_value>
+      </field>
+      <field>
+        <source_value>Email Address</source_value>
+        <target_value>primary_email</target_value>
+      </field>
+      <field>
+        <source_value>Day Of Birth</source_value>
+        <target_value>dob</target_value>
+      </field>
+    </fields>
+    <target_field>name_new</target_field>
+    <attributes/>
+    <GUI>
+      <xloc>400</xloc>
+      <yloc>464</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>sort fields</name>
+    <type>SortRows</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <directory>${java.io.tmpdir}</directory>
+    <prefix>out</prefix>
+    <sort_size>1000000</sort_size>
+    <free_memory/>
+    <compress>N</compress>
+    <compress_variable/>
+    <unique_rows>N</unique_rows>
+    <fields>
+      <field>
+        <name>field_position</name>
+        <ascending>Y</ascending>
+        <case_sensitive>N</case_sensitive>
+        <collator_enabled>N</collator_enabled>
+        <collator_strength>0</collator_strength>
+        <presorted>N</presorted>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>848</xloc>
+      <yloc>464</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>sort unique filename</name>
+    <type>SortRows</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <directory>${java.io.tmpdir}</directory>
+    <prefix>out</prefix>
+    <sort_size>1000000</sort_size>
+    <free_memory/>
+    <compress>N</compress>
+    <compress_variable/>
+    <unique_rows>Y</unique_rows>
+    <fields>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>848</xloc>
+      <yloc>256</yloc>
+    </GUI>
+  </transform>
+  <transform_error_handling>
+  </transform_error_handling>
+  <attributes/>
+</pipeline>

Reply via email to