Domanda

I am trying to import different csv files from a folder containing different csv file types. So I need to filter my foreach loop with the starting flatfile name. I only want to process files starting with MyFileType_1*.csv and not the others in the same folder. Any suggestion is welcome, thanks.

È stato utile?

Soluzione

In your for-each container can specify which files to read as Ocaso is saying. In the Variable mappings tab in the for-each container you can there set which variable you want to save the files found. Then you can use this variable as the connection string to a flat file connection. Set which files to read Set variable mappings Set connection string

Altri suggerimenti

Nighty_'s answer is correct, but just for the sake of completeness it is worth mentioning that to set the ConnectionString in a Flat File Connection you must use a variable of package-level scope in the expression (in his case @[User::v_FilePath]). This is because the connection itself is package level. This might feel a bit unintuitive... or ugly... it is.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top