nebula-importer icon indicating copy to clipboard operation
nebula-importer copied to clipboard

support default value while import

Open xuhuijun opened this issue 3 years ago • 2 comments

we are migrating data from neo4j to nebula by using csv file. There is one field which type is bool. In neo4j export csv file, the value could be true/false/empty. In such case, importing failed due to nebula reject empty value.

So we need to add default value while filed value is missing. Below is the example we want:

data.csv: 100,true, 101,,

Schema definition: schema: type: vertex vertex: tags: - name: collection props: - name: used type: bool default: false

The second line in data will use default value false and below will load to nebula: 100(true) 101(false)

xuhuijun avatar Apr 15 '21 07:04 xuhuijun

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

:white_check_mark: HarrisChu
:white_check_mark: Aiee
:x: xuhuijun
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Apr 15 '21 07:04 CLAassistant

Thanks @xuhuijun

Could you add some test data in the examples folder to test the feature ?

In addition, don't forget to sign the CLA by click the badge in above comment.

yixinglu avatar Apr 15 '21 07:04 yixinglu

@xuhuijun Thanks!I create an PR #243 to support default value, and thanks again and again.

veezhang avatar Dec 07 '22 08:12 veezhang