danielcraig23
ATApache TinkerPop
•Created by danielcraig23 on 5/9/2024 in #questions
Is the insertion order guaranteed with this example code?
Taking the following code which is found at https://tinkerpop.apache.org/docs/current/reference/#gremlin-javascript-transactions, is the insertion order guaranteed for these two new vertices?
13 replies
ATApache TinkerPop
•Created by danielcraig23 on 5/9/2024 in #questions
Using mergeE to create an edge with an id that depends on a lookup
I want to use mergeE to produce an edge whose id is the concatenation of the ids of its inV and outV vertices. But the inV vertex has to be looked up, the exact id is not known without a lookup.
Suppose that partialMacbookId === "macbookAir" and the result of the lookup is the vertex with id "macbookAir2024"
And suppose that ownerId === "1111"
I want to create a hasOwner edge with id "macbookAir20241111"
Is this possible?
8 replies
ATApache TinkerPop
•Created by danielcraig23 on 5/8/2024 in #questions
Is tx.close() necessary in Javascript?
I have read the following two pieces of documentation and I have the question, is tx.close() necessary in Javascript?
https://tinkerpop.apache.org/docs/current/reference/#gremlin-javascript-transactions https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-transactions.html
https://tinkerpop.apache.org/docs/current/reference/#gremlin-javascript-transactions https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-transactions.html
6 replies
ATApache TinkerPop
•Created by danielcraig23 on 4/18/2024 in #questions
.mergeV() with Javascript not working
Hi, I have a nodeJS 18 lambda which is closely modeled after this documentation: https://docs.aws.amazon.com/neptune/latest/userguide/lambda-functions-examples.html#lambda-functions-examples-javascript
here is my async query function:
This code produces the following vertex, without using the userId or label which I provided:
How can I troubleshoot this function? I'm using Neptune 1.2.1.0 with a nodeJs 18 lambda and here is an excerpt from my package.json and yarn.lock which shows the gremlin versions which yarn resolved for my project
28 replies
ATApache TinkerPop
•Created by danielcraig23 on 11/29/2023 in #questions
How can I use the .io("filename.json").write() pattern to append to an existing graphson file?
I have read about defining a custom GraphWriter using the builder, but wanted to ask first before spending more time
Here is my example code:
, which gets results as follows:
7 replies
ATApache TinkerPop
•Created by danielcraig23 on 11/7/2023 in #questions
Can I surpress gremlin console's warnings?
How can I surpress these WARNING messages? I've tried gremlin -l but can't seem to get the syntax right because it seems to have no effect when I do
gremlin -l ERROR
5 replies
ATApache TinkerPop
•Created by danielcraig23 on 10/16/2023 in #questions
Can I name the result of an anonymous traversal without moving the traverser?
I can currently do the following:
I wish I could do something like this instead:
What would you recommend to me? I only want to do
__.out().has("name", "ripple")
once, because in my project this filter is much longer so there is considerable repeated code.7 replies
ATApache TinkerPop
•Created by danielcraig23 on 8/24/2023 in #questions
Does .math() always return a Double?
I have the following query, how can I get the result as a Long instead of a Double? In context, I want this query to be unioned with a set of other numbers which are Longs and then I want to take the .max() of them. But I can't do that if I have a mix of Long and Double
6 replies
ATApache TinkerPop
•Created by danielcraig23 on 7/21/2023 in #questions
How can I filter by property type
9 replies
ATApache TinkerPop
•Created by danielcraig23 on 7/19/2023 in #questions
How can I write a project using an inject that doesn't exhaust itself?
Take the following example query:
g.inject("1", "2", "3").project("list").by(__.inject("b").fold()).toList()
its result is [{list=[1, b]}, {list=[2]}, {list=[3]}]
I'd like to see [{list=[1, b]}, {list=[2, b]}, {list=[3, b]}] instead
How can I accomplish this?
8 replies
ATApache TinkerPop
•Created by danielcraig23 on 7/14/2023 in #questions
Can I use a query to export data in the form of a query?
In the SQL world you can use SQL Developer to generate INSERT statements from the results of a query. I want to sample some of our Neptune data for use in a unit test that uses Tinkergraph - is it possible to capture the results of a query as something like g.addV() queries that allow me to export my real data into Tinkergraph?
15 replies
ATApache TinkerPop
•Created by danielcraig23 on 6/16/2023 in #questions
Using the modern graph, how can I write a query that finds the name of the oldest person?
I want to take the graph produced by TinkerFactory.createModern() and write a query that finds the oldest person and returns their name. I want to learn to use the max() traversal step.
11 replies
ATApache TinkerPop
•Created by danielcraig23 on 6/5/2023 in #questions
What's the status amazon-neptune-sigv4-signer?
amazon-neptune-sigv4-signer hasn't had a new release in 2 years, is it still part of the recommended set of tools for aws Neptune?
5 replies