我通过TwitterAPI在pandas dataframe中获取推文,并将数据写入teradata数据库。然而,与其他tweet不同,一个单元格有特定的tweet,其中包含粗体数据。当我尝试将其插入数据库时,会弹出以下错误:
OperationalError: [Version 17.0.0.4] [Session 3046127] [Teradata SQL Driver] [Error 528] A failure occurred while executing rows 1 through 292 of a batch request.
at gosqldriver/teradatasql.(*teradataConnection).makeDriverErrorCode TeradataConnection.go:1120
at gosqldriver/teradatasql.newTeradataRows TeradataRows.go:396
at gosqldriver/teradatasql.(*teradataStatement).QueryContext TeradataStatement.go:122
at gosqldriver/teradatasql.(*teradataConnection).QueryContext TeradataConnection.go:2083
at database/sql.ctxDriverQuery ctxutil.go:48
at database/sql.(*DB).queryDC.func1 sql.go:1579
at database/sql.withLock sql.go:3204
at database/sql.(*DB).queryDC sql.go:1574
at database/sql.(*Conn).QueryContext sql.go:1823
at main.goCreateRows goside.go:654
at main._cgoexpwrap_cfa80c8a3acb_goCreateRows _cgo_gotypes.go:363
at runtime.cgocallbackg1 cgocall.go:332
at runtime.cgocallbackg cgocall.go:207
at runtime.cgocallback_gofunc asm_amd64.s:793
at runtime.goexit asm_amd64.s:1373
Caused by [Version 17.0.0.4] [Session 3046127] [Teradata Database] [Error 6705] An illegally formed character string was encountered during translation.
at gosqldriver/teradatasql.(*teradataConnection).formatDatabaseError TeradataConnection.go:1138
at gosqldriver/teradatasql.(*teradataConnection).makeChainedDatabaseError TeradataConnection.go:1154
数据库中的tweets数据类型为“varchar(1000)字符集unicode非大小写特定”
以下是示例数据:
包含粗体文本的tweet导致插入问题。我如何缓解这种情况?
暂无答案!
目前还没有任何答案,快来回答吧!