none
Logic Apps Flat File Schema Wizard error RRS feed

  • Question

  • Hi Team, When we create a Flat file schema on Azure  integration account on visual studio, in the element mapping stage once select element type as a 'ignore' Next button got hide, Could you please correct me if there have any issue.

    Wednesday, June 26, 2019 11:24 AM

Answers

  • Hi Mahesh,

    You can look at the documentation to see all the functionality provided by this tool.
    https://docs.microsoft.com/en-us/biztalk/core/walkthrough-creating-a-flat-file-schema-from-a-document-instance

    I would do it a per the following steps:

    1. In Select Document data step, select initial 2 rows - headers and first row.

    2.  choose "by delimiter symbol" and select CR LF as delimiter.

    3. Set the headers row type as "record" and first row type as "Repeating Record".

    4. Similarly now you can define each of these. You define them to be delimiitted by "," and select type if needed or leave it as string.

    The resulting schema will capture your headers as well, but you can ignore them or remove them in a different step from the XML

    The following blog has more detailed information and references if you are looking for additional functionality in with repect to processing flat files.

    https://blogs.msdn.microsoft.com/david_burgs_blog/2017/05/19/logic-app-flat-file-encoding-and-decoding-documentation-references/

    Thanks,

    Preetham

    Thursday, June 27, 2019 9:47 PM
  • Hi Mahesh,

    On the Flat file schema wizard you have to make the record as repeating record that should help you to get the desired output.

    Best Regards,
    Suraj Revankar

    • Marked as answer by Maheshma Friday, July 5, 2019 6:52 AM
    Friday, June 28, 2019 1:33 PM
  • Hi Mahesh,

    I am a bit confused looking at the snapshot.
    The sample file you showed before has headers.
    The data in Logic app does not seem to have headers. Please use the file with data as expected in Logic app for generating the schema. DO you expect to pass headers in Logic app ?

     It looks like rows are defined as records, but the elements in the row are defined as repeating records. The change is required in the previous step.

    After you select CRLF as the delimitter, set first row as record type (for headers since there will be only 1 row)
    Set the second row type as repeating records(since you will have have multiple rows)

    Then while defining each of these you select comma as the delimiter. Leave the elements in each row as field elements.

    • Marked as answer by Maheshma Friday, July 5, 2019 6:51 AM
    Monday, July 1, 2019 10:16 PM

All replies

  • Hi Maheshma,

    Generally, Element type "Ignore" is used with Element type "repeating records" so that repetitions can be defined only once. The tools expects ignore only in that case.
    If you are using the sample flat file expected, what is the scenario for ignoring some characters ? 

    Wednesday, June 26, 2019 9:05 PM
  • Hi Preetham,

    Thank you for your respond, OK understood but for o want to remove commas (,) and other unnecessary rows. as i already ignore in above screen shot.How Can i remove these. If you want to refer my sample csv file i can share with you.Could you please advise and give guidance to me.

    Thanks

    Mahesh

    Thursday, June 27, 2019 2:40 AM
  • Hi Mahesma,

    In the Wizard you have to place "," as a delimiter so that it shows up only the data. It's on your previous step of the screen shot i guess.

    Best Regards,
    Suraj Revankar

    Thursday, June 27, 2019 12:25 PM
  • Hi Suraj,

    Thank you for guidance but when i using "," as a delimeter still capture some uncessary part and i need to remore column hedding as well. Could you please advise on this. Please find the screenshot.

    Thanks

    Mahesh

    Thursday, June 27, 2019 1:41 PM
  • Hi Mahesh,

    You can look at the documentation to see all the functionality provided by this tool.
    https://docs.microsoft.com/en-us/biztalk/core/walkthrough-creating-a-flat-file-schema-from-a-document-instance

    I would do it a per the following steps:

    1. In Select Document data step, select initial 2 rows - headers and first row.

    2.  choose "by delimiter symbol" and select CR LF as delimiter.

    3. Set the headers row type as "record" and first row type as "Repeating Record".

    4. Similarly now you can define each of these. You define them to be delimiitted by "," and select type if needed or leave it as string.

    The resulting schema will capture your headers as well, but you can ignore them or remove them in a different step from the XML

    The following blog has more detailed information and references if you are looking for additional functionality in with repect to processing flat files.

    https://blogs.msdn.microsoft.com/david_burgs_blog/2017/05/19/logic-app-flat-file-encoding-and-decoding-documentation-references/

    Thanks,

    Preetham

    Thursday, June 27, 2019 9:47 PM
  • Hi Preetham,

    Thank you for your info . I Just able to create a one-line data for schema and and according to simple xml created using logic app flatfile decorder. I just want to know how to create a schema for data repeatable data. below i attached current schema and current xml output for your reference.

    Decording screen

    Current Schema-

    <?xml version="1.0" encoding="UTF-16"?>

    -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://IntegrationAccount1.Schema4" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://IntegrationAccount1.Schema4">


    -<xs:annotation>


    -<xs:appinfo>

    <schemaEditorExtension:schemaInfo xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" standardName="Flat File" extensionClass="Microsoft.Azure.Integration.DesignTools.FlatFileExtension.FlatFileExtension" namespaceAlias="b"/>

    <b:schemaInfo xmlns:b="http://schemas.microsoft.com/BizTalk/2003" root_reference="Root" codepage="65001" standard="Flat File"/>

    </xs:appinfo>

    </xs:annotation>


    -<xs:element name="Root">


    -<xs:annotation>


    -<xs:appinfo>

    <b:recordInfo child_order="infix" child_delimiter="," child_delimiter_type="char" structure="delimited"/>

    </xs:appinfo>

    </xs:annotation>


    -<xs:complexType>


    -<xs:sequence>


    -<xs:element name="Console_No" type="xs:string">


    -<xs:annotation>


    -<xs:appinfo>

    <b:fieldInfo justification="left"/>

    </xs:appinfo>

    </xs:annotation>

    </xs:element>


    -<xs:element name="Origin" type="xs:string">


    -<xs:annotation>


    -<xs:appinfo>

    <b:fieldInfo justification="left"/>

    </xs:appinfo>

    </xs:annotation>

    </xs:element>


    -<xs:element name="Destination" type="xs:string">


    -<xs:annotation>


    -<xs:appinfo>

    <b:fieldInfo justification="left"/>

    </xs:appinfo>

    </xs:annotation>

    </xs:element>

    </xs:sequence>

    </xs:complexType>

    </xs:element>

    </xs:schema>

    Current OutPut- 

    <?xml version="1.0" encoding="utf-8"?>
    <Root xmlns="http://IntegrationAccount1.Schema4">
    <Console_No xmlns="">C10219089768</Console_No>
    <Origin xmlns="">LKCMB</Origin>
    <Destination xmlns="">USJFK
    C14019089768,USJFK,LKCMB
    C14019089769,LKCMB,USJFK
    C10219089769,USJFK,LKCMB
    </Destination>
    </Root>

    Friday, June 28, 2019 9:45 AM
  • Hi Mahesh,

    On the Flat file schema wizard you have to make the record as repeating record that should help you to get the desired output.

    Best Regards,
    Suraj Revankar

    • Marked as answer by Maheshma Friday, July 5, 2019 6:52 AM
    Friday, June 28, 2019 1:33 PM
  • Hi Mahesh,

    It looks like you have defined only the one record for the header.

    In step 3 of my previous reply, you should see 2 rows in the wizard.
    Please select the type for first row as "Record"
    and select type for second row as "Repeating record"

    The wizard should then take you through defining thee 2 types of records.

    Saturday, June 29, 2019 1:28 AM
  • Hi Pretham/Suraj,

    Using your instruction, i create a new flat file schema's for multiple lines using repeat record and Record and feild eliments, then i uploaded to Logic app then its getting error as a below. but using elements tag i can convert single line xml. Couls you please guide me sort out my concern, if you want i can give remote session as well. 

    Thanks you

    Sunday, June 30, 2019 7:04 AM
  • Hi Pretham/Suraj,

    Have you any chance to look into my concern.

    Thanks

    Monday, July 1, 2019 6:05 AM
  • Hi Mahesh,

    I am a bit confused looking at the snapshot.
    The sample file you showed before has headers.
    The data in Logic app does not seem to have headers. Please use the file with data as expected in Logic app for generating the schema. DO you expect to pass headers in Logic app ?

     It looks like rows are defined as records, but the elements in the row are defined as repeating records. The change is required in the previous step.

    After you select CRLF as the delimitter, set first row as record type (for headers since there will be only 1 row)
    Set the second row type as repeating records(since you will have have multiple rows)

    Then while defining each of these you select comma as the delimiter. Leave the elements in each row as field elements.

    • Marked as answer by Maheshma Friday, July 5, 2019 6:51 AM
    Monday, July 1, 2019 10:16 PM
  • Hi Preetham./Suraj,

    yes our basic requirement is create a flat file schema for a excel file save as a .csv formatted. but when i using a that file with headers its getting issue, so i'm decide to use same file without headers, but i need create a schema for header readable format when schema tuning with header include file on Logic app flat file decoder  Can you give me solution for this as well, because this file for data added by user level so we need to maintain input csv file including header.

    User data entering input xml for logic app.

    Thank very much for your guidance, without heading input csv file i'm able to create a multiple lines xml, Please find the input file and output we got. Could you please support to create a same multiple lines schema for use header include file in for logic app.

    without heading 

    Success logic app flat file  screen

    Can you please support to sort out input file header concern as well?

    Thanks

    Mahesh

    Friday, July 5, 2019 6:51 AM
  • Hi Preetham./Suraj,

    Could you please support to sort out input file header concern as well?

    Thanks

    Mahesh


    • Edited by Maheshma Sunday, July 7, 2019 7:02 PM
    Sunday, July 7, 2019 5:22 AM
  • Hi Preetham./Suraj,

    Have you any chance to support on this my above concern?

    Thanks

    Mahesh

    Tuesday, July 9, 2019 3:02 AM