Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where to store and how to load sample data on remote gremlin server #162

Open
andrew-aernos opened this issue Dec 13, 2019 · 2 comments
Open

Comments

@andrew-aernos
Copy link

andrew-aernos commented Dec 13, 2019

I've followed the steps Chapter 7. INTRODUCING GREMLIN SERVER on setting up the gremlin console on a remote server and connected to it with

gremlin> :remote connect tinkerpop.server conf/remote.yaml session
==>Configured localhost/127.0.0.1:8182-[49767b47-89d7-4984-9a37-6eeb6d551be7]
gremlin> :remote console
==>All scripts will now be sent to Gremlin Server - [localhost/127.0.0.1:8182]-[49767b47-89d7-4984-9a37-6eeb6d551be7] - type ':remote console' to return to local mode

tried this resulted in file not found. How might I download the script to remote?

gremlin> :load load-air-routes-graph.groovy

tried this resulted in No such property: ToInputStream

gremlin> graph.io(IoCore.graphml()).reader().create().readGraph(ToInputStream.from("url", "https://github.com/krlawrence/graph/raw/master/sample-data/air-routes.graphml"), graph);

My current hurdle is I'm trying to figure out how to 1) download the data with the Gremlin console on remote, 2) retrieve it and load it into the graph.

Thanks for this great work @krlawrence

@krlawrence
Copy link
Owner

If you are just using a Gremlin Server you can have the data loaded from the server side scripts as in the example in section 7.6.

@krlawrence
Copy link
Owner

krlawrence commented Dec 13, 2019

There is also this comment in the official TinkerPop documentation that points out that the file must be accessible on the server:

Remote Gremlin Console users or Gremlin Language Variant (GLV) users (e.g. gremlin-python) who utilize the io()-step should recall that their read() or write() operation will occur on the server and not locally and therefore the file specified for import/export must be something accessible by the server.

I should probably add some text to the book that points this out. I also need to add coverage of the new g.io() way of loading data. That is captured in issue #115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants