[ 
https://issues.apache.org/jira/browse/TRAFODION-2102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15416421#comment-15416421
 ] 

zhangliang edited comment on TRAFODION-2102 at 8/11/16 2:46 AM:
----------------------------------------------------------------

Thanks for @sureshsubbiah's explanation.

In Pg 53 of the ODB manual
( http://trafodion.incubator.apache.org/docs/odb/Trafodion_odb_User_Guide.pdf ) 
we have

"A generic mapfile contains:
• Comments (line starting with #)
• Mappings to link input file fields to the corresponding target table columns."

So it isn't a bug, # is desgined to support comment, and can't be used as fs.


was (Author: zale):
Thanks for @sureshsubbiah's explanation.

In Pg 53 of the ODB manual
( http://trafodion.incubator.apache.org/docs/odb/Trafodion_odb_User_Guide.pdf ) 
we have

"A generic mapfile contains:
• Comments (line starting with #)
• Mappings to link input file fields to the corresponding target table columns."

So it isn't a bug

> Load data with # as fs in linux failed
> --------------------------------------
>
>                 Key: TRAFODION-2102
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2102
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: db-utility-odb
>         Environment: centos6.7 
> HBase 1.0.0-chd5.4.8
>            Reporter: zhangliang
>            Assignee: zhangliang
>            Priority: Trivial
>
> load data with # as sp and " as fs failed
> logs here:
> Usecase : load with # as sp
> Command : ./odb64luo -u trafodion -p traf123 -d traf  -l 
> src=odb_auto_loadfile/load_data_3:pre=@scripts/ddl_person3.sql:tgt=trafodion.odb_test.person3:max=1000:rows=5000:parallel=5:loadcmd=UL:fs=#:sq=\"
> Result : failed
> During : 22s
> Details :
> odb [2016-07-07 16:47:04]: 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 16.499s (prep 0.002s, exec 16.497s, 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.460s (prep 0.002s, exec 1.458s, fetch 
> 0.000s/0.000s)
> Connected to Trafodion
> odb [Oload(7472)] - Error: row 1 col 1 field truncation. Input string: 
> >1#Jian-Guo#Pu#Canada#Xian#1927-10-07#U#ora...@qq.edu#190048#Google#aaaa#2016-07-07
>  16:37:06< of length 91. This row won't be loaded
> odb [Oload(7466)] - Warning: row 1 col 2 field truncation. Input string: 
> >2#Liang#Wu#US#Xian#1979-01-24#F#ap...@esgyn.cn#593561#Tencent#aaaa#2016-07-07
>  16:37:06< of length 86. Only the first 20 char(s) will be loaded
> odb [Oload(7466)] - Warning: row 1 col 3 field truncation. Input string: 
> >3#Yun-Peng#Luo#Canada#Guiyang#1943-09-18#M#ora...@163.org#119880#Microsoft#bbbbbb#2016-07-07
>  16:37:06< of length 101. Only the first 20 char(s) will be loaded
> odb [Oload(7466)] - Warning: row 1 col 4 field truncation. Input string: 
> >4#Li-Ru#Yu#India#Xian#1982-01-05#F#le...@sina.com#693695#Esgyn#cccccc#2016-07-07
>  16:37:06< of length 89. Only the first 40 char(s) will be loaded
> odb [Oload(7466)] - Warning: row 1 col 5 field truncation. Input string: 
> >5#Yun-Peng#Zhou#US#Guiyang#1977-02-03#M#ap...@163.org#586833#Google#cccccc#2016-07-07
>  16:37:06< of length 94. Only the first 40 char(s) will be loaded
> odb [Oload(7472)] - Error: row 1 col 6 field truncation. Input string: 
> >6#Liang#Luo#Canada#Shanghai#1968-05-13#U#p...@esgyn.cn#980259#Apple#cccccc#2016-07-07
>  16:37:06< of length 94. This row won't be loaded
> odb [Oload(7466)] - Warning: row 1 col 7 field truncation. Input string: 
> >7#Fu-Jin#Zhang#Canada#Shanghai#1964-08-02#M#p...@qq.edu#189402#Esgyn#aaaa#2016-07-07
>  16:37:06< of length 93. Only the first 1 char(s) will be loaded
> odb [Oload(7466)] - Warning: row 1 col 8 field truncation. Input string: 
> >8#Liang#Zhang#Canada#Guangzhou#1987-01-12#F#p...@sina.cn#1670621#Microsoft#aaaa#2016-07-07
>  16:37:06< of length 99. Only the first 40 char(s) will be loaded
> odb [Oload(7472)] - Error: row 1 col 9 field truncation. Input string: 
> >9#Shi-Fu#Yu#US#Beijing#2005-04-05#M#ap...@esgyn.cn#1045566#Microsoft#aaaa#2016-07-07
>  16:37:06< of length 93. This row won't be loaded
> odb [Oload(7466)] - Warning: row 1 col 10 field truncation. Input string: 
> >10#Liang#Wu#Canada#Shanghai#1917-07-18#M#ap...@163.cn#1810598#Esgyn#bbbbbb#2016-07-07
>  16:37:06< of length 94. Only the first 40 char(s) will be loaded
> odb [Oload(7466)] - Warning: row 1 col 11 field truncation. Input string: 
> >11#Shi-Fu#Wu#Canada#Guangzhou#1966-05-30#M#ora...@gmail.org#1376463#Google#cccccc#2016-07-07
>  16:37:06< of length 101. Only the first 80 char(s) will be loaded
> odb [Oload(7472)] - Error: row 1 col 12 field truncation. Input string: 
> >12#Liang#Wu#China#Shanghai#1999-09-05#M#ora...@gmail.org#306457#HP#bbbbbb#2016-07-07
>  16:37:06< of length 93. This row won't be loaded
> ...
> [0] odb version 1.1.0 Load statistics:
>  [0] Target table: TRAFODION.ODB_TEST.PERSON3
>  [0] Source: odb_auto_loadfile/load_data_3
>  [0] Pre-loading time: 21.917 s (00:00:21.917)
>  [0] Loading time: 0.052 s(00:00:00.052)
>  [0] Total records read: 833
>  [0] Total records inserted: 0
>  [0] Total number of columns: 12
>  [0] Total bytes read: 1,138,306
>  [0] Average input row size: 1,366.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): 21,377.441 KiB/s
>  [0] Load throughput (ODBC): 0.000 KiB/s
>  [0] Reader Total/Wait Cycles: 0/0
> odb [2016-07-07 16:47:26]: exiting. Session Elapsed time 21.990 seconds 
> (00:00:21.990)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to