PyCharm 2019.1.3 (Professional Edition) problem with "Import Data from File"

已回答

Hi,

I used "Dump Data to File" into a csv file to backup the content of a postgres database.

Then I removed data in the database table and used "Import Data from File" to check whether it will be imported properly.

While the "Data Preview" window displays the splitting of the row into columns correctly

after import columns C2,C3,C4 content values are set to <null>

strangely C5 column is imported properly (value equals to 0).

What could be the problem?

Thank you!

 

database:

PostgreSQL 11

database table type:

text, bigint, bigint, bigint, bigint, bigint, text

csv file content:

af8d85,81,0,100,0,"""{0}"",'a'"

 

0

What is the columns type? Note that if IDE fails to convert the data it inserts NULL when Insert inconvertible values as null option is enabled.

When importing data you can save errors/warnings in log file. What's there after you import data? Also in import dialog there is column mappings - make sure they are correctly mapped.

0

Hi Andrey,

Thank you for your reply.

> What is the columns type?

text, bigint, bigint, bigint, bigint, bigint, text

> Note that if IDE fails to convert the data it inserts NULL when Insert inconvertible values as null option is enabled.

Hm, not in my case:

> When importing data you can save errors/warnings in log file. What's there after you import data?

No log file is created during import.

> Also in import dialog there is column mappings - make sure they are correctly mapped.

Looks good to me.

0

Can not reproduce. Please provide DDL for a table and example file to import from. Please also attach idea.log after IDE restart and reproducing.

0
create table if not exists {table_name}
(
"a" text,
"b" bigint,
"c" bigint,
"d" bigint,
"e" bigint,
"f" text
);

import.csv and idea_import.log uploaded to https://uploads.services.jetbrains.com/

Thank you!

0

Can not reproduce

But filled an issue: https://youtrack.jetbrains.com/issue/DBE-8651 for the investigation. Please follow it for further updates. If you have any additional tips, how it can be reproduced, please share them in YouTrack issue. Thanks.

0

请先登录再写评论。