Construct Edge Properties Graph in Stardog

According to this blog:

https://www.stardog.com/blog/property-graphs-meet-stardog/

May I know how to construct edge properties graph like the picture in this blog?
I constructed the example of the manual in stardog but it split into a new node [object object].

Thank you.

Sorry about the trouble here. Can you please post a screenshot of Studio (with the query and the results) so that we can better diagnose this?

Thanks,
Jason

My Turtle file:
:Pete a { :since 2010 ; :until 2018} :Engineer ;
:worksAt { :source :HR } :Stardog

My query:
CONSTRUCT {
?emp :worksAt ?org.
<< ?emp :worksAt ?org >> :source :HR
}
WHERE {
?emp a :Engineer ;
:worksAt ?org
}

Sorry I can't post the pictures because it shows the error below:
"Sorry, there was an error uploading that file. Please try again"

Thanks.

It looks like I get the following error when I try to add

:Pete a { :since 2010 ; until 2018} :Engineer ;
:worksAt { :source :HR } :Stardog

There was a fatal failure during preparation of 52bc5871-29de-464e-9b8c-900fb0235b9a com.stardog.stark.io.InvalidRDF: Nested edge properties are not allowed [L1]

and the following stacktrace in the logs

This is with Stardog 7.1.2 with the option edge.properties=true enabled

I get the same error if I just try to load

:Pete :worksAt { :source :HR } :Stardog

or if I use the alternative syntax

<< :Pete a :Engineer >>         :since  2010 .
<< :Pete :worksAt :Stardog >>   :source :HR .

Stacktrace:

WARN  2020-02-11 16:36:49,017 [stardog-user-2] com.complexible.common.rdf.rio.RDFStreamProcessor:setException(599): Error during loading /opt/stardog-7.1.2/test.ttl: Nested edge properties are not allowed [L1]
WARN  2020-02-11 16:36:49,018 [stardog-user-2] com.complexible.common.rdf.rio.RDFStreamProcessor:setException(606): Parse process creator: 
java.lang.Exception: null
	at com.complexible.common.rdf.rio.RDFStreamProcessor.<init>(RDFStreamProcessor.java:137) ~[stardog-utils-rdf-7.1.2.jar:?]
	at com.complexible.common.rdf.rio.RDFStreamProcessor.create(RDFStreamProcessor.java:113) ~[stardog-utils-rdf-7.1.2.jar:?]
	at com.complexible.stardog.index.BaseIndexWriterDataMap.update(BaseIndexWriterDataMap.java:100) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.index.BaseIndexWriterDataMap.add(BaseIndexWriterDataMap.java:70) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.index.BaseIndexWriter.add(BaseIndexWriter.java:117) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.index.Indexes.add(Indexes.java:379) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl$IndexResourceTransaction.apply(ConnectableIndexRWConnectionImpl.java:656) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl.apply(ConnectableIndexRWConnectionImpl.java:379) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.ConnectableConnectionCollection.apply(ConnectableConnectionCollection.java:194) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DatabaseConnectionImpl.apply(DatabaseConnectionImpl.java:770) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DatabaseConnectionImpl.add(DatabaseConnectionImpl.java:801) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DelegatingDatabaseConnection.add(DelegatingDatabaseConnection.java:223) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DatabaseImpl$DBConnectionWrapper.add(DatabaseImpl.java:1329) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DelegatingDatabaseConnection.add(DelegatingDatabaseConnection.java:223) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.StardogKernel$KernelDbConnection.add(StardogKernel.java:3358) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DelegatingDatabaseConnection.add(DelegatingDatabaseConnection.java:223) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.StardogKernel$NotifyingDatabaseConnection.add(StardogKernel.java:3455) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.TransactionService.lambda$null$2(TransactionService.java:175) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:419) ~[?:1.8.0_232]
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647) ~[?:1.8.0_232]
	at com.complexible.stardog.protocols.http.server.TransactionService.lambda$processUpdate$3(TransactionService.java:175) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:206) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:171) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.TransactionService.add(TransactionService.java:157) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.3.0.jar:1.3.0]
	at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.3.0.jar:1.3.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
