Closed OliverLemm closed 5 months ago
Currently using schemacrawler lint for qa of our datamodels, would appreciate if you could deliver a predefined rule set to ease evaluation of your tool
thanks for advice, we will take a look into the schemacrawler Is this the link from the tool? https://www.schemacrawler.com/lint.html
Yes - for schemacrawler.tools.linter.LinterCatalogSql/schemacrawler.tools.linter.LinterTableSql we use SQL with LISTAGG
LP-Internal Von: Oliver @.> Gesendet: Mittwoch, 28. September 2022 10:40 An: mt-ag/quasto @.> Cc: Guenter Leimbeck @.>; Comment @.> Betreff: Re: [mt-ag/quasto] export and import rules (Issue #10)
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
thanks for advice, we will take a look into the schemacrawler Is this the link from the tool? https://www.schemacrawler.com/lint.html
- Reply to this email directly, view it on GitHubhttps://github.com/mt-ag/quasto/issues/10#issuecomment-1260578300, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEMXIBPJ3Y2SFHG2XCNIXLTWAP76HANCNFSM576CK7UA. You are receiving this because you commented.Message ID: @.**@.>>
For next steps the schemacrawler is to be checked and the structure should be compared to JSON.
We need a possible JSON structure for the QA_RULES table.
Comparing schemacrawler with Oracle integrated JSON functionality:
Schemacrawler:
Usability for QUASTO: -> both directions are possible: DB-table to JSON and JSON to DB-table -> Java is needed -> an additional language must be used (Javascript or Ruby for example) -> extra Software is needed
Oracle Integrated JSON:
Usability for QUASTO:
Questions:
regarding the points @SabrinaPrang has listed we will use JSON without the schemacrawler as in/output format
Thanks for your support @ThisGuenter
The first draft of the JSON-format: QUASTO_JSON_structure_first_draft.txt
For the uploaded JSON-files an upload-table is planned. Here is the first draft of the upload table QA_IMPORT_FILES with all needed skripts for sequence, trigger, etc. qa_import_files_cons.txt qa_import_files_ind.txt qaim_iu_trg.txt qaim_seq.txt qa_import_files.txt
Next steps. Write Export & Import mechanic for json format with given table structure. Export should be a clob.
A formated export File written directly into a file will be defined in another task
create new package export_import_rules_pkg with
Document how to spool out the rules inside the package and the documentation page
Keep an eye on the correct format when importing and exporting the SQL
Adjust Jenkins jobs
quasto_json_tempalte.txt New Version of the Export JSON that is generated by the Database. I wrote everything lowercase and added a missing column. Along with the removal of the "U" in "QUARU" to reduce confusion with the actual table columns. Also we couldnt implement the boolean Value Conversion form the is_active column easily so we went ahead and put the original values (0/1) in it. Now the Json depicts the table as far as possible.
Package qa_export_import_rules_pkg created Functions and Procedures added for Export and Import Script for Writing exported CLOB to a file added /scripts/export_rules_to_file
The following issues still in
Es gilbt folgende Optionen um den Clob beim Export des JSONs richtig in den File auszugeben:
Punkt 2 wird als erstes ausprobiert, da sauberer und simplerer Code-Logik.
Json-Template: we came to the conclusion that removing the prefix "qaru" inside our json-template would be the more user friendly option. The Json will become more readable.
we should create a qa_files table for import/exporting files columns
Script example for importing a file with sqlcl https://gist.github.com/krisrice/8da5e6cbc07db5becde799742a3c72d2#file-blobs-helper-js-L25
for easier export and importing rules the standalone plsql function fc_export_qa_rules has to be rewritten and integrated into an export_import_rules_pkg.
the primary key and the audit columns must be excluded inside the export/import file.
a merge statement based on the columns qaru_rule_number and qaru_client_name has to be used for export and import as unique identifier the sql statement should be seperated from the statement for easier reading.
it should be evaluated whether the metadata for the rules and the import/export logik should be divided