Is there a way to create an entirely numeric UUID?

With the legacy ID() being deprecated, and the new elementId() creating an alphanumeric - I have a challenge working with graph projections in GDS.

With beta functionality, we are testing a gds projection into another database (basically a graphlet). However with projection limitations you can only push out numeric property values.

I'd sometimes like the ability to come back to the subgraph I exported, and re-attach some property values (from the original graphdb) that are non-numeric. I could easily do this, as long as the projected graph nodes have a uid value on it, that I can use in a query to find the original node, and retrieve properties.

That works fine with id(n) but won't work with elementId(n).

Is there (or could we add functionality) to something like apoc.create.uuid where you request a strictly numeric return value? or is there another built-in function to create a purely numeric UID?

Thanks!

This doesn't specifically answer your question but look again at the elementID. The last digits are the same as returned by id(n). You might be able to look at something like CONTAINS ":135" as an option.

Just a thought. I too use id(n) when comparing several nodes when the text (e.g., name) is almost identical to make sure I have the correct node.

Thanks! I will take a look at that. hadn't paid enough attention the the resulting string to notice that!

I could perform a split as long as these are a constant length to extract just the numeric portion.

Yes, Mike's suggestion works. I implemented this in one of my databases.

1 Like