Uploaded image for project: 'Teiid Designer'
  1. Teiid Designer
  2. TEIIDDES-191

XSD as Relational importer has problems with child elements with many parents

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • No Future
    • 6.0.0
    • Import/Export
    • None

      I've encountered a lot of problems with the Teiid Designer XML as Relational Importer (and with its legacy ancestor) dealing with importing XSDs where a child element has multiple parents. The importer currently treats all elements throughout the XSD that have the same name and type as the same, and so models that element(s) as a single table with multiple parents, if the number of parents is above a configurable number (currently defaults to 3).

      Which is all well and good in theory, but in practice it seems to hit a number of problems

      1) During the import process, if the selection of document root elements is left at the default, not all needed tables are generated. See person.xsd example attached.

      2) If all possible root elements are selected, it looks mostly right, but there are often extra elements in the child tables (again try with person.xsd). Plus, the tables don't actually work at runtime correctly (try using attached person2.xml as the data source - notice that you can only get to the spouse's father from Person, not to their own father).

      I've also attached some other example problem XSDs - person2.xsd, and address.xsd

      Now, in some cases a reasonable workaround is to up the number of allowed parents parameter, so that everything gets folded into a single table. But that isn't a general solution, as it doesn't work with things like person2.xsd.

        1. address.xsd
          1 kB
        2. person.xsd
          3 kB
        3. person2.xml
          1 kB
        4. person2.xsd
          3 kB

            Unassigned Unassigned
            greghaber_jira Greg Haber (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: