q_utilities: functions that interact directly with the KDB+ processes...

Description Usage Arguments Value Examples

Description

The q_set_operation function performs a set operation on a list of vectors. The supported operations are: union, intersection and complement (minus). These operations are executed in an incremental manner across the list of vectors in the function API calls.

The get_q_object returns a Q object from the KDB+ server

The get_q_table returns a Q table from the KDB+ server

Usage

1
2
3
4
5
6
7
8
q_set_operation(list_of_q_vectors = "__NULL__", set_operation = "__NULL__",
  api_function = "q_set_operation", return_all_flag = F, ...)

get_q_object(q_object_name, api_function = "get_q_object",
  return_all_flag = F, ...)

get_q_table(q_table_name, return_all_flag = F, api_function = "get_q_table",
  ...)

Arguments

list_of_q_vectors

a list containing vectors on which the operation should be performed

set_operation

a character value indicating the type of set operation requested. Allowed values are: "union","intersection" and "complement"

api_function

a variable indicating the name of the function. It is unlikely that you'll ever need to change the value of this parameter and it is best left as-is

return_all_flag

a boolean value indicating whether all the data should be returned to R. This parameter generally defaults to FALSE since returning large amounts of data to the R Session may take time. It should be set to TRUE only if you are certain that you'd like to load all the data that is a result of the query into your session.

q_object_name

the name of the Q object

q_table_name

the name of the Q table

Value

q_set_operation: a data table with the results of the query

get_q_object: a data table with the values of the Q object

get_q_table: a data table with the values of the Q object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# union of c(1,2,3) and c(3,4,5)
q_set_operation(list(c(1,2,3),c(3,4,5)), set_operation = "union")

# intersection of c(1,2,3) and c(3,4,5)
q_set_operation(list(c(1,2,3),c(3,4,5)), set_operation = "intersection")

# complement of c(1,2,3) and c(3,4,5)
q_set_operation(list(c(1,2,3),c(3,4,5)), set_operation = "complement")

# get the JSON object APP_QUERY in the KDB+ server
get_q_object("APP_QUERY")

# get the Q table dim_cap from the KDB+ server
get_q_table("dim_cap")

xbsd/rxdsapi2 documentation built on May 14, 2019, 11:08 a.m.