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

Failed import graphml due to 'nan' input string #444

Open
MikeB2019x opened this issue Jun 24, 2023 · 3 comments
Open

Failed import graphml due to 'nan' input string #444

MikeB2019x opened this issue Jun 24, 2023 · 3 comments

Comments

@MikeB2019x
Copy link

MikeB2019x commented Jun 24, 2023

I have been using the following command to import .graphml files in to neo4j

CALL apoc.import.graphml("test.graphml", {readLabels: true, storeNodeIds:true})

Recently I began working with larger files (3GB) derived from larger data tables and started getting this error when trying to import.

Failed to invoke procedure `apoc.import.graphml`: Caused by: java.lang.NumberFormatException: For input string: "nan"

Yes there are <data key=xxx > nan</data> entries in the graphml b/c it was derived from a table with NaN values. Is there a workaround? Note that the import will work if I replace all the nan with no character i.e. <data></data> but that seems an unecessary hack.

I'm am working on creating a small data set but my workflow is:

  1. Import tabular data from postgres db
  2. Create a graph using pandas and networkx (incl. creating a proper 'labels' as a node attribute)
  3. From networkx export a .graphml
  4. Import .graphml in to neo4j with command indicated at beginning

Screenshots

image

Versions

  • OS: Mac Pro M1 w/ Ventrua 13.3.1 (a)
  • Neo4j: 4.4.o (community)
  • Neo4j-Apoc: 4.4.0.1
@gem-neo4j
Copy link
Contributor

Hi, thank you writing in :) I will ticket this, however, we currently have APOC under maintenance mode so cannot say when this would be possible for us to put in, feel free to make a PR yourself for us to review if you want it done faster! Thanks

@MikeB2019x
Copy link
Author

I'm showing my ignorance but what is 'maintenance mode'? Just curious.

@gem-neo4j
Copy link
Contributor

So we are focusing on only fixing bugs and security issues and not adding new functionality atm :)

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

No branches or pull requests

2 participants