CSV batch file records uploads

Home Page Forums BizTalk 2004 – BizTalk 2010 CSV batch file records uploads

Viewing 1 reply thread
  • Author
    Posts
    • #23943

      I have a csv file with multiple transactions/Records that I need to upload into a SQL database using a BizTalk Orchestration. I have created a flat file schema for the csv file. The csv flat file schema is then mapped to a schema that inserts the data into SQL table using a stored procedure using WCF SQL adapter. The only issue that I’m having is that only one record is being uploaded. There must an easy way of uploading all these records without writing a custom pipeline. I have tried to look at the various properties of the flat file schema i.e envelope property as advised in some texts but it doesn’t work and also using functoids. There must be a easy way of doing this. Can someone please assist.

      Nashe

    • #23946

      It sounds like you’re debatching each individual line in the CSV file into an individual message that is being uploaded to SQL Server.

      You need to modify your CSV flat-file schema so that only one message is generated from each input file (i.e. one flat-file with ten records creates one Xml message with ten records). Then, map that to your SQL schema and send over the WCF-SQL adapter – only one transaction will be used (although depending on how you have crafted your SQL schema, several INSERTS may be performed within the single transaction).

      One other point, you don’t need to use an orchestration here (unless you need some of the functionality provided – NACKS, error handling etc.). You could just bind the WCF-SQL Adapter send port directly to the Receive Port and save the overhead of instanciating an orchestration.

      Hope this helps, Nick.

      • #23953

        Nick, thanks for the suggestion the solution is quite simple I don’t know how it eluded me. I simply set the properties of the FlatFile Schema Record Min Occurs =1 and Max Occurs =1 and the Enveloper document propert has to be set to Yes.

        Nashe

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