Creating a Schema v2.0

Overview

When a new schema is created in the SDW by the administrator via the sdw_new_schema function, four roles are automatically created:

  • [schema]_viewer

  • [schema]_editor

  • [schema}_owner

  • [schema]_creator

Create the Schema

To create a new schema:

  1. Open Studio

  2. Expand the Jobs node, right click on Unassigned tasks and select New Task.

  3. Create a Workflow Stored Procedure Task and give it a Name e.g. Create SDW Schema

  4. Select the Spatial Data Warehouse Connection, select astun from the Function filter and pick sdw_new_schema

  5. Select the schemaname parameter and enter the name of your schema in the Edit parameter box. Then select the staffaccess parameter and enter true. Note: Change "true" to "false" for a private schema.

  6. Click the Run button to run the task. You should see the dialog SPTask 'Create SDW Schema' completed successfully. Click OK.

  7. Click Save to save your new task details.

Granting iShare Access to the Schema

Now we need to give iShare permission to use the schema. Granting [schema]_owner to sdw_creator means that any user, that is a member of sdw_creator, can do anything in that schema, including the necessary create and drop privileges needed to allow ogr to create data in that schema. isharedata_gis is a member of this role and therefore will be granted those rights. isharedata_gis is the ishare user that will be importing the data into the schema.

To grant this permission you will need to run the following either via pgAdmin or you can use the wkf_executecmd Stored Procedure Task.

GRANT my_new_schema_owner TO sdw_creator;

Granting user access rights to a private Schema

If you wish to assign a user access rights to a private schema then please see Assigning Access Rights to a Private Schema.