Search code examples
xsddoublebiztalkflat-file

How to create flat file XSD-schema, if fractional part of numbers delimited by comma?


I have a csv-file with fractional part of numbers delimited by comma:

header1;header2;header3;header4
text1;2,99;0,5;7,35
text2;6,12;3,98;0,15

How to create flat file XSD-schema from it? The problem is that flat file schema wizard expects dot as numbers' fractional part delimiter. Of course, I can create number fields as string fields and then create mapping for replace commas by dots. But this approach requires 1 additional schema and 1 orchestration with mapping. The problem is common and often appearing. Is there any way to replace commas by dots, when I create schema? Or any another way to solve this problem?


Solution

    1. Create the fields as string by the wizard
    2. After creating the schema, change element's "Data Type" to decimal.
    3. Change the schema's Culture property to Turkish(Turkey) or any other culture that uses comma as decimal delimiter.

    You don't need to use any map for the comma replacement