I want to insert data into Oracle Table, where one row type-RAW(In python BYTES).
sql = f"INSERT /*+ APPEND */ INTO {table} ({columns}) VALUES ({values})"
ins_r = ', '.join(lst)
cur.execute(sql, ins_r)
This is my printed SQL:
INFO - INSERT /*+ APPEND */ INTO TR.ZZ_TEST (REGION_ID, REGION_NAME, CHANGE_DATE, MD5) VALUES (:REGION_ID, :REGION_NAME, :CHANGE_DATE, :MD5)
And this my data which I want to Insert:
['1', "'TEST'", "to_date('2021-09-28 18:48:23','YYYY-MM-DD HH24:MI:SS')", b'aWQ\x9b\xa6(\x17zj\xab\x97\x8e\x12uE4']
And I have the error:
ins_r = ', '.join(lst)
TypeError: sequence item 3: expected str instance, bytes found
And I wanted to convert bytes to str, but is not correct.