-
Notifications
You must be signed in to change notification settings - Fork 85
Document schema loading #48
Comments
This could be made easier when we have a dedicated image for the console: #100. |
Hi @FlorianHockmann (and others), I have a usecase where we would like to:
Today, we manage this via a set of I would really love if we could manage this in a different way - either via init scripts (so we deploy the migrations together with Janusgraph) or via in-code that is a bit more typesafe than submitting file content as string. I'm unsure when the initscripts are executed (on every startup / only once for first startup if clean slate / new script present?) Obviously, I might be missing something here :) But I think this feature really sounds interesting, if it was more clear how it can be used. For context, I have been a bit inspired how C# / Entity Framework manages metadata state via code. I miss something similar, but I'm also in doubt if it's already possible to do. |
Hi @anders-rydbirk, interesting to hear about your use case, but that sounds quite advanced and out of scope for this specific issue here that just wants to document how a Groovy schema script can be executed with the Docker image. Schema migrations are of course an interesting and important topic in general, but I'm not sure whether we will be able to handle them inside of JanusGraph directly any time soon since it most likely includes iterating over all vertices. Regarding init scripts: If you are talking about scripts placed under If you have any further / follow-up questions or would like to discuss this some more, then please use one of our community channels, like Discord, the janusgraph-users mailing list or GitHub discussions. |
Hi @FlorianHockmann, Yeah, I think that's also the realisation I arrived at. I ended up making our setup a bit less complicated, which ended up removing the need for having a bespoke graph to keep state of migrations. Appreciate the details on scripts - and the care you put in this. |
The docker image now supports the execution of Groovy files on startup, but the docs currently only show an example to execute Gremlin traversals, e.g., to load initial data.
It's also possible to access the management API, for example to create a schema. This can be done with the remote Gremlin Console.
We should explain this use case as it's probably not clear to most new users.
See this thread on janusgraph-users for more information.
The text was updated successfully, but these errors were encountered: