none
FlatFile schema - how to Include headers ? RRS feed

  • Question

  • I created a Flat file schema on Send send, I want my output with Headers. How can I achieve this ?

    Is there a property in schema where I can enable or set to YES ?

    Monday, February 6, 2017 8:15 PM

Answers

  • Hi Pushpendra,

    I tried using Flat file assembler and mentioned the schema under Document schema and Header schema, but in the output first 2 lines a re coming empty. Do you what am I doing wrong ?

    Refer: http://spnotepad.blogspot.in/2011/02/generating-flat-files-with-biztalk-2009.html

    What I didn't understand was that even after I defined a header schema, 2 things were occurring; empty string values for column names and no carriage return.  So I set off to find what was wrong with my definition.  What I found was that, I needed to define either the "Fixed" or "Default Value"  property for each element field.   But before I get into that, let me note that defining a header schema is as simple as taking a copy of your document schema and manipulating the values for Fixed or Default and ensuring that a PostFix value is defined for the child order of the root record element.  With that, your header values will print and your carriage return will push the first row of data below the column headers.  Now you're done. Well, almost.  Go back to your Send Pipeline and define the Header Schema property with the newly created Header Schema and now you can deploy and enjoy your BizTalk application.


    Rachit Sikroria (Microsoft Azure MVP)

    Wednesday, February 8, 2017 2:38 AM
    Moderator

All replies

  • Hi,

    There are two options:

    1>From an orchestration : 

    msg(XMLNORM.FlatFileHeaderDocument) = "Headervalue";

    2>In Flat file assembler component in send pipelien use the property :

    Header schema and Document schema.


    Regards PK: Please mark the reply as answer or vote it up, as deemed fit.

    Monday, February 6, 2017 9:01 PM
  • Hi Pushpendra,

    I tried using Flat file assembler and mentioned the schema under Document schema and Header schema, but in the output first 2 lines a re coming empty. Do you what am I doing wrong ?

    Monday, February 6, 2017 9:23 PM
  • Hi Sunny,

    Please don't create duplicate thread with same type of questions, use the same thread if your question is relevant and not answered.

    Duplicate


    Thanks,

    If my reply is helpful please mark as Answer or vote as Helpful.

    My blog | Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.


    Tuesday, February 7, 2017 7:45 PM
    Moderator
  • Hi Pushpendra,

    I tried using Flat file assembler and mentioned the schema under Document schema and Header schema, but in the output first 2 lines a re coming empty. Do you what am I doing wrong ?

    Refer: http://spnotepad.blogspot.in/2011/02/generating-flat-files-with-biztalk-2009.html

    What I didn't understand was that even after I defined a header schema, 2 things were occurring; empty string values for column names and no carriage return.  So I set off to find what was wrong with my definition.  What I found was that, I needed to define either the "Fixed" or "Default Value"  property for each element field.   But before I get into that, let me note that defining a header schema is as simple as taking a copy of your document schema and manipulating the values for Fixed or Default and ensuring that a PostFix value is defined for the child order of the root record element.  With that, your header values will print and your carriage return will push the first row of data below the column headers.  Now you're done. Well, almost.  Go back to your Send Pipeline and define the Header Schema property with the newly created Header Schema and now you can deploy and enjoy your BizTalk application.


    Rachit Sikroria (Microsoft Azure MVP)

    Wednesday, February 8, 2017 2:38 AM
    Moderator