Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to import NULL value #168

Closed
yixinglu opened this issue Oct 14, 2021 · 6 comments
Closed

Support to import NULL value #168

yixinglu opened this issue Oct 14, 2021 · 6 comments
Labels
help wanted Extra attention is needed type/feature req Type: feature request

Comments

@yixinglu
Copy link
Contributor

for nullable fields of tag or edge, think about how to import the NULL value in csv file.

@zfanswer
Copy link

+1

@wey-gu wey-gu added the help wanted Extra attention is needed label Apr 1, 2022
@yixinglu
Copy link
Contributor Author

yixinglu commented Apr 2, 2022

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.

@zfanswer
Copy link

zfanswer commented Apr 2, 2022

Thanks for your quick response! Looking forward for the new feature.

@goranc
Copy link

goranc commented Jul 29, 2022

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.

@Sophie-Xie Sophie-Xie added type/feature req Type: feature request and removed feature req labels Nov 29, 2022
@dbacyj
Copy link

dbacyj commented Dec 4, 2022

@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")

@veezhang
Copy link
Contributor

veezhang commented Dec 6, 2022

@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")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed type/feature req Type: feature request
Projects
None yet
Development

No branches or pull requests

7 participants