forked from apache/hop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request apache#2198 from sramazzina/2142.1
fix apache#2142
- Loading branch information
Showing
4 changed files
with
519 additions
and
6 deletions.
There are no files selected for viewing
175 changes: 175 additions & 0 deletions
175
integration-tests/transforms/0065-check-excel-file-exists.hpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
<?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>0064-check-excel-file-exists.hpl</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>2023/01/12 09:32:57.327</created_date> | ||
<modified_user>-</modified_user> | ||
<modified_date>2023/01/12 09:32:57.327</modified_date> | ||
</info> | ||
<notepads> | ||
</notepads> | ||
<order> | ||
<hop> | ||
<from>File exists!</from> | ||
<to>Cleanup temporary file</to> | ||
<enabled>Y</enabled> | ||
</hop> | ||
<hop> | ||
<from>Look for test file in target dir</from> | ||
<to>Detect empty stream</to> | ||
<enabled>Y</enabled> | ||
</hop> | ||
<hop> | ||
<from>Detect empty stream</from> | ||
<to>Abort because expected file not found!</to> | ||
<enabled>Y</enabled> | ||
</hop> | ||
<hop> | ||
<from>Look for test file in target dir</from> | ||
<to>File exists!</to> | ||
<enabled>Y</enabled> | ||
</hop> | ||
</order> | ||
<transform> | ||
<name>Abort because expected file not found!</name> | ||
<type>Abort</type> | ||
<description/> | ||
<distribute>Y</distribute> | ||
<custom_distribution/> | ||
<copies>1</copies> | ||
<partitioning> | ||
<method>none</method> | ||
<schema_name/> | ||
</partitioning> | ||
<abort_option>ABORT_WITH_ERROR</abort_option> | ||
<always_log_rows>Y</always_log_rows> | ||
<message>Expected file not found!</message> | ||
<row_threshold>0</row_threshold> | ||
<attributes/> | ||
<GUI> | ||
<xloc>336</xloc> | ||
<yloc>368</yloc> | ||
</GUI> | ||
</transform> | ||
<transform> | ||
<name>Cleanup temporary file</name> | ||
<type>ProcessFiles</type> | ||
<description/> | ||
<distribute>Y</distribute> | ||
<custom_distribution/> | ||
<copies>1</copies> | ||
<partitioning> | ||
<method>none</method> | ||
<schema_name/> | ||
</partitioning> | ||
<addresultfilenames>N</addresultfilenames> | ||
<createparentfolder>N</createparentfolder> | ||
<operation_type>delete</operation_type> | ||
<overwritetargetfile>N</overwritetargetfile> | ||
<simulate>N</simulate> | ||
<sourcefilenamefield>filename</sourcefilenamefield> | ||
<attributes/> | ||
<GUI> | ||
<xloc>720</xloc> | ||
<yloc>144</yloc> | ||
</GUI> | ||
</transform> | ||
<transform> | ||
<name>Detect empty stream</name> | ||
<type>DetectEmptyStream</type> | ||
<description/> | ||
<distribute>Y</distribute> | ||
<custom_distribution/> | ||
<copies>1</copies> | ||
<partitioning> | ||
<method>none</method> | ||
<schema_name/> | ||
</partitioning> | ||
<attributes/> | ||
<GUI> | ||
<xloc>336</xloc> | ||
<yloc>256</yloc> | ||
</GUI> | ||
</transform> | ||
<transform> | ||
<name>File exists!</name> | ||
<type>Dummy</type> | ||
<description/> | ||
<distribute>Y</distribute> | ||
<custom_distribution/> | ||
<copies>1</copies> | ||
<partitioning> | ||
<method>none</method> | ||
<schema_name/> | ||
</partitioning> | ||
<attributes/> | ||
<GUI> | ||
<xloc>560</xloc> | ||
<yloc>144</yloc> | ||
</GUI> | ||
</transform> | ||
<transform> | ||
<name>Look for test file in target dir</name> | ||
<type>GetFileNames</type> | ||
<description/> | ||
<distribute>N</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> | ||
<include_subfolders>N</include_subfolders> | ||
<name>${PROJECT_HOME}/files/excel/temp-excel-output.xlsx</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>336</xloc> | ||
<yloc>144</yloc> | ||
</GUI> | ||
</transform> | ||
<transform_error_handling> | ||
</transform_error_handling> | ||
<attributes/> | ||
</pipeline> |
153 changes: 153 additions & 0 deletions
153
integration-tests/transforms/0065-create-excel-file.hpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
<?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>0064-create-excel-file.hpl</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>2023/01/12 09:30:06.480</created_date> | ||
<modified_user>-</modified_user> | ||
<modified_date>2023/01/12 09:30:06.480</modified_date> | ||
</info> | ||
<notepads> | ||
</notepads> | ||
<order> | ||
<hop> | ||
<from>Data grid</from> | ||
<to>Write test excel file</to> | ||
<enabled>Y</enabled> | ||
</hop> | ||
</order> | ||
<transform> | ||
<name>Data grid</name> | ||
<type>DataGrid</type> | ||
<description/> | ||
<distribute>Y</distribute> | ||
<custom_distribution/> | ||
<copies>1</copies> | ||
<partitioning> | ||
<method>none</method> | ||
<schema_name/> | ||
</partitioning> | ||
<data> | ||
<line> | ||
<item>A</item> | ||
</line> | ||
</data> | ||
<fields> | ||
<field> | ||
<length>-1</length> | ||
<precision>-1</precision> | ||
<set_empty_string>N</set_empty_string> | ||
<name>f1</name> | ||
<type>String</type> | ||
</field> | ||
</fields> | ||
<attributes/> | ||
<GUI> | ||
<xloc>256</xloc> | ||
<yloc>192</yloc> | ||
</GUI> | ||
</transform> | ||
<transform> | ||
<name>Write test excel file</name> | ||
<type>TypeExitExcelWriterTransform</type> | ||
<description/> | ||
<distribute>Y</distribute> | ||
<custom_distribution/> | ||
<copies>1</copies> | ||
<partitioning> | ||
<method>none</method> | ||
<schema_name/> | ||
</partitioning> | ||
<add_to_result_filenames>Y</add_to_result_filenames> | ||
<appendEmpty>0</appendEmpty> | ||
<appendLines>N</appendLines> | ||
<appendOffset>0</appendOffset> | ||
<appendOmitHeader>N</appendOmitHeader> | ||
<fields> | ||
<field> | ||
<commentAuthorField/> | ||
<commentField/> | ||
<format/> | ||
<formula>N</formula> | ||
<hyperlinkField/> | ||
<name>f1</name> | ||
<styleCell/> | ||
<title>f1</title> | ||
<titleStyleCell/> | ||
<type>String</type> | ||
</field> | ||
</fields> | ||
<file> | ||
<SpecifyFormat>N</SpecifyFormat> | ||
<add_date>N</add_date> | ||
<add_time>N</add_time> | ||
<autosizecolums>N</autosizecolums> | ||
<createParentFolder>Y</createParentFolder> | ||
<date_time_format/> | ||
<do_not_open_newfile_init>Y</do_not_open_newfile_init> | ||
<extension>xlsx</extension> | ||
<filename_field/> | ||
<filename_in_field>N</filename_in_field> | ||
<if_file_exists>new</if_file_exists> | ||
<if_sheet_exists>new</if_sheet_exists> | ||
<name>${PROJECT_HOME}/files/excel/temp-excel-output</name> | ||
<password/> | ||
<protect_sheet>N</protect_sheet> | ||
<protected_by/> | ||
<sheetname>Sheet1</sheetname> | ||
<split>N</split> | ||
<splitevery>0</splitevery> | ||
<stream_data>N</stream_data> | ||
</file> | ||
<footer>N</footer> | ||
<forceFormulaRecalculation>N</forceFormulaRecalculation> | ||
<header>Y</header> | ||
<leaveExistingStylesUnchanged>N</leaveExistingStylesUnchanged> | ||
<makeSheetActive>Y</makeSheetActive> | ||
<rowWritingMethod>overwrite</rowWritingMethod> | ||
<startingCell>A1</startingCell> | ||
<template> | ||
<enabled>N</enabled> | ||
<filename>template.xls</filename> | ||
<hidden>N</hidden> | ||
<sheet_enabled>N</sheet_enabled> | ||
<sheetname/> | ||
</template> | ||
<attributes/> | ||
<GUI> | ||
<xloc>448</xloc> | ||
<yloc>192</yloc> | ||
</GUI> | ||
</transform> | ||
<transform_error_handling> | ||
</transform_error_handling> | ||
<attributes/> | ||
</pipeline> |
Oops, something went wrong.