base.batch_append_rows合并表格出现重复行

我在使用base.batch_append_rows合并表格到一个汇总表格中出现一些无规律的, _id重复的行, 合并的脚本如下, 没有做特殊的操作。 现在遇到的问题是汇总表中出现不少_id重复,行内容除了ctime不一样其他内容完全相同的行, 且无法使用delete sql 删除(delete sql删除,会提示502错误), 有遇到过类似问题的同学吗?

sql = 'select count(*) from ' + table_name
lines = base.query(sql)
line_limit = int(lines[0]['COUNT(*)'])
search_line_limit = 1000
search_count = math.ceil(line_limit / search_line_limit)
logging.info("合并表 " + table_name + " 总计" + str(line_limit) + "共计需要查询:" + str(search_count) + " 次")
start_line = 0
end_line = 0
last_line = line_limit % search_line_limit
for i in range(0, search_count):
    if i == search_count - 1 and last_line != 0:
        end_line += last_line
    else:
        end_line = start_line + search_line_limit
    logging.info("开始取表" + table_name + "从" + str(start_line) + "行到" + str(end_line) + "行")
    #rows = _base.list_rows(table_name, view_name='Default View',desc=False, start=start_line, limit=end_line)
    rows = base.list_rows(table_name, view_name='Default View',  start=start_line, limit=end_line)

    base.batch_append_rows(summary_table, rows)
    start_line = end_line
    del rows