Uploaded image for project: 'Apache Trafodion'
  1. Apache Trafodion
  2. TRAFODION-2034

Cannot output bad records in the loaded file even if specified file for storing bad records

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1-incubating
    • Component/s: db-utility-odb
    • Labels:
      None
    • Environment:
      centos6.7 HBase 1.0.0-cdh5.4.8

      Description

      This issue is from mantis 330.
      Load file where is bad record in it, with option bad=output_data/bad_records to hold the bad records, but the result is the file output_data/bad_records generated but it is empty lines.

      [root@suse-1 odb_test]# ./odb64luo -u trafodion -p traf123 -d traf -l src=output_data/ext_person3.csv:pre=@scripts/ddl_person3.sql:tgt=trafodion.odb_test.person3:max=1000:rows=5000:parallel=5:loadcmd=UL:fs=|:sq=\":bad=output_data/bad_records
      odb [2016-04-25 19:17:05]: starting ODBC connection(s)... 0 1 2 3 4 5
      [0.0.0]Executing: 'drop table TRAFODION.odb_test.person3;'
      [0.0.0]--- command executed in 7.279s (prep 0.001s, exec 7.278s, fetch 0.000s/0.000s)
      [0.0.1]Executing: 'CREATE TABLE TRAFODION.odb_test."PERSON3" (
      PID BIGINT SIGNED NOT NULL
      ,FNAME CHAR(20) NOT NULL
      ,LNAME CHAR(20) NOT NULL
      ,COUNTRY VARCHAR(40) NOT NULL
      ,CITY VARCHAR(40) NOT NULL
      ,BDATE DATE NOT NULL
      ,SEX CHAR(1) NOT NULL
      ,EMAIL VARCHAR(40) NOT NULL
      ,SALARY NUMERIC(9,2) NOT NULL
      ,EMPL VARCHAR(40) NOT NULL
      ,NOTES VARCHAR(80)
      ,LOADTS TIMESTAMP(0)
      ,PRIMARY KEY (PID)
      );'
      [0.0.1]--- command executed in 1.388s (prep 0.002s, exec 1.386s, fetch 0.000s/0.000s)
      Connected to Trafodion
      [1] odb [Oloadbuff(9438)] - Error loading row 5 (State: 23000, Native 0)
      [Trafodion ODBC Driver] GENERAL ERROR. Null Value in a non nullable column. Row: 5 Column: 1
      [1] 999 records inserted [commit]
      [0] odb version 1.1.0 Load statistics:
      [0] Target table: TRAFODION.ODB_TEST.PERSON3
      [0] Source: output_data/ext_person3.csv
      [0] Pre-loading time: 10.920 s (00:00:10.920)
      [0] Loading time: 0.127 s(00:00:00.127)
      [0] Total records read: 1,000
      [0] Total records inserted: 999
      [0] Total number of columns: 12
      [0] Total bytes read: 180,517
      [0] Average input row size: 180.5 B
      [0] ODBC row size: 341 B (data) + 96 B (len ind)
      [0] Rowset size: 1,000
      [0] Rowset buffer size: 426.76 KiB
      [0] Load throughput (real data): 1,388.080 KiB/s
      [0] Load throughput (ODBC): 2,619.487 KiB/s
      [0] Reader Total/Wait Cycles: 1/0
      odb [2016-04-25 19:17:16]: exiting. Session Elapsed time 11.060 seconds (00:00:11.060)

      SQL>showddl person3;

      CREATE TABLE TRAFODION.ODB_TEST.PERSON3
      (
      PID LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE
      SERIALIZED
      , FNAME CHAR(20) CHARACTER SET ISO88591 COLLATE
      DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE SERIALIZED
      , LNAME CHAR(20) CHARACTER SET ISO88591 COLLATE
      DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE SERIALIZED
      , COUNTRY VARCHAR(40) CHARACTER SET ISO88591 COLLATE
      DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE SERIALIZED
      , CITY VARCHAR(40) CHARACTER SET ISO88591 COLLATE
      DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE SERIALIZED
      , BDATE DATE NO DEFAULT NOT NULL NOT DROPPABLE NOT
      SERIALIZED
      , SEX CHAR(1) CHARACTER SET ISO88591 COLLATE
      DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE SERIALIZED
      , EMAIL VARCHAR(40) CHARACTER SET ISO88591 COLLATE
      DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE SERIALIZED
      , SALARY NUMERIC(9, 2) NO DEFAULT NOT NULL NOT
      DROPPABLE SERIALIZED
      , EMPL VARCHAR(40) CHARACTER SET ISO88591 COLLATE
      DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE SERIALIZED
      , NOTES VARCHAR(80) CHARACTER SET ISO88591 COLLATE
      DEFAULT DEFAULT NULL SERIALIZED
      , LOADTS TIMESTAMP(0) DEFAULT NULL NOT SERIALIZED
      , PRIMARY KEY (PID ASC)
      )
      ;

      — SQL operation complete.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                zale zhangliang
                Reporter:
                zale zhangliang
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: