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
)

Arguments

opal

Opal connection object.

project

Project name where the view will be located.

table

View name to be created.

resource

Fully qualified resource name.

type

Entity type, default is "Participant".

idColumn

Name of the column which contains the entity identifiers. If not specified, the first column will be used.

profile

R server profile to use for establishing the connection with the resource. If not specifed, the profile will guessed based on the resource definition.

Examples

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)
}