UltipaDocs
Try Playground
  • Introduction
    • Installation
    • Connection
      • Overview and Request Configuration
      • UQL Execution
      • GQL Execution
      • Graph
      • Schema and Property
      • Data Insertion
      • Query Acceleration
      • HDC Graph and Algorithm
      • Data Export
      • Process and Job
      • Access Control
    • Result Processing
    • Driver Data Classes
    • Installation
    • Connection
      • Overview and Request Configuration
      • UQL Execution
      • GQL Execution
      • Graph
      • Schema and Property
      • Data Insertion
      • Query Acceleration
      • HDC Graph and Algorithm
      • Data Export
      • Process and Job
      • Access Control
    • Result Processing
    • Driver Data Classes
    • Quick Start
    • Connect to Database
    • Query the Database
      • Graph
      • Schema and Property
      • Data Insertion
      • Query Acceleration
      • HDC Graph and Algorithm
      • Data Export
      • Process and Job
      • Access Control
    • Process Query Results
    • Data Structures
    • Quick Start
    • Connect to Database
    • Query the Database
      • Graph
      • Schema and Property
      • Data Insertion
      • Query Acceleration
      • HDC Graph and Algorithm
      • Data Export
      • Process and Job
      • Access Control
    • Process Query Results
    • Data Structures
    • Installation
    • Connection
    • Request Configuration
    • UQL Execution
    • GQL Execution
    • Graphset Management
    • Schema and Property Management
    • Data Insertion and Deletion
    • Query Acceleration
    • Algorithm Management
    • Downloads and Exports
    • Process and Task Management
    • Access Management
    • Server Statistics
    • Result Processing
    • Types Mapping Ultipa and C#
  • RESTful API
  1. Docs
  2. /
  3. Ultipa Drivers
  4. /
  5. Node.js

Data Structures

This section introduces the core data structures provided by the driver.

Node

Node includes the following fields:

Field
Type
Description
uuidstringNode _uuid.
idstringNode _id.
schemastringName of the schema the node belongs to.
values[key: string]: anyNode property key-value pairs.

If a query returns nodes, you can use asNodes() to convert the results into a list of Nodes.

TypeScript
const requestConfig: RequestConfig = { graph: "g1" };
const response = await driver.gql("MATCH (n:User) RETURN n LIMIT 2", requestConfig);
const nodes = response.alias("n").asNodes();
for (const node of nodes) {
  console.log(node)
}
Output
Node {
  uuid: '6557243256474697731',
  id: 'U4',
  schema: 'User',
  values: { name: 'mochaeach' }
}
Node {
  uuid: '7926337543195328514',
  id: 'U2',
  schema: 'User',
  values: { name: 'Brainy' }
}

Edge

Edge includes the following fields:

Field
Type
Description
uuidstringEdge _uuid.
fromUuidstring_uuid of the source node of the edge.
toUuidstring_uuid of the destination node of the edge.
fromstring_id of the source node of the edge.
tostring_id of the destination node of the edge.
schemastringName of the schema the edge belongs to.
values[key: string]: anyEdge property key-value pairs.

If a query returns edges, you can use asEdges() to convert them into a list of Edges.

TypeScript
const requestConfig: RequestConfig = { graph: "g1" };
const response = await driver.gql("MATCH ()-[e]->() RETURN e LIMIT 2", requestConfig);
const edges = response.alias("e").asEdges();
for (const edge of edges) {
  console.log(edge)
}
Output
Edge {
  uuid: '2',
  fromUuid: '6557243256474697731',
  toUuid: '7926337543195328514',
  from: 'U4',
  to: 'U2',
  schema: 'Follows',
  values: { createdOn: '2024-02-10' }
}
Edge {
  uuid: '3',
  fromUuid: '7926337543195328514',
  toUuid: '17870285520429383683',
  from: 'U2',
  to: 'U3',
  schema: 'Follows',
  values: { createdOn: '2024-02-01' }
}

Path

Path includes the following fields:

