0

I have mysql table which consists of fields (from_time, to_time) having time data type. Here is below my table description and some data from that table.

enter image description here

enter image description here

I want to migrate mysql data to clickhouse. Clickhouse accepts the time data type field as a string. But when I try to dump data from mysql to clickhouse it shows me the following error.

CRITICAL:ex='datetime.timedelta' object has no attribute 'encode'

Is there any solution ??

vladimir
  • 13,428
  • 2
  • 44
  • 70
RohanJ24
  • 21
  • 4
  • it looks that this bug related to mysql - see https://stackoverflow.com/questions/52469341/django-attribute-error-datetime-timedelta-object-has-no-attribute-decode. – vladimir Feb 03 '21 at 16:08
  • to connect to mysql table from CH can be used [mysql table function](https://clickhouse.tech/docs/en/sql-reference/table-functions/mysql/#mysql). To dump data just do *insert into ch_table select * from mysql_table_func*. – vladimir Feb 03 '21 at 16:10

0 Answers0