0

I'm creating a simple app, which takes in an xml file, map it to another schema, then convert it to a text file, and drop it in a folder.

I have created a schema using the Flat file wizard and setup send pipeline.

My problem is, in the flatfile I want to add pad character before each element e.g "Helloworld,"hey,"12

What's the best way to do this? Is it best to do this during the map from source schema to destination schema (add a " before each element during the map). In this case wouldn't all elements in destination schema need to be of type 'string'? Is there a better way to do this?

Mike Smith
  • 139
  • 2
  • 2
  • 12

1 Answers1

2

So, that's a rather odd requirement, I would double check.

A simple way to do this would be to set the infix field delimiter of the row elements to ," instead of just ,

To handle the first ", I think a dummy field with a default value of " would be the best.

Johns-305
  • 10,908
  • 12
  • 21
  • Thanks again boat! It seems the specification was a little odd. The resulting native file should be of comma and quote. It only stated comma in the documentation. I do have one other question, when trying to validate a flat file schema and giving it an input of XML and trying to obtain an output of Native format -it still produces an XML file as output. I can never seem to produce an Native file as output. Am I missing something? – Mike Smith Jul 25 '14 at 09:54
  • If the output is Native, it will produce a .txt file. Be careful, the Output windows will show both. – Johns-305 Jul 25 '14 at 11:25