Field
Type
Description
nodeUuidsstring[]The list of node _uuids in the path.
edgeUuidsstring[]The list of edge _uuids in the path
nodesMap<string, Node>A map of nodes in the path, where the key is the node’s _uuid, and the value is the corresponding node.
edgesMap<string, Edge>A map of edges in the path, where the key is the edge’s _uuid, and the value is the corresponding edge.

Methods on Path:

Method
Parameters
Returns
Description
length()/numberReturns the number of edges in the path.

If a query returns paths, you can first use asGraph() to convert the results into a Graph object; Graph provides access to the returned paths.

TypeScript
const requestConfig: RequestConfig = { graph: "g1" };
const response = await driver.gql("MATCH p = ()-[]-() RETURN p LIMIT 2", requestConfig);
const graph = response.alias("p").asGraph();
const paths = graph.getPaths();
for (const path of paths) {
 console.log("Node _uuids:", path.nodeUuids, "Length:", path.length())
};
Output
Node _uuids: [ '6557243256474697731', '7926337543195328514' ] Length: 1
Node _uuids: [ '7926337543195328514', '17870285520429383683' ] Length: 1

Graph

Graph includes the following fields:

Field
Type
Description
pathsPath[]The list of the returned paths.
nodesMap<string, Node>A map of unique nodes in the graph, where the key is the node’s _uuid, and the value is the corresponding node.
edgesMap<string, Edge>A map of unique edges in the graph, where the key is the edge’s _uuid, and the value is the corresponding edge.

Methods on Graph:

Method
Parameters
Returns
Description
getPaths()/Path[]Returns the list of Path objects in the graph.
addNode()node: NodevoidAdds a Node to the graph. Duplicate nodes are not added; nodes remains unique.
addEdge()edge: EdgevoidAdds an Edge to the graph. Duplicate edges are not added; edges remains unique.

If a query returns paths, you can use asGraph() to convert them into a Graph.

TypeScript
const requestConfig: RequestConfig = { graph: "g1" };
const response = await driver.gql("MATCH p = ()-[]->() RETURN p LIMIT 2", requestConfig);
const graph = response.alias("p").asGraph();
console.log("Unique nodes:", graph.nodes)
console.log("Unique edges:", graph.edges)
console.log("All paths:", graph.paths)
Output
Unique nodes: Map(3) {
  '6557243256474697731' => Node {
    uuid: '6557243256474697731',
    id: 'U4',
    schema: 'User',
    values: { name: 'mochaeach' }
  },
  '7926337543195328514' => Node {
    uuid: '7926337543195328514',
    id: 'U2',
    schema: 'User',
    values: { name: 'Brainy' }
  },
  '17870285520429383683' => Node {
    uuid: '17870285520429383683',
    id: 'U3',
    schema: 'User',
    values: { name: 'purplechalk' }
  }
}
Unique edges: Map(2) {
  '2' => Edge {
    uuid: '2',
    fromUuid: '6557243256474697731',
    toUuid: '7926337543195328514',
    from: 'U4',
    to: 'U2',
    schema: 'Follows',
    values: { createdOn: '2024-02-10' }
  },
  '3' => Edge {
    uuid: '3',
    fromUuid: '7926337543195328514',
    toUuid: '17870285520429383683',
    from: 'U2',
    to: 'U3',
    schema: 'Follows',
    values: { createdOn: '2024-02-01' }
  }
}
All paths: [
  Path {
    nodeUuids: [ '6557243256474697731', '7926337543195328514' ],
    edgeUuids: [ '2' ],
    nodes: Map(2) {
      '6557243256474697731' => [Node],
      '7926337543195328514' => [Node]
    },
    edges: Map(1) { '2' => [Edge] }
  },
  Path {
    nodeUuids: [ '7926337543195328514', '17870285520429383683' ],
    edgeUuids: [ '3' ],
    nodes: Map(2) {
      '7926337543195328514' => [Node],
      '17870285520429383683' => [Node]
    },
    edges: Map(1) { '3' => [Edge] }
  }
]

GraphSet

GraphSet includes the following fields:

Field
Type
Description
idstringGraph ID.
namestringGraph name.
totalNodesstringTotal number of nodes in the graph.
totalEdgesstringTotal number of edges in the graph.
shardsstring[]The list of IDs of shard servers where the graph is stored.
partitionBystringThe hash function used for graph sharding, which can be Crc32 (default), Crc64WE, Crc64XZ, or CityHash64.
statusstringGraph status, which can be NORMAL, LOADING_SNAPSHOT, CREATING, DROPPING, or SCALING.
descriptionstringGraph description.
slotNumnumberThe number of slots used for graph sharding.

If a query retrieves graphs (graphsets) in the database, you can use asGraphSets() to convert them into a list of GraphSets.

TypeScript
const response = await driver.gql("SHOW GRAPH");
const graphs = response.alias("_graph").asGraphSets();
for (const graph of graphs) {
  console.log(graph.name)
}

The showGraph() method also retrieves graphs (graphsets) in the database, it returns a list of GraphSets directly.

TypeScript
const graphs = await driver.showGraph();
graphs.forEach((graph) => console.log(graph.name));
Output
g1
miniCircle
amz

Schema

Schema includes the following fields:

Field
Type
Description
namestringSchema name
dbTypeDBTypeSchema type, which can be DBNODE or DBEDGE.
propertiesProperty[]The list of properties associated with the schema.
descriptionstringSchema description
totalstringTotal number of nodes or edges belonging to the schema.
idstringSchema ID.
statsSchemaStat[]a list of SchemaStats. each SchemaStat includes fields schema (schema name), dbType (schema type), fromSchema (source node schema), toSchema (destination node schema), and count (count of nodes or edges).

If a query retrieves node or edge schemas defined in a graph, you can use asSchemas() to convert them into a list of Schemas.

TypeScript
const requestConfig: RequestConfig = { graph: "miniCircle" };
const response = await driver.gql("SHOW NODE SCHEMA", requestConfig);
const schemas = response.get(0).asSchemas();
for (const schema of schemas) {
 console.log(schema.name)
}

The showSchema(), showNodeSchema() and showEdgeSchema() methods also retrieve node and edge schemas in a graph, it returns a list of Schemas directly.

TypeScript
const requestConfig: RequestConfig = { graph: "miniCircle" };
const schemas = await driver.showSchema(requestConfig);
schemas.forEach((schema: any) => {
  console.log(schema.name);
});
Output
default
account
celebrity
country
movie

Property

Property includes the following fields:

Field
Type
Description
namestringProperty name.
typeUltipaPropertyTypeProperty value type, which can be INT32, UINT32, INT64, UINT64, FLOAT, DOUBLE, DECIMAL, STRING, TEXT, LOCAL_DATETIME, ZONED_DATETIME, DATE, LOCAL_TIME, ZONED_TIME, DATETIME, TIMESTAMP, YEAR_TO_MONTH, DAY_TO_SECOND, BLOB, BOOL, POINT, LIST, SET, MAP, NULL, UUID, ID, FROM, FROM_UUID, TO, TO_UUID, IGNORE, or UNSET.
subTypeUltipaPropertyType[]If the type is LIST or SET, sets its element type; only one UltipaPropertyType is allowed in the list.
schemastringThe associated schema of the property.
descriptionstringProperty description.
ltebooleanWhether the property is LTE-ed.
readbooleanWhether the property is readable.
writebooleanWhether the property can be written.
encryptstringEncryption method of the property, which can be AES128, AES256, RSA, or ECC.
decimalExtraDecimalExtraThe precision (1–65) and scale (0–30) of the DECIMAL type.

If a query retrieves node or edge properties defined in a graph, you can use asProperties() to convert them into a list of Propertys.

TypeScript
const requestConfig: RequestConfig = { graph: "miniCircle" };
const response = await driver.gql("SHOW NODE account PROPERTY", requestConfig);
const properties = response.get(0).asProperties();
for (const property of properties) {
 console.log(property.name)
}

The showProperty(), showNodeProperty() and showEdgeProperty() methods also retrieve node and edge properties in a graph, it returns a list of Propertys directly.

TypeScript
const requestConfig: RequestConfig = { graph: "miniCircle" };
const properties = await driver.showProperty(DBType.DBNODE, "account", requestConfig);
properties.nodeProperties.forEach((property) => {
  console.log(property.name)
});
Output
_id
gender
year
industry
name

