Skip to content
Merged

#7166 #7169

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public String getFileRequiredDesc() {
}

public String getIncludeSubFoldersDesc() {
if (fileRequired) {
if (includeSubFolders) {
return BaseMessages.getString("System.Combo.Yes");
} else {
return BaseMessages.getString("System.Combo.No");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,13 @@ public static void convertLegacyXml(List<InputFile> inputFiles, Node node) {
XmlHandler.getNodeValue(XmlHandler.getSubNodeByNr(fileNode, "exclude_filemask", i));
String fileRequired =
XmlHandler.getNodeValue(XmlHandler.getSubNodeByNr(fileNode, "file_required", i));
String includeSubfolders =
XmlHandler.getNodeValue(XmlHandler.getSubNodeByNr(fileNode, "include_subfolders", i));
inputFile.setFileName(fileName);
inputFile.setFileMask(fileMask);
inputFile.setExcludeFileMask(fileExcludeMask);
inputFile.setFileRequired(Const.toBoolean(fileRequired));
inputFile.setIncludeSubFolders(Const.toBoolean(includeSubfolders));
inputFiles.add(inputFile);
}
}
Expand Down
170 changes: 170 additions & 0 deletions integration-tests/transforms/0100-json-input-include-subfolders.hpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
<?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>0100-json-input-include-subfolders</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description>Issue 7166: JSON Input must honor include_subfolders when loading legacy file XML.</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>2026/05/25 12:00:00.000</created_date>
<modified_user>-</modified_user>
<modified_date>2026/05/25 12:00:00.000</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>JSON input</from>
<to>Sort rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Sort rows</from>
<to>validate</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>JSON input</name>
<type>JsonInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<include>N</include>
<include_field/>
<rownum>N</rownum>
<addresultfile>N</addresultfile>
<readurl>N</readurl>
<removeSourceField>N</removeSourceField>
<IsIgnoreEmptyFile>N</IsIgnoreEmptyFile>
<doNotFailIfNoFile>Y</doNotFailIfNoFile>
<ignoreMissingPath>Y</ignoreMissingPath>
<defaultPathLeafToNull>Y</defaultPathLeafToNull>
<rownum_field/>
<files>
<file>
<name>${PROJECT_HOME}/files/file-input-include-subfolders</name>
<filemask>^[^/]+\.json$</filemask>
<exclude_filemask>.*-events\.json$</exclude_filemask>
<file_required>N</file_required>
<include_subfolders>Y</include_subfolders>
</file>
</files>
<fields>
<field>
<name>id</name>
<path>$.id</path>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
</field>
</fields>
<limit>0</limit>
<IsInFields>N</IsInFields>
<IsAFile>N</IsAFile>
<valueField/>
<shortFileFieldName/>
<pathFieldName/>
<hiddenFieldName/>
<lastModificationTimeFieldName/>
<uriNameFieldName/>
<rootUriNameFieldName/>
<extensionFieldName/>
<sizeFieldName/>
<attributes/>
<GUI>
<xloc>80</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform>
<name>Sort rows</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>id</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>224</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform>
<name>validate</name>
<type>Dummy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<attributes/>
<GUI>
<xloc>368</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
<?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>0100-json-normalize-input-include-subfolders</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description>Issue 7166: JSON Normalize Input must honor include_subfolders when loading legacy file XML.</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>2026/05/25 12:00:00.000</created_date>
<modified_user>-</modified_user>
<modified_date>2026/05/25 12:00:00.000</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>JSON normalize input</from>
<to>Sort rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Sort rows</from>
<to>validate</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>JSON normalize input</name>
<type>JsonNormalizeInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<include>N</include>
<include_field/>
<rownum>N</rownum>
<rownum_field/>
<limit>0</limit>
<valueField/>
<IsInFields>N</IsInFields>
<IsAFile>N</IsAFile>
<addresultfile>N</addresultfile>
<IsIgnoreEmptyFile>N</IsIgnoreEmptyFile>
<doNotFailIfNoFile>Y</doNotFailIfNoFile>
<readurl>N</readurl>
<removeSourceField>N</removeSourceField>
<recordPath>$.events[*]</recordPath>
<fieldSeparator>.</fieldSeparator>
<maxFlattenDepth>-1</maxFlattenDepth>
<arrayHandling>STRINGIFY</arrayHandling>
<beyondDepthBehavior>STRINGIFY</beyondDepthBehavior>
<ignoreMissingField>Y</ignoreMissingField>
<shortFileFieldName/>
<extensionFieldName/>
<pathFieldName/>
<sizeFieldName/>
<hiddenFieldName/>
<lastModificationTimeFieldName/>
<uriNameFieldName/>
<rootUriNameFieldName/>
<files>
<file>
<name>${PROJECT_HOME}/files/file-input-include-subfolders</name>
<filemask>.*-events\.json$</filemask>
<exclude_filemask/>
<file_required>N</file_required>
<include_subfolders>Y</include_subfolders>
</file>
</files>
<fields>
<field>
<name>id</name>
<path>id</path>
<type>String</type>
<format/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
<currency/>
<decimal/>
<group/>
<repeat>N</repeat>
</field>
<field>
<name>event</name>
<path>event</path>
<type>String</type>
<format/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
<currency/>
<decimal/>
<group/>
<repeat>N</repeat>
</field>
</fields>
<attributes/>
<GUI>
<xloc>80</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform>
<name>Sort rows</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>id</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>224</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform>
<name>validate</name>
<type>Dummy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<attributes/>
<GUI>
<xloc>368</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>
Loading
Loading