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.
Please enter the password.
Submit

Change Nickname

Current Nickname:
Submit

Apply New License

License Detail

Please complete this required field.

  • Ultipa Graph V4

Standalone

Please complete this required field.

Please complete this required field.

The MAC address of the server you want to deploy.

Please complete this required field.

Please complete this required field.

Cancel
Apply
ID
Product
Status
Cores
Applied Validity Period(days)
Effective Date
Excpired Date
Mac Address
Apply Comment
Review Comment
Close
Profile
  • Full Name:
  • Phone:
  • Company:
  • Company Email:
  • Country:
  • Language:
Change Password
Apply

You have no license application record.

Apply
Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

Product Created On ID Amount (USD) Invoice
Product Created On ID Amount (USD) Invoice

No Invoice

v5.0
Search
    English
    v5.0

      Prepare Graph

      This page introduces how to create graph model, insert and modify graph data in Ultipa Manager. Demonstrations are given as both UI operations and UQLs.

      Graph Model

      Graph model in Ultipa Graph means the schemas and properties of a graphset:

      Chart1: Graph model of graphset 'retail' displayed in Ultipa Manager

      How to Run UQL

      create().graph("retail_test")
      

      The above UQL will create graphset retail_test as its literal meaning describes.
      In Ultipa Manager, a UQL, take this 'create graph' as an example, can be composed in the CLI box (Chart2) or assembled via UI operations (Chart3):

      Chart2: Create graphset by composing UQL in CLI box
      Chart3: Create graphset via UI operations

      Note: To switch to the new graphset after it is created, click the 'Select' button of the graphset as shown in Chart3. This is not achieved by UQL, but a function of SDK employed by Ultipa Manager.

      Create Graph Model

      Chart4: Create graph model via UI operations

      Chart4 shows a minimal procedure of creating graph model. It essentially assembles two UQLs that create a node schema and a property via UI:

      // Create node schema 'customer'
      create().node_schema("customer")
      
      // create property 'balance' under node schema 'customer', with data type 'float'
      create().node_property(@customer, "balance", float)			
      

      Features of these UQLs:

      • Start with command create()
      • The following node_schema(), node_property(), ... are parameters, connecting to the command by dot '.'
      • A schema should be created prior to its properties
      • Users only create Custom Properties, but not System Properties (see below explanations)

      Please create all the schemas and their properties listed in Chart1.

      Details of creating graph model can be found in documentation of GraphSet, Schema, Property.

      Metadata

      Metadata is a general term for nodes and edges in the graph, it is also another term for graph data.

      Insert Nodes

      Chart5: Insert node via UI operations

      Nodes have two system properties _id and _uuid, they both are the unique identifiers inhered in each node, but with different data type.

      Click and read about Unique Identifier of metadata.

      Below UQLs all insert some node(s) into schema customer:

      // insert a node, all custom properties set to null, '_id' and `_uuid` auto-generated
      insert().into(@customer).nodes({})						
      
      // insert two nodes, all custom properties set to null, '_id' and `_uuid` auto-generated
      insert().into(@customer).nodes([{},{}])					
      
      // insert a node with 'cust_name' set to 'Jason', all the other custom properties set to null, '_id' and `_uuid` auto-generated
      insert().into(@customer).nodes({cust_name: "Jason"})	
      
      // insert a node with '_id' set to 'CU001', all custom properties set to null, `_uuid` auto-generated
      insert().into(@customer).nodes({_id: "CU001"})			
      
      // insert a node, designate both 'cust_name' and '_id', all the other custom properties set to null, `_uuid` auto-generated
      insert().into(@customer).nodes({cust_name: "Jason", _id: "CU001"})		
      ...
      

      Features of these UQLs:

      • Start with command insert()
      • Declare schema in into(), organize property values of each node as an object in nodes()
      • Custom properties not provided will be set to null
      • _id and _uuid not provided will be auto-generated

      Details of inserting metadata can be found in documentation of Insert, Overwrite, Upsert.

      Insert Edges

      Chart6: Insert edge via UI operations

      Edges have only _uuid inhered as unique identifier, but have another 4 inhered system properties, namely, start and end node ID of edge _from&_to, _from_uuid&_to_uuid, at least one pair of which must be designated when inserting an edge.

      Below UQLs all insert some edge(s) into schema transfer, pointing from 'CU001' or 'CU002' to 'MC001':

      // insert an edge, all custom properties set to null, `_uuid` auto-generated
      insert().into(@transfer).edges({_from: "CU001", _to: "MC001"})
      
      // insert two edges, all custom properties set to null, `_uuid` auto-generated
      insert().into(@transfer).edges([{_from: "CU001", _to: "MC001"},{_from: "CU002", _to: "MC001"}])		
      
      // insert an edge with 'tran_amount' set to '1000', all the other custom properties set to null, `_uuid` auto-generated
      insert().into(@transfer).edges({_from: "CU001", _to: "MC001", tran_amount: "1000"})
      
      // insert an edge with '_uuid' set to '1', all custom properties set to null
      insert().into(@transfer).edges({_from: "CU001", _to: "MC001", _uuid: 1})
      
      // insert an edge, designate both 'tran_amount' and '_uuid', all the other custom properties set to null 
      insert().into(@transfer).edges({_from: "CU001", _to: "MC001", tran_amount: "Jason", _uuid: "CU001"})
      
      ...
      

      Similar to inserting nodes, these UQLs have below features:

      • Start with command insert()
      • Declare schema in into(), organize property values of each edge as an object in edges()
      • Custom properties not provided will be set to null
      • _uuid not provided will be auto-generated
      • Must provide _from and _to (or _from_uuid and _to_uuid) that represent nodes already existent

      Details of inserting metadata can be found in documentation of Insert, Overwrite, Upsert.

      For batch import of data from CSV files or other databases, please refer to article Data Import.

      Update Metadata

      Chart7: Update node via UI operations

      More UQL examples that update node(s) or edge(s):

      // update 'type' of all nodes to 'IV'
      update().nodes().set({type: "IV"})										
      
      // update 'type' of node whose '_id' is 'CU001' to 'IV' 
      update().nodes({_id == "CU001"}).set({type: "IV"})						
      
      // update 'type' of nodes whose 'merchant_name' contains 'Beijing' to 'IV' 
      update().nodes({merchant_name contains "Beijing"}).set({type: "IV"})	
      
      // update 'result' of all edges to 'success'
      update().edges().set({result: "success"})								
      
      // update 'result' of edge whose '_uuid' is '1' to 'success'
      update().edges({_uuid == 1}).set({result: "success"})					
      
      // update 'result' of 'transfer' edges initiated by 'CU001' to 'success'
      update().edges({@transfer._from == "CU001"}).set({result: "success"})	
      ...
      

      Features of these UQLs:

      • Start with command update()
      • Describe in nodes() or edges() the metadata to be updated (review article Graph Data on how to describe nodes and edges in UQL)
      • Organize in an object in set() the property values to be updated, properties not provided will not be updated
      • _id and _uuid are not allowed to be updated

      Command update() is used to modify property values of metadata, but not to rename properties. Renaming properties, schemas, or graphsets belongs to the category of modifying graph models, see details in documentation of GraphSet, Schema, Property.

      Please complete the following information to download this book
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写