MYSQL Workbench imports 'None' instead of null from JSON file

26 Views Asked by At

I'm working on a project and trying to setup my local database using the data extracted from DEV environment. I used Table Data Export Wizard to get the data in json. For example: I get below json data using export wizard

[{"id":1534991, "name":"John Doe", "added_on":null},
 {"id":1534992, "name":"John Doe 2", "added_on":null}]

Now, when I try to import the same data in my workbench database, I get below in preview

enter image description here

We can see that workbench is trying to insert 'None' instead of a mysql NULL, which it should not do.

For the purpose of explaining the problem, I have created a test table:

create table employee
( id int primary key, 
 name varchar(255),
 added_on timestamp default current_timestamp);

enter image description here

Has anyone faced this issue before? I know, we can also use the option of export as csv, but csv import is having it's own set of issues because the original table has lot of columns containing long JSON data.

My question is: Is there any option in workbench or any setting using which I can get rid of this behaviour of mysql workbench

0

There are 0 best solutions below