These are guidelines for using the Local Schemas on the Cornell Metadb reporting database.
What Local Schemas are available
*r/o = read-only access to a given file; user can see and use the files in this schema, but cannot modify or delete them
*r/w =read-write access to a given file; user can create, see, use, modify, and detete the files in this schema
Schema Name | Schema Description | Permissions |
---|---|---|
local_open | This schema is a sandbox for all users who want to publish a file to a local schema. | r/w metadbuser_cornell user account r/w reporting team user accounts |
local_automation | This schema is for internal use by the Automation Team. | r/w metadbuser_cornell user account r/w reporting team user accounts |
local_core | This schema is for internal use by the Reporting Team. | r/w metadbuser_cornell user account r/w reporting team user accounts |
local_digpres | This schema is used by the HathiTrust team. | r/w metadbuser_cornell user account r/w reporting team user accounts |
local_hathitrust | This schema is used internally by the HathiTrust team. | r/w metadbuser_cornell user account r/w reporting team user accounts |
local_protected | This schema is used to store tables with protected data that is used internally by the Reporting Team. | r/o reporting team user accounts r/w z_slm5 |
local_shared | This schema is used to store local tables that are in queries used by all reporting users. All users can read the files here, but only reporting team members can post files here. | r/o metadbuser_cornell user account r/w reporting team user accounts |
local_statistics | This schema is for internal use by the Assessment and Planning team. | r/o metadbuser_cornell user account r/w z_lm14, z_slm5, z_vp25 |
How to Set Permissions on files used in Local Schemas
To give other users permission to see and use a table you have imported or created in a local schema in Metadb, you need to grant that user access to the new table. To do so, you can issue a command to alter the table permissions as a query in a DBeaver session connected to Metadb. Here is an example:
To grant the user z_slm5 READ-ONLY access to the table vs_folio_physical_material_formats in the local_shared schema on Metadb, you would issue this command:
GRANT SELECT ON local_shared.vs_folio_physical_material_formats TO z_slm5;
To grant the user z_slm5 READ-WRITE access to the table vs_folio_physical_material_formats in the local_shared schema on Metadb, you would issue this command:
GRANT SELECT, INSERT, UPDATE, DELETE ON local_shared.vs_folio_physical_material_formats TO z_slm5;
Re-issue the command for each user if there are multiple users to whom you need to grant access. Ask the user(s) to confirm seeing the table after you have granted permissions.
*Please note that if you replace or update the table, you will need to reset these permissions.