Attr

Attr includes the following fields:

Field
Type
Description
namestringName of the returned alias.
valuesobject[]The returned values.
propertyTypeUltipaPropertyTypeType of the property.
resultTypeResultTypeType of the results, which can be RESULT_TYPE_UNSET, RESULT_TYPE_PATH, RESULT_TYPE_NODE, RESULT_TYPE_EDGE, RESULT_TYPE_ATTR or RESULT_TYPE_TABLE.

If a query returns results like property values, expressions, or computed values, you can use asAttr() to convert them into an Attr.

TypeScript
const requestConfig: RequestConfig = { graph: "g1" };
const response = await driver.gql("MATCH (n:User) LIMIT 2 RETURN n.name", requestConfig);
const attr = response.alias("n.name").asAttr();
console.log(attr)
Output
Attr {
  propertyType: 7,
  resultType: 4,
  values: [ 'mochaeach', 'Brainy' ],
  name: 'n.name'
}

Table

Table includes the following fields:

Field
Type
Description
namestringTable name.
headersHeader[]Table headers.
rowsany[][]Table rows.

Methods on Table:

Method
Parameters
Returns
Description
toKV()/any[]Convert all rows in the table to an array of key-value objects.

If a query uses the table() function to return a set of rows and columns, you can use asTable() to convert them into a Table.

TypeScript
const requestConfig: RequestConfig = { graph: "g1" };
const response = await driver.gql("MATCH (n:User) LIMIT 2 RETURN table(n._id, n.name) AS result", requestConfig);
const table = response.alias("result").asTable();
console.log(table)
Output
Table {
  name: 'result',
  headers: [
    Header { propertyName: 'n._id', propertyType: 7 },
    Header { propertyName: 'n.name', propertyType: 7 }
  ],
  rows: [ [ 'U4', 'mochaeach' ], [ 'U2', 'Brainy' ] ]
}

HDCGraph

HDCGraph includes the following fields:

Field
Type
Description
namestringHDC graph name.
graphNamestringThe source graph from which the HDC graph is created.
statusstringHDC graph status.
statsstringStatistics of the HDC graph.
isDefaultstringWhether it is the default HDC graph of the source graph.
hdcServerNamestringName of the HDC server that hosts the HDC graph.
hdcServerStatusstringStatus of the HDC server that hosts the HDC graph.
configstringConfigurations of the HDC graph.

If a query retrieves HDC graphs of a garph, you can use asHDCGraphs() to convert them into a list of HDCGraphs.

TypeScript
const requestConfig: RequestConfig = { graph: "g1" };
const response = await driver.gql("SHOW HDC GRAPH", requestConfig);
const hdcGraphs = response.get(0).asHDCGraphs();
for (const hdcGraph of hdcGraphs) {
  console.log(hdcGraph.name);
}

The showHDCGraph() method also retrieves HDC graphs of a graph, it returns a list of HDCGraphs directly.

TypeScript
const requestConfig: RequestConfig = { graph: "g1" };
const hdcGraphs = await driver.showHDCGraph(requestConfig);
for (const hdcGraph of hdcGraphs) {
  console.log(hdcGraph.name);
}
Output
g1_hdc_full
g1_hdc_nodes

Algo

Algo includes the following fields:

Field
Type
Description
namestringAlgorithm name.
typestringAlgorithm type.
versionstringAlgorithm version.
paramsAlgoParam[]Algorithm parameters, each AlgoParam has field name and desc.
writeSupportTypestringThe writeback types supported by the algorithm.
canRollbackstringWhether the algorithm version supports rollback.
configContextstringThe configurations of the algorithm.

If a query retrieves algorithms installed on an HDC server of the database, you can use asAlgos() to convert them into a list of Algos.

TypeScript
const response = await driver.gql("SHOW HDC ALGO ON 'hdc-server-1'");
const algos = response.get(0).asAlgos();
for (const algo of algos) {
  if (algo.type === "algo") {
    console.log(algo.name);
  }
}

The showHDCAlgo() method also retrieves algorithms installed on an HDC server of the database, it returns a list of Algos directly.