ERROR 2020-02-11 16:36:49,018 [stardog-user-2] com.complexible.tx.api.impl.DefaultTransaction:computePrepareResult(471): There was a fatal failure during preparation of 464eaf62-7785-4c75-9beb-4d8fcb3aede0
java.lang.RuntimeException: com.stardog.stark.io.InvalidRDF: Nested edge properties are not allowed [L1]
	at com.complexible.stardog.index.BaseIndexWriterDataMap.waitForUpdates(BaseIndexWriterDataMap.java:151) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.index.BaseIndexWriter.sync(BaseIndexWriter.java:126) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl$IndexResourceTransaction.prepare(ConnectableIndexRWConnectionImpl.java:551) ~[stardog-7.1.2.jar:?]
	at com.complexible.tx.api.BaseResourceTransaction.prepare(BaseResourceTransaction.java:158) ~[stardog-7.1.2.jar:?]
	at com.complexible.tx.api.impl.DefaultTransaction.computePrepareResult(DefaultTransaction.java:455) ~[stardog-7.1.2.jar:?]
	at com.complexible.tx.api.impl.DefaultTransaction.runPreparePhase(DefaultTransaction.java:422) ~[stardog-7.1.2.jar:?]
	at com.complexible.tx.api.impl.DefaultTransaction.commit(DefaultTransaction.java:308) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DatabaseConnectionImpl.commit(DatabaseConnectionImpl.java:498) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DatabaseImpl$MonitoredDbConnection.commit(DatabaseImpl.java:1674) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DatabaseImpl$DBConnectionWrapper.commit(DatabaseImpl.java:1432) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.StardogKernel$KernelDbConnection.commit(StardogKernel.java:3298) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.StardogKernel$NotifyingDatabaseConnection.commit(StardogKernel.java:3567) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeCommit(ProtocolUtils.java:686) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:210) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:171) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.TransactionService.add(TransactionService.java:157) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.3.0.jar:1.3.0]
	at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.3.0.jar:1.3.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
Caused by: com.stardog.stark.io.InvalidRDF: Nested edge properties are not allowed [L1]
	at com.stardog.stark.io.ParserContext.error(ParserContext.java:231) ~[stardog-stark-io-api-7.1.2.jar:?]
	at com.stardog.stark.io.ParserContext.error(ParserContext.java:219) ~[stardog-stark-io-api-7.1.2.jar:?]
	at com.stardog.stark.io.turtle.TurtleParser.parsePredicateWithEdgeProperties(TurtleParser.java:277) ~[stardog-stark-io-turtle-7.1.2.jar:?]
	at com.stardog.stark.io.turtle.TurtleParser.parsePredicateObjectList(TurtleParser.java:244) ~[stardog-stark-io-turtle-7.1.2.jar:?]
	at com.stardog.stark.io.trig.TrigParser.parseGraph(TrigParser.java:184) ~[stardog-stark-io-trig-7.1.2.jar:?]
	at com.stardog.stark.io.trig.TrigParser.parseStatement(TrigParser.java:71) ~[stardog-stark-io-trig-7.1.2.jar:?]
	at com.stardog.stark.io.turtle.TurtleParser.parse(TurtleParser.java:110) ~[stardog-stark-io-turtle-7.1.2.jar:?]
	at com.complexible.common.rdf.rio.RDFStreamBuilder$RDFAbstractStream.parse(RDFStreamBuilder.java:300) ~[stardog-utils-rdf-7.1.2.jar:?]
	at com.complexible.common.rdf.rio.RDFStreamBuilder$RDFAbstractStream.parse(RDFStreamBuilder.java:260) ~[stardog-utils-rdf-7.1.2.jar:?]
	at com.complexible.common.rdf.rio.DelegatingRDFStream.parse(DelegatingRDFStream.java:28) ~[stardog-utils-rdf-7.1.2.jar:?]
	at com.complexible.stardog.db.EmbeddedRDFStream.parse(EmbeddedRDFStream.java:35) ~[stardog-7.1.2.jar:?]
	at com.complexible.common.rdf.rio.RDFStreamProcessor$ConcurrentLoadManagerImpl.add(RDFStreamProcessor.java:504) ~[stardog-utils-rdf-7.1.2.jar:?]
	at com.complexible.common.rdf.rio.RDFStreamProcessor.add(RDFStreamProcessor.java:216) ~[stardog-utils-rdf-7.1.2.jar:?]
	at com.complexible.stardog.index.BaseIndexWriterDataMap.update(BaseIndexWriterDataMap.java:132) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.index.BaseIndexWriterDataMap.add(BaseIndexWriterDataMap.java:70) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.index.BaseIndexWriter.add(BaseIndexWriter.java:117) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.index.Indexes.add(Indexes.java:379) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl$IndexResourceTransaction.apply(ConnectableIndexRWConnectionImpl.java:656) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl.apply(ConnectableIndexRWConnectionImpl.java:379) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.ConnectableConnectionCollection.apply(ConnectableConnectionCollection.java:194) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DatabaseConnectionImpl.apply(DatabaseConnectionImpl.java:770) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DatabaseConnectionImpl.add(DatabaseConnectionImpl.java:801) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DelegatingDatabaseConnection.add(DelegatingDatabaseConnection.java:223) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DatabaseImpl$DBConnectionWrapper.add(DatabaseImpl.java:1329) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DelegatingDatabaseConnection.add(DelegatingDatabaseConnection.java:223) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.StardogKernel$KernelDbConnection.add(StardogKernel.java:3358) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DelegatingDatabaseConnection.add(DelegatingDatabaseConnection.java:223) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.StardogKernel$NotifyingDatabaseConnection.add(StardogKernel.java:3455) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.TransactionService.lambda$null$2(TransactionService.java:175) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:419) ~[?:1.8.0_232]
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647) ~[?:1.8.0_232]
	at com.complexible.stardog.protocols.http.server.TransactionService.lambda$processUpdate$3(TransactionService.java:175) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:206) ~[stardog-protocols-http-server-7.1.2.jar:?]
	... 8 more
