简体   繁体   中英

Using ADF Copy Activity, I need to unzip and convert .seq files in .zip to csv

This scenario is new for me. My storage account having multiple folders. 1 folder contains few.txt files and.zip files. .zip files contains.seq files.

My requirement is need to look in to each folder and

  1. copy.txt files
  2. unzip zip files
  3. files(.seq) in zip folder to be convert to.csv.

Sink to destination.

Get the list of folders from the container, copy.txt files to sink folder and unzip and copy seq files to sink, convert seq files to CSV and delete seq files from the folder.

在此处输入图像描述

Part1:

  1. Using the Get Metadata activity get the folders list.

在此处输入图像描述

在此处输入图像描述

  1. Pass the output of Get Metadata1 to ForEach activity.

@activity('get folder list').output.childItems

在此处输入图像描述

  1. Inside the ForEach activity, add 2 copy activities.

在此处输入图像描述

Copy data activity1:

In one copy data activity, unzip the zip files and copy to sink.

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

Copy data activity2:

在此处输入图像描述

在此处输入图像描述

Part2:

  1. Get seq files where they are copied to in previous activities.

在此处输入图像描述

  1. Pass the GetMetadata2 activity output to ForEach2 activity. Copy each 'seq' file and convert it to CSV using copy data activity.

在此处输入图像描述

Parameterize the sink file name and replace extension seq with CSV .

@replace(item().name,'.seq','.csv')

在此处输入图像描述

Part3:

As seq files were not deleted while converting them to CSV, we can use delete activity to delete them from the folder.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM