Creating schemas for virtual objects in Watson Query
You can use schemas to group virtual objects. A virtual object can belong to only one
schema. Use the
CREATE SCHEMA SQL statement to create schemas.
About this task
If a schema does not exist in your Watson Query service, you must create a schema
explicitly. Any user can create a schema with their own authorization name by using a
SCHEMA statement. For example, user with user ID
create a private schema named
dv_ibmid_1001. To enable other users or roles to use the schema,
dv_ibmid_1001 must grant CREATEIN, ALTERIN, or
DROPIN schema permissions to these users or roles. Additionally, granting these permissions to
PUBLIC enables the schema to be shared by all users.
Watson Query Managers can create schemas based on names other than the existing user’s authorization name. Watson Query Managers must grant appropriate permissions to other users or roles for them to use the schema to create virtual objects.
As Watson Query Manager, you can grant IMPLICIT_SCHEMA permissions to a user with the Watson Query Engineer role for each project. Watson Query Engineer can then create schemas to be used by other users in their project. When schemas are created by using the IMPLICIT_SCHEMA permission, PUBLIC is granted the CREATIN permission on these schemas.
- To create a schema while you create a virtualized table:
Note: Watson Query changes the schema name to uppercase even if it is entered in lowercase or mixed case.
- If you have the Watson Query Engineer or User role, leave the Schema field as default to create a schema with your user ID.
- If you have the Watson Query Manager role, leave the Schema field as default to create a schema with your user ID or enter the new schema name in the Schema field.
To learn more about creating virtualized tables, see Virtualizing data.
- To create a schema from the SQL editor, enter the following statement:
CREATE SCHEMA schema-name
For more information, see Creating schemas in the Db2® product documentation.