Skip to content

Zero is imported as Null #12

@schwab

Description

@schwab

When importing from csv files where a column has values like 0,1,2,3 etc, the 0 value always imports as a Null into the graph.

`

hash_value rescue_nausea_meds
e9ab6037a25b0fae297751422279084f 2
beeb21285afaf07ea1b557703cbd00dd 1
93964ffcda314d4941908dfd6c6f116c 2
b70c1dfd353a22ddcad8fe5a09953913 1
d820181b209561b370caeaa5b5a88112 1
bb0420cbb067aa764cc686cb9cd06e2d 1
37b473f8cc72b0ff3d229d757a0715d5 0
0fae0f1578fd4d48f9c2d06b4ea14c51 0
6300351ca9b19e1bc9eddfb9f961de9d 0
425a7c5efa8ef22a6b90b4568d20fb3e 0
0f86ca97659d942fe5d22ab096c7a1f5 0
c62df49732032e95cb0baeeef390998d 0
850197a09e64129f28108f187d692a96 0

`

Results in:

graph.query graph:ortho "MATCH (f:fact_ortho) WHERE f.hash_value='37b473f8cc72b0ff3d229d757a0715d5' RETURN   distinct f.hash_value, f.rescue_nausea_meds limit 10"
1) ["f.hash_value","f.rescue_nausea_meds"]
2) [["37b473f8cc72b0ff3d229d757a0715d5",null]]
3) ["Query internal execution time: 7.162228 milliseconds"]

We can also see that all the rows with 0 were imported that way...

graph.query graph:ortho "MATCH (f:fact_ortho) RETURN   distinct f.rescue_nausea_meds, count(f) limit 10"
1) ["f.rescue_nausea_meds","count(f)"]
2) [["1",504],["2",86],["3",3],[null,7363]]
3) ["Query internal execution time: 8.976518 milliseconds"]

This happens with multiple columns. How can we force the build insert to store real zeros?

Note: This bug is adversely affecting math operations as well. For instance queries with filters like "WHERE x.value < 1 RETURN count x" return no records even when the are 0 values since they are all set to null.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions