Description
Creates a table from query.
Usage
## S3 method for class 'Teradata'
db_compute(
con,
table,
sql,
temporary = FALSE,
table.type = "PI",
primary.index = NULL,
...
)
Arguments
con |
Required Argument. |
table |
Required Argument. |
sql |
Required Argument. |
temporary |
Optional Argument. |
table.type |
Optional Argument. |
primary.index |
Optional Argument. |
... |
Other parameters passed to methods. |
Value
Returns name of the newly created remote table.
See Also
db_save_query()
Examples
# Get remote data source connection.
con <- td_get_context()$connection
# Save iris dataset into table 'db_compute_test'.
iris2 <- copy_to(con, iris, name = "db_compute_test", overwrite = FALSE)
sql <- "select * from db_compute_test"
# Create PI table from the result set of "sql".
db_compute(con, "db_compute_test1", sql, temporary = FALSE,
table.type = "PI", primary.index = c("Petal.Length","Species"))