首页 > 解决方案 > How to use two file extensions as wildcard (*.csv or *.xml) in Azure data factory?

问题描述

I have a path in ADLS that has a range of different files including *.csv and *.xml (which is not true xml, it's just a csv with xml extension).

I want to copy only *.csv and *.xml files from this path to another using copy activity in ADF. Right now I only can specify one of them as wildcard in the file name of copy activity and not both. Is there any way to specify two wildcards, like for example, .csv or .xml.

BTW, I might be able to use filter activity with get meta data, but this is too much if there is other ways. This documentation didn't help much too:

As I said, filtering won't work (without forEach), and that's not optimized: enter image description here

标签: azureazure-data-factory-2azure-data-factory-pipeline

解决方案


No, there isn't a way can specify two wildcards path.

According my experience, the easiest way is that you can create two copy active in one pipeline:

  1. Copy active1: copy the files end with *.csv.
  2. Copy active2: copy the files end with *.xml.

For your another question,there are many ways can achieve it. You could add an if condition to filter the condition: only copy active 1 and 2 both true/succeeded: enter image description here

You also could do like@Nandan said: enter image description here


推荐阅读