How to change the data type of property in Janus Graph

--

Case1 :- When data loss is not an issue.

First remove the property.

mgmt.getPropertyKey(‘lat’).remove();

Then add the property with changed data type

mgmt.makePropertyKey(‘lat’).dataType(Double.class).cardinality(Cardinality.SINGLE).make()

Case 2:- When data loss is an issue

first make the property with the changed data type

and then rename the property

and then change with the changed_data_type property

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response