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

SIARD Validation gets confused when two tables in different schemas have the same name. #608

Open
stighemmer opened this issue May 24, 2024 · 1 comment
Assignees
Labels
bug Issue type

Comments

@stighemmer
Copy link

Description:
When multiple schemas exist, and two tables in different schema have the same name, the primary/candidate key part of SIARD validation gets confused and gives errors.

This example SIARD file is produced by dbptk itself.

Steps required to reproduce the bug:

  1. Rename the attached testdb.zip to testdb.siard.
    testdb.zip

  2. Validate it.

  3. Read report.
    dbptk-validation-reporter-testdb-20240524221110141.txt
    Highlights:

A_M_5.8-1-2: [ERROR] : Primary key column reference id not found on dbo.testtable
A_M_5.11-1-2: [ERROR] : Candidate key column reference id not found on dbo.testtable

  1. Notice that dbo.testtable does in fact have a column id.
  2. But other.testtable do not.

Attach the dbptk-app.log.txt file below.
dbptk-app.log.txt
This log describes both the creation of the SIARD file and the validation of it.

@stighemmer
Copy link
Author

In my eagerness to create a minimal example, I removed too much. There is also a problem with foreign keys.

New test file:
testdb-fk.zip

New report, new highlights:
dbptk-validation-reporter-testdb-20240528211236978.txt

A_M_5.8-1-2: [ERROR] : Primary key column reference id not found on dbo.testtable
A_M_5.10-1-1: [ERROR] : referenced column name fkother does not exist on referenced table testtable
M_5.10-1-2: [ERROR] : Unable to validate, column does not exist (metadata.xml schema:dbo/table:testtable/foreignKey:FK_dbo_other/reference:fkother)
A_M_5.10-1-2: [ERROR] : Unable to validate, column does not exist (metadata.xml schema:dbo/table:testtable/foreignKey:FK_dbo_other/reference:fkother)
A_M_5.10-1-2: [ERROR] : referenced column name id of table testtable does not exist on referenced table testtable
A_M_5.11-1-2: [ERROR] : Candidate key column reference id not found on dbo.testtable

New app.log:
dbptk-app.log.txt

@luis100 luis100 added the bug Issue type label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue type
Projects
Status: No status
Development

No branches or pull requests

3 participants