Log to an existing object#
To connect to an existing object, you can reinitialize it in your code by passing its Neptune ID to the with_id
argument. This works for any Neptune object: runs, models, and the project itself.
Resuming an object lets you:
- add new data or visualizations to a previously closed run
- modify existing data by overriding a field with a new value
- delete data from the object
- access its metadata in read-only mode
There is no limit to the number of times you can resume an object.
To connect to an existing object:
-
Obtain the Neptune ID of the object to resume.
- Each object's ID is stored in the
sys/id
field. - You can see it displayed in the leftmost column of the table view.
-
If the object has been initialized in the code, you can obtain it programmatically with
- Each object's ID is stored in the
-
Initialize the object with the ID:
-
Log metadata to the object as you normally would.
You can overwrite existing fields, delete fields, or create new ones.
Related
- For more examples, see Resume a run.
- Trash and delete data: Deleting metadata from objects
- What you can log and display
Fetching metadata in read only mode#
If you're just fetching metadata and not logging new data, you can initialize any existing Neptune object in read only mode.
This mode ensures that the object's metadata won't be modified.
Related
- For more about the different modes you can use Neptune in, see Connection modes
Initializing a Neptune project#
You can also treat your Neptune project as an object and log metadata to it via the Neptune API.
Data logged like this will appear under the Project metadata tab of your project.
For more, see Log project-level metadata.
Related
- For a more detailed guide on accessing an existing run, see Resume a run.
- Query the Neptune API
- Query metadata from the model registry