Gremlins 3.4.1 not working

(Serge Colle) #1

Gremlin console 3.4.1 is not working. I found a post on another site http://blog.techotom.com/2017/12/18/stardog-plugin-and-gremlin-console-not-working.html which mention that it will work with gremlin console 3.0.2.

So my question is, where can I find gremlin console 3.0.2 (link in post broken and my google search failed) and is the gremlin support deprecated.

Also I know this is a long shot, but if not deprecated, any plan to release a gremlins tutorials similarly to the SPARQL tutorial (which by the way I wish I had when I started learning SPARQL :slight_smile: )

(zachary.whitley) #2

There was a previous post that mentioned that gremlin was no longer a priority feature. I’ll have to find the link. I think the reasoning was that using the newer paths feature was the preferred way to do these types of queries.

You’ll have to be careful about the exact version. You’ll have to poke around the gremlin website to find them.

(Serge Colle) #3

ok, the reason I am looking at gremlins is the following

  • traversing the nodes without falling into an infinite loop
  • another POC is being done on a gremlin database and I would like to better understand the gremlin syntax.

For the former, I suspect that my PATHS query is falling into an infinite loop coming back onto itself. I was told that in gremlin you could limit the number of time a node is visited in your query,

Will try to find the 3.0.2 version.

(Pavel Klinov) #4

PATHS queries do cycle elimination and should not get into infinite loops. We haven't seen that issue yet. We'd appreciate a test case if you believe it's the case.

We do not recommend to use Gremlin with Stardog and it's not been decided whether it'd be supported in Stardog 7 or not.

Best,
Pavel

(Serge Colle) #5

Thanks, on a slightly different note. Is there a way to pass the PATHS result to a select, similarly to a subselect, something like the following

SELECT ?name {
    ?x asset:name ?name .
    {
        PATHS START ?x=asset:NRMS_CABLE_5467926 END ?y=asset:NRMS_CIRCUIT_335499931 via  asset:consistsOf|asset:partOf|asset:carrierFor
    }
}

-Serge

(Pavel Klinov) #6

No, but this is a very good question and it's on the roadmap. This isn't an easy change because PATHS result sets cannot be represented as SPARQL solutions (i.e. binding sets which represent intermediate results in SPARQL for algebraic operations like joins and filters). We had a blog post about that a while ago but haven't yet had time to finish the work: https://www.stardog.com/blog/extending-the-solution/

Cheers,
Pavel

(zachary.whitley) #7

Just to follow up on my post here is the thread mentioning the status of gremlin. It says the same thing that @pavel reiterated in his reply but I'll add it just for completeness. Stardog with gremlin console

And you can find the old versions of tinker pop here under the "Archived Releases" pull down.

(Serge Colle) #8

After some investigation it does not seem like it an infinite loop but rather than the result is return in a bad format. Nothing in the log. To reproduce use this query:

PATHS 
  START ?x=<tag:stardog:api:obf:253ea5d397bc3040155c298b670e8bfd5080209cf63977ab08cbcda88b277d39>
  END ?y#=<tag:stardog:api:obf:b21dd7f39d5500feec43b352bdb0363ae1712eab6ab337cad9f9f1d60907fae3> 
  VIA <tag:stardog:api:obf:b2fa11e4d2b171a0f3282210ca5d25fd1d671ece42e85f7eda0298768d00129e>|<tag:stardog:api:obf:8a5b55a5f68ba0347981fde5a86944ac2286f2209e95aed7d478bfac2bc9a1ea>|<tag:stardog:api:obf:81e644c807657c46893e7bc4235c3d0b7f595311add951bd8d73d51471a6404f>

I do have the obfuscate data to match this query, but not sure how to send to you guys since it too big (5.7M) to post here.

FYI: stardog query obfscuate does not work well with PATHS queries.

FYI2: would be nice to have a simple button in Stardog studio to create a data with an obscuated copy and same for the query.

(Pavel Klinov) #9

Thanks, Serge, we're aware of the obfuscation issue for paths and it's already fixed in the dev branch. Should come out next week or so.

You can send the data to me off list, 5.7M is OK for email (first name at stardog).

Thanks,
Pavel

(Serge Colle) #10

Also should OPTIONAL work in a path query? I get QueryEval: null when I try. Attach is the stacktrace
stack.zip (1.5 KB)

For example

PATHS START ?x=asset:NRMS_CABLE_5467926 END ?y=asset:NRMS_CIRCUIT_335499931 
via  {
    values(?p) { (asset:consistsOf)(asset:partOf)(asset:carrierFor)}
    ?x ?relation ?y .
    ?x asset:name ?from_name .
    OPTIONAL { ?y asset:name ?to_name } 
}

I can send the obfscuated query if needed.

(Pavel Klinov) #11

Thanks, we will take a look. Just a quick question: should it really be values ?p and not values ?relation?

(Serge Colle) #12

It should be ?relation, but the query behave the same either way.

(Pavel Klinov) #13

This looks like a bug, indeed.

(Serge Colle) #14

Which one, the returning bad format, or the one with the optional statement or both. Should I create two new topic so it easier to track/people find.

(Pavel Klinov) #15

Please send the obfuscated data for the bad format thing to me directly. It's hard to say yet what's going on there. But the stack trace for the query with OPTIONAL certainly looks like a bug.

(Serge Colle) #16

you shoud of received the data. I sent it before 11.

(system) closed #17

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