Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This page lists all built-in edge methods that can be accessed by edge aliases using the dot (.
) operator.
getAttr()
e.getAttr( attrName, atterType )
Returns the value of an attribute of the edge.
The data type of the attribute itself.
If we have the following edge:
Assume the alias of the edge is e
:
isDirected()
e.isDirected()
Returns a boolean value indicating whether the edge is directed or undirected.
BOOL
None.
setAttr()
e.setAttr( attrName, attrNewValue)
Sets an attribute of an edge to a new value.
No return value.
Parameter
Description
Data type
attrName
The name of the attribute.
STRING
attrType
The type of the attribute
STRING
Parameter
Description
Data type
attrName
The name of the attribute
STRING
attrNewValue
The new value of the attribute
The type of the attribute
This section contains information on all functions in the GSQL query language.
This section contains information on all functions in the GSQL query language. Functions are categorized by data type when applicable, and by purpose when the function involves multiple data structures.
All built-in function names are case-insensitive. However, user-defined function names are case-sensitive
Built-in functions:
In GSQL, users can supplement the language by defining their own Query User-Defined Functions (Query UDF). To learn about how to define a Query UDF, see Query User-Defined Functions.
This page lists the methods of a JSONARRAY object. Methods can be accessed via the dot(.
) operator.
getBool()
jsonarray.getBool( idx )
Returns the boolean value at a specified index.
BOOL
getDouble()
jsonarray.getDouble( idx )
Returns the double at a specified index.
DOUBLE
getInt()
jsonarray.getInt( idx )
Returns the integer value at a specified index.
INT
getJsonArray()
jsonarray.getJSONArray( idx )
Returns the JSONArray value at a specified index.
BOOL
getJsonObject()
jsonarray.getJsonObject( idx )
Returns the JSONOBJECT value at a specified index.
JSONOBJECT
getString()
jsonarray.getString( idx )
Returns the boolean value at a specified index.
STRING
size()
jsonarray.size()
Returns the size of the array.
INT
None.
This page lists the aggregation functions available in the GSQL query language. These functions take a single SET
, BAG,
SetAccum
, BagAccum
, or ListAccum
as the parameter and return an aggregated value from all members of the set or bag.
The DISTINCT
keyword can be used to include repeated values only once when aggregating.
avg( [DISTINCT] setExp )
Returns the average of all elements in a set or bag. The function can only take set/bag expressions whose members are numeric types.
A numeric type. If all members of the set/bag expression are integers, the return value will also be rounded down to be an integer.
count( [DISTINCT] setExp )
Returns the size of the set or bag.
INT
max( [DISTINCT] setExp )
Returns the member with the maximum value in a set or bag. The function can only take set/bag expressions whose members are numeric types.
A numeric type.
min( [DISTINCT] setExp )
Returns the member with the minimum value in a set or bag. The function can only take set/bag expressions whose members are numeric types.
A numberic type.
sum( [DISTINCT] setExp )
Returns the sum of all members in a set or bag. The function can only take set/bag expressions whose members are numeric types.
A numeric type.
Parameter
Description
Data type
idx
The index of the value to return
INT
Parameter
Description
Data type
idx
The index of the value to return
INT
Parameter
Description
Data type
idx
The index of the value to return
INT
Parameter
Description
Data type
idx
The index of the value to return
INT
Parameter
Description
Data type
idx
The index of the value to return
INT
Parameter
Description
Data type
idx
The index of the value to return
INT
Parameter | Description | Data type |
| An expression that evaluates to a |
|
Parameter | Description | Data type |
| An expression that evaluates to a |
|
Parameter | Description | Data type |
| An expression that evaluates to a |
|
Parameter | Description | Data type |
| An expression that evaluates to a |
|
Parameter | Description | Data type |
| An expression that evaluates to a |
|
The functions on this page are used to convert data from one type to another in the GSQL query language.
parse_json_array()
parse_json_array( str )
Converts a string into a JSON array. The string must be properly formatted, or the function will generate a run-time error. To be properly formatted, besides having the proper nesting and matching of curly braces { }
and brackets [ ]
, each value field must be one of the following:
a string
a number
a boolean
a JSONOBJECT - Each key of a key-value pair must be a string in double quotes.
a JSON array
JSONARRAY
parse_json_object()
parse_json_object( str )
Converts a string into a JSON object. The string must be properly formatted, or the function will generate a run-time error. To be properly formatted, besides having the proper nesting and matching of curly braces { }
and brackets [ ]
, each value field must be one of the following:
a string
a number
a boolean
a JSONOBJECT - Each key of a key-value pair must be a string in double quotes, and the quotes need to be escaped with a backlash-escape \
. However, if you are supplying the string in GraphStudio as a parameter, you do not need the backlash-escape since string values are not enclosed in double quotes.
a JSON array
JSONOBJECT
str_to_int ()
str_to_int (str)
Converts a string to an integer.
INT
to_datetime ()
to_datetime ( str )
Converts a string value into a DATETIME
value.
DATETIME
to_string()
to_string(num)
Converts a number to a string.
STRING
This page lists DATETIME
functions that are available in the GSQL query language. Every function in this page either takes a DATETIME
object as its argument or return a DATETIME
object.
datetime_add()
datetime_add( date, INTERVAL int_value time_unit )
Calculates a new DATETIME
from a specified datepart multiplied by a specified amount, added to a specified DATETIME
.INTERVAL
is a keyword that must be exactly entered. time_unit
is one of the keywords YEAR
, MONTH
, DAY
, HOUR
, MINUTE
, or SECOND
.
DATETIME
datetime_diff()
datetime_diff( date1, date2 )
Calculates the difference in seconds between two DATETIME
values
INT
datetime_format()
datetime_format(date[, str])
Print a DATETIME
value in a specific format indicated by a string.
STRING
datetime_sub( )
datetime_sub(date, INTERVAL int_value time_unit)
Calculates a new DATETIME
from a specified datepart multiplied by a specified amount, subtracted from a specified DATETIME
.INTERVAL
is a keyword that must be exactly entered. time_unit
is one of the keywords YEAR
, MONTH
, DAY
, HOUR
, MINUTE
, or SECOND
.
DATETIME
datetime_to_epoch()
datetime_to_epoch( date )
Converts a DATETIME
value to epoch time.
INT
day()
day( date )
Returns the day of the month of a DATETIME
value.
INT
epoch_to_datetime()
epoch_to_datetime(int_value)
Converts an epoch time value to a DATETIME
value.
DATETIME
hour()
hour(date)
Extracts the hour of the day from a DATETIME
value.
INT
minute()
minute(date)
Extracts the minute of the hour from a DATETIME
value.
INT
month()
month(date)
Extracts the month of the year from a DATETIME
value.
now()
now()
Returns the current time in DATETIME
DATETIME
None.
second()
second(date)
Extracts the second from a DATETIME
value.
INT
year()
year(date)
Extracts the year from a DATETIME
value.
This page lists the string functions available in the GSQL query language
ascii( str )
Returns the ASCII (numeric) position of the first character in a string. If the argument is an empty string, returns 0.
INT
chr( n )
Converts an integer to a character according to its ASCII position. If the input value n
is greater than 255, returns the character at the position of the modulo of n / 256
.
STRING
difference(str1, str2)
Compares the Soundex codes of two strings and returns an integer. The return value ranges from 0 to 4, and it indicates the similarity between the input strings' phonetic representation values.
0 indicates weak similarity, and 4 indicates strong similarity with identical phonetic representation values.
INT
find_in_set(str, str_list)
Returns the position of a string within a list of strings separated by commas.
If string
is not found in string_list
, this function returns -1.
NOTE:
find_in_set
does not ignore whitespace after the comma. For example,find_in_set("a", "b a, a") = 0
, indicating that “a” is not an element in the list. This happens because the second and third elements of the list are space+a, rather than a.
INT
gsql_uuid_v4()
Generates and returns a version-4 universally unique identifier(UUID).
STRING
None.
insert(str1, position[, number], str2)
Inserts a string within a string at the specified position and for a certain number of characters, and replaces a specified number of characters starting from the insertion position. The starting index is 0.
STRING
instr (str, substr [, position, occurence])
Searches a string (str
) for a substring (substr
) and returns the location of the substring in the string. If a substring that is equal to substr
is found, then the function returns an integer indicating the position of the first character of this substring. If no such substring is found, then the function returns -1.
INT
left(str, number_of_chars)
Extracts a number of characters from a string starting from left.
STRING
length(str)
Returns the length of the input string.
INT
ltrim( str[, set] )
Removes all occurrences of the characters contained in a set from a string from the left side.
The function begins scanning the string from its first character and removes all characters that appear in set
until reaching a character not in set
and then returns the result.
STRING
lower(str)
Returns the input string with all letters in lowercase.
STRING
lpad(str, padded_length [, pad_str] )
Pads the left side of a string with another pad string. If the pad string (pad_str
) is omitted, it will pad with white space. If the parameter length is smaller than the original string, it will truncate the string from the right side.
STRING
replace(str, str_to_replace [, replacement_str])
Replaces a sequence of characters in a string with another set of characters.
STRING
right(str, number_of_chars)
Extracts a number of characters from a string starting from the right.
STRING
rpad(str, padded_length [, pad_str] )
Pads the right side of a string (str
) with another pad string. If the pad string (pad_str
) is omitted, it will pad with white space. If the parameter length is smaller than the original string, it will truncate the string from the right side.
STRING
rtrim( str [,set] )
Removes all occurrences of the characters contained in a set from a string from the right side.
The function begins scanning the string from its last character and removes all characters that appear in set
until reaching a character not in set
and then returns the result.
STRING
soundex( str )
Returns a character string containing the Soundex code of str
. This function lets you compare words that are spelled differently, but sound alike in English.
Soundex is a phonetic algorithm defined in The Art of Computer Programming, Volume 3: Sorting and Searching, by Donald E. Knuth, as follows:
Retain the first letter of the string and remove all other occurrences of the following letters: a, e, h, i, o, u, w, y.
Assign numbers to the remaining letters (after the first) as follows:
If two or more letters with the same number were adjacent in the original name (before step 1), or adjacent except for any intervening h and w, then retain the first letter and omit the rest of all the adjacent letters with the same number.
Return the first four bytes padded with 0.
STRING
space( n )
Returns a string that contains the specified number of space characters
STRING
substr(str, start [, length])
Returns the substring indicated by the start point and length. If the parameter length is omitted, then it will extend to the end.
STRING
translate( str_origin, characters, translations )
Returns the string from the first argument after the characters specified in the second argument are translated into the characters specified at the same index in the third argument.
NOTE: The function will return an error if
characters
andtranslations
have different lengths.
STRING
trim( [ [ LEADING | TRAILING | BOTH ] [removal_char FROM] ] str )
Trims characters from the leading and/or trailing ends of a string.
By using one of the keywords LEADING
, TRAILING
, or BOTH
, the user can specify that characters are to be removed from the left end, right end, or both ends of the string, respectively. If none of these keywords is used, the function will remove from both ends.
STRING
upper(str)
Returns the input string with all letters in uppercase.
STRING
This page lists the methods of a JSON object variable. Methods can be accessed using the dot(.
) operator.
containsKey()
jsonobject.containsKey( keyStr )
Returns a boolean value indicating whether the JSON object contains a specified key.
BOOL
getBool()
jsonobject.getBool( keyStr )
Returns the boolean value associated with a specified key.
BOOL
getDouble()
jsonobject.getDouble( keyStr )
Returns the double value associated with a specified key.
DOUBLE
getInt()
jsonobject.getInt( keyStr )
Returns the integer value associated with a specified key.
INT
getJsonArray()
jsonobject.getJsonArray( keyStr )
Returns the JSON array value associated with a specified key.
JSONARRAY
getJsonObject()
jsonobject.getJsonObject( keyStr )
Returns the value associated with a specified key.
JSONOBJECT
getString()
jsonobject.getString( keyStr )
Returns the string value associated with a specified key.
STRING
This page lists the mathematical functions that are available in the GSQL query language. They are divided into three categories:
General
Logarithmic
Trigonometric
abs( num )
Returns the absolute value of a number.
Number
ceil(num)
Rounds a number up to the smallest integer that's greater than or equal to the number.
INT
exp(num)
Returns the base-e exponential of a number.
FLOAT
float_to_int (num)
Converts a floating-point number to an integer by truncating the floating part.
INT
floor(num)
Rounds a number down to the biggest integer that is smaller than or equal to the number.
INT
fmod(numer, denom)
Returns the floating-point remainder of numer
divided by denom
FLOAT
ldexp(x, exp)
Returns x
multiplied by 2 raised to the power of exp
FLOAT
PI()
Returns the value of π.
DOUBLE
None.
pow(base, exp)
Returns the power of a number.
FLOAT
rand( [seed] )
Returns a completely random number >= 0 and <1. If seed
is specified, it returns a repeatable sequence of random numbers. If no seed is specified, it returns a completely random number.
DOUBLE
round ( num[, integer] )
Rounds a number to a specified place relative to the decimal point and returns the result.
A numeric type.
sign( num )
Returns the sign of a number. If the number is positive, return 1
; if the number is negative, return -1
; if the number is 0
, return 0
INT
square( num )
Returns the square of a number.
A numeric type.
sqrt(num)
Returns the square root of a number
FLOAT
trunc( num, [decimal_place] )
Returns a number truncated to a specified decimal place.
A numeric type.
log(num)
Returns the natural logarithm of a number (base e).
DOUBLE
log2( num )
Returns the base-2 logarithm of a number.
DOUBLE
log10(num)
Return the common logarithm of a number (base 10).
FLOAT
acos(num)
Returns the arc cosine of a number.
FLOAT
asin(num)
Returns the arc sine of a number.
FLOAT
atan(num)
Returns the arctangent of a number.
FLOAT
atan2(y, x)
Returns the arctangent of a fraction.
FLOAT
cos(num)
Returns the cosine of a number.
FLOAT
cosh(num)
Returns the hyperbolic cosine of a number.
FLOAT
cot( num )
Returns the cotangent of a number.
DOUBLE
degrees( num )
Converts a value in radians to degrees.
DOUBLE
radians( num )
Converts a value in degrees to radians.
DOUBLE
sin(num)
Returns the sine of a number.
FLOAT
sinh(num)
Returns the hyperbolic sine of a number.
FLOAT
tan(num)
Returns the tangent of a number.
FLOAT
tanh(num)
Returns the hyperbolic tangent of a number.
FLOAT
This page lists the vertex functions that are available in the GSQL query language. The functions are divided into three categories.
Vertex alias methods
Methods available to vertex aliases
Vertex-level access control(VLAC) vertex alias methods
Methods available to vertex aliases that are related to vertex tags.
Vertex functions
Functions that return a vertex or vertex set, or functions that are closely related to certain attributes of VERTEX
type variables.
This section lists the built-in methods of vertex aliases. Methods can be accessed by the dot (.
) operator.
edgeAttribute()
v.edgeAttribute( edgeType, attrName )
From a vertex, traverse edges of a specified type and return the bag of values for a specified edge attribute.
BagAccum<attrType>
filter()
BagAccum
getAttr()
v.getAttr(attrName, attrType)
Returns the value of a vertex attribute on the vertex.
attrType
neighborAttribute()
v.neighborAttribute( edgeType, targetVertexType, attrName )
From a vertex, traverses edges of a specified type to its neighbors of a specified type, and returns the set of values for a specified attribute.
BagAccum<attrType>
For the following graph:
neighbors()
v.neighbors([edgeType])
Returns the out-neighbors or undirected neighbors of the vertex. If edge types are provided, it will only return the neighbors connected by the specified edge types.
BagAccum<VERTEX>
For the following graph:
outdegree()
v.outdegree([edgeType])
Returns the number of outgoing or undirected edges connected to the vertex. If edge types are provided, it will only return the number of edges of the specified types.
INT
Note on outdegree(): This function reads a metadata value stored with each vertex, to avoid traversing the graph and thus have a fast response. The snapshot transaction semantics means that outdegree() may sometimes read an old value if there are concurrent write transactions. To guarantee an accurate count, traverse the neighboring edges and count them with a SumAccum, or use a function like neighbors() and then use size() on the set.
setAttr()
v.setAttr( attrName, newValue )
Sets the specified attribute of a vertex to a new value.
No return value.
This section covers the vertex alias methods used to access and modify tags on vertices,
addTags()
v.addTags(STRING tag1,... STRING tagN)
Adds the tags provided in the argument list to the vertex.
No return value.
differenceTags()
v.differenceTags( v2 )
Returns the difference in tags between the vertex and another vertex as a set.
SET<STRING>
getTags()
v.getTags()
Returns the vertex's tags as a set. If the vertex has no tags or is untaggable, it returns an empty set.
SET<STRING>
None.
Tip: getTags()
can be used within a PRINT
statement:
PRINT R [R.getTags()];
or PRINT R WITH TAGS
which is syntax sugar, except that it won’t print "R.getTags()": []
for non-taggable vertices.
hasTags()
hasTags( tag1, tag2, ..., tagN )
Returns true
if the vertex has every tag provided in the argument list and returns false
if it does not.
BOOL
The output of the query would be:
isTaggable()
v.isTaggable()
Returns true if the vertex is taggable.
BOOL
None
intersectTags()
v.intersectTags( v2 )
Returns the common tags between the vertex and another vertex as a set.
SET<STRING>
removeAllTags()
v.removeAllTags()
Removes all tags from the vertex.
No return value.
None
removeTags()
removeTags( tag1, tag2, ..., tagN )
Removes the tags provided in the argument list from the vertex.
No return value.
The functions in this section either have return values of vertex or vertex set type or are closely related to vertex attributes.
getvid()
getvid( v )
Returns the internal ID number of a vertex.
The internal ID is not the primary ID which the user assigned when creating the vertex. However, there is a 1-to-1 mapping between the external ID (primary_id
) and internal ID.
The engine can access the internal ID faster than accessing the external ID, so if a query needs unique values for a large number of vertices, but doesn't care about particular values, getvid()
can be a useful option. For example, in many community detection algorithms, we start by assigning every vertex a unique community ID. Then, as the algorithm progresses, some vertices will join the community of one of their neighbors, giving up their current community ID and copying the IDs of their neighbors.
INT
selectVertex()
selectVertex( filepath, vertexIdColumn, vertexTypeColumn, seperator, header)
Reads a data file that lists particular vertices of the graph and returns the corresponding vertex set. This function can only be used in a vertex set variable declaration statement as a seed set and the vertices in the data file must already be in the graph. The data file must be organized as a table with one or more columns. One column must be for vertex ID. Optionally, another column is for vertex type.
SET<VERTEX>
to_vertex()
Running to_vertex() and to_vertex_set()
requires real-time conversion of an external ID to a GSQL internal ID, which is a relatively slow process. Therefore,
If the user can always know the id before running the query, define the query with VERTEX
or SET<VERTEX>
parameters instead of STRING
or SET<STRING>
parameters, and avoid calling to_vertex()
or to_vertex_set()
.
Calling to_vertex_set()
one time is much faster than calling to_vertex()
multiple times. Use to_vertex_set()
instead of to_vertex()
as much as possible.
to_vertex( id, vertex_type )
Returns a vertex from a string ID and vertex type. If a vertex with the provided ID and type does not exist, the function will throw a run-time error.
VERTEX
to_vertex_set()
to_vertex_set( id_set, vertex_type)
Returns a vertex set from a set or bag of string IDs and a vertex type. If there are invalid IDs in the set, those IDs will be skipped and the response will contain a warning message. If the vertex type does not exist, the function will throw a run-time error.
SET<VERTEX>
In GSQL, users can supplement the language by defining their own query user-defined functions (query UDF). Query UDFs can be called in queries and subqueries to perform a set of defined actions and return a value like the built-in functions.
This page introduces the process to define a query UDF. Once defined, the new functions will be added into GSQL automatically next time GSQL is executed.
Below are the steps to add a Query UDF to GSQL:
Use the GET ExprFunctions
command in GSQL to download the current UDF file to any location on your machine. The file and the directores will be created if they do not exist, and the file must end with the file extention .hpp
:
If your query UDF requires a user-defined struct or helper function, also use the GET ExprUtil
command to download the current ExprUtil
file:
Define the C++ function inside the UDIMPL
namespace inside of the UDF file you just downloaded in Step 1. The definition of the function should include the keyword inline
. Only bool
, int
, float
, double
, and string
(NOT std::string
) are allowed as the return value type and the function argument type. However, any C++ type is allowed inside a function body.
If the function requires a user-defined struct or helper function, define it in the ExprUtil
file you downloaded in Step 1.
Below is an example of a query UDF definition:
If any code in ExprFunctions.hpp
or ExprUtil.hpp
causes a compilation error, GSQL cannot install any GSQL query, even if the GSQL query doesn't call any query UDF. Therefore, please test each new query UDF after adding it. One way of testing a function is to create a new file test.cpp
and compile it:
> g++ test.cpp
> ./a.out
You might need to remove the include header #include <gle/engine/cpplib/headers.hpp>
in ExprFunctions.hpp
and ExprUtil.hpp
in order to compile.
After you have defined the function, use the PUT
command to upload the files you modified.
The PUT
command will automatically upload the files to all nodes in a cluster. Once the files are uploaded, you will be able to call the query UDF the next time GSQL is executed. This includes the next time you start the GSQL shell or executing GSQL scripts from a bash shell.
Suppose you are working in a distributed environment and want to add a function that that returns a random double between 0 and 1.
Start by downloading the current UDF file with the GET
command:
In the downloaded file, add the function definition for function rng
and add the necessary include directives at the top:
Lastly, use the PUT
command to upload the file. This will uploaded the file to all nodes in a cluster:
The UDF has now been added to GSQL and you can start using the function in GSQL queries.
This page lists the functions in the GSQL query language that are not tied to any single data type.
coalesce()
coalesce( exp [, exp ...] )
Returns the first expression that isn't NULL
.
This function requires all its arguments have the same data type (BOOL
, INT
, FLOAT,
DOUBLE
, STRING
, or VERTEX
). The only exception is that different numeric types can be used together. In this case, all values are converted into the first argument type.
BOOL
, INT
, FLOAT,
DOUBLE
, STRING
, or VERTEX
The function takes a number of parameters and returns the first one that does not evaluate to NULL
evaluate()
evaluate( expressionStr, typeStr )
Takes a string argument and interprets it as an expression which is evaluated during run-time. This enables users to create a general purpose query instead of separate queries for each specific computation.
This function cannot be nested.
The following situations generate a run-time error:
The expression string expressionStr cannot be compiled (unless the error is due to a non-existent vertex or edge attribute).
The result type of the expression does not match the parameter typeStr.
Silent failure conditions
If any of the following conditions occur, the query may continue running, but the entire clause or statement in which the evaluate() function resides will fail, without producing a run-time error message. For conditional clauses (WHERE, HAVING), a failing evaluate() clause is treated as if the condition is false. An assignment statement with a failing evaluate() will not execute, and an ORDER BY clause with a failing evaluate() will not sort.
The expression references a non-existent attribute of a vertex or edge alias.
The expression uses an operator for non-compatible operation. For example, 123 == "xyz".
Tyep indicated by typeStr
This function is appended to , , or to filter the output set according to a filter condition. Only elements that satisfy the condition will be returned.
Parameter
Description
Data type
str
The string to be converted into a JSON array.
STRING
Parameter
Description
Data type
str
The string to be converted into a JSON object.
STRING
Parameter
Description
Data type
str
The string that contains an integer to convert to an integer
STRING
Parameter
Description
Data type
str
A string value
STRING
Parameter
Description
Data type
num
The number to turn into a string
Number
Parameter
Description
Data type
date
The DATETIME
to add to.
DATETIME
int_value
An integer value
INT
Parameter
Description
Data type
date1
A DATETIME
value
DATETIME
date2
A DATETIME
value
DATETIME
Parameter
Description
Data type
date
A DATETIME
value
DATETIME
str
A string pattern expressing the format to print date
in. Use the following specifiers in your string to insert the corresponding value in the output.
%Y
- year
%m
- month
%d
- day of month
%H
- hour
%M
- minute
%S
- second
The default value for this parameter is "%Y-%m-%d %H:%M:%S"
DATETIME
Parameter
Description
Data type
date
The DATETIME
to subtract from
DATETIME
int_value
An integer value
INT
Parameter
Description
Data type
date
A DATETIME
value
DATETIME
Parameter
Description
Data type
date
A DATETIME
value
DATETIME
Parameter
Description
Data type
int_value
An epoch time value
INT
Parameter
Description
Data type
date
A DATETIME
value
DATETIME
Parameter
Description
Data type
date
A DATETIME
value
DATETIME
Parameter
Description
Data type
date
A DATETIME
value
DATETIME
Parameter
Description
Data type
date
A DATETIME
value
DATETIME
Parameter
Description
Data type
date
A DATETIME
value
DATETIME
Parameter
Description
Data type
str
A string value
STRING
Parameter
Description
Data type
n
An integer value
INT
Parameter
Description
Data type
str1
A string value
STRING
str2
A string value
STRING
Parameter
Description
Data type
str
A string value
STRING
str_list
A string representation of a list of strings.
STRING
Parameter
Description
Data type
str1
The string to insert another string into
STRING
position
The index of the starting position to insert the string
INT
number
Optional. The number of characters from the original string that will be replaced. If the argument is left off, it defaults to 0.
STRING
str2
The string to be inserted
STRING
Parameter
Description
Data type
str
The string to search
STRING
substr
The string to search for in str
STRING
position
Optional. The position is a nonzero integer indicating the character of str
from where the search begins. If omitted, it defaults to 0. The first position in the string is 0. If position
is negative, then the function counts backward from the end of str
and then searches backward from the resulting position.
STRING
occurrence
Optional, The occurrence is an integer indicating which occurrence of substr
in str
the function should search for.
STRING
Parameter
Description
Data type
str
A string value
STRING
number_of_chars
The number of characters to extract
INT
Parameter
Description
Data type
str
The string whose length to evaluate
STRING
Parameter
Description
Data type
str
A string value
STRING
set
Optional. A string of characters. The distinct characters from the string form the set. If not specified, it defaults to a single space.
STRING
Parameter
Description
Data type
str
The string to convert to lowercase
STRING
Parameter
Description
Data type
str
The string to pad characters to
STRING
padded_length
The number of characters to return. If the padded_length
is smaller than the original string, the lpad
function will truncate the string to the size of padded_length
.
INT
pad_str
Optional. This is the string that will be padded to the left-hand side of str
. If this parameter is omitted, the lpad
function will pad spaces to the left-side of str
.
STRING
Parameter
Description
Data type
str
The original string whose substrings are to be replaced
STRING
str_to_replace
The string that will be searched for and replaced in str
STRING
replacement_str
Optional. The string that will replace str_to_replace
. If omitted, replace()
removes all occurrences of string_to_replace, and returns the resulting string.
STRING
Parameter
Description
Data type
str
A string value
STRING
number_of_chars
The number of characters to extract
INT
Parameter
Description
Data type
str
The string to pad characters to
STRING
padded_length
The number of characters to return. If the padded_length
is smaller than the original string, the lpad
function will truncate the string to the size of padded_length
.
INT
pad_str
Optional. This is the string that will be padded to the right-hand side of str
. If this parameter is omitted, the lpad
function will pad spaces to the right-side of str
.
STRING
Parameter
Description
Data type
str
A string value
STRING
set
Optional. A string of characters. The distinct characters from the string form the set. If not specified, it defaults to a single space.
STRING
Parameter
Description
Data type
str
A string value
STRING
Parameter
Description
Data type
n
An integer value
INT
Parameter
Description
Data type
str
The string to extract substring from
STRING
start
The position that indicates the start of the substring
INT
length
Optional. The length of the substring. If omitted, the substring will be
INT
Parameter
Description
Data type
str_origin
A string value
STRING
characters
A string of characters
STRING
translations
A string of characters
STRING
Parameter
Description
Data type
removal_char
Optional. The character to remove. If removal_char
is not specified, the function will remove whitespaces, including spaces, tabs, and newlines. If removal_char
is specified, the user must also write the keyword FROM
between removal_char
and str
.
STRING
str
A string value.
STRING
Parameter
Description
Data type
str
The string to convert to uppercase
STRING
Parameter
Description
Data type
keyStr
A string.
STRING
Parameter
Description
Data type
keyStr
The key whose value to return
STRING
Parameter
Description
Data type
keyStr
The key whose value to return
STRING
Parameter
Description
Data type
keyStr
The key whose value to return
STRING
Parameter
Description
Data type
keyStr
The key whose value to return
STRING
Parameter
Description
Data type
keyStr
The key whose value to return
STRING
Parameter
Description
Data type
keyStr
The key whose value to return
STRING
Parameter
Description
Data type
num
The number to return the absolute value for
Number
Parameter
Description
Data type
num
The number to round up from
num
Parameter
Description
Data type
num
The exponent
Number
Parameter
Description
Data type
num
The floating-point number to convert to integer
FLOAT
Parameter
Description
Data type
num
The number to round down from
Number
Parameter
Description
Data type
numer
The dividend
Number
denom
The divisor
Number
Parameter
Description
Data type
x
The base
Number
exp
The exponent of 2
Number
Parameter
Description
Data type
base
The base
Number
exp
The exponent
Number
Parameter
Description
Data type
seed
Optional. If seed
is specified, it returns a repeatable sequence of random numbers. If no seed is specified, it returns a completely random number
UINT
Parameter
Description
Data type
num
The number to be rounded
NUM
integer
Optional. An integer value indicating the place to round the first argument to.
If integer
is positive, the function returns num
rounded to integer
places to the right of the decimal point. If you omit integer
, then num
is rounded to zero places. If integer
is negative, then num
is rounded off to the left of the decimal point.
INT
Parameter
Description
Data type
num
A numeric value
INT
, DOUBLE
Parameter
Description
Data type
num
A numeric value.
INT
, FLOAT
, or DOUBLE
Parameter
Description
Data type
num
The number to get square root for.
Number
Parameter
Description
Data type
num
The number to be truncated
INT
, FLOAT
or DOUBLE
decimal_place
Optional. The integer indicating the decimal place to truncate the number to.
If decimal_plac
is positive, the function returns the number truncated to decimal_place
decimal places. If decimal_place
is omitted, then the number is truncated to 0 places. decimal_place
can be negative to truncate (make zero) decimal_place
digits left of the decimal point.
INT
Parameter
Description
Data type
num
The number to compute natural logarithm for
Number
Parameter
Description
Data type
num
A numeric value
INT
, FLOAT
, DOUBLE
Parameter
Description
Data type
num
The number to compute common logarithm for
Number
Parameter
Description
Data type
num
The number to compute arccosine for
Number
Parameter
Description
Data type
num
The number to compute arcsine for
Number
Parameter
Description
Data type
num
The number to compute arctangent for
Number
Parameter
Description
Data type
y
The dividend of the fraction to compute arctangent for
Number
x
The divisor of the fraction to compute arctangent for
Number
Parameter
Description
Data type
num
The number to return cosine for
Number
Parameter
Description
Data type
num
The number to compute hyperbolic cosine for
Number
Parameter
Description
Data type
num
A numeric value
INT
, FLOAT
, or DOUBLE
Parameter
Description
Data type
num
A numeric value
INT
, FLOAT
, or DOUBLE
Parameter
Description
Data type
num
A numeric value
INT
, FLOAT
, or DOUBLE
Parameter
Description
Data type
num
The number to compute sine for
Number
Parameter
Description
Data type
num
The number to compute hyperbolic sine for
Number
Parameter
Description
Data type
num
The number to compute tangent for
Number
Parameter
Description
Data type
num
The number to compute hyperbolic tangent for
Number
Parameter | Description | Data type |
| The edge type to traverse |
|
| The attribute whose value to retrieve |
|
Parameter | Description | Data type |
| An expression that evaluates to a boolean value |
|
Parameter | Description | Data type |
| A vertex attribute |
|
| The type of the attribute value |
|
Parameter | Description | Data type |
| The edge type to traverse |
|
| The target vertex type to visit |
|
| An attribute of the target vertex type |
|
Parameter | Description | Data type |
| Optional. An edge type or a collections of edge types. |
|
Parameter | Description | Data type |
| Optional. An edge type or a collection of edge types. |
|
Parameter | Description | Data type |
| The name of an attribute |
|
| The new value for the attribute | The type of the attribute |
Parameter | Description | Data type |
| A tag to add to the vertex |
|
Parameter | Description | Data type |
| A vertex |
|
Parameter | Description | Data type |
| A string. |
|
Parameter | Description | Data type |
| A string value |
|
Parameter | Description | Data type |
| A vertex alias. | Vertex alias |
Parameter | Description | Data type |
| The absolute file path of the input file to be read. A relative path is not supported. |
|
| The vertex ID column position. The index for column positions starts at 0. Therefore, to designate the first column as the ID column, set this parameter to |
If |
| The vertex type column position or a specific vertex type. |
If Alternatively, a vertex type without double quotes. |
| The column separator character. |
|
| Whether this file has a header. | `BOO |
Parameter | Description | Data type |
| The ID of a vertex |
|
| The type of the vertex |
|
Parameter | Description | Data type |
| A set of vertex IDs |
|
| The type of the vertices |
|
Parameter | Description | Data type |
| The expression to evaluate typed as a string.
|
|
| The return type for the function call. It must be a string literal for a primitive data type, e.g., one of |
|