Move csv file from one folder to another when output should be xml file

Home Page Forums BizTalk 2004 – BizTalk 2010 Move csv file from one folder to another when output should be xml file

Viewing 1 reply thread
  • Author
    Posts
    • #22440

      Hello!

      I’m new to Biztalk. I have read a book called Foundations of BizTalk Server
      2006 up
      to chapter 10 Orchestration. So I have only basic knowledge about BizTalk.
      I have done some simple exercices but now I want to to something that I
      don’t know how to do.

      Below I have a CSV flat text file. I call it MyTest.csv It’s text from the
      book I’m reading.
      I have set up BizTalk(File adapter) in such a way that I can move this
      MyTest.csv from one folder to another and this work perfectly. I use the %MessageID%.csv so I get unique file every time which is what I want.
      10001, Acme warp drive component, 123.56, 2
      10013, Acme cloaking device, 234.99, 1
      10021, Acme Time Travel Device, 855.99, 9
      10045, Acme Personal Clone, 900.99, 1

      In the above exercise when I moved a file from one folder to another I had
      one folder called In and one folder called Out.

      But know I want the output to be an xml file instead of a strict copy of the
      MyTest.csv.

      So I just want to read the MyTest.csv file from the In folder and create a
      new XML file from this MyTest.csv file by using the %MessageID%.XML that is
      set in FileTransport propery dialog to the Out  folder.  ?

      I have created a flat file schema for the input file.

      But what do I do know ?

      //Tony

    • #22441

      You need to parse the flat file into an Xml message. This is done by the Flat File Disassembler (FFDASM), a standard pipeline component.

      1. In your Biztalk project, add a receive pipeline.
      2. From the tool box, drag the FFDASM into the Disassemble stage of your pipeline.
      3. Select the FFDASM component in the pipeline, and in the properties window set the Document property to your flat file schema that your have created.
      4. Build and deploy your assembly.
      5. In your receive location, set the receive pipeline to the custom pipeline you have just created.
      6. Restart the host instance

      • #22442

        Thanks very much very good explained!

        I understand all of it but I just wonder if this will create one xml file with all the detail records from the csv flat file or
        if it will create one single xml file for each detail record in the csv flat file.

        I want to have one xml file with all the detail record from the csv flat file within

        //Tony

         

      • #22443

        Thanks very much very good explained!

        I understand all of it but I just wonder if this will create one xml file with all the detail records from the csv flat file or
        if it will create one single xml file for each detail record in the csv flat file.

        I want to have one xml file with all the detail record from the csv flat file within

        //Tony

        • #22445

          This depends on how you define your flat file schema.

          If your structure  contains a root element with an unbounded record element the you will get one output file.
          If your strusture on defines a single record element then the flat file diassembler will debatch the incoming flat file into multiple messages. 

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.