Package options

The following package options can be set with R's options function.

SciDB namespaces and roles

The global package option scidb.prefix is designed to simplify working with SciDB user roles from R. SciDB user roles are provided by the namespaces plugin and may require issuing the query load_library('namespaces') before use (usually performed by the SciDB system administrator). For instance, use the scidb.prefix package option to assume a special database user role "functionary" shown in the following example:

options(scidb.prefix="set_role('functionary')")

After setting that, all queries will be prefixed with the role-setting statement. Another use case is to change the default namespace in which to look for arrays from public to something else:

options(scidb.prefix="set_namespace('test_namespace')")

More information on SciDB permissioning and security can be found here.

You may use the scidb.prefix option to prefix queries with arbitrary AFL statements. Separate multiple statements with the semi-colon character.

Alternatively, you may use the scidb_prefix() function on a per-database connection level. The prefix will be displayed in the connection summary.

library(scidb)
db <- scidbconnect()
db <- scidb_prefix(db, "set_role('functionary')")
print(db)

Debugging

Set options(scidb.debug=TRUE) to see interesting debugging information including all the issued SciDB queries.

Change the default shim port and host.

options(scidb.default_shim_port=8080L)
options(scidb.default_shim_host="localhost")

Array download options

When downloading a SciDB array, users are typically interested in the values of array's dimensions as well as its attributes. There are two methods, corresponding to separate internal SciDB operators, that can be used to do this: * by default, the unpack method flattens the array into one whose attributes are the attributes and dimensions of the original array, with one new artificial dimension. * the apply method uses the SciDB apply operator to add attributes with values equal to the dimensions, and can be faster in some cases when used with aio.

Set scidb.unpack=FALSE to use the second apply-based method:

options(scidb.unpack=FALSE)

SSL settings

Set options(scidb.verifyhost=FALSE) to disable SSL certificate host name checking by default. This is important mostly for Amazon EC2 where hostnames rarely match their DNS names. If you enable this then the shim SSL certificate CN entry must match the server host name for the encrypted session to work. Set this TRUE for stronger security (help avoid MTM) in SSL connections.

curl options to allow long connections

Set curl options to allow long connections (some firewalls tend to drop connections for long running scidb queries -- these options prevent such disconnections)

options(scidb.curl_options = list(
   tcp_keepalive = 1L, 
   tcp_keepintvl = 30, 
   tcp_keepidle = 60)
)

To see the full list of curl options, run curl::curl_options()

List of special DDL operators

options(scidb.ddl=c("cancel",
                    "create_array",
                    "remove",
                    "rename",
                    "sync",
                    "add_instances",
                    "remove_instances",
                    "unregister_instances",
                    "create_namespace",
                    "drop_namespace",
                    "move_array_to_namespace",
                    "create_role",
                    "create_user",
                    "drop_namespace",
                    "drop_role",
                    "drop_user",
                    "add_user_to_role",
                    "drop_user_from_role",
                    "set_namespace",
                    "set_role",
                    "set_role_permissions",
                    "verity_user",
                    "create_with_residency")


Paradigm4/SciDBR documentation built on Nov. 9, 2023, 4:58 a.m.