nebula-importer
nebula-importer copied to clipboard
Support to import NULL value
for nullable fields of tag or edge, think about how to import the NULL value in csv file.
+1
We will support this feature recently. And the implementation maybe follow the answer of this question in stackoverflow:
https://stackoverflow.com/questions/2675323/mysql-load-null-values-from-csv-data
@zfanswer if you have more ideas and question about this feature, please be free to raise them here. Thanks.
Thanks for your quick response! Looking forward for the new feature.
Just to put info here after discussion on Slack channel. You can use NULL value instead of standard \N in CSV file to be able to import it into Nebula.
@veezhang This needs to be dealt with
The data type of prop1 is float, when prop1 is null in the csv file, the generated insert statement is
INSERT EDGE test (prop1,prop2) VALUES "1001" ->"1002" : (,"2022-04-01")
[ERROR (-1004)]: SyntaxError: syntax error near `,"2022-0'
even if prop1 is nullable and with default value,the following insert statement can be executed successfully:
INSERT EDGE test (prop1,prop2) VALUES "1001" ->"1002" : (null,"2022-04-01")
@dbacyj It's will be fixed in #238 .
@veezhang This needs to be dealt with
The data type of prop1 is float, when prop1 is null in the csv file, the generated insert statement is
INSERT EDGE test (prop1,prop2) VALUES "1001" ->"1002" : (,"2022-04-01") [ERROR (-1004)]: SyntaxError: syntax error near `,"2022-0'
even if prop1 is nullable and with default value,the following insert statement can be executed successfully:
INSERT EDGE test (prop1,prop2) VALUES "1001" ->"1002" : (null,"2022-04-01")