ERROR 2020-02-11 16:36:49,019 [stardog-user-2] com.complexible.stardog.db.DatabaseConnectionImpl:commit(509): There was an error committing the transaction, all changes were rolled back successfully
com.complexible.tx.api.HeuristicRollbackException: There was a fatal failure during preparation of 464eaf62-7785-4c75-9beb-4d8fcb3aede0 com.stardog.stark.io.InvalidRDF: Nested edge properties are not allowed [L1]
	at com.complexible.tx.api.impl.DefaultTransaction.runPreparePhase(DefaultTransaction.java:426) ~[stardog-7.1.2.jar:?]
	at com.complexible.tx.api.impl.DefaultTransaction.commit(DefaultTransaction.java:308) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DatabaseConnectionImpl.commit(DatabaseConnectionImpl.java:498) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DatabaseImpl$MonitoredDbConnection.commit(DatabaseImpl.java:1674) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DatabaseImpl$DBConnectionWrapper.commit(DatabaseImpl.java:1432) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.StardogKernel$KernelDbConnection.commit(StardogKernel.java:3298) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.StardogKernel$NotifyingDatabaseConnection.commit(StardogKernel.java:3567) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeCommit(ProtocolUtils.java:686) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:210) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:171) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.TransactionService.add(TransactionService.java:157) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.3.0.jar:1.3.0]
	at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.3.0.jar:1.3.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
WARN  2020-02-11 16:36:49,020 [stardog-user-2] com.complexible.stardog.protocols.http.server.StardogUndertowErrorHandler:accept(61): Unexpected exception was handled by the server
com.complexible.tx.api.HeuristicRollbackException: There was a fatal failure during preparation of 464eaf62-7785-4c75-9beb-4d8fcb3aede0 com.stardog.stark.io.InvalidRDF: Nested edge properties are not allowed [L1]
	at com.complexible.tx.api.impl.DefaultTransaction.runPreparePhase(DefaultTransaction.java:426) ~[stardog-7.1.2.jar:?]
	at com.complexible.tx.api.impl.DefaultTransaction.commit(DefaultTransaction.java:308) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DatabaseConnectionImpl.commit(DatabaseConnectionImpl.java:498) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DatabaseImpl$MonitoredDbConnection.commit(DatabaseImpl.java:1674) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DatabaseImpl$DBConnectionWrapper.commit(DatabaseImpl.java:1432) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.StardogKernel$KernelDbConnection.commit(StardogKernel.java:3298) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.StardogKernel$NotifyingDatabaseConnection.commit(StardogKernel.java:3567) ~[stardog-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeCommit(ProtocolUtils.java:686) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:210) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:171) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at com.complexible.stardog.protocols.http.server.TransactionService.add(TransactionService.java:157) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.1.2.jar:?]
	at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.3.0.jar:1.3.0]
	at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.3.0.jar:1.3.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]

