Dynamic delimiters

Home Page Forums BizTalk 2004 – BizTalk 2010 Dynamic delimiters

Viewing 1 reply thread
  • Author
    Posts
    • #20626

      Hello,

      I’m new to BizTalk and usually I search around forums/Google for answers (often in combination with trial and error) to solve my problems, but this time I couldn’t find anything. Perhaps because there is no answer or more probably because I search for the wrong things/key words. (I am Dutch so I guess that’s my excuse.)

      My situation:

      Our customers are able to request a download (e.g. a list of their orders). In a database we defined all our customers and their authorization, but also the type of document they prefer. Among those types are also character delimited flat files (CSV’s). They usually open those files with Excel or something alike, but – and here comes by ‘problem – different customers have different settings, like the field separator they use to separate the fields (obviously). So the question was if I could adjust our BizTalk application so that it retrieves the separator from the database (defined per customer record) and use that character as the delimiter in the flat file.

      I know you define the child delimiter in the schema definition properties, but is there a way to dynamically adjust this? I read something about a custom pipeline, but as I said I’m still a newbie (working with BizTalk for a few months now), and copying all the schema’s and changing the delimiter hard coded is probably a faster way for me to solve this situation. (Currently there are only two separators possible anyway: the semi-colon and the comma.)

      As a matter of fact I am currently copying the schema’s and adjusting the orchestrations etc., but if anybody knows a better solution, I’d really appreciate it if you would share it with me.

      Please excuse my English and if things are unclear, please let me know.

       

      Thanks in advance,

      Ruud
      The Netherlands

    • #20628

       Little update:

      I copied one schema (of six) so the other delimiter can be used, but it took me quite some work. (Now I know how to do it, the other five won’t take me as long of course, but still it’s time consuming.)

      I had to copy the schema itself and adjust its delimiter and its namespace (I decided to put ‘_Semi’ [for semi-colon] behind both the schema name and the namespace), the send pipeline (althought I’m not sure if that was really needed, I’ll check tomorrow), the orchestration ports and port types and of course I had to put in some logic (“Use semi-colon or default schema?”).

      It works, but I got the feeling this can be done easier. If there’s no (simple) way to dynamically change the delimiter, than maybe there is a simpler way of doing what I did.

      Any suggestions are appreciated.

       

      – Ruud
      The Netherlands

      By the way: I’ll be back tomorrow (time difference and I have to go somewhere now)

      • #20664

         

        While it’s been a while since I’ve worked with Flat Files… I can’t think of an easy way to accomplish what you want.  The Delimiters are baked into the Schema definition. 

        You could have done some something custom inside a pipeline.  Either a simple find and replace or some think more programmatic. 

        I’d probably have gone the route of 6 schemas as well.  It’s straight forward.  Only downside is if you need to make a change…  I also think this fits the pattern a little better: one port, one schema, one format.  Easy to add a 7th or turn off the 3rd.

        Hope this helps.

         

        • #20680

          Hi Stephen,

          Thanks for your reply!

          I continued the six schemas route. The other five schemas were a fairly easy job after the first one. It’s all working correctly now, so I’ll leave it as it is.

          I’ve thought about the changing part too, and I guess I’ll have to live with that.

          Oh and I tested the send pipeline thingy. It wasn’t needed to make a new pipeline for every schema. I just set the schema in the flat file assembler to (none) and it automatically picks the right schema. What I don’t understand is why the programmer before me created a send pipeline for every schema in the first place, as I set them all to (none) now and it all works fine. Oh well, I’ll let it be for now (don’t fix it if it ain’t broken?).

           

          Ruud

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