[
https://issues.apache.org/jira/browse/TRAFODION-3252?focusedWorklogId=188712&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-188712
]
ASF GitHub Bot logged work on TRAFODION-3252:
---------------------------------------------
Author: ASF GitHub Bot
Created on: 23/Jan/19 08:33
Start Date: 23/Jan/19 08:33
Worklog Time Spent: 10m
Work Description: SuJinpei commented on pull request #1778:
[TRAFODION-3252] odb -cp command does not support writting to bad file
URL: https://github.com/apache/trafodion/pull/1778
**New Feature Description:** Now, the odb's -cp command supports "bad"
option. For example, you can use below command to specify where to store the
records that can't be loaded to Trafodion.
`./odb64luo -d dsn1:dsn2 -u user1:user2 -p passwd1:passwd2 -cp
src=tb1:tgt=tb2:bad=badf`
The bad file records the 'bad' records in the CSV format.
**Changes In odb:** New field ' **Octype**' to remember the C data type has
been added to the '**struct tdesc**' to decode the batch buffer if failed to
load the data to the target table later. Some variables were used for multiple
purposes, now add new variables to separate it.
**Verification:** No new issue was introduced by running the odb regression
test set. The new feature also works fine by current test cases.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 188712)
Time Spent: 10m
Remaining Estimate: 0h
> odb -cp command does not support writting to bad file
> -----------------------------------------------------
>
> Key: TRAFODION-3252
> URL: https://issues.apache.org/jira/browse/TRAFODION-3252
> Project: Apache Trafodion
> Issue Type: New Feature
> Components: db-utility-odb
> Reporter: 苏锦佩
> Assignee: 苏锦佩
> Priority: Major
> Fix For: 2.3
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> For -l command, there is an option "bad" to specify where to store bad
> records, but for -cp command, there is no such option.
>
> {code:java}
> odb64luo -u v7fat:trafodion -p v7fat:traf123 -d oracle:traf -cp
> src=KSTP_TCJHJG:tgt=v7fat.KSTP_TCJHJG:rows=1000:loadcmd=UL:parallel=6:truncate:bad=+KSTP_TCJHJGbadfile
> odb [parseopt(14353)] - Error: unknown parameter "bad"{code}
>
>
> For -cp command, there is an option "errdmp" to specify where to dump bad
> buffer when an error occurred. But for the Chinese user, the contents is not
> easy to understand. For example:
> {code:java}
> [sujinpei@localhost bin]$ cat errdump
> [1] odb [Oloadbuff(10207)] - Error loading row 1 (State: HY723, Native 0)
> [Trafodion ODBC Driver] TRANSLATIONDLL ERROR: DRIVERTODATASOURCE
> [01!S!].TranslateUTF8: No Unicode Translation Row: 1 Column: 2
> [1] Dumping row 1 in a block of 2 rows. ODBC row length = 78
> 000000: 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1...............
> 000016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 000032: 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 ................
> 000048: 00 e4 bd a0 e4 bb ac e5 a5 bd 20 20 20 20 20 20 ..........
> 000064: 20 20 20 20 20 00 14 00 00 00 00 00 00 00 .........
> [1] odb [Oloadbuff(10207)] - Error loading row 2 (State: HY723, Native 0)
> [Trafodion ODBC Driver] TRANSLATIONDLL ERROR: DRIVERTODATASOURCE
> [01!S!].TranslateUTF8: No Unicode Translation Row: 2 Column: 2
> [1] Dumping row 2 in a block of 2 rows. ODBC row length = 78
> 000000: 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2...............
> 000016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 000032: 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 ................
> 000048: 00 e6 88 91 e4 bb ac e6 9d a5 e4 ba 86 20 20 20 .............
> 000064: 20 20 20 20 20 00 14 00 00 00 00 00 00 00 .........{code}
>
> So some user wants to add the intuitive option "bad" for "-cp" command and do
> similar things as "-l" command.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)