Description Usage Arguments Value Examples
This requires distributedR and HPData and will attempt to load them. If Distributed R is not already running, it will start it. Internally, this function simply saves the tbl reference as a view in Vertica and then uses the Vertica Loader to move data into Distributed R, and then deletes the view from database. Note that if you do not use the Vertica Native Data Loader, your table must have a 'rowid' column for this to work (see ?HPdata::db2darray for more information).
1 2 | tbl2darray(table, dsn, features, npartitions, verticaConnector = TRUE,
loadPolicy = "local")
|
table |
The local R-variable name of the tbl_vertica object to be converted to a darray. |
dsn |
The name of the DSN as specified in the ODBC.INI file. If an ODBC connection is already active, then the DSN of that connection will be used. If not (JDBC is being used), this field will be required. |
features |
Names of the columns to convert into the darray, provided as a list. |
npartitions |
this optional argument specifies the desired number of splits (partitions) in the dobject. |
verticaConnector |
TRUE to use the Vertica Connector for Distributed R. If FALSE, your table must include a 'rowid' column. See the manual page for HPdata::db2darray for more information. |
loadPolicy |
"local" or "uniform". Please see help doc for db2darray in package HPdata. Please read the details for more information. |
A new darray object
1 2 3 4 5 6 7 | ## Not run:
vertica <- src_vertica("VerticaDSN")
table1 <- tbl(vertica,"some_table")
table1_modified <- filter(table1,foo > 3)
my_darray <- tbl2darray(table1_modified,features=list("some_column"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.