TypeScript
const algos = await driver.showHDCAlgo("hdc-server-1");
for (const algo of algos) {
  if (algo.type == "algo") {
    console.log(algo.name);
  }
}
Output
bipartite
fastRP

Projection

Projection includes the following fields:

Field
Type
Description
namestringProjection name.
graphNamestringThe source graph from which the projection is created.
statusstringProjection status.
statsstringStatistics of the projection.
configstringConfigurations of the projection.

If a query retrieves projections of a graph, you can use asProjections() to convert them into a list of Projections.

TypeScript
const requestConfig: RequestConfig = { graph: "g1" };
const response = await driver.gql("SHOW PROJECTION", requestConfig);
const projections = response.get(0).asProjections();
for (const projection of projections) {
  console.log(projection.name);
}
Output
distG1
distG1_nodes

Index

Index includes the following fields:

Field
Type
Description
idstringIndex ID.
namestringIndex name.
propertiesstringProperties associated with the index.
schemastringThe schema associated with the index
statusstringIndex status.
sizestringIndex size in bytes.
dbTypeDBTypeIndex type, which can be DBNODE or DBEDGE.

If a query retrieves node or edge indexes of a graph, you can use asIndexes() to convert them into a list of Indexs.

TypeScript
const requestConfig: RequestConfig = { graph: "g1" };
const response = await driver.gql("SHOW NODE INDEX", requestConfig);
const indexes = response.get(0).asIndexes();
for (const index of indexes) {
  console.log(index)
}

The showIndex(), showNodeIndex(), and showEdgeIndex() methods also retrieve indexes of a graph, it returns a list of Indexs directly.

TypeScript
const requestConfig: RequestConfig = { graph: "g1" };
const indexList = await driver.showIndex(requestConfig);
for (const index of indexList) {
  console.log(index);
}
Output
Index {
  id: '1',
  name: 'User_name',
  properties: 'name(1024)',
  schema: 'User',
  status: 'DONE',
  size: undefined,
  dbType: 0
}

Privilege

Privilege includes the following fields:

Field
Type
Description
namestringPrivilege name.
levelPrivilegeLevelPrivilege level, which can be GraphLevel or SystemLevel.

If a query retrieves privileges defined in Ultipa, you can use asPrivileges() to convert them into a list of Privileges.

TypeScript
const response = await driver.uql("show().privilege()");
const privileges = response.get(0).asPrivileges();

const graphPriviledgeNames = privileges
  .filter((p) => p.level === PrivilegeLevel.GraphLevel)
  .map((p) => p.name)
  .join(", ");
console.log("Graph privileges:" + graphPriviledgeNames);

const systemPriviledgeNames = privileges
  .filter((p) => p.level === PrivilegeLevel.SystemLevel)
  .map((p) => p.name)
  .join(", ");
console.log("System privileges:" + systemPriviledgeNames);

The showPrivilege() method also retrieves privileges defined in Ultipa, it returns a list of Privileges directly.

TypeScript
const privileges = await driver.showPrivilege();

const graphPriviledgeNames = privileges
  .filter((p) => p.level === PrivilegeLevel.GraphLevel)
  .map((p) => p.name)
  .join(", ");
console.log("Graph privileges:" + graphPriviledgeNames);

const systemPriviledgeNames = privileges
  .filter((p) => p.level === PrivilegeLevel.SystemLevel)
  .map((p) => p.name)
  .join(", ");
