jexp / neo4j-shell-tools

A bunch of import/export tools for the neo4j-shell
288 stars 55 forks source link

export-cypher large integers have commas #80

Open rotten opened 8 years ago

rotten commented 8 years ago

When I run export-cypher, if I have an integer property on a node, and it has a large value, the export adds commas (such as the UTC timestamp below):

`utc_timestamp`:1,445,255,430,

This makes the resulting cypher file unexecutable. It should output:

`utc_timestamp`:1445255430,

Is there an easy work-around?

jexp commented 8 years ago

Should be fixed please check

rotten commented 8 years ago

I can confirm it is fixed, thanks! Sorry I didn't response sooner. I got pulled away for another more urgent task for a day or two.

rotten commented 8 years ago

I spoke too soon. :-( In my development environment it worked. I deployed neo4j-shell-tools to my production environment and one of the large integers was comma-free, but the other one still had commas.

From the first line of the cypher export:

CREATE (:myLabel{some_id:2,node_type:"something",another_id:14,unique_id:"440ae455-90a1-11e5-8e06-060bf5e2472f",some_time_utc:1,445,255,430,lastupdate_ts:1455639262926,load_time:"2016-01-26T15:16:54.542713+00:00",some_time_string:"2015-10-19 11:50:30 -00:00"});

These were the jars that deployed:

-rw-r--r-- 1 neo4j neo4j 19827 Feb 23 23:24 opencsv-2.3.jar -rw-r--r-- 1 neo4j neo4j 305569 Feb 23 23:24 mapdb-0.9.3.jar -rw-r--r-- 1 neo4j neo4j 106886 Feb 23 23:24 import-tools-2.3.2.jar -rw-r--r-- 1 neo4j neo4j 19615 Feb 23 23:24 geoff-0.5.0.jar

jexp commented 8 years ago

I don't see the commas

Von meinem iPhone gesendet

Am 26.02.2016 um 15:28 schrieb Rick Otten notifications@github.com:

I spoke too soon. :-( In my development environment it worked. I deployed neo4j-shell-tools to my production environment and one of the large integers was comma-free, but the other one still had commas.

From the first line of the cypher export:

CREATE (:myLabel{some_id:2,node_type:"something",another_id:14,unique_id:"440ae455-90a1-11e5-8e06-060bf5e2472f",some_time_utc:1,445,255,430,lastupdate_ts:1455639262926,load_time:"2016-01-26T15:16:54.542713+00:00",some_time_string:"2015-10-19 11:50:30 -00:00"});

These were the jars that deployed:

-rw-r--r-- 1 neo4j neo4j 19827 Feb 23 23:24 opencsv-2.3.jar -rw-r--r-- 1 neo4j neo4j 305569 Feb 23 23:24 mapdb-0.9.3.jar -rw-r--r-- 1 neo4j neo4j 106886 Feb 23 23:24 import-tools-2.3.2.jar -rw-r--r-- 1 neo4j neo4j 19615 Feb 23 23:24 geoff-0.5.0.jar

— Reply to this email directly or view it on GitHub.

rotten commented 8 years ago

The some_time_utc property has them. The lastupdate_ts does not.

rotten commented 8 years ago

It is possible the lastupdate_ts is a 'float' and some_time_utc is an integer. export-cypher didn't export them with double-quotes, so I'm pretty sure neither is a string.

robyinno commented 8 years ago

I have the problem of a numeric property that the import-graphml restore as string.

I have in graphml backup file <data key="relevant">1</data> done with export-graphml -t -r -o I restore with import-graphml -i ${PATH_FILE_BKP} -t and in neo4j I see: "relevant": "1",

robyinno commented 8 years ago

_Now numeric work perfectly thanks you! _ for us is fixed!

jexp commented 8 years ago

Is that an arry on the node?

robyinno commented 8 years ago

Yes it's a an array of string.

2016-03-30 13:54 GMT+02:00 Michael Hunger notifications@github.com:

Is that an arry on the node?

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/jexp/neo4j-shell-tools/issues/80#issuecomment-203395879

robyinno commented 8 years ago

We have a int property called num that in the <data key="num">1</data> and we don't see in the exported graphml the initial definition like for another int property <key id="relevant" for="node" attr.name="relevant" attr.type="int"/> that means that on the restore it restore a string for the num property

Look like that "num" is not a welcome name for a _node property _