keeps/dbptk-developer

SQL Server 2022 ->Siard -> Validation fail on hierarchyid column type

pi-r-ayotte opened this issue · 4 comments

Description: hierarchyid column type are not present in xml data table and the validation is failing with message:

"T_6.0-2: [ERROR] - Validation against XSD failed. - cvc-complex-type.2.4.b: The content of element 'row' is not complete. One of '{"http://www.admin.ch/xmlns/siard/2/schema1/table1.xsd":c4}' is expected. At line 1, column 292 on content/schema1/table1/table1.xml
Requirements for table data [FAILED]"

Context: DBPTK Desktop: Windows 2022, SQL 2022, DBPTK 2.9

Steps required to reproduce the bug:

  1. Create table with at least on hierarchyid column, ex:
    CREATE TABLE [HR].[Employee](
    [Id] [int] IDENTITY(1,1) NOT NULL,
    [FirstName] nvarchar NOT NULL,
    [LastName] nvarchar NOT NULL,
    [hid] [hierarchyid] NOT NULL,
    );
    INSERT INTO HR.Employee (FirstName, LastName, hid)
    VALUES ('John', 'Doe', '/'); -- conversion implicite
    INSERT INTO HR.Employee (FirstName, LastName, hid)
    VALUES ('John2', 'Doe2', '/1/'); -- conversion implicite

  2. Create Siard file (with Desktop version)

  3. Validate and it should fail

Attach any relevant logs below.
dbptk-validation-reporter-TestHID-20240423101021491.txt

Also open on dbpkt-ui, was not sure where to open

Relevant documentation: https://learn.microsoft.com/en-us/sql/t-sql/data-types/hierarchyid-data-type-method-reference?view=sql-server-ver16

Possibly not exporting hierarchyid, as it should fallback to nvarchar(4000) datatype but it seems not to be adding the cell at all.

I have another situation that i would like to troubleshoot to pinpoint the exact problem. I have this error in dbvtk.log: "2024-04-22 12:19:38,707 [http-nio-auto-1-exec-2] ERROR c.d.c.c.c.utils.AsyncCallbackUtils - [0:0:0:0:0:0:0:1] AsyncCallback error - RESTException: Remote exception caused by GenericException: No group 1 caused by IndexOutOfBoundsException: No group 1
". This is when validating exported db to siard file. The desktoke give me this error and nothing happen after and the validation nerver terminate.
Now i tried to add a logback.xml configuration in C:\Users\userid.dbvtk\config (windows 10 pro) but i am not able to get ore detailed logs. Can you tell me how can i troubleshoot this problem so i can come back to you with more detail on this error?
Regards,
Pierre Ayotte

@Spykey89 you can validate using the dbptk-developer (command-line) to get error logs more directly.

https://github.com/keeps/dbptk-developer/wiki/Validation