createdbstructure: Creates a database structure based on a sql dump file

Description Usage Arguments Details Examples

View source: R/database_create.R

Description

Load a .sql file containing a database structure.

Usage

1
2
3
4
5
6
7
createdbstructure(
  sqlfile,
  dbname = "tradeflows",
  sqlfolder = system.file("config", package = "eutradeflows", mustWork = TRUE),
  messageonly = FALSE,
  verbose = TRUE
)

Arguments

sqlfile

character name of an SQL file

dbname

character name of a database

sqlfolder

character path to the folder where the sqlfile is located (defaults to the package config directory)

messageonly

boolean if TRUE prints only a message and doesn't transfer the database structure

verbose

boolean if TRUE print messages, if FALSE mute messages

Details

The default .sql file is storred in the package configuration folder.

Examples

1
2
3
4
5
# Load new database structures in the test database
# Load a database structure designed to contain raw data
createdbstructure(sqlfile = "raw_comext.sql", dbname = "test")
# Load a database structure designed to contain validated data
createdbstructure(sqlfile = "vld_comext.sql", dbname = "test")

stix-global/eutradeflows documentation built on Nov. 13, 2020, 9:23 p.m.