If you insert a value that contains the record terminator, which defaults to '\x01', then pyvertica does not encode it correctly. Here's a test program:
from pyvertica.batch import VerticaBatch
vb = VerticaBatch(
odbc_kwargs={'dsn': 'toy'},
reconnect=False,
table_name='books',
column_list=['name','price','author'],
)
vb.insert_list( [u'a fail\x01ure',5,'me'] )
vb.commit()
error_bool, error_file_obj = vb.get_errors()
if error_bool:
print error_file_obj.read()
It produces this result:
Rejected data at line: "a fail
It also successfully creates a book with the name "ure, price 5, and author me.
If you insert a value that contains the record terminator, which defaults to
'\x01', then pyvertica does not encode it correctly. Here's a test program:It produces this result:
It also successfully creates a book with the name
"ure, price5, and authorme.