Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-23 Thread Paul Damian
Hey, I'm trying to run a command to find out 10 clients and the companies they work for. I've used a query like this: match (c: Client)-[WORKS_FOR]-(co: Company) return c, co limit 10 However, it keeps returning Java heap space error. Neo4j is installed on a vm with windows server 2012R2 Intel

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-23 Thread Michael Hunger
Please start a new thread for this discussion. Am 23.06.2014 um 11:02 schrieb Paul Damian pauldamia...@gmail.com: Hey, I'm trying to run a command to find out 10 clients and the companies they work for. I've used a query like this: match (c: Client)-[WORKS_FOR]-(co: Company) return c, co

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-23 Thread Paul Damian
I did. Do you have any new ideas on the current topic? luni, 23 iunie 2014, 13:22:38 UTC+3, Michael Hunger a scris: Please start a new thread for this discussion. Am 23.06.2014 um 11:02 schrieb Paul Damian paulda...@gmail.com javascript:: Hey, I'm trying to run a command to find out 10

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-18 Thread Paul Damian
I cannot run this command. It returns invalid syntax. Only way I could run it was LOAD CSV WITH HEADERS FROM file:/Users/pauld/Documents/LOCATED_IN.csv AS c MATCH (client: Client { Id: toInt(c.Id)}), (city: City { Id: toInt(c.CityId)}) Return count(*) Limit 100 Also, I think a skype call

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-18 Thread Michael Hunger
sorry LOAD CSV WITH HEADERS FROM file:/Users/pauld/Documents/LOCATED_IN.csv AS c WITH c LIMIT 100 MATCH (client: Client { Id: toInt(c.Id)}), (city: City { Id: toInt(c.CityId)}) Return count(*) Am 18.06.2014 um 11:44 schrieb Paul Damian pauldamia...@gmail.com: I cannot run this command. It

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-18 Thread Paul Damian
It returns 100 miercuri, 18 iunie 2014, 14:20:57 UTC+3, Michael Hunger a scris: sorry LOAD CSV WITH HEADERS FROM file:/Users/pauld/Documents/LOCATED_IN.csv AS c WITH c LIMIT 100 MATCH (client: Client { Id: toInt(c.Id)}), (city: City { Id: toInt(c.CityId)}) Return count(*) Am

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-18 Thread Paul Damian
Hi, I've tried with another file, which contains ClientdId and VerticalId. The thing is, there are only 7 verticals and 11M clients, so there is an obvious one-to-many relationship there. When I run LOAD CSV WITH HEADERS FROM file:/Users/pauld/Documents/Vertical.csv AS c WITH c LIMIT 100 MATCH

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-18 Thread Michael Hunger
For me it sounds as if there is a big cross product happening. I.e. many Verticals with the same Id What happens if you do: MATCH (v:Vertical) RETURN v.Id, count(*) Michael Am 18.06.2014 um 15:26 schrieb Paul Damian pauldamia...@gmail.com: Hi, I've tried with another file, which

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-18 Thread Paul Damian
In the graph I only have one node/vertical v.Idcount(*)21514171113161 but in the model, every client must provide at least one vertical For me it sounds as if there is a big cross product happening. I.e. many Verticals with the same Id What happens if you do: MATCH (v:Vertical) RETURN

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-17 Thread Michael Hunger
if they don't have a value for city id, do they then have empty columns there still? like user-id,, You probably want to filter these rows? LOAD CSV WITH HEADERS FROM file:/Users/pauld/Documents/LOCATED_IN.csv AS c WHERE coalesce(c.CitiId,) ... Am 17.06.2014 um 11:23 schrieb Paul Damian

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-17 Thread Paul Damian
in the file I only have 2 columns, one for client id, which is always not null and CityId, which may be sometimes null. Should I export the records from SQL database leaving out the columns that contain null values? marți, 17 iunie 2014, 15:39:14 UTC+3, Michael Hunger a scris: if they don't

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-17 Thread Michael Hunger
No you can just filter out the lines with no cityid Did you run my suggested commands? LOAD CSV WITH HEADERS FROM file:/Users/pauld/Documents/LOCATED_IN.csv AS c MATCH (client: Client { Id: toInt(c.Id)}) RETURN count(*) LOAD CSV WITH HEADERS FROM file:/Users/pauld/Documents/LOCATED_IN.csv

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-17 Thread Paul Damian
The first query returns 96 which is the number of rows in the file and the second one returns Neo.DatabaseError.Statement.ExecutionFailure probably because of the null values. But then I run the following command: LOAD CSV WITH HEADERS FROM file:/Users/pauld/Documents/LOCATED_IN.csv AS c

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-17 Thread Michael Hunger
Ok, cool and you have the indexes for both :City(Id) and :Client(Id) ? Michael Am 17.06.2014 um 18:15 schrieb Paul Damian pauldamia...@gmail.com: The first query returns 96 which is the number of rows in the file and the second one returns Neo.DatabaseError.Statement.ExecutionFailure

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-17 Thread Paul Damian
Yes, I do. I keep getting Java heap space error now. I'm using 100 commit size. marți, 17 iunie 2014, 19:28:05 UTC+3, Michael Hunger a scris: Ok, cool and you have the indexes for both :City(Id) and :Client(Id) ? Michael Am 17.06.2014 um 18:15 schrieb Paul Damian paulda...@gmail.com

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-16 Thread Michael Hunger
did you create an index on :Client(Id) and :City(Id) what happens if you do: LOAD CSV WITH HEADERS FROM file:/Users/pauld/Documents/LOCATED_IN.csv AS c MATCH (client: Client { Id: toInt(c.Id)}) RETURN count(*) LOAD CSV WITH HEADERS FROM file:/Users/pauld/Documents/LOCATED_IN.csv AS c

[Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-05 Thread Paul Damian
Hi there, I'm experimenting with Neo4j while benchmarking a bunch of NoSQL databases for my graduation paper. I'm using the web interface to populate the database. I've been able to load the smaller tables from my SQL database and LOAD CSV works fine. By small, I mean a few columns (4-5) and

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-05 Thread Michael Hunger
I'd probably use a commit size in your case of 50k or 100k. Try to use the neo4j-shell and not the web-interface. Connect to neo4j using bin/neo4j-shell Then run your commands ending with a semicolon. Just curious: Your data is imported as one node per row? That's not really a graph structure.

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-05 Thread Paul Damian
I've tried using the shell and I get the same results: nodes with no properties. I've created the csv file using MsSQL Server Export. Is it relevant? About you curiosity: I figured I would import first the nodes, then the relationships from the connection tables. Am I doing it wrong? Thanks

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-05 Thread Michael Hunger
Perhaps something with field or line terminators? I assume it blows up the field separation. Try to run: LOAD CSV WITH HEADERS FROM file:/Users/pauld/Documents/Client.csv AS c RETURN { Id: toInt(c.Id), FirstName: c.FirstName, LastName: c.Lastname, Address: c.Address, ZipCode: toInt(c.ZipCode),

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-05 Thread Paul Damian
Well, for all properties it sets null values. The data is read well from the file. Is it ok if I have NULL values in the file? Would that be a problem? joi, 5 iunie 2014, 12:05:18 UTC+3, Michael Hunger a scris: Perhaps something with field or line terminators? I assume it blows up the field

Re: [Neo4j] LOAD CSV creates nodes but does not set properties

2014-06-05 Thread Paul Damian
Also, the properties are not in the same order as in the csv file.. joi, 5 iunie 2014, 12:29:43 UTC+3, Paul Damian a scris: Well, for all properties it sets null values. The data is read well from the file. Is it ok if I have NULL values in the file? Would that be a problem? joi, 5 iunie