Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-05-2021 03:17 AM
Dear All:
I'm learning rdf import from Importing RDF Data - Neosemantics ,
when I use: CALL n10s.rdf.import.fetch("https://github.com/neo4j-labs/neosemantics/raw/3.5/docs/rdf/nsmntx.ttl","Turtle"); --it's OK,but I download and import "nsmntx.ttl" locally, it fails:
CALL n10s.rdf.import.fetch("file:///D:nsmntx.ttl","Turtle"); --shows "/E:nsmntx.ttl (No such file or directory)"
then I try: CALL n10s.rdf.import.fetch("file://D:nsmntx.ttl","Turtle"); --shows "Error at index 0 in: "nsmntx.ttl" "
I wonder what went wrong.
Thanks for your help!
05-05-2021 06:40 AM
05-05-2021 06:49 AM
Thank you Koji, but this still doesn't work.
I use neosemantics 4.2.0.0 and neo4j 4.2.4, with http://localhost:7474/browser/.
Can someone else import local ttl files successfully?
05-05-2021 07:32 AM
Hi @joylix
This command works good.
CALL n10s.rdf.import.fetch("file:///C:/Users/koji/nsmntx.ttl","Turtle");
Maybe this one will work.
CALL n10s.rdf.import.fetch("file:///D:/nsmntx.ttl","Turtle");
My Env:
Windows 10 Pro (on Parallels Desktop on macOS)
20H2
Neo4j Desktop 1.4.5
Neo4j 4.2.5
neosemantics 4.2.0.0
05-05-2021 08:28 AM
Hi Koji
My Env is: Windows 10 Pro 20H2, wsl2,
Neo4j 4.2.4
neosemantics 4.2.0.0
But it never worked. I want to try Neo4j 4.2.5 to see if it works
05-05-2021 09:05 AM
My Windows 10 on the macOS Big Sur.
05-06-2021 07:38 AM
I have tried all sorts of things, but I still cannot successfully import local ttl format RDF data. I tried the Neo4j Community versions 4.2.5 and 4.2.6, both under OpenJDK 11 and OpenJDK 14. it's still the same result and error message.
Can someone help me find out what went wrong? Thank you very much!
05-07-2021 04:57 AM
HI joylix,
Pls try this CALL n10s.rdf.import.fetch("file:\\D:\\nsmntx.ttl","Turtle");
It works in my Env
Hope it should work!!!
05-07-2021 07:14 AM
Dear naveenkumar:
I try it, but it still not work
CALL n10s.rdf.import.fetch("file:\D:\nsmntx.ttl","Turtle");
--"\D:\nsmntx.ttl (No such file or directory)"
CALL n10s.rdf.import.fetch("file://D:\nsmntx.ttl","Turtle");
--"Error at index 0 in: "\nsmntx.ttl""
05-09-2021 08:02 PM
Dear joylix
Make sure that your file is in exact directory and try with double slashes the exact format of what i have shared
CALL n10s.rdf.import.fetch("file:\\D:\\nsmntx.ttl","Turtle");
Thanks !!!
05-10-2021 12:08 AM
Dear sir,
I tried a lot of things, including the way you said, but it didn't work .
I'm sure that the file is in exact directory : D:/nsmntx.ttl
when Try:
CALL n10s.rdf.import.fetch("file:\D:\nsmntx.ttl","Turtle");
or CALL n10s.rdf.import.fetch("file:\D:\nsmntx.ttl","Turtle");
It shows--"\D:\nsmntx.ttl (No such file or directory)"
when use: CALL n10s.rdf.import.fetch("file://D:/nsmntx.ttl","Turtle");
or : CALL n10s.rdf.import.fetch("file://D://nsmntx.ttl","Turtle");
It seems the file has been read, but It feed back:
terminationStatus "KO" ; triplesLoaded 0; extraInfo "D"
when use: CALL n10s.rdf.import.fetch("file://D:\nsmntx.ttl","Turtle");
-- "Error at index 0 in: "\nsmntx.ttl""
when use: CALL n10s.rdf.import.fetch("file:///D:/nsmntx.ttl","Turtle");
-- "/D:/nsmntx.ttl (No such file or directory)""
05-10-2021 12:31 AM
Dear joylix ,
You have initialized graph config?
CALL n10s.graphconfig.init();
CREATE CONSTRAINT n10s_unique_uri ON (r:Resource) ASSERT r.uri IS UNIQUE;
and try the function which was able to read
CALL n10s.rdf.import.fetch("file://D://nsmntx.ttl","Turtle");
05-10-2021 06:11 AM
Yes, I do, but as you can see, it still doesn't work.
05-17-2021 02:40 AM
Hi, I'm not a Windows user myself but there's a note in the manual on how to construct urls for local windows files.
I copy it here:
If you’re working on a windows machine and want to access an RDF file stored on your drive, here’s the syntax for paths:
CALL n10s.rdf.import.fetch("file:///D:\\Data\\some_rdf_file.rdf", "RDF/XML");
Hope this helps.
PS: It would be great to hear from windows users on whether this works or alternative syntaxes are preferable. I'd like to add this info to the manual.
JB.
05-17-2021 08:56 AM
So far, I have not been able to import successfully in the Windows 10 WSL2 environment. None of the foregoing methods will do. My WSL2 is using Ubuntu 20.04.2 LTS (GNU/Linux 4.19.104-microsoft standard x86_64)
But I re-uploaded this local file nsmntx.ttl to the file server, then use fetch "http://....nsmntx.ttl " to import, it works well.
10-24-2022 06:35 AM
I am also facing the same issue when trying to load a Turtle file from my file system (using Windows) in Neo4j web console. Tried all possible syntaxes and everything fails (same errors as the original poster)
All the sessions of the conference are now available online