Learn R Programming

opalr (version 3.3.1)

opal.table_view_update: Update the table references and the entity filter of an Opal view

Description

Update the table references and/or the entity filter of an existing Opal view. The view dictionary will NOT be modified (use opal.table_dictionary_update to apply a dictionary).

Usage

opal.table_view_update(opal, project, table, tables = NULL, where = NULL)

Arguments

opal

Opal connection object.

project

Project name where the table will be located.

table

Table name to be created.

tables

List of the fully qualified table names that are referred by the view. Not modified when NULL (default).

where

The entity filter script. Not modified when NULL (default). To remove the filter, set an empty string.

See Also

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_save(), opal.table_truncate(), opal.table_view_create()

Examples

Run this code
if (FALSE) {
o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
# make a view
opal.table_view_create(o, "CNSIM", "CNSIM123",
                       c("CNSIM.CNSIM1"))

# update the table references
opal.table_view_update(o, "CNSIM", "CNSIM123",
                       tables = c("CNSIM.CNSIM1", "CNSIM.CNSIM2", "CNSIM.CNSIM3"))

# update the entity filter
opal.table_view_update(o, "CNSIM", "CNSIM123", where = "$('LAB_TSC').ge(5)")

# remove the entity filter
opal.table_view_update(o, "CNSIM", "CNSIM123", where = "")

# update both the table references and the entity filter
opal.table_view_update(o, "CNSIM", "CNSIM123",
                       tables = c("CNSIM.CNSIM1", "CNSIM.CNSIM2", "CNSIM.CNSIM3"),
                       where = "$('LAB_TSC').ge(5)")
opal.logout(o)
}

Run the code above in your browser using DataLab