I found that we can send a CSV file into Influxdb 2.0, but is the reverse operation possible? How can I export flux database into CSV file in CLI?
Related
I have some csv files which i want to upload on database in mariadb docker container that automatically creates table out of the csv file through python with headers of csv file as column names of table.
I'm trying to read a csv file located in my hdfs filesystem through apoc library in Neo4j with the following line of code"
CALL apoc.load.csv('hdfs://ipAddrress:port/myFileLocation.csv')
I also disabled Neo4j configuration for apoc and enabled importing files through apoc. So i included the following lines in my configuration file:
apoc.import.file.use_neo4j_config=false
apoc.import.file.enabled=true
but i keep getting the following error:
Failed to invoke procedure `apoc.load.csv`: Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.fs.FSDataOutputStream
The dependencies are built into neo4j apoc extension but i don't know why the hadoop-related class can't be found. Any help?
After searching the internet a bit, I found this from Tom Geudens.
At this time that is not possible : CSV files can be stored on the
database server and are then accessible using a file:/// URL.
Alternatively, LOAD CSV also supports accessing CSV files via HTTPS,
HTTP, and FTP.
You may be able to expose your hdfs filesystem over http (and then use
a http:// url) but otherwise ... no.
I have created a graph database within Neo4j Desktop (version 1.1.10) I wish to export that as a Cypher file.
How do I do that? I can't see any command within the app for export a Cypher file.
You can try following the documentation here: Neo4j - Export a (sub)graph to Cypher script and import it again
First, install the apoc procedure library, and add it into the plugins directory.
Second, run Neo4j as an administrator. If not, Neo4j doesn't have permission to write files.
Before starting Neo4j, edit the neo4j.conf file and add this line:
apoc.export.file.enabled=true
Then, start Neo4j, and in the Neo4j browser, execute the following command:
CALL apoc.export.cypher.all("export.cypher",{})
This will store the whole database in the file "export.cypher".
I'm trying to load a CSV file into Neo4j Enterprise edition and I think I'm considering all the rules but I don't understand what is the error related to
this is the error :
this is my csv file . I have entered my data in excel and then saved it as a CSV file :
Copy your CSV file to Neo4j Import Directory. Take a look in Neo4j file locations docs. For windows desktop installations this directory is %APPDATA%\Neo4j Community Edition\import.
Change your import path to 'file:///abc.csv'
Try again.
Im trying to import csv files from disk with cypher commands as shown in the tutorial, but Im getting "Couldn't load the external resourse at: externalResourceFailure.
Is there any "roadmap" for importing csv in windows from files?
Thank you in advance!
take alook at SyntaxException with Neo4j LOAD command
in the question, step 3, please check if you path to the file is correct on your operating system:
the syntax for accessing a local file on windows is simply "file:c:/nosql/test/unclaimed.csv" and not file:// as might be inferred from examples on ...
You have to put the files into the import directory in neo4j.
it will work if path like this "file:///C:/myfile.csv"
The Windows and Linux file systems require different file URI schemes for streaming over HTTP. Neo4j's LOAD CSV Cypher clause makes an HTTP web request to the URI of a file and not the file system path.
For more information on file URI schemes on Windows please take a look at: http://en.wikipedia.org/wiki/File_URI_scheme#Windows_2
You can also create a folder import into your neo4j installation folder and run a cipher like this
LOAD CSV WITH HEADERS FROM "file:///yourcsvfile.csv" AS row
On mac: create a folder inside the Neo4j directory. Neo4j will install in Documents (by default)
mkdir /Users//Documents/Neo4j/default.graphdb/import
Copy your file in this location
Use it like this
USING PERIODIC COMMIT LOAD CSV WITH HEADERS FROM "file:///user_list.csv" as row create (:Users {userId: row.USER_ID });