Customer Portal

How to generate a metadata based on XSD

Comments 7

  • Avatar
    avackova
    0
    Comment actions Permalink
    Hello,
    it is possible to import metadata from XSD schema in CloverETL Desktop (see Metadata from XSD)
  • Avatar
    mishav
    0
    Comment actions Permalink

    Hello,
    it is possible to import metadata from XSD schema in CloverETL Desktop (see Metadata from XSD)

    "avackova"



    Thank you for the response.

    I am having problems with the import process.
    With v3.0 of the tool, the XSD import wizard is requiring to provide options for Delimited/Fixlength data that do not apply to XSD. I have tried providing options as stated in the link above and clicking the "next" button (as "Finish" was grayed out) Upon entering the next screen the schema was shown with (red X ball) indicating that something was not right and no XSD nodes were available to choose from.

    With version 2.9.4 of the tool, the next button is grayed out and "Finish" is available". However, the output generated by the wizard does not seem to be correct.

    The following output is being produced for delimited metadata setting:
    <?xml version="1.0" encoding="UTF-8"?>
    <Record name="Document" recordDelimiter=";" recordSize="-1" type="delimited"/>

    The following output is being produced for fixlength metadata setting:
    <?xml version="1.0" encoding="UTF-8"?>
    <Record name="Document" type="fixed"/>
  • Avatar
    avackova
    0
    Comment actions Permalink
    Can you send the schema?
  • Avatar
    mishav
    0
    Comment actions Permalink

    Can you send the schema?

    "avackova"


    We are using standard PAIN.008 schema from ISO20022.
    XSD is attached.
  • Avatar
    avackova
    0
    Comment actions Permalink
    Hello,
    the metadata can't be imported to CloverETL, because it exists xsd element in the file, that doesn't satisfy Clover naming restrictions. I've reported the problem to our bug tracking system (http://bug.cloveretl.org/view.php?id=5140). An easy workaround is to rename this element in the xsd schema file. When you change line 219 from:
     <xs:element name="pain.008.001.01" type="pain.008.001.01"/>

    to:
    <xs:element name="pain_008_001_01" type="pain.008.001.01"/>

    the wizard works properly.
  • Avatar
    evn
    0
    Comment actions Permalink
    Hi,
    I'm using the xsl transform component to extract the Message Body from a SOAP message (xml). The output is passed to the XMLExtract component from the ouput port of XSLTransformer.
    The meta data for the output port needs to be configured to have an xsd structure. I have tried using the generate metadata based on XSD option, however,
    1. How is the Delimited Data or the fixed length metadata options are valid in this scenario.
    2. On choosing the fixedlength metadata option (field size=0), in the subsequent window, the xsd is broken down into into individual metadata files, implying the xsd structure is no longer valid and cannot be used for the output port.

    Regards
    evn
  • Avatar
    imriskal
    0
    Comment actions Permalink
    Hi evn,

    ad 1) If you mean metadata between XLSTransformer and XMLExtract, you probably want to send the whole file to XMLExtract at once. To achieve this, you do not need to extract metadata from XSD, you can just create metadata with one field, delete record delimiter and field delimiter and set EOF as delimiter property in the field. And if you mean metadata on the output edge of XMLExtract, delimited metadata are better for you because there is no limitation for length of values in metadata fields.

    ad 2) With your XSD schema, there is no way to create only one metadata file. Each element with cardinality 0:n, 1:n or m:n has to have it's own metadata.
    Here is an example:
    <people>
    <person name='adam'>
    <phone>123</phone>
    </person>
    <person name='bob'>
    <phone>789</phone>
    </person>
    </people>

    Data
    name|phone
    adam|123
    bob|789

    Here is possible to have only one metadata because cardinality between person and phone is 1:1.

    Another example:
    <people>
    <person name='adam'>
    <phone type='home'>123</phone>
    <phone type='work'>321</phone>
    </person>
    <person name='bob'>
    <phone type='home'>789</phone>
    <phone type='work'>987</phone>
    </person>
    </people>

    Data
    name|phone|phone|?type?
    adam|123|321
    bob|789|987

    As you can see, table would be denormalized. Data should be divided into two tables. Therefore two metadata should be created:
    Person
    person_id|name
    1|adam
    2|bob

    Phone
    person_id|type|phone_number
    1|home|123
    1|work|321
    2|home|789
    2|work|987

    Please, let me know if you have any further questions.

    Best regards,

Please sign in to leave a comment.