Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

restore csv files failed with tidb backend #438

Closed
glorv opened this issue Nov 2, 2020 · 0 comments · Fixed by #437
Closed

restore csv files failed with tidb backend #438

glorv opened this issue Nov 2, 2020 · 0 comments · Fixed by #437
Assignees
Labels
severity/major type/bug This issue is a bug report

Comments

@glorv
Copy link
Contributor

glorv commented Nov 2, 2020

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.
    Use lightning to restore some csv files.

Table schema:

CREATE TABLE `test` (
	`id` int(11) NOT NULL,
	`contract_no` varchar(64) DEFAULT NULL,
	`fund_seq_no` varchar(64) DEFAULT NULL,
	`term_no` int(11) DEFAULT NULL,
	`contract_type` varchar(8) DEFAULT NULL,
	`internal_transfer_tag` varchar(8) DEFAULT NULL,
	`prin_amt` int(11) DEFAULT NULL,
	`start_date` varchar(8) DEFAULT NULL,
	`end_date` varchar(8) DEFAULT NULL,
	`batch_date` varchar(8) DEFAULT NULL,
	`crt_time` timestamp DEFAULT CURRENT_TIMESTAMP,
	`region_code` varchar(8) DEFAULT NULL,
	`credit_code` varchar(64) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
PARTITION BY RANGE COLUMNS(batch_date) (
	PARTITION `P20200224` VALUES LESS THAN ("2020-02-05 00:00:00"),
	PARTITION `P20200324` VALUES LESS THAN ("2020-03-05 00:00:00"),
	PARTITION `P20200424` VALUES LESS THAN ("2020-04-05 00:00:00"),
	PARTITION `P20200524` VALUES LESS THAN ("2020-05-05 00:00:00"),
	PARTITION `P_MAXVALUE` VALUES LESS THAN MAXVALUE
);

Some sample rows in the csv files:

contract_no,fund_seq_no,term_no,contract_type,internal_transfer_tag,prin_amt,start_date,end_date,region_code,credit_code
2020061030595,20200629,1,01,N,356,20200210,20200720,000000,
202023462,00628,1,01,N,3561,20200310,20200720,000001,
64030597,0627,1,01,N,3562,20200410,20200720,000002,33
64030598,626,12,02,Y,26368,20200510,20200620,000003,
030599,9520200625,1,01,N,3960,20200610,20200720,000005,999 
  1. What did you expect to see?
    Lightning should import data successfully.

  2. What did you see instead?
    Failed with following error:
    image

  3. Versions of the cluster
    v4.0.7

  4. Operation logs

  5. Configuration of the cluster and the task
    lightning config:
    image

  6. Screenshot/exported-PDF of Grafana dashboard or metrics' graph in Prometheus for TiDB-Lightning if possible

@glorv glorv added the type/bug This issue is a bug report label Nov 2, 2020
@glorv glorv self-assigned this Nov 2, 2020
@glorv glorv closed this as completed in #437 Nov 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity/major type/bug This issue is a bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants