cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Novice trying to import access database on Mac Os

Please keep the following things in mind:

  1. did you search for what you want to ask before posting?
  2. please use tags for additional info
  3. use a self-descriptive title

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:

  • neo4j version, desktop version, browser version
  • what kind of API / driver do you use
  • screenshot of PROFILE or EXPLAIN with boxes expanded (lower right corner)
  • a sample of the data you want to import
  • which plugins / extensions / procedures do you use
  • neo4j.log and debug.log
23 REPLIES 23

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.

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

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

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

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.

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?

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

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?

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')

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)

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

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?

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?

I have attached examples of the screenshots showing where I could see the dates, but the query returns no results

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

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
^

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?

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?

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 ???

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?

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?