-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bulk Insert get errors in inserting data into HANA #56
Comments
Please provide a proper issue description with an code example to reproduce the error. |
We create one table and convert the type to lob as below. and insert the data as the bulk insert.
} func randomResult(typeList []string) string { |
Thanks for the explanation! Like presumed you are using a string variable (randValue) as argument for a CLOB field but you need to use a driver.Lob field instead (please see https://godoc.org/github.com/SAP/go-hdb/driver#Lob and the examples for reference). |
{"_func":"HanaChaos/Executor.runTest","_level":"info","_loc":"sqljob.go:58","_time":"2020-09-01T03:21:05.517832857-07:00","msg":"Run Test Case:INSERT INTO DDL5 VALUES($2) "}
{"_func":"HanaChaos/Executor.runTest","_level":"info","_loc":"sqljob.go:60","_time":"2020-09-01T03:21:05.518816453-07:00","msg":"Run Test Case:INSERT INTO DDL5 VALUES($2) "}
{"_func":"HanaChaos/Executor.bulkInsert","_level":"info","_loc":"sqljob.go:96","_time":"2020-09-01T03:21:05.519362595-07:00","msg":"BULK INSERT INTO DDL5 VALUES(?, ?)"}
{"_func":"HanaChaos/Executor.bulkInsert","_level":"fatal","_loc":"sqljob.go:106","_time":"2020-09-01T03:21:05.679429537-07:00","_trace":"goroutine 15 [running]:\nruntime/debug.Stack(0x7b4789, 0x5, 0xc000759a50)\n\t/usr/local/go/src/runtime/debug/stack.go:24 +0x9d\nHanaChaos/Logging.preLogFatal(0xc000f345b0)\n\t/home/lzhang/go/src/HanaChaos/Logging/logger.go:66 +0x17a\nHanaChaos/Logging.Fatal(0xc000759c98, 0x1, 0x1)\n\t/home/lzhang/go/src/HanaChaos/Logging/logger.go:126 +0x26\nHanaChaos/Executor.bulkInsert(0xc0002e8300, 0xc000246120, 0x1b)\n\t/home/lzhang/go/src/HanaChaos/Executor/sqljob.go:106 +0x35b\nHanaChaos/Executor.runTest(0xc0002222a0, 0xc000222270, 0x0, 0x0)\n\t/home/lzhang/go/src/HanaChaos/Executor/sqljob.go:65 +0x1ce\nHanaChaos/Executor.(*SqlJob).Run(0xc000228080, 0xc00022e080, 0x2, 0x0)\n\t/home/lzhang/go/src/HanaChaos/Executor/sqljob.go:21 +0x44\nHanaChaos/Worker.Worker.Start.func1(0xc00007a420, 0xc000092900, 0xc000092960)\n\t/home/lzhang/go/src/HanaChaos/Worker/job.go:26 +0x108\ncreated by HanaChaos/Worker.Worker.Start\n\t/home/lzhang/go/src/HanaChaos/Worker/job.go:18 +0x53\n","msg":"sql: converting argument $2 type: unsupported lobCESU8Type conversion: string 0u5jwx7z9z"}
{"_func":"HanaChaos/Executor.bulkInsert","_level":"fatal","_loc":"sqljob.go:106","_time":"2020-09-01T03:21:05.680060927-07:00","_trace":"goroutine 15 [running]:\nruntime/debug.Stack(0x7b4789, 0x5, 0xc000759a50)\n\t/usr/local/go/src/runtime/debug/stack.go:24 +0x9d\nHanaChaos/Logging.preLogFatal(0xc000f348e0)\n\t/home/lzhang/go/src/HanaChaos/Logging/logger.go:66 +0x17a\nHanaChaos/Logging.Fatal(0xc000759c98, 0x1, 0x1)\n\t/home/lzhang/go/src/HanaChaos/Logging/logger.go:126 +0x26\nHanaChaos/Executor.bulkInsert(0xc0002e8300, 0xc000246120, 0x1b)\n\t/home/lzhang/go/src/HanaChaos/Executor/sqljob.go:106 +0x35b\nHanaChaos/Executor.runTest(0xc0002222a0, 0xc000222270, 0x0, 0x0)\n\t/home/lzhang/go/src/HanaChaos/Executor/sqljob.go:65 +0x1ce\nHanaChaos/Executor.(*SqlJob).Run(0xc000228080, 0xc00022e080, 0x2, 0x0)\n\t/home/lzhang/go/src/HanaChaos/Executor/sqljob.go:21 +0x44\nHanaChaos/Worker.Worker.Start.func1(0xc00007a420, 0xc000092900, 0xc000092960)\n\t/home/lzhang/go/src/HanaChaos/Worker/job.go:26 +0x108\ncreated by HanaChaos/Worker.Worker.Start\n\t/home/lzhang/go/src/HanaChaos/Worker/job.go:18 +0x53\n","msg":"sql: converting argument $2 type: unsupported lobCESU8Type conversion: string e1itpn70fg"}
The text was updated successfully, but these errors were encountered: