Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #3872 #3873

Merged
merged 2 commits into from
Apr 29, 2024
Merged
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
283 changes: 283 additions & 0 deletions integration-tests/transforms/0072-prepare-parquet-file.hpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,283 @@
<?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>0072-prepare-parquet-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>2024/02/28 17:00:11.950</created_date>
<modified_user>-</modified_user>
<modified_date>2024/02/28 17:00:11.950</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Generate rows</from>
<to>Fake data</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Fake data</from>
<to>Generate random value</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Generate random value</from>
<to>Add sequence</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Add sequence</from>
<to>Calculator</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Calculator</from>
<to>Parquet File Output</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Add sequence</name>
<type>Sequence</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>duckdb</connection>
<increment_by>1</increment_by>
<max_value>999999999</max_value>
<seqname>SEQ_</seqname>
<start_at>1</start_at>
<use_counter>Y</use_counter>
<use_database>N</use_database>
<valuename>seq</valuename>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>144</yloc>
</GUI>
</transform>
<transform>
<name>Calculator</name>
<type>Calculator</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<calculation>
<calc_type>CONSTANT</calc_type>
<field_a>c:\temp\test-parquet</field_a>
<field_name>base_filename</field_name>
<remove>Y</remove>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<value_type>String</value_type>
</calculation>
<calculation>
<calc_type>CONSTANT</calc_type>
<field_a>10000</field_a>
<field_name>den</field_name>
<remove>Y</remove>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<value_type>Integer</value_type>
</calculation>
<calculation>
<calc_type>DIVIDE</calc_type>
<field_a>seq</field_a>
<field_b>den</field_b>
<field_name>ratio</field_name>
<remove>N</remove>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<value_type>Integer</value_type>
</calculation>
<calculation>
<calc_type>ADD</calc_type>
<field_a>base_filename</field_a>
<field_b>ratio</field_b>
<field_name>filename</field_name>
<remove>N</remove>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<value_type>String</value_type>
</calculation>
<failIfNoFile>Y</failIfNoFile>
<attributes/>
<GUI>
<xloc>848</xloc>
<yloc>144</yloc>
</GUI>
</transform>
<transform>
<name>Fake data</name>
<type>Fake</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<name>Name</name>
<topic>name</topic>
<type>Name</type>
</field>
<field>
<name>CompanyName</name>
<topic>name</topic>
<type>Company</type>
</field>
<field>
<name>Industry</name>
<topic>industry</topic>
<type>Company</type>
</field>
</fields>
<locale>en</locale>
<attributes/>
<GUI>
<xloc>416</xloc>
<yloc>144</yloc>
</GUI>
</transform>
<transform>
<name>Generate random value</name>
<type>RandomValue</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<name>IntNumber</name>
<type>random integer</type>
</field>
</fields>
<attributes/>
<GUI>
<xloc>544</xloc>
<yloc>144</yloc>
</GUI>
</transform>
<transform>
<name>Generate rows</name>
<type>RowGenerator</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
</fields>
<interval_in_ms>5000</interval_in_ms>
<last_time_field>FiveSecondsAgo</last_time_field>
<limit>10</limit>
<never_ending>N</never_ending>
<row_time_field>now</row_time_field>
<attributes/>
<GUI>
<xloc>304</xloc>
<yloc>144</yloc>
</GUI>
</transform>
<transform>
<name>Parquet File Output</name>
<type>ParquetFileOutput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<compression_codec>UNCOMPRESSED</compression_codec>
<data_page_size>8192</data_page_size>
<dictionary_page_size>1048576</dictionary_page_size>
<fields>
<field>
<source_field>Name</source_field>
<target_field>Name</target_field>
</field>
<field>
<source_field>CompanyName</source_field>
<target_field>CompanyName</target_field>
</field>
<field>
<source_field>Industry</source_field>
<target_field>Industry</target_field>
</field>
<field>
<source_field>IntNumber</source_field>
<target_field>Int_Number</target_field>
</field>
</fields>
<filename_base>${PROJECT_HOME}/files/parquet-test</filename_base>
<filename_create_parent_folders>Y</filename_create_parent_folders>
<filename_datetime_format>yyyyMMdd-HHmmss</filename_datetime_format>
<filename_ext>parquet</filename_ext>
<filename_include_copy>Y</filename_include_copy>
<filename_include_date>N</filename_include_date>
<filename_include_datetime>N</filename_include_datetime>
<filename_include_split>Y</filename_include_split>
<filename_include_time>N</filename_include_time>
<filename_split_size>100</filename_split_size>
<row_group_size>268435456</row_group_size>
<version>2.0</version>
<attributes/>
<GUI>
<xloc>1040</xloc>
<yloc>144</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>
Loading
Loading