Load CSV - replace number with commas to dots ( 4,654 ---> 4.654)

(Jeffreylm) #1

Dear Everyone,

Being that I am in europe, the system uses a "," instead on "."
I exported the data from Filemaker pro where in the fields uses commas to denote the decimal points.

How do I go about converting it so that Neo4J can import it? Is the a convert function in Neo4j?
Or is there a website like http://www.convertcsv.com/ that can just convert the decimal character?

Thank you in advance

Kind regards,

(Michael Hunger) #2

You can use toFloat(replace(row.number, ',', '.'))

(Jeffreylm) #3

Hello Michael,

Thank you for that piece of information. It has been added and I am now at the following error.
It has to do with the url of the file on osx. Here is the url I get from terminal: /Volumes/Caldigit/Filemaker/Toys.csv

This gives the following error: Invalid url no protocol

Kind regards,

(Michael Hunger) #4

put the file into the neo4j import directory and then use file:///Toys.csv

(Jeffreylm) #5

Hello Michael,

Thank you for that information. My question is. Do you know any good tutorials covering migrating a relational database with join tables over to Neo4J?

I have a database filled with join tables, and I want to bring it over.

Kind regards,

(Ameyasoft) #6

Create a stored a stored procedure with all table joins. With JDBC connection to your database you can use call apoc.load.jdbc procedure with appropriate connection parameters and add exec stored procedure.

call apoc.load.jdbc('jdbc:sqlserver://localhost:1433;databaseName=vvv;user=bb;password=****','exec [dbo].[spname]')
yield row

I used this method to successfully import data from MS SQL server.

(Michael Hunger) #7

I recommend the neo4j-etl tool for this purpose