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

Compare two SAI DB and report in outputted csv file. #193

Open
zdavatz opened this issue Oct 6, 2021 · 0 comments
Open

Compare two SAI DB and report in outputted csv file. #193

zdavatz opened this issue Oct 6, 2021 · 0 comments

Comments

@zdavatz
Copy link
Owner

zdavatz commented Oct 6, 2021

  1. We need to be able to compare two sai.db files and report the difference in date_sai_diff.csv. date is the day the report was created.
  2. Delimiter of date_sai_diff.csv is ;.
  3. running sai --diff will result in comparing the contents of the last two month of the files found here: https://sai.refdata.ch/download. Basically two sai.db are created with the timestamp of the .zip filename, so i.e.: sai_05102021.db and sai_05092021.db.
  4. Then each line between the two dbs is compared to find which cell of each line has changed.
  5. The output file date_sai_diff.csv only contains lines where the content of one or more cells has changed.
  6. The file date_sai_diff.csv contains the cell(s) with the changed information.
  7. The header name of the cell of which the content has changed, we print in the first cell of each line of date_sai_diff.csv. If several cells of a line have changed, we separate the header names by ,.
  8. Complete new lines are added at the end of the file.
  9. This only has to work from XSD version 3.0.
@zdavatz zdavatz changed the title Compare two SAI DB Compare two SAI DB and report in outputted csv file. Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant