none
Export batch data into CSV file using SQL SP RRS feed

  • Question

  • Hi,

    I have created WCF-Custom receive adapter to poll Sql SP (WITH xmlnamespaces(DEFAULT 'Namespace' and For XML PATH(''), Type) . Get the result properly in batch while polling and but getting error while converting into CSV by using map.

    Please can anyone give me some idea to export SQL data into CSV file using SP.

    Wednesday, January 7, 2015 1:30 PM

Answers

  • Check the SDK samples folder

    YourBizTalkInstalltionDirectory\SDK\Samples\Pipelines\AssemblerDisassembler\FlatFileSend for a code sample from Microsoft on this topic.

    FlatFileSend (BizTalk Server Sample)


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

    • Marked as answer by Angie Xu Thursday, January 15, 2015 1:33 AM
    Wednesday, January 7, 2015 2:30 PM
  • Hi Narasaiah,

    Its been well described in one of previous post over Biz talk forum

    1.Create the schema for Flat File message.

    2. Create the mapper to map the XML schema(stored procedure) to Flat File schema.

    3. Create a custom send pipeline using the Flat File Assembler.

    4.Create receive port and then receive location and use XMLReceive as receive pipeline. Specify the schema created in step 3 as inbound map.

    5.Create the send port to drop the flatfile to desired location and use the send pipeline create in step 3 .

    You can see it at previous forum post in Creating TXT file from XML file in BizTalk

    For Reference you can look into How to use BizTalk Server  to convert XML to CSV file

    Thanks

    Abhishek

    Wednesday, January 7, 2015 6:22 PM

All replies

  • How are you doing this.

    • You would have got XML representation for the XML batch received from SQL
    • You should have a flat-file schema representing the CSV file which you want to send.
    • Map the received XML representation of data from SQL to flat-file schema
    • have custom pipeline with flat-file assembler on the assembler stage of the send pipeline.
    • In the send port use the map which convert received XML from SQL to flat file schema and use the above custom flat-file disassembler send port

    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

    Wednesday, January 7, 2015 1:41 PM
  • Hi Ashwin,

    Yes I followed same way which you mentioned. It more helpful if you provide some reference link or sample.

    Thanks

    Wednesday, January 7, 2015 1:56 PM
  • Check the SDK samples folder

    YourBizTalkInstalltionDirectory\SDK\Samples\Pipelines\AssemblerDisassembler\FlatFileSend for a code sample from Microsoft on this topic.

    FlatFileSend (BizTalk Server Sample)


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

    • Marked as answer by Angie Xu Thursday, January 15, 2015 1:33 AM
    Wednesday, January 7, 2015 2:30 PM
  • Ok I will check this sample
    Wednesday, January 7, 2015 2:51 PM
  • Hi Narasaiah,

    Its been well described in one of previous post over Biz talk forum

    1.Create the schema for Flat File message.

    2. Create the mapper to map the XML schema(stored procedure) to Flat File schema.

    3. Create a custom send pipeline using the Flat File Assembler.

    4.Create receive port and then receive location and use XMLReceive as receive pipeline. Specify the schema created in step 3 as inbound map.

    5.Create the send port to drop the flatfile to desired location and use the send pipeline create in step 3 .

    You can see it at previous forum post in Creating TXT file from XML file in BizTalk

    For Reference you can look into How to use BizTalk Server  to convert XML to CSV file

    Thanks

    Abhishek

    Wednesday, January 7, 2015 6:22 PM