Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pi-r-ayotte opened this issue Apr 23, 2024 · 4 comments
Open
Assignees
Labels
data loss ms sql Microsoft SQL Server database module

Comments

@pi-r-ayotte
Copy link

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

@pi-r-ayotte
Copy link
Author

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

@luis100
Copy link
Member

luis100 commented Apr 24, 2024

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.

@pi-r-ayotte
Copy link
Author

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

@luis100
Copy link
Member

luis100 commented Apr 26, 2024

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data loss ms sql Microsoft SQL Server database module
Projects
Status: No status
Development

No branches or pull requests

4 participants