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

csv import fails when parse an empty string as a date #2645

Closed
sterin501 opened this issue Mar 17, 2022 · 0 comments · Fixed by #2703
Closed

csv import fails when parse an empty string as a date #2645

sterin501 opened this issue Mar 17, 2022 · 0 comments · Fixed by #2703

Comments

@sterin501
Copy link

Guidelines

apoc.import.csv fails when parse an empty string as a date
But empty string and int process fine the same procedure .

Expected Behavior (Mandatory)

Empty or null date in the csv should import like empty string and empty int

Actual Behavior (Mandatory)

Failed to invoke procedure apoc.import.csv: Caused by: org.neo4j.exceptions.TemporalParseException: Text cannot be parsed to a Date
""
^

How to Reproduce the Problem

Simple Dataset (where it's possibile)

pass.csv

id:ID,:LABEL,str:STRING,int:INT,date:DATE
1,lab,hello,1,2020-01-01
2,lab,world,2,2020-01-01
3,lab,,,2020-01-01

fail.csv

id:ID,:LABEL,str:STRING,int:INT,date:DATE
1,lab,hello,1,2020-01-01
2,lab,world,2,2020-01-01
3,lab,,,

Steps (Mandatory)

1 .CALL apoc.import.csv([{fileName: 'pass.csv', labels:[]}], [], {nullValues: ['']})`
works fine in ignoring the blank strings skipping the attribute creation.

However,
2 . CALL apoc.import.csv([{fileName: 'fail.csv', labels:[]}], [], {nullValues: ['']})
will fail with

Failed to invoke procedure apoc.import.csv: Caused by: org.neo4j.exceptions.TemporalParseException: Text cannot be parsed to a Date
""
^

Screenshots (where it's possibile)

Specifications (Mandatory)

4.4.4

Versions

  • OS:ubuntu
  • Neo4j:4.4.4
  • Neo4j-Apoc:apoc-4.4.0.1-all.jar
vga91 added a commit to vga91/neo4j-apoc-procedures that referenced this issue Apr 5, 2022
Lojjs pushed a commit that referenced this issue Apr 20, 2022
…2703) (#2775)

Co-authored-by: Giuseppe Villani <giuseppe.villani@larus-ba.it>
neo4j-oss-build added a commit that referenced this issue Apr 20, 2022
…2703) (#2775)

Co-authored-by: Giuseppe Villani <giuseppe.villani@larus-ba.it>
Lojjs pushed a commit that referenced this issue Apr 20, 2022
…2703) (#2774) No AUTO

Co-authored-by: Giuseppe Villani <giuseppe.villani@larus-ba.it>
Lojjs pushed a commit that referenced this issue Apr 20, 2022
…2703) (#2775) (#2777) No AUTO

Co-authored-by: Giuseppe Villani <giuseppe.villani@larus-ba.it>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant