Skip to content

Commit

Permalink
add integration test, apache#3838
Browse files Browse the repository at this point in the history
  • Loading branch information
hansva committed Jun 7, 2024
1 parent 8751d82 commit 007c085
Show file tree
Hide file tree
Showing 3 changed files with 568 additions and 0 deletions.
289 changes: 289 additions & 0 deletions integration-tests/database/0029-sql-file-output-validate-file.hpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,289 @@
<?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:https://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>0029-sql-file-output-validate-file</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/05/09 16:12:45.934</created_date>
<modified_user>-</modified_user>
<modified_date>2023/05/09 16:12:45.934</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Data grid</from>
<to>Merge join</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Text file input</from>
<to>Merge join</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Merge join</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Filter rows</from>
<to>Abort</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Abort</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>
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<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>(</item>
</line>
<line>
<item> column1 TEXT</item>
</line>
<line>
<item>, column2 TEXT</item>
</line>
<line>
<item>)</item>
</line>
<line>
<item>;</item>
</line>
<line>
<item/>
</line>
<line>
<item>INSERT INTO "public".testtable(column1, column2) VALUES (E'this',E'is');</item>
</line>
<line>
<item>INSERT INTO "public".testtable(column1, column2) VALUES (E'some',E'data');</item>
</line>
</data>
<fields>
<field>
<length>-1</length>
<precision>-1</precision>
<set_empty_string>N</set_empty_string>
<name>sql_file</name>
<type>String</type>
</field>
</fields>
<attributes/>
<GUI>
<xloc>192</xloc>
<yloc>112</yloc>
</GUI>
</transform>
<transform>
<name>Filter rows</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>&lt;></function>
<leftvalue>sql_file</leftvalue>
<negated>N</negated>
<operator>-</operator>
<rightvalue>content</rightvalue>
</condition>
</compare>
<attributes/>
<GUI>
<xloc>512</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Merge join</name>
<type>MergeJoin</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<join_type>FULL OUTER</join_type>
<keys_1>
<key>sql_file</key>
</keys_1>
<keys_2>
<key>content</key>
</keys_2>
<transform1>Data grid</transform1>
<transform2>Text file input</transform2>
<attributes/>
<GUI>
<xloc>352</xloc>
<yloc>208</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_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>Characters</length>
<add_to_result_filenames>Y</add_to_result_filenames>
<file>
<name>${PROJECT_HOME}/output/filename.sql</name>
<filemask/>
<exclude_filemask/>
<file_required>N</file_required>
<include_subfolders>N</include_subfolders>
<type>CSV</type>
<compression>None</compression>
</file>
<filters>
</filters>
<fields>
<field>
<name>content</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<ifnull/>
<position>-1</position>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
</field>
</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>176</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>
Loading

0 comments on commit 007c085

Please sign in to comment.