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

[Bug]: Move files action does not work with Azure blob files #3920 #3928

Merged
merged 3 commits into from
May 17, 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
2 changes: 1 addition & 1 deletion docker/integration-tests/integration-tests-azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
azurite-blob:
ports:
- "10000"
image: mcr.microsoft.com/azure-storage/azurite
image: mcr.microsoft.com/azure-storage/azurite:3.29.0
command: azurite-blob --blobHost 0.0.0.0
healthcheck:
test: nc 127.0.0.1 10000 -z
Expand Down
2 changes: 1 addition & 1 deletion docker/integration-tests/integration-tests-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ services:
- ../../integration-tests/:/files
environment:
- FLASK_ENV=docker
command: [ "bash", "-c", "/files/scripts/run-tests.sh ${PROJECT_NAME}" ]
command: [ "bash", "-c", "/files/scripts/run-tests.sh ${PROJECT_NAME}" ]
Original file line number Diff line number Diff line change
Expand Up @@ -117,33 +117,21 @@ limitations under the License.
<field>
<source_field>id</source_field>
<target_field>id</target_field>
<target_format/>
<target_length/>
<target_precision/>
<target_type>Integer</target_type>
</field>
<field>
<source_field>name</source_field>
<target_field>name</target_field>
<target_format/>
<target_length/>
<target_precision/>
<target_type>String</target_type>
</field>
<field>
<source_field>company</source_field>
<target_field>company</target_field>
<target_format/>
<target_length/>
<target_precision/>
<target_type>String</target_type>
</field>
<field>
<source_field>industry</source_field>
<target_field>industry</target_field>
<target_format/>
<target_length/>
<target_precision/>
<target_type>String</target_type>
</field>
</fields>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ limitations under the License.
<order>
<hop>
<from>Read employees data from dataset</from>
<to>Write to Azurite a Parquet file (azure://)</to>
<to>Write to Azurite a Parquet file (azure)</to>
<enabled>Y</enabled>
</hop>
</order>
Expand All @@ -60,7 +60,7 @@ limitations under the License.
<passing_through_fields>N</passing_through_fields>
<accept_field/>
<accept_transform_name/>
<separator>;</separator>
<separator>,</separator>
<enclosure>"</enclosure>
<enclosure_breaks>N</enclosure_breaks>
<escapechar/>
Expand All @@ -84,7 +84,7 @@ limitations under the License.
<length>Characters</length>
<add_to_result_filenames>Y</add_to_result_filenames>
<file>
<name>${PROJECT_HOME}/datasets/golden-parquet.csv</name>
<name>${PROJECT_HOME}/datasets/golden-dataset-employees.csv</name>
<filemask/>
<exclude_filemask/>
<file_required>N</file_required>
Expand Down Expand Up @@ -120,13 +120,13 @@ limitations under the License.
<nullif>-</nullif>
<ifnull/>
<position>-1</position>
<length>23</length>
<length>22</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
</field>
<field>
<name>companyName</name>
<name>company</name>
<type>String</type>
<format/>
<currency>$</currency>
Expand All @@ -135,7 +135,7 @@ limitations under the License.
<nullif>-</nullif>
<ifnull/>
<position>-1</position>
<length>33</length>
<length>32</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
Expand All @@ -150,7 +150,7 @@ limitations under the License.
<nullif>-</nullif>
<ifnull/>
<position>-1</position>
<length>37</length>
<length>36</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
Expand Down Expand Up @@ -184,12 +184,12 @@ limitations under the License.
<sizeFieldName/>
<attributes/>
<GUI>
<xloc>448</xloc>
<yloc>160</yloc>
<xloc>240</xloc>
<yloc>144</yloc>
</GUI>
</transform>
<transform>
<name>Write to Azurite a Parquet file (azure://)</name>
<name>Write to Azurite a Parquet file (azure)</name>
<type>ParquetFileOutput</type>
<description/>
<distribute>Y</distribute>
Expand All @@ -204,20 +204,20 @@ limitations under the License.
<dictionary_page_size>1048576</dictionary_page_size>
<fields>
<field>
<source_field>Name</source_field>
<target_field>Name</target_field>
<source_field>id</source_field>
<target_field>id</target_field>
</field>
<field>
<source_field>CompanyName</source_field>
<target_field>CompanyName</target_field>
<source_field>name</source_field>
<target_field>name</target_field>
</field>
<field>
<source_field>Industry</source_field>
<target_field>Industry</target_field>
<source_field>company</source_field>
<target_field>company</target_field>
</field>
<field>
<source_field>Id</source_field>
<target_field>Id</target_field>
<source_field>industry</source_field>
<target_field>industry</target_field>
</field>
</fields>
<filename_base>azure://mycontainer/azure-scheme</filename_base>
Expand All @@ -234,8 +234,8 @@ limitations under the License.
<version>2.0</version>
<attributes/>
<GUI>
<xloc>736</xloc>
<yloc>160</yloc>
<xloc>528</xloc>
<yloc>144</yloc>
</GUI>
</transform>
<transform_error_handling>
Expand Down
226 changes: 226 additions & 0 deletions integration-tests/azure/0004-read-from-azure.hpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
<?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>0004-read-from-azure</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>
</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/16 17:50:22.607</created_date>
<modified_user>-</modified_user>
<modified_date>2024/05/16 17:50:22.607</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Text file input</from>
<to>Dummy (do nothing)</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Dummy (do nothing)</name>
<type>Dummy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<attributes/>
<GUI>
<xloc>880</xloc>
<yloc>512</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>Characters</length>
<add_to_result_filenames>Y</add_to_result_filenames>
<file>
<name>azure://mycontainer/subfolder/ingest-300.csv</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>id</name>
<type>String</type>
<format/>
<currency>$</currency>
<decimal>.</decimal>
<group>,</group>
<nullif>-</nullif>
<ifnull/>
<position>-1</position>
<length>15</length>
<precision>0</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
</field>
<field>
<name>name</name>
<type>String</type>
<format/>
<currency>$</currency>
<decimal>.</decimal>
<group>,</group>
<nullif>-</nullif>
<ifnull/>
<position>-1</position>
<length>255</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
</field>
<field>
<name>birthday</name>
<type>String</type>
<format/>
<currency>$</currency>
<decimal>.</decimal>
<group>,</group>
<nullif>-</nullif>
<ifnull/>
<position>-1</position>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
</field>
<field>
<name>quote</name>
<type>String</type>
<format/>
<currency>$</currency>
<decimal>.</decimal>
<group>,</group>
<nullif>-</nullif>
<ifnull/>
<position>-1</position>
<length>255</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
</field>
<field>
<name>instrument</name>
<type>String</type>
<format/>
<currency>$</currency>
<decimal>.</decimal>
<group>,</group>
<nullif>-</nullif>
<ifnull/>
<position>-1</position>
<length>255</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>672</xloc>
<yloc>512</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>
4 changes: 4 additions & 0 deletions integration-tests/azure/datasets/ingest-3.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
id,name,birthday,quote,instrument
9,Anita Knapp,2004/06/02 21:58:19.131,"Doubt that the sun doth move, doubt truth to be a liar, but never doubt I love.",Acoustic Guitar
6782,Noah Riddle,2000/03/19 02:53:11.776,"I will speak daggers to her, but use none.",Ukelele
17605,Dwayne Pipe,1967/09/11 00:27:00.201,"I will speak daggers to her, but use none.",Drums
Loading
Loading