dbConnect: dbConnect()

Description Usage Arguments See Also Examples

Description

Connect to a Kinetica DB going through the appropriate authentication procedure. You can have multiple connections open and connections can have multiple results attached. This function may be invoked repeatedly assigning its output to different objects. Authentication can be provided by using username/password variables. row_limit param would limit the number of rows in query results, it's an integer value allowing up to 2,147,483,647 rows. Value literal must be followed by L, as in row_limit = 1000000L, also see example below. Use [dbCanConnect()] to check if a connection can be established.

Usage

1
2
3
4
## S4 method for signature 'KineticaDriver'
dbConnect(drv, host = NULL, port = NULL,
  url = NULL, username = NULL, password = NULL, timeout = NULL,
  row_limit = NULL, ha_ring = NULL, ...)

Arguments

drv

Kinetica driver object

host

character string for Kinetica DB host address

port

integer value for Kinetica DB port

url

character string for Kinetica DB url (protocol + host + port)

username

character string for Kinetica DB username

password

character string for Kinetica DB password

timeout

integer value for Kinetica DB connection timeout

...

Other arguments omitted in generic signature

See Also

Other KineticaDriver methods: dbCanConnect,KineticaDriver-method, dbDataType,KineticaDriver-method, dbGetInfo, dbIsValid, dbListConnections,KineticaDriver-method, dbUnloadDriver,KineticaDriver-method, show,KineticaDriver-method

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
# If you jave a Kinetica DB instance running in local docker image,
# the minimum set of parameters to connect is url
dbConnect(Kinetica(), url = "http://localhost:9191")
# You can also use host and port combination
dbConnect(Kinetica(), host = "127.0.0.1", port = 9191)
# Remote instances would also require username and password.
dbConnect(Kinetica(), host = "127.0.0.1", port = 9191,
  username = "username", password = "Pa$$w0rd", row_limit = 1000000L)
con <- dbConnect(Kinetica(), url = "http://localhost:9191")
show(con)
# KineticaConnection
# url: http://localhost:9191
dbDisconnect(con)

## End(Not run)

kineticadb/RKinetica documentation built on Sept. 29, 2020, 5:38 p.m.