Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-06-2019 05:02 AM
Please keep the following things in mind:
Please format code + Cypher statements with the code </>
icon, it's much easier to read.
Please provide the following information if you ran into a more serious issue:
PROFILE
or EXPLAIN
with boxes expanded (lower right corner)09-09-2019 03:37 PM
You forgot to put actual content into your question.
Please do that, and share what you want to do and what you've tried so far as well as any context.
09-10-2019 02:16 AM
I am new to neo4j and l have a Microsoft access database that l am trying to import to neo4j. I am struggling with how k should proceed
09-10-2019 03:25 AM
Access is interesting. Can you dump it to CSV files which then can be easily imported?
You might want to try out the Neo4j-ETL tool with a JDBC driver for access but I haven't tried that myself.
Using something like this: https://www.easysoft.com/applications/microsoft-access/jdbc-odbc.html
09-12-2019 06:25 AM
I have dumped the data into CSV and tried to import it that way. However, l am on a Mac and the LOAD CSV command does not work, l am getting an error message, “command not found". Brew install and changing the Path to the Neo4j bin directory does not work.
Is this an error you have encountered before, if so, how can this be resolved.
Regards
09-12-2019 10:28 AM
LOAD CSV
command not found? LOAD CSV
is a cypher statement https://neo4j.com/docs/cypher-manual/3.5/clauses/load-csv/ . You need to run a LOAD CSV
at a cypher prompt, for example thru bin/cypher-shell or through the browser.
10-18-2019 08:04 AM
I am have imported two separate CSV files into Neo4j, however, when I try to create edges between the nodes, these are not showing when when I run the CALL db.schema; command. Is there a reason why I would fail to create edges between nodes that have been imported from two CSV sheets?
Also, is it advisable to create dates nodes within Neo4j, if so, what is the best way to do this?
10-18-2019 10:03 AM
Call db.schema
samples the database. This sample may/may not include said relationships
If you run match (n)-[r]-(n2) return n,r,n2;
does this show the edges.
Note you may want to qualify n
and n2
by including a label
10-27-2019 05:41 AM
Hi, I have imported some date into neo4j using the following:
LOAD CSV WITH HEADERS FROM "file:///tblDataPlant.csv" AS row
WITH row, SPLIT(row.Date,"-") AS date
CREATE (collector:Collector {name: UPPER(row. Collector), location: UPPER(row.Location), date:(row.Date)})
SET collector += apoc.map.clean(row, ['Location' , 'County', 'Latitude' , 'Longitude'], [])
CREATE (site:Site {name: coalesce(row.Location, ' '), county: coalesce(row.County, ''), location: point({latitude:toFloat(row.Latitude), longitude: toFloat(row.Longitude)})})
SET site.year = TOINT(date[0]),
site.month = TOINT(date[2]),
site.day = TOINT(date[1])
SET site += apoc.map.clean(row, ['Location','County', 'Latitude','Longitude'], [])
CREATE (collector)- [:VISITED]->(site)
However, we I try to run the following command:
MATCH (c:Collector)
WHERE Date('1826-05-17') < c.Date < Date('1827-04-23')
RETURN (c)
I am not getting any result, it is saying (no changes, no records) even though I can see that there are collectors with this date. Where could I be getting it wrong.
Also, do you do one to one telephone/face to face sessions where someone has multiple questions?
10-27-2019 01:37 PM
the LOAD CSV
defines a property named date
for nodes with a label of :Collector. and as evidence
CREATE (collector:Collector {name: UPPER(row. Collector), location: UPPER(row.Location), date:(row.Date)})
However your MATCH and WHERE clause is on a property named Date
, as evidence
WHERE Date('1826-05-17') < c.Date < Date('1827-04-23')
change the WHERE clause to
WHERE Date('1826-05-17') < c.date < Date('1827-04-23')
10-27-2019 02:34 PM
Even after changing the the WHERE clause to the following does not resolve the issue, it is still coming up with (no changes, no records)
MATCH (c:Collector)
WHERE Date('1826-05-17') < c.date < Date('1827-04-23')
RETURN (c)
10-28-2019 04:40 AM
can you return the results of
MATCH (c:Collector)
RETURN c.name, c.location,c.date,id(c) limit 10;
to which this will return 10 nodes with a label named :Collector and return the nodes name
, location
, date
and internal id properties
10-29-2019 03:44 AM
When I return the results for
MATCH (c:Collector)
RETURN c.name, c.location,c.date,id(c) limit 10;
All the dates are coming back as NULL, could this be a suggestion that there is something wrong with the way I have imported the date?
10-29-2019 04:22 AM
oh... interesting. but
I am not getting any result, it is saying (no changes, no records) even though I can see that there are collectors with this date. Where could I be getting it wrong.
where were you seeing collectors with dates?
10-29-2019 04:32 AM
10-29-2019 04:34 AM
10-29-2019 04:34 AM
I have attached examples of the screenshots showing where I could see the dates, but the query returns no results
10-29-2019 06:39 AM
your example of
where DATE("1827") < c.data < Date("1827") ...... ....
DATE("1827") produces a value of 1827-01-01
. and the where cause would suggest the properties date
property is greater than 1827-01-01
and also less than 1827-01-01
so I would expect this would yield no results. No??
but further I suspect this is a matter of type conversions. If you run
match (n:Collector) where Date("1827-06-25") < Date(n.date) < Date("1827-06-28") return n;
do you get a result for JENYNS, LEONARD
11-08-2019 06:53 AM
I am loading some data using csv, I am parsing one of the columns as a date. I have some "na" within the data column and I am getting a message which says, " Text cannot be parsed to a Date
"na". How can I ignore these during the loading process? I have a similar problems with NULLS and I used the following the statement which worked
"WITH line WHERE not line.Date IS NULL", what would be an equivalent statement for n/a? I tried WITH line WHERE not line.Date IS "na' and it did not work
^
11-08-2019 10:16 AM
are you suggesting your load csv file has data similar to
Collector, Locations, Date
collector-A, locationA, 2019-08-01
collector-A, locationA,
collector-A, locationA, n/a
and line 3 has a NULL for the Date property and line 4 has a value of n/a
for the Date Property?
What is the expectation for line 3 and line 4. They not get loaded into Neo4j? they get loaded but the Date
property be undefined?
11-10-2019 10:55 AM
I have another problem which has reared it's ugly head. Date column has dates of different lengths i.e. in some cases just the year e.g. 1836, in others year and month i.e. 1984/02 and yet in others the year, month and day i.e. 1836/03/09. I when merching my USER, one of the attributes I am adding is the date i.e MERGE (user:User {id:row.usr_id), date:date(row.date)}) and I am getting an error message that says ""Text cannot be parsed to a Date "1826/09"""". How best can I resolve the issue? is there a way YYYY/MM can be parsed as a date? the same issue occurs if I use CREATE instead of MERGE
thanks in advance?
11-11-2019 04:15 AM
I think this comes down to having inconsistent data representing a date
. Typically a date includes date, month and year. For 1836
this simply is a number. If we were to convert to a date, even if we could, how would it be represented as a year, month, day? Is this thus January 1 or 1836? The same for 1826/09. Is that the 9th month of 1826? If so then what day of the 9th month of 1826? If not the 9th month is it 9th the day?
If this 'date' is coming from some table.column in Access how does Access interpret 1826
???
11-25-2019 05:44 AM
Hi there, I am back again. I have a Cypher query that I am using and it is as follows:
MATCH (c:Collector),(s:Site)
with c,s
WHERE NOT c.name IS NULL,
WHERE NOT s.name IS NULL,
AND c.year =s.year AND c.month = s.month,
RETURN DISTINCT(c.name), s.name, c.month, c.year, s.year
This query is meant to show me collectors that were collecting from the same site at the same time, i.e. same month and year.I am trying to exclude NULLS and NA from the results, how best can I structure the query as this is giving me error.
Also, is it possible to have a variant of the query to have a look at people collecting at the same location but a year apart, how would I change the query to achieve these results?
11-25-2019 05:48 AM
it might be best to start a new thread/question as if not mistaken the initial problem and as the subject describes of Novice trying to import access database on MacOS
is now solved? correct?
All the sessions of the conference are now available online