Customer Portal

Record delimiter for Delimted Files

Comments 6

  • Avatar
    oldforum
    0
    Comment actions Permalink
    The above approach works only if they still have the \n character at the end of each record.

    -Shiva
  • Avatar
    oldforum
    0
    Comment actions Permalink
    In the configuration XML file:

    <?xml version="1.0" encoding="UTF-8"?>
    <Record name="TEST" type="delimited">
    <Field name="Field1" type="string" delimiter="|"/>
    ................
    ................
    <Field name="Fieldn" type="string" delimiter="~"/>

    </Record>

    NOTE: The last element is used for the line delimiter.

    Regards,
    Shiva
  • Avatar
    oldforum
    0
    Comment actions Permalink
    I am sorry for the confusion. The above logic doesn't work for record delimiter.

    -Shiva
  • Avatar
    oldforum
    0
    Comment actions Permalink
    Hmm, I am not sure what you mean, exactly. If you use DELIMITED_DATA_READER_NIO, then you don't have to have "\n" at the end of your record. There can be anything - string of arbitrary length.
  • Avatar
    oldforum
    0
    Comment actions Permalink
    Grrr. Sorry, I am really st..id. You can of course specify delimiter which is longer than 1 character.

    Forget extra dummy field.

    In case your last field is separated from next record by "|~" characters, just put these two into delimiter attribute.
  • Avatar
    oldforum
    0
    Comment actions Permalink
    Actually, the question is whether each field is separated by "|" (pipe) , even the last one and
    the whole record is separated by "~" (tilda).

    Then use "|" in delimiter parameter and add at the end one more field - dummy field and specify that it has "~" as delimiter. Make it "string" type of field and specify that it is nullable.

    It should solve the problem. If not, let me know at david.pavlis@centrum.cz

Please sign in to leave a comment.