Change Password

Please enter the password.
Please enter the password. Between 8-64 characters. Not identical to your email address. Contain at least 3 of uppercase, lowercase, numbers, and special characters (such as @*&#).
Please enter the password.
Submit

Change Nickname

Current Nickname:
Submit

v4.2
Search
中文EN
v4.2

    Batch Insert

    Data Type

    Ultipa property types and Python data types are correlated as following pairs:

    Ultipa Python
    string string
    text string
    float float
    double float
    int32 int
    uint32 int
    int64 int
    uint64 int
    datetime string
    timestamp string, int

    InsertNodesBatchBySchema()

    InsertNodesBatchBySchema() will insert multiple nodes of a particular node schema. The properties carried in the values of nodes should be consistent with those declared in the schema structure.

    Method and class:

    def InsertNodesBatchBySchema(self, 
    							 schema: ULTIPA_REQUEST.Schema, 
                                 rows: List[ULTIPA.Node],
                                 config: ULTIPA_REQUEST.InsertConfig
    ) -> ULTIPA_RESPONSE.InsertResponse
    
    class Schema:
    	def __init__(self, 
        			 name: str, 
                     properties: List[Property], 
                     desc: str = None, 
                     type: str = None,
                     DBType: ULTIPA.DBType = None, 
                     total: int = None
    	)
    
    class Property:
    	def __init__(self, name: str, type: ULTIPA.PropertyType = None, desc: str = None)
    
    class Node:
    	def __init__(self, values: Dict, schema: str = None, id: str = None, uuid: int = None)
    

    Example: Insert multiple nodes into schema 'customer' of graphset 'test', use insert mode

    from ultipa import Connection, UltipaConfig, InsertConfig
    from ultipa import ULTIPA_REQUEST, ULTIPA
    
    # omit code of establishing server connection 'conn' using graphset 'default'
    
    schema = ULTIPA_REQUEST.Schema(
      "customer",
      [
        ULTIPA_REQUEST.Property("name", ULTIPA.PropertyType.PROPERTY_STRING),
        ULTIPA_REQUEST.Property("level", ULTIPA.PropertyType.PROPERTY_INT32)
      ]
    )
    
    rows = [
      ULTIPA.Node(values = {"name": "Paal", "level": 2}),
      ULTIPA.Node(values = {"name": "Alice", "level": 1})
    ]
    
    req = conn.InsertNodesBatchBySchema(
      schema,
      rows,
      InsertConfig(ULTIPA.InsertType.NORMAL, "test")
    )
    
    req.Print()
    

    InsertNodesBatchAuto()

    InsertNodesBatchAuto() will insert multiple nodes of multiple node schemas. The nodes should carry schema, and the properties carried in the values of nodes should be consistent with those defined in the graphset.

    Method and class:

    def InsertNodesBatchAuto(self, 
    						 nodes: List[ULTIPA.Node],
                             config: ULTIPA_REQUEST.InsertConfig
    ) -> ULTIPA_RESPONSE.ResponseBatchAutoInsert
    
    class Node:
    	def __init__(self, values: Dict, schema: str = None, id: str = None, uuid: int = None)
    

    Example: Insert multiple nodes into multiple schemas of graphset 'test', use upsert mode

    from ultipa import Connection, UltipaConfig, InsertConfig
    from ultipa import ULTIPA_REQUEST, ULTIPA
    
    # omit code of establishing server connection 'conn' using graphset 'default'
    
    rows = [
      ULTIPA.Node(values = {"name": "Paal", "level": 3}, schema = "customer", id = "CUST000A2D"),
      ULTIPA.Node(values = {"balance": 4000.0, "level": 1}, schema = "card", id = "CARD000901")
    ]
    
    req = conn.InsertNodesBatchAuto(
      rows,
      InsertConfig(ULTIPA.InsertType.UPSERT,"test")
    )
    req.Print()
    

    InsertEdgesBatchBySchema()

    InsertEdgesBatchBySchema() will insert multiple edges of a particular edge schema. The properties carried in the values of edges should be consistent with those declared in the schema structure.

    Method and class:

    def InsertEdgesBatchBySchema(self, 
    							 schema: ULTIPA_REQUEST.Schema, 
                                 rows: List[ULTIPA.Edge],
                                 config: ULTIPA_REQUEST.InsertConfig
    ) -> ULTIPA_RESPONSE.InsertResponse
    
    class Schema:
    	def __init__(self, 
        			 name: str, 
                     properties: List[Property], 
                     desc: str = None, 
                     type: str = None,
                     DBType: ULTIPA.DBType = None, 
                     total: int = None
    	)
    
    class Property:
    	def __init__(self, name: str, type: ULTIPA.PropertyType = None, desc: str = None)
    
    class Edge:
    	def __init__(self, 
        			 values: Dict, 
                     from_id: str = None, 
                     from_uuid: int = None, 
                     to_id: str = None, 
                     to_uuid: int = None,
                     schema: str = None,
                     uuid: int = None
    	)
    

    Example: Insert multiple edges into schema 'transfer' of graphset 'test', use insert mode

    from ultipa import Connection, UltipaConfig, InsertConfig
    from ultipa import ULTIPA_REQUEST, ULTIPA
    
    # omit code of establishing server connection 'conn' using graphset 'default'
    
    schema = ULTIPA_REQUEST.Schema(
      "transfer",
      [
        ULTIPA_REQUEST.Property("amount", ULTIPA.PropertyType.PROPERTY_FLOAT),
        ULTIPA_REQUEST.Property("type", ULTIPA.PropertyType.PROPERTY_STRING)
      ]
    )
    
    rows = [
      ULTIPA.Edge(values = {"amount": 2000.0, "type": "I"}, from_id = "CARD000901", to_id = "CARD000A21"),
      ULTIPA.Edge(values = {"amount": 125.5, "type": "II"}, from_id = "CARD000BB2", to_id = "CARD000C74")
    ]
    
    req = conn.InsertEdgesBatchBySchema(
      schema,
      rows,
      InsertConfig(ULTIPA.InsertType.NORMAL,"test")
    )
    req.Print()
    

    InsertEdgesBatchAuto()

    InsertEdgesBatchAuto() will insert multiple edges of multiple edge schemas. The edges should carry schema, and the properties carried in the values of edges should be consistent with those defined in the graphset.

    Method and class:

    def InsertEdgesBatchAuto(self, 
    						 edges: List[ULTIPA.Edge],
                             config: ULTIPA_REQUEST.InsertConfig
    ) -> ULTIPA_RESPONSE.ResponseBatchAutoInsert
    
    class Edge:
    	def __init__(self, 
        			 values: Dict, 
                     from_id: str = None, 
                     from_uuid: int = None, 
                     to_id: str = None, 
                     to_uuid: int = None,
                     schema: str = None,
                     uuid: int = None
    	)
    

    Example: Insert multiple edges into multiple schemas of graphset 'test', use overwrite mode

    from ultipa import Connection, UltipaConfig, InsertConfig
    from ultipa import ULTIPA_REQUEST, ULTIPA
    
    # omit code of establishing server connection 'conn' using graphset 'default'
    
    rows = [
      ULTIPA.Edge(values = {"amount": 2000.0, "type": "IV"}, from_id = "CARD000901", to_id = "CARD000A21", schema = "transfer", uuid = 5),
      ULTIPA.Edge(values = {}, from_id = "STAF000E32", to_id = "CUST000F9A", schema = "manage", uuid = 7)
    ]
    
    req = conn.InsertEdgesBatchAuto(
      rows,
      InsertConfig(ULTIPA.InsertType.OVERWRITE,"test")
    )
    req.Print()
    
    Please complete the following information to download this book
    *
    公司名称不能为空
    *
    公司邮箱必须填写
    *
    你的名字必须填写
    *
    你的电话必须填写
    *
    你的电话必须填写