clean.madlib.temp: Delete all the result tables created during calculations of...

Description Usage Arguments Details Author(s) See Also Examples

Description

Some MADlib wrapper functions create result tables that cannot be dropped in the background, because other functions need to use these tables. For example, madlib.arima creates 3 result tables, which are needed by predict.arima.css.madlib. One can manually delete these 3 tables when they are not useful anymore using delete,arima.css.madlib-method. One can also choose to all such tables created by many such functions together using this function.

Usage

1

Arguments

conn.id

An integer, the connection ID of the database. See db.connect for more details.

Details

All such result tables created by MADlib wrapper functions start with "__madlib_temp_" followed by three random integers. This function deletes all such tables.

Author(s)

Author: Predictive Analytics Team at Pivotal Inc.

Maintainer: Frank McQuillan, Pivotal Inc. fmcquillan@pivotal.io

See Also

madlib.arima creates three tables with names starting with "__madlib_temp_" when it fits ARIMA model to time series

delete,arima.css.madlib-method deletes the result of madlib.arima together with the model, residual and statistics tables.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
## Not run: 


## set up the database connection
## Assume that .port is port number and .dbname is the database name
cid <- db.connect(port = .port, dbname = .dbname, verbose = FALSE)

## use double values as the time stamp
## Any values that can be ordered will work
example_time_series <- data.frame(
    id = seq(0,1000,length.out=length(ts)),
    val = arima.sim(list(order=c(2,0,1),
    ar=c(0.7, -0.3), ma=0.2), n=1000000) + 3.2)

x <- as.db.data.frame(example_time_series, field.types =
                      list(id="double precision", val = "double precision"),
                      conn.id = cid, verbose = FALSE)

dim(x)

names(x)

## use formula
s <- madlib.arima(val ~ id, x, order = c(2,0,1))

s

## delete all result tables
clean.madlib.temp(conn.id = 1)

## s still exists but the 3 tables (model, residuals, etc.) are deleted
s

db.disconnect(cid, verbose = FALSE)

## End(Not run)


Search within the PivotalR package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.