R/opal.resource.R
opal.resource_view_create.Rd
Create an Opal view if a table with same name does not already exist. The resource reference is required.The dictionary of the created view will be discovered at initialization time. Use opal.table_dictionary_update to apply a dictionary.
opal.resource_view_create(
opal,
project,
table,
resource,
type = "Participant",
idColumn = NULL,
profile = NULL
)
Opal connection object.
Project name where the view will be located.
View name to be created.
Fully qualified resource name.
Entity type, default is "Participant".
Name of the column which contains the entity identifiers. If not specified, the first column will be used.
R server profile to use for establishing the connection with the resource. If not specifed, the profile will guessed based on the resource definition.
Other table functions:
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_save()
,
opal.table_truncate()
,
opal.table_view_create()
,
opal.table_view_update()
if (FALSE) {
o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
# make a view over a resource
opal.resource_view_create(o, "CNSIM", "CNSIM4", resource = "RSRC.CNSIM1")
opal.resource_view_create(o, "CNSIM", "FEMALE_2439",
resource = "RSRC.FEMALE_2439", idColumn = "Name")
opal.logout(o)
}