vesoft-inc / nebula-importer

Nebula Graph Importer with Go
Apache License 2.0
90 stars 60 forks source link

"sources.edges.filter.expr" doesn't work in nebula-importer-4.0.0 #300

Closed marcus-Tian closed 9 months ago

marcus-Tian commented 10 months ago

I set sources.edges.filter.expr: expr: Record[4] != "" in yaml file, then run nebula-importer. The procedure succeeded with no error or warning, but i checked the data imported into graph, the filter expression didn't work, the record with Record[4]=="" was imported to database.

Linux 3.10.0-1127.18.2.el7.x86_64 nebula-importer-4.0.0 nebulaGraph-3.6.0

Steps to reproduce the behavior:

  1. prepare csv file 《sample.csv》
  2. prepare yaml file 《sample.yaml》
  3. ./bin/nebula-importer --config sample.yaml
  4. searching in studio with command match (n:PERSON)-[e:WORK]->(m:PERSON) where id(n)=="333" return e;

image

referred files: 1、《sample.csv》 sample.csv 2、《sample.yaml》 sample.txt

wey-gu commented 10 months ago

@veezhang could this be related to "" vs NULL?

@marcus-Tian maybe give a try on verifying via non "" like none/null in the expression(not familiar with golang, and am on mobile device to verify it on my own)

veezhang commented 10 months ago

@marcus-Tian Hi, the filter is supported starting from 4.1.0, maybe you need upgrade the nebula-importer. U can download in the releases page. cc @wey-gu

QingZ11 commented 9 months ago

Hi, I have noticed that the issue you created hasn’t been updated for nearly a month, so I have to close it for now. If you have any new updates, you are welcome to reopen this issue anytime.

Thanks a lot for your contribution anyway 😊