0

as mentioned in nebula documentation here :

https://docs.nebula-graph.io/1.2.0/manual-EN/2.query-language/1.data-types/data-types/

nebula documentation create vertex datetime timestamp record in graph database

nebula> INSERT VERTEX school(name, create_time) VALUES hash("new"):("new", "1985-10-01 08:00:00")

error is:

-1005:Storage Error: The data type does not meet the requirements. Use the correct type of data.

and this:

-1005:Wrong vertex id type: hash("new")

saber tabatabaee yazdi
  • 4,404
  • 3
  • 42
  • 58
  • 1
    Dear @saber I noticed you are referring to the v1.x documentation, please always access the doc from https://docs.nebula-graph.io/ which will navigate you the latest stable version of documentation – Wey Gu Dec 01 '22 at 07:55

2 Answers2

1

Please be noted you are referring to NebulaGraph v1.x documentation, in NebulaGraph V1, the vid only supports int64, but now, it supports(since 2.x) string format. And you could define this during the creation of the graph space:

CREATE SPACE [IF NOT EXISTS] <graph_space_name> (
    [partition_num = <partition_number>,]
    [replica_factor = <replica_number>,]
    vid_type = {FIXED_STRING(<N>) | INT[64]}
    )
    [COMMENT = '<comment>'];

for instance if you created space like this:

CREATE SPACE IF NOT EXISTS my_space_2 (partition_num=15, replica_factor=1, vid_type=FIXED_STRING(30));

The vid of "new" is valid and no hash is needed.

ref:

Wey Gu
  • 575
  • 1
  • 6
  • 11
0

for your first error please use 1669817257 this format or now() "1985-10-01 08:00:00")

like this: enter image description here

match (v:school) return v,now() limit 10;

as you mentioned: nebula documentaion

this documentation said:

The underlying storage data type is: int64

as you can see in this picture you can define two types of spaces there:

define space nebula graph

via this form you can create/define new space:

define create new space in nebula graph

when your id is not int64 your error is the second error message that you reported

when your storage vid is int64 you should use hash

saber tabatabaee yazdi
  • 4,404
  • 3
  • 42
  • 58