To deploy the star database, we must indicate a name for the deployment, a connection function and a disconnection function from the database. If it is the first deployment, we must also indicate the name of a local file where the star database will be stored.
Usage
deploy(db, name, connect, disconnect, file)
# S3 method for star_database
deploy(db, name, connect, disconnect = NULL, file = NULL)
Arguments
- db
A
star_database
object.- name
A string, name of the deployment.
- connect
A function that returns a
DBI::DBIConnection
object.- disconnect
A function that receives a
DBI::DBIConnection
object as a parameter and close the connection.- file
A string, name of the file to store the object.
Details
If the disconnection function consists only of calling DBI::dbDisconnect(con)
,
there is no need to indicate it, it is taken by default.
As a result, it exports the tables from the star database to the connection database and from now on will keep them updated with each periodic refresh. Additionally, it will also keep a copy of the star database updated on file, which can be used when needed.
See also
Other star database deployment functions:
cancel_deployment()
,
get_deployment_names()
,
load_star_database()