keeps / dbptk-developer

DBPTK Developer - library and command-line tool for execution of database preservation actions
http://www.database-preservation.com
GNU Lesser General Public License v3.0
43 stars 19 forks source link

Bug in P_4.3-2? #394

Closed PhillipTommerholt closed 5 years ago

PhillipTommerholt commented 5 years ago

SIARD spec states this: image I have this siard file with 14 tables and 152 columns: MSSQL_Northwind.siard.zip

I get this error from app.log:

2019-09-11 11:05:22,886 [main] INFO  (c.d.m.m.v.ProgressValidationLoggerObserver) P_4.3-2: [ERROR]
2019-09-11 11:05:22,886 [main] INFO  (c.d.m.m.v.ProgressValidationLoggerObserver) Correspondence between metadata and table data [FAILED]

in: dbptk-app.log.txt I get this error in the validation report:

> 4.3 - Correspondence between metadata and table data
>   P_4.3-1: [OK]
>   P_4.3-2: [ERROR] - The number of columns in a table specified in metadata.xml must be identical to that in the corresponding table[number].xsd file - content/schema1/table1/table1.xsd
>   P_4.3-2: [ERROR] - The number of columns in a table specified in metadata.xml must be identical to that in the corresponding table[number].xsd file - content/schema1/table2/table2.xsd
>   P_4.3-2: [ERROR] - The number of columns in a table specified in metadata.xml must be identical to that in the corresponding table[number].xsd file - content/schema1/table3/table3.xsd
>   P_4.3-2: [ERROR] - The number of columns in a table specified in metadata.xml must be identical to that in the corresponding table[number].xsd file - content/schema1/table4/table4.xsd
>   P_4.3-2: [ERROR] - The number of columns in a table specified in metadata.xml must be identical to that in the corresponding table[number].xsd file - content/schema1/table5/table5.xsd
>   P_4.3-2: [ERROR] - The number of columns in a table specified in metadata.xml must be identical to that in the corresponding table[number].xsd file - content/schema1/table6/table6.xsd
>   P_4.3-2: [ERROR] - The number of columns in a table specified in metadata.xml must be identical to that in the corresponding table[number].xsd file - content/schema1/table7/table7.xsd
>   P_4.3-2: [ERROR] - The number of columns in a table specified in metadata.xml must be identical to that in the corresponding table[number].xsd file - content/schema1/table8/table8.xsd
>   P_4.3-2: [ERROR] - The number of columns in a table specified in metadata.xml must be identical to that in the corresponding table[number].xsd file - content/schema1/table9/table9.xsd
>   P_4.3-2: [ERROR] - The number of columns in a table specified in metadata.xml must be identical to that in the corresponding table[number].xsd file - content/schema1/table10/table10.xsd
>   P_4.3-2: [ERROR] - The number of columns in a table specified in metadata.xml must be identical to that in the corresponding table[number].xsd file - content/schema1/table11/table11.xsd
>   P_4.3-2: [ERROR] - The number of columns in a table specified in metadata.xml must be identical to that in the corresponding table[number].xsd file - content/schema1/table12/table12.xsd
>   P_4.3-2: [ERROR] - The number of columns in a table specified in metadata.xml must be identical to that in the corresponding table[number].xsd file - content/schema1/table13/table13.xsd
>   P_4.3-2: [ERROR] - The number of columns in a table specified in metadata.xml must be identical to that in the corresponding table[number].xsd file - content/schema1/table14/table14.xsd
> Correspondence between metadata and table data [FAILED]

When I look at metadata.xml and table1 it describes 4 columns. When I look at table1.xml it has 4 columns When I look at table1.xsd it describes 4 columns

So something seems not right?

Best regards Phillip

hmiguim commented 5 years ago

Hi Phillip,

If you take a closer look at any table[number].xsd in the SIARD file, you will find a XML part with this structure:

 <xs:element name="table">
        <xs:complexType>
            <xs:sequence>
                <xs:element maxOccurs="unbounded" minOccurs="0" name="row" type="rowType"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

The type attribute in xs:element is rowType, where it should be recordType as SIARD 2.1 specification states.

The report message can be improved to show why its giving different counts.

Also that is related with the issue #377.

PhillipTommerholt commented 5 years ago

Oh, I see. Thx for clarification!

hmiguim commented 5 years ago

You can fix the SIARD by importing and exporting with DBPTK version 2.4.0 or above