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

Search
    English

      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

      For users of Ultipa Cloud, click 'load sample' from your sever list and let Ultipa Cloud create graphset and graph model, and ingest graph data for you.
      For users of self-deployed Ultipa Manager, please follow the instruction below to create graph model and graph data from scratch.

      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 some UQLs of creating schema and property:

      create().node_schema("customer")
      create().edge_schema("transfer")
      create().node_property(@customer, "balance", float)			// create property 'balance' under node schema 'customer', with data type 'float'
      create().edge_property(@transfer, "tran_type", int32)		// create property 'tran_type' under edge schema 'transfer', with data type 'int32'
      ...
      

      Features of these UQLs:

      • Start with command create()
      • The following node_schema(), edge_schema(), ... 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

      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, which are the unique identifiers inhered in each node.

      Click and read about Unique Identifier of metadata.

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

      insert().into(@customer).nodes({})						// insert a node with default property values 
      insert().into(@customer).nodes([{},{}])					// insert two nodes with default property values 
      insert().into(@customer).nodes({cust_name: "Jason"})	// insert a node whose 'cust_name' is 'Jason'
      insert().into(@customer).nodes({_id: "CU001"})			// insert a node whose '_id' is 'CU001'
      insert().into(@customer).nodes({cust_name: "Jason", _id: "CU001"})		// insert a node, designate both 'cust_name' and '_id'
      ...
      

      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 default value
      • _id and _uuid not provided will be auto-generated

      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 with default property values 
      insert().into(@transfer).edges({_from: "CU001", _to: "MC001"})
      
      // insert two edges with default property values						
      insert().into(@transfer).edges([{_from: "CU001", _to: "MC001"},{_from: "CU002", _to: "MC001"}])		
      
      // insert an edge whose 'tran_amount' is '1000'
      insert().into(@transfer).edges({_from: "CU001", _to: "MC001", tran_amount: "1000"})
      
      // insert an edge whose '_uuid' is '1'
      insert().into(@transfer).edges({_from: "CU001", _to: "MC001", _uuid: 1})
      
      // insert an edge, designate both 'tran_amount' and '_uuid'
      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 default value
      • _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, 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().nodes().set({type: "IV"})										// update 'type' of all nodes to 'IV'
      update().nodes({_id == "CU001"}).set({type: "IV"})						// update 'type' of node whose '_id' is 'CU001' to 'IV' 
      update().nodes({merchant_name contains "Beijing"}).set({type: "IV"})	// update 'type' of nodes whose 'merchant_name' contains 'Beijing' to 'IV' 
      update().edges().set({result: "success"})								// update 'result' of all edges to 'success'
      update().edges({_uuid == 1}).set({result: "success"})					// update 'result' of edge whose '_uuid' is '1' to 'success'
      update().edges({@transfer._from == "CU001"}).set({result: "success"})	// update 'result' of 'transfer' edges initiated by 'CU001' to '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
      • _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
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写