You can add the data successfully with sparql

INSERT DATA {

<< :Pete a :Engineer >>         :since  2010 .
<< :Pete :worksAt :Stardog >>   :source :HR .
}

and

INSERT DATA {
:Pete   a { :since 2010 ; :until 2018}   :Engineer ;
		:worksAt { :source :HR }        :Stardog

NOTE: the docs have a missing semicolon before "until" so you'll get a syntax error if you copy/pasted it from there

:Pete   a { :since 2010 ; until 2018}   :Engineer ;

It's not actually turtle so I'm not sure if Stardog just handles it or if you need to tell it it's ttl* when you load it.

Hi Zach,

There's no need for "ttl*", the standard Turtle and Trig extensions will do.

Re: the error, turns out you need the closing .. We will fix this. Adding

:Pete a { :since 2010 ; :until 2018} :Engineer ;
:worksAt { :source :HR } :Stardog .

works for me. Also

<< :Pete a :Engineer >>         :since  2010 .
<< :Pete :worksAt :Stardog >>   :source :HR .

does.

Cheers,
Pavel

I could have sworn I noticed the missing '.' and tried it with and without it but I'll double check.

I have the following in a file called test.ttl

<< :Pete a :Engineer >>         :since  2010 .
<< :Pete :worksAt :Stardog >>   :source :HR .

and try to add it with

stardog data add test test.ttl

I get the following error

There was a fatal failure during preparation of 791d39f4-ae3b-4a32-84b1-7a48957822e1 com.stardog.stark.io.InvalidRDF: Nested embedded statements are not supported: (<< (<< (http://api.stardog.com/Pete http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://api.stardog.com/Engineer) >> http://api.stardog.com/since "2010"^^<http://www.w3.org/2001/XMLSchema#integer>) >> http://api.stardog.com/since "2010"^^<http://www.w3.org/2001/XMLSchema#integer>)

If I change it to

:Pete a { :since 2010 ; until 2018} :Engineer ;
:worksAt { :source :HR } :Stardog .

and add with

stardog data add test test.ttl

I get

Adding data from file: test.ttl
There was a fatal failure during preparation of e8c56c20-776a-43cc-981a-f7b249ea3dae com.stardog.stark.io.InvalidRDF: Nested edge properties are not allowed [L1]

Zach, you're right, the . was a red herring. The real issue is rather technical but if you restart the server, you should be able to load that snipper (regardless of it using the Stardog EP syntax or not). Just make sure you fix :until. Let us know otherwise.

We will fix this in the March release.

Thanks,
Pavel

HI,
Can you please help me solve the problem of constructing edge properties?
I want to construct edge properties graph like the picture in this blog below:
https://www.stardog.com/blog/property-graphs-meet-stardog/

My Turtle file:
:Pete a { :since 2010 ; :until 2018} :Engineer ;
:worksAt { :source :HR } :Stardog

My query:
CONSTRUCT {
?emp :worksAt ?org.
<< ?emp :worksAt ?org >> :source :HR
}
WHERE {
?emp a :Engineer ;
:worksAt ?org
}

Thanks.

Your data and query are syntactically valid. Just restart the server to avoid the parsing issue Zach hit earlier in this thread.

I added your file with the stardog data add command to a database created with the -o edge.properties=true option. Then I connected Studio, ran your CONSTRUCT query and clicked on the "Visual" button in the results. I'm attaching the resulting image.

Cheers,
Pavel

Sorry I can't post picture because it shows the error below:
"Sorry, there was an error uploading that file. Please try again"

My result will create a new node called [object object], so there are two triples:

  1. :Pete :worksAt :Stardog
  2. [object object] :source :HR

Why are there different results with same query?

Thanks

What version of Studio do you use? What results do you get if you run the query from the console, i.e. using the stardog query {db name} {path to query file}?

Best,
Pavel

I use Stardog studio 7.1.1.

My query:
select *
where{
?s ?p ?o
}

Result:
s p o
:Pete rdf:type :Engineer
:Pete :worksAt :Stardog
:source :HR
:since 2010
:until 2018

No, I mean the version of Stardog Studio, i.e. the front-end app, not the version of Stardog. You can see it in the top menu: Stardog Studio -> About Stardog Studio. I suspect you may need to update it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.