Database

A database is a data object representing Spark database in the platform. A database object is stored in a project.

Database Sharing

Database can be shared with other users or organizations through project sharing. Access to the database can be revoked at any time by revoking access to the project by the project administrator. If revoking access to the project is not possible, the database can be relocated to another project with different set of collaborators.

Database And Project Policies

Project policies restrict how the data can be modified or copied to other projects. Databases follow the Delete Policy. However, databases do not follow the Copy Policy as databases cannot be copied between projects. Currently, databases do not adhere to the PHI Data Protection policy. Users should be careful not to violate their PHI policies, by using access tokens that are restricted to specific projects and not mix PHI and non-PHI projects for the same token.

Database Access

Database access is controlled by project access. These access levels and database object state translate into specific SQL abilities for the database, tables, data and database object in the project.

The following tables reference supported actions on a Spark database and database object with lowest necessary access level for an open and closed database.

Spark SQL Function Open Database Closed Database
ALTER DATABASE SET DBPROPERTIES CONTRIBUTE N/A
ALTER TABLE RENAME UPLOAD N/A
ALTER TABLE DROP PARTITION CONTRIBUTE (*) N/A
ALTER TABLE RENAME PARTITION CONTRIBUTE N/A
ANALYZE TABLE COMPUTE STATISTICS UPLOAD N/A
CACHE, CACHE TABLE, CLEAR CACHE VIEW VIEW
CREATE DATABASE UPLOAD UPLOAD
CREATE FUNCTION N/A N/A
CREATE TABLE UPLOAD N/A
CREATE VIEW UPLOAD UPLOAD
DESCRIBE DATABASE, TABLE, FUNCTION VIEW VIEW
DROP DATABASE CONTRIBUTE (*) ADMINISTER
DROP FUNCTION N/A N/A
DROP TABLE CONTRIBUTE (*) N/A
EXPLAIN VIEW VIEW
INSERT UPLOAD N/A
REFRESH TABLE VIEW VIEW
RESET VIEW VIEW
SELECT VIEW VIEW
SET VIEW VIEW
SHOW COLUMNS VIEW VIEW
SHOW DATABASES VIEW VIEW
SHOW FUNCTIONS VIEW VIEW
SHOW PARTITIONS VIEW VIEW
SHOW TABLES VIEW VIEW
TRUNCATE TABLE UPLOAD N/A
UNCACHE TABLE VIEW VIEW

(*) If project is protected then ADMINISTER level is required

Data Object Action Open Database Closed Database
Add Tags UPLOAD CONTRIBUTE
Add Types UPLOAD N/A
Close UPLOAD N/A
Get Details VIEW VIEW
Remove CONTRIBUTE (*) ADMINISTER
Remove Tags UPLOAD CONTRIBUTE
Remove Types UPLOAD N/A
Rename UPLOAD CONTRIBUTE
Set Details UPLOAD N/A
Set Properties UPLOAD CONTRIBUTE
Set Visibility UPLOAD N/A

(*) If project is protected then ADMINISTER level is required

Last edited by Elena Duranova, 2018-10-24 22:03:29

 Feedback