console.log("System privileges:" + systemPriviledgeNames);
Output
Graph privileges:READ, INSERT, UPSERT, UPDATE, DELETE, CREATE_SCHEMA, DROP_SCHEMA, ALTER_SCHEMA, SHOW_SCHEMA, RELOAD_SCHEMA, CREATE_PROPERTY, DROP_PROPERTY, ALTER_PROPERTY, SHOW_PROPERTY, CREATE_FULLTEXT, DROP_FULLTEXT, SHOW_FULLTEXT, CREATE_INDEX, DROP_INDEX, SHOW_INDEX, LTE, UFE, CLEAR_JOB, STOP_JOB, SHOW_JOB, ALGO, CREATE_PROJECT, SHOW_PROJECT, DROP_PROJECT, CREATE_HDC_GRAPH, SHOW_HDC_GRAPH, DROP_HDC_GRAPH, COMPACT_HDC_GRAPH, SHOW_VECTOR_INDEX, CREATE_VECTOR_INDEX, DROP_VECTOR_INDEX, SHOW_CONSTRAINT, CREATE_CONSTRAINT, DROP_CONSTRAINT
System privileges:TRUNCATE, COMPACT, CREATE_GRAPH, SHOW_GRAPH, DROP_GRAPH, ALTER_GRAPH, CREATE_GRAPH_TYPE, SHOW_GRAPH_TYPE, DROP_GRAPH_TYPE, TOP, KILL, STAT, SHOW_POLICY, CREATE_POLICY, DROP_POLICY, ALTER_POLICY, SHOW_USER, CREATE_USER, DROP_USER, ALTER_USER, SHOW_PRIVILEGE, SHOW_META, SHOW_SHARD, ADD_SHARD, DELETE_SHARD, REPLACE_SHARD, SHOW_HDC_SERVER, ADD_HDC_SERVER, DELETE_HDC_SERVER, LICENSE_UPDATE, LICENSE_DUMP, GRANT, REVOKE, SHOW_BACKUP, CREATE_BACKUP, SHOW_VECTOR_SERVER, ADD_VECTOR_SERVER, DELETE_VECTOR_SERVER

Policy

Policy includes the following fields:

Field
Type
Description
namestringPolicy name.
systemPrivilegesstring[]System privileges included in the policy.
graphPrivilegesMap<string, string[]>Graph privileges included in the policy; in the map, the key is the name of the graph, and the value is the corresponding graph privileges.
propertyPrivilegesPropertyPrivilegeProperty privileges included in the policy; the PropertyPrivilege has fields node and edge, both are PropertyPrivilegeElement objects.
policiesstring[]Policies included in the policy.

PropertyPrivilegeElement includes the following fields:

Field
Type
Description
readstring[][]An array of arrays; each inner array contains three strings representing the graph, schema, and property.
writestring[][]An array of arrays; each inner array contains three strings representing the graph, schema, and property.
denystring[][]An array of arrays; each inner array contains three strings representing the graph, schema, and property.

If a query retrieves policies (roles) defined in the database, you can use asPolicies() to convert them into a list of Policys.

TypeScript
const response = await driver.gql("SHOW ROLE");
const policies = response.get(0).asPolicies();
for (const policy of policies) {
  console.log(policy.name);
}

The showPolicy() method also retrieves policies (roles) defined in the database, it returns a list of Policys directly.

TypeScript
const policies = await driver.showPolicy();
for (const policy of policies) {
  console.log(policy.name);
}
Output
manager
Tester
operator
superADM

User

User includes the following fields:

Field
Type
Description
usernamestringUsername.
passwordstringPassword.
createdTimeDateThe time when the user was created.
systemPrivilegesstring[]System privileges granted to the user.
graphPrivilegesMap<string, string[]>Graph privileges granted to the user; in the map, the key is the name of the graph, and the value is the corresponding graph privileges.
propertyPrivilegesPropertyPrivilegeProperty privileges granted to the user; the PropertyPrivilege has fields node and edge, both are PropertyPrivilegeElement objects.
policiesstring[]Policies granted to the user.

PropertyPrivilegeElement includes the following fields:

Field
Type
Description
readstring[][]An array of arrays; each array list contains three strings representing the graph, schema, and property.
writestring[][]An array of arrays; each array list contains three strings representing the graph, schema, and property.
denystring[][]An array of arrays; each array list contains three strings representing the graph, schema, and property.

If a query retrieves database users, you can use asUsers() to convert them into a list of Users.

TypeScript
const response = await driver.gql("SHOW USER");
const users = response.get(0).asUsers();
for (const user of users) {
  console.log(user.username);
}

The showUser() method also retrieves database users, it returns a list of Users directly.

TypeScript
const users = await driver.showUser();
for (const user of users) {
  console.log(user.username);
}
Output
user01
root
johndoe

Process

Process includes the following fields:

