修改密码

请输入密码
请输入密码 请输入8-64长度密码 和 email 地址不相同 至少包括数字、大写字母、小写字母、半角符号中的 3 个
请输入密码
提交

修改昵称

当前昵称:
提交

申请证书

证书详情

Please complete this required field.

  • Ultipa Graph V4

Standalone

Please complete this required field.

Please complete this required field.

服务器的MAC地址

Please complete this required field.

Please complete this required field.

取消
申请
ID
产品
状态
核数
申请天数
审批时间
过期时间
MAC地址
申请理由
审核信息
关闭
基础信息
  • 用户昵称:
  • 手机号:
  • 公司名称:
  • 公司邮箱:
  • 地区:
  • 语言:
修改密码
申请证书

当前未申请证书.

申请证书
Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

ProductName CreateTime ID Price File
ProductName CreateTime ID Price File

No Invoice

搜索
    中文

      批量插入

      数据类型

      Ultipa 属性与 Python 数据类型的对应关系:

      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() 可以为某一个点 schema 导入多条数据,需保证数据携带的属性与声明 schema 时携带的属性一致。

      方法及相关类:

      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)
      

      示例:为图集 test 的点 schema 'customer' 插入多条数据,采用插入模式

      from ultipa import Connection, UltipaConfig, InsertConfig
      from ultipa import ULTIPA_REQUEST, ULTIPA
      
      # 创建名为 conn 的连接并使用 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() 可以同时为多个点 schema 导入多条数据,需保证数据携带 schema,且携带的属性与图集中该 schema 的属性一致。

      方法及相关类:

      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)
      

      示例:为图集 test 的多个点 schema 插入多条数据,采用插入更新模式

      from ultipa import Connection, UltipaConfig, InsertConfig
      from ultipa import ULTIPA_REQUEST, ULTIPA
      
      # 创建名为 conn 的连接并使用 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() 可以为某一个边 schema 导入多条数据,需保证数据携带的属性与声明 schema 时携带的属性一致。

      方法及相关类:

      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
      	)
      

      示例:为图集 test 的边 schema 'transfer' 插入多条数据,采用插入模式

      from ultipa import Connection, UltipaConfig, InsertConfig
      from ultipa import ULTIPA_REQUEST, ULTIPA
      
      # 创建名为 conn 的连接并使用 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() 可以同时为多个边 schema 导入多条数据,需保证数据携带 schema,且携带的属性与图集中该 schema 的属性一致。

      方法及相关类:

      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
      	)
      

      示例:为图集 test 的多个边 schema 插入多条数据,采用插入覆盖模式

      from ultipa import Connection, UltipaConfig, InsertConfig
      from ultipa import ULTIPA_REQUEST, ULTIPA
      
      # 创建名为 conn 的连接并使用 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()
      
      请完成以下信息后可下载此书
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写
      *
      你的电话必须填写