AT
Apache TinkerPopdanielcraig23
.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
AWS Lambda function examples for Amazon Neptune - Amazon Neptune
The following example AWS Lambda functions, written in Java, JavaScript and Python, illustrate upserting a single vertex with a randomly generated ID using the fold().coalesce().unfold() idiom.
D
danielcraig23•16d ago
logging the response shows me this:
VK
Valentyn Kahamlyk•16d ago
what is the type of
userId
?D
danielcraig23•15d ago
userId is a string
K
kelvinl2816•15d ago
Is it possible the vertex already existed?
D
danielcraig23•14d ago
no unfortunately, I'm testing this new lambda with a empty neptune db, created for this purpose
Now I've changed/simplified the query function to this:
But the result is similar,
and the vertex created is this:
it seems like mergeV on javascript is not eager to comply with my expectations :/
@salman_walmart This is the question I was telling you about
I can't seem to get mergeV to work
D
danielcraig23•14d ago
It creates a vertex without considering the map that I provide, it seems like I'm using the wrong syntax but it's the same syntax that is generated by the gremlator tool https://www.gremlator.com/
Gremlator
Gremlin Language Variant Translator for Apache Tinkerpop
D
danielcraig23•14d ago
Now when I instrument the function a bit more, I'm seeing that there is something wrong with the map that I'm creating:
the logs show
As deployed in Lambda the code appears like this:
I'm not sure what
/* @__PURE__ */
means
Now I've updated my function to
and the logs show
So it seems that the map was populated after all, and my logging was just representing it as {}.
so the problem remainsT
triggan•14d ago
I just tried this using gremlin-javascript 3.6.2:
Same query:
g.mergeV(new Map([[t.label,"person"],["name","marko"],["age",29]])).next()
And got this result:
Running element map on that id returns:
D
danielcraig23•14d ago
ooh nice that's what I want to see
I provided some more details in an amazon case which I just created, can I send you that case #?
T
triggan•14d ago
yes, please
D
danielcraig23•14d ago
Thank you!
Apache TinkerPop is an open source graph computing framework and the home of the Gremlin graph query language.
1.3KMembers
View on DiscordWant results from more Discord servers?
More PostsUnable to deserialize results with Gremlin-go client + JanusGraphHi all - I'm trying to set up a JanusGraph database and use the Gremlin-go client to run some gremliFulltext-search-like features without ElasticSearch, OpenSearch, Solr and such?I've read in multiple sources that Apache TinkerPop isn't optimized for text search operations like Conditionally updating a variable with choose()How do I create and update a variable with a conditional? I need a number to be calculated based on Systems Analysis Report on Apache TinkerPop - Where to Start?Hey all, I'm currently writing an alaysis on Apache TinkerPop for grad school and was just hoping thLambda example in TypeScriptDoes anyone know where I can find example code that demonstrates up-to-date best practices for writimergeE(): increment counter on matchHi, is there an easy way to increment an existing edge property based on its current value using `meSerialization IssueI have a weird error, when I am connecting with JanusGraph gremlin client using `conf/remote-graph-Design decision related to multiple heterogenous relational graphsI'm working with over 100k instances of heterogeneous, relational node-and-edge attributed graphs, eStackoverflow when adding a larger list of property values using traverser.property()Hey, we encounter a stack overflow:
```
Exception during Transaction, rolling back ...
org.apache.tijava: package org.apache.tinkerpop.shaded.jackson.core does not existWhile trying to `mvn clean install` with jdk11, I ran into the above error using the master branch. Performance issue in large graphsWhen performing changes in large graph (ca. 100K nodes, 500K edges) which is stored in one kryo fileConcurrent queries to authentication required sever resulted in 401 errorHey guys, playing around with gremlin & encountered this very odd error where concurrent queries wilDiscrepancy between console server id conventions and NeptuneSo I'm working with my test server and on Neptune--and I'm noticing a difference in the type of the how to connect the amothic/neptune container to the volume?I need to know which directory needs to attach to containeer. so that the data is stored safely. eveDocker yaml authentication settings (gremlinserver.authentication) questionDoes anyone have any experience setting up authentication on Docker by using the supplied .yaml fileGremlin Injection Attacks?Is anyone talking about or looking into attacks and mitigations for Gremlin Injection Attacks? That Returned vertex properties (JS client)Hi, I've got a question regarding the returned vertex value when using the JS client. How come non-aAnyone using Tinkerpop docker as a local Cosmos replacementRunning into some random issues. Looking for tips and tricks.Configuring Websockets connection to pass through a proxy serverHey,
I'm working on making G.V() fully proxy aware, but I can't seem to get websockets connection tpython goblin vs spring-data-goblin for interactions with gremlin serverI want an OGM to interact with my gremlin server. What would be a good choice?