zdavatz/cpp2sqlite

Compare two SAI DB and report in outputted csv file.

zdavatz opened this issue · 0 comments

  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.