Upload a local tibble to the R server side through Opal, assign this tibble to the provided symbol name and import it as a table into a Opal project.
opal.table_save(
opal,
tibble,
project,
table,
overwrite = TRUE,
force = FALSE,
identifiers = NULL,
policy = "required",
id.name = "id",
type = "Participant"
)
Opal connection object.
The tibble object to be imported.
Project name where the table will be located.
Destination table name.
If the destination table already exists, it will be replaced (deleted, re-created with associated permissions reinstated and then imported). Otherwise the table will be updated (data dictionaries merge may conflict). Default is TRUE. See also opal.table_truncate function.
If the destination already exists, stop with an informative message if this flag is FALSE (default).
Name of the identifiers mapping to use when assigning entities to Opal.
Identifiers policy: 'required' (each identifiers must be mapped prior importation (default)), ignore' (ignore unknown identifiers) and 'generate' (generate a system identifier for each unknown identifier).
The name of the column representing the entity identifiers. Default is 'id'.
Entity type (what the data are about). Default is 'Participant'
An invisible logical indicating whether the destination table exists.
Other table functions:
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
opal.table_delete()
,
opal.table_dictionary_get()
,
opal.table_dictionary_update()
,
opal.table_exists()
,
opal.table_export()
,
opal.table_get()
,
opal.table_import()
,
opal.table_perm_add()
,
opal.table_perm_delete()
,
opal.table_perm()
,
opal.table_truncate()
,
opal.table_view_create()
,
opal.table_view_update()
if (FALSE) {
o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
cqx <- opal.table_get(o, "CPTP", "Cag_coreqx")
# do some (meta)data transformations, then save in opal's database
opal.table_save(o, cqx, "CPTP", "Cag_coreqx", overwrite = TRUE, force = TRUE)
# or overwrite data only (keep original data dictionary)
opal.table_save(o, cqx, "CPTP", "Cag_coreqx", overwrite = 'values', force = TRUE)
opal.logout(o)
}