Title: | Interface to 'Greenplum' Database |
---|---|
Description: | Fully 'DBI'-compliant interface to 'Greenplum' <https://greenplum.org/>, an open-source parallel database. This is an extension of the 'RPostgres' package <https://github.com/r-dbi/RPostgres>. |
Authors: | Michael Williams [aut, cre] |
Maintainer: | Michael Williams <[email protected]> |
License: | GPL-2 |
Version: | 0.1.2 |
Built: | 2024-11-14 06:00:25 UTC |
Source: | https://github.com/mwillumz/rgreenplum |
Manually disconnecting a connection is not necessary with RGreenplum, but still recommended; if you delete the object containing the connection, it will be automatically disconnected during the next GC with a warning.
## S4 method for signature 'GreenplumDriver' dbConnect(drv, dbname = NULL, host = NULL, port = NULL, password = NULL, user = NULL, service = NULL, ..., bigint = c("integer64", "integer", "numeric", "character"))
## S4 method for signature 'GreenplumDriver' dbConnect(drv, dbname = NULL, host = NULL, port = NULL, password = NULL, user = NULL, service = NULL, ..., bigint = c("integer64", "integer", "numeric", "character"))
drv |
'RGreenplum::Greenplum()' |
dbname |
Database name. If 'NULL', defaults to the user name. Note that this argument can only contain the database name, it will not be parsed as a connection string (internally, 'expand_dbname' is set to 'false' in the call to ['PQconnectdbParams()'](https://www.postgresql.org/docs/9.6/static/libpq-connect.html)). |
host , port
|
Host and port. If 'NULL', will be retrieved from 'PGHOST' and 'PGPORT' env vars. |
user , password
|
User name and password. If 'NULL', will be retrieved from 'PGUSER' and 'PGPASSWORD' envvars, or from the appropriate line in '~/.pgpass'. See <http://www.postgresql.org/docs/9.6/static/libpq-pgpass.html> for more details. |
service |
Name of service to connect as. If 'NULL', will be ignored. Otherwise, connection parameters will be loaded from the pg_service.conf file and used. See <http://www.postgresql.org/docs/9.6/static/libpq-pgservice.html> for details on this file and syntax. |
... |
Other name-value pairs that describe additional connection options as described at <http://www.postgresql.org/docs/9.6/static/libpq-connect.html#LIBPQ-PARAMKEYWORDS> |
bigint |
The R type that 64-bit integer types should be mapped to, default is [bit64::integer64], which allows the full range of 64 bit integers. |
Greenplum dbIsValid method
## S4 method for signature 'GreenplumDriver' dbIsValid(dbObj, ...)
## S4 method for signature 'GreenplumDriver' dbIsValid(dbObj, ...)
dbObj |
database object |
... |
other arguments for method |
Greenplum dbWriteTable method
Greenplum dbExistsTable method
## S4 method for signature 'GreenplumConnection,character,data.frame' dbWriteTable(conn, name, value, ..., row.names = FALSE, overwrite = FALSE, append = FALSE, field.types = NULL, temporary = FALSE, distributed_by = NULL, copy = TRUE) ## S4 method for signature 'GreenplumConnection,character' dbExistsTable(conn, name, ...)
## S4 method for signature 'GreenplumConnection,character,data.frame' dbWriteTable(conn, name, value, ..., row.names = FALSE, overwrite = FALSE, append = FALSE, field.types = NULL, temporary = FALSE, distributed_by = NULL, copy = TRUE) ## S4 method for signature 'GreenplumConnection,character' dbExistsTable(conn, name, ...)
conn |
a [GreenplumConnection-class] object |
name |
a character string specifying a table name. Names will be automatically quoted so you can use any sequence of characters, not just any valid bare table name. |
value |
A data.frame to write to the database. |
... |
Other arguments used by individual methods. |
row.names |
Either TRUE, FALSE, NA or a string |
overwrite |
a logical specifying whether to overwrite an existing table or not. Its default is FALSE. |
append |
a logical specifying whether to append to an existing table in the DBMS. Its default is FALSE. |
field.types |
character vector of named SQL field types where the names are the names of new table's columns. |
temporary |
If TRUE, will generate a temporary table statement. |
distributed_by |
Distribution columns for new table. NULL for random distribution. |
copy |
If TRUE, data will be copied to remote database |
This driver never needs to be unloaded and hence 'dbUnload()' is a null-op.
Greenplum()
Greenplum()
library(RPostgres) RGreenplum::Greenplum()
library(RPostgres) RGreenplum::Greenplum()