keeps / dbptk-developer

DBPTK Developer - library and command-line tool for execution of database preservation actions
http://www.database-preservation.com
GNU Lesser General Public License v3.0
43 stars 19 forks source link

Comments not included in Siard-dk (from Oracle) #310

Open PrismaHans opened 7 years ago

PrismaHans commented 7 years ago

Description: Comments not included in siard-dk export from Oracle

Steps required to reproduce the bug:

  1. Add comment to table COMMENT ON TABLE SJSYSADM.AFD IS 'Test';
  2. Run command to export java "-Dfile.encoding=UTF-8" -jar dbptk-app-2.0.0-beta7.2.jar --import oracle --import-server-name=127.0.0.1 --import-database="xe" --import-username=sjsysadm --import-password="" --import-accept-license --import-port-number=1521 --export siard-dk --export-folder=AVID.AA.10.10 -etf exp.txt
  3. Description should be entered manually is stated in the tableIndex.xml file: 1.0 SJSYSADM Oracle AFDtable1**Description should be entered manually** NAVNELBNR c1 DECIMAL(12) NUMBER(12,0) false Description should be set [dbptk-app.log.txt](https://github.com/keeps/db-preservation-toolkit/files/879492/dbptk-app.log.txt)

    Attach the dbptk-app.log.txt file below.

    PrismaHans commented 7 years ago

    My tableIndex.xml file got lost I will upload it here tableIndex.zip

    chalkos commented 7 years ago

    May be related to #174 if the description is not being fetched from Oracle.

    Or it may be a problem in SIARD-DK module if the placeholder text "Description should be entered manually" is being added even when the actual description exists.

    PrismaHans commented 7 years ago

    Could you please point out where in the code the query is being generated towards Oracle. Then I could emulate from some other source.

    andreaskring commented 7 years ago

    @PrismaHans The problem is related to #174 since the descriptive metadata is not being fetched from Oracle. In the SIARDDK export module, the descriptive metadata is being set if it is available from the TableStructure object here

    PrismaHans commented 7 years ago

    @andreaskring I meant where in the code is the query towards Oracle generated?

    chalkos commented 7 years ago

    @PrismaHans From #174, I don't think that there is a specific query in the code to retrieve this information.

    Most database metadata is retrieved in a generic way using JDBC, but some database systems require specific adjustments to retrieve certain fields (this is the case for most descriptions); since the descriptions are currently not being fetched, I'm assuming that there isn't yet (implemented in the code) a specific query to do this.