Field
Type
Description
processIdstringProcess ID.
processQuerystringThe query that the process executes.
statusstringProcess status.
durationstringThe duration (in seconds) the process has run.

If a query retrieves processes running in the database, you can use asProcesses() to convert them into a list of Processs.

TypeScript
const response = await driver.gql("TOP");
const processes = response.get(0).asProcesses();
for (const process of processes) {
  console.log(process);
}

The top() method also retrieves processes running in the database, it returns a list of Processs directly.

TypeScript
const processes = await driver.top();
for (const process of processes){
  console.log(process);
}
Output
Process {
  processId: '1060719',
  processQuery: 'MATCH p = ()-{1,7}() RETURN p',
  duration: '1',
  status: 'RUNNING'
}

Job

Job includes the following fields:

Field
Type
Description
idstringJob ID.
graphNamestringName of the graph where the job executes on.
querystringThe query that the job executes.
typestringJob type.
errNsgstringError message of the job.
resultMap<any, any>Result of the job.
startTimestringThe time when the job begins.
endTimestringThe times when the job ends.
statusstringJob status.
progressstringProgress updates for the job, such as indications that the write operation has been started.

If a query retrieves jobs of a graph, you can use asJobs() to convert them into a list of Jobs.

TypeScript
const requestConfig: RequestConfig = { graph: "g1" };
const response = await driver.gql("SHOW JOB", requestConfig);
const jobs = response.get(0).asJobs();
for (const job of jobs) {
  console.log(job);
}

The showJob() method also retrieves processes running in the database, it returns a list of Jobs directly.

TypeScript
const requestConfig: RequestConfig = { graph: "g1" };
const jobs = await driver.showJob(undefined, requestConfig);
for (const job of jobs) {
  console.log(job);
}
Output
Job {
  id: '5',
  graphName: 'g1',
  query: 'CREATE INDEX User_name ON NODE User (name)',
  type: 'CREATE_INDEX',
  errMsg: '',
  result: null,
  startTime: '2025-09-23 17:43:54',
  endTime: '2025-09-23 17:43:55',
  status: 'FINISHED',
  progress: ''
}
Job {
  id: '5_1',
  graphName: 'g1',
  query: '',
  type: 'CREATE_INDEX',
  errMsg: '',
  result: null,
  startTime: '2025-09-23 17:43:55',
  endTime: '2025-09-23 17:43:55',
  status: 'FINISHED',
  progress: ''
}
Job {
  id: '5_2',
  graphName: 'g1',
  query: '',
  type: 'CREATE_INDEX',
  errMsg: '',
  result: null,
  startTime: '2025-09-23 17:43:55',
  endTime: '2025-09-23 17:43:55',
  status: 'FINISHED',
  progress: ''
}
Job {
  id: '5_3',
  graphName: 'g1',
  query: '',
  type: 'CREATE_INDEX',
  errMsg: '',
  result: null,
  startTime: '2025-09-23 17:43:55',
  endTime: '2025-09-23 17:43:55',
  status: 'FINISHED',
  progress: ''
}
Job {
  id: '1',
  graphName: 'g1',
  query: 'CREATE HDC GRAPH g1_hdc_full ON "hdc-server-1" OPTIONS {\n' +
    '  nodes: {"*": ["*"]},\n' +
    '  edges: {"*": ["*"]},\n' +
    '  direction: "undirected",\n' +
    '  load_id: true,\n' +
    '  update: "static"\n' +
    '}',
  type: 'CREATE_HDC_GRAPH',
  errMsg: '',
  result: Map(4) {
    'edge_count' => 4,
    'edge_schema' => { Follows: [Object], default: [Object] },
    'node_count' => 5,
    'node_schema' => { User: [Object], default: [Object] }
  },
  startTime: '2025-09-23 17:29:05',
  endTime: '2025-09-23 17:29:07',
  status: 'FINISHED',
  progress: ''
}
Job {
  id: '1_1',
  graphName: 'g1',
  query: '',
  type: 'CREATE_HDC_GRAPH',
  errMsg: '',
  result: null,
  startTime: '2025-09-23 17:29:05',
  endTime: '2025-09-23 17:29:07',
  status: 'FINISHED',
  progress: ''
}