苏锦佩 created TRAFODION-2677:
------------------------------
Summary: odb load source with src=-file is failure
Key: TRAFODION-2677
URL: https://issues.apache.org/jira/browse/TRAFODION-2677
Project: Apache Trafodion
Issue Type: Bug
Components: db-utility-odb
Reporter: 苏锦佩
Fix For: 2.3-incubating
I'm using the statement "odb64luo -u trafuser -p trafpasswd -d trafdb -l
src=-odb_load_file:tgt=trafodion.odb_test.sp_person3:max=10000:rows=5000:parallel=1:loadcmd=UL:fs=\!:sq=\""
to load some files into a trafodion table,then I see the error display as
follow.
ERROR MESSAGES
Connected to Trafodion
Connected to Trafodion
Connected to Trafodion
[4] odb(13004) [2017-06-08 01:16:30] - [Trafodion ODBC Driver][Trafodion
Database] SQL ERROR:*** ERROR[8822] The statement was not prepared. [2017-06-08
01:16:30] (State: X08MU Native Err: -8822)
[4] odb(13004) [2017-06-08 01:16:30] - [Trafodion ODBC Driver][Trafodion
Database] SQL ERROR:*** ERROR[4082] Object TRAFODION.QA.TRAFODION does not
exist or is inaccessible. [2017-06-08 01:16:30] (State: 42000 Native Err: -4082)
odb [Oload(6388)] - Error analyzing target table (null).(null).TRAFODION
odb: thread 4 closing connection...
odb: thread 4 is ending...
odb: thread 5 closing connection...
[2] odb(13004) [2017-06-08 01:16:30] - [Trafodion ODBC Driver][Trafodion
Database] SQL ERROR:*** ERROR[8822] The statement was not prepared. [2017-06-08
01:16:30] (State: X08MU Native Err: -8822)
[2] odb(13004) [2017-06-08 01:16:30] - [Trafodion ODBC Driver][Trafodion
Database] SQL ERROR:*** ERROR[4082] Object TRAFODION.QA.TRAFODION does not
exist or is inaccessible. [2017-06-08 01:16:30] (State: 42000 Native Err: -4082)
odb [Oload(6388)] - Error analyzing target table (null).(null).TRAFODION
odb: thread 2 closing connection...
odb: thread 2 is ending...
odb: thread 3 closing connection...
odb: thread 5 is ending...
odb: thread 3 is ending...
odb [Oload(7053)] - INSERT
statement:PID","FNAME","LNAME","COUNTRY","CITY","BDATE","SEX","EMAIL","SALARY","EMPL","NOTES","LOADTS")
VALUES(?,?,?,?,?,?,?,?,?,?,?,?)
[0] odb(7150) [2017-06-08 01:16:34] - [Trafodion ODBC Driver][Trafodion
Database] SQL ERROR:*** ERROR[8822] The statement was not prepared. [2017-06-08
01:16:34] (State: X08MU Native Err: -8822)
[0] odb(7150) [2017-06-08 01:16:34] - [Trafodion ODBC Driver][Trafodion
Database] SQL ERROR:*** ERROR[15005] Unmatched quote in input (unterminated
string):
PID","FNAME","LNAME","COUNTRY","CITY","BDATE","SEX","EMAIL","SALARY","EMPL","NOTES","LOADTS")
VALUES(?,?,?,?,?,?,?,?,?,?,?,?); [2017-06-08 01:16:34] (State: 42000 Native
Err: -15005)
odb: thread 1 closing connection...
odb: thread 0 closing connection...
odb: thread 0 is ending...
odb: thread 1 is ending...
odb [2017-06-08 01:16:34]: exiting. Session Elapsed time 6.588 seconds
(00:00:06.588)
*step to reproduce:*
1. create trafodion table
CREATE TABLE TRAFODION.odb_test."SP_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));
2.create directory and create three file in this directory, then input data to
these files.
example
mkdir -p data
touch data/test1
touch data/test2
touch data/test3
data format as follow.
1!"Shi-Fu"!"Wu"!"Canada"!"Shanghai"!1918-06-23!"U"!"[email protected]"!304030!"Esgyn"!"aaaa"!2016-10-24
17:04:24
3.touch file named "odb_load_file",it contain content as follow.
src=data/test1
src=data/test2
src=data/test3
4.execute the odb statement as follow.
odb64luo -u trafuser -p trafpasswd -d trafdb -l
src=-odb_load_file:tgt=trafodion.odb_test.sp_person3:max=10000:rows=5000:parallel=1:loadcmd=UL:fs=\!:sq=\"
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)