Copying Schemas

Use the Copy Schema From dialog to insert an existing schema into a component that requires a schema, including input streams, query tables, lock sets, and some input adapters. Copy Schema From is also available for arcs when StreamBase cannot automatically determine the schema to use (for example, when there are multiple arcs between two components). Copying allows you to reuse existing schemas, and to avoid having to manually enter the fields.

To display the Copy Schema From dialog, click the Copy Schema from Existing Component button in the tab's tool bar.

The following screen shows a Copy Schema From dialog:

  1. You can copy the following schema types:

    • A saved schema previously saved using the Save Schema command or saved using the Saved Schemas view.

      1. Select From Saved Schemas.

      2. Select the dropdown control to see a list of currently saved schemas.

      3. Choose a schema from the list.

    • The schema of a stream in the system container. For example, you can copy the schema of the standard StreamBase error tuple by selecting error:schema in the From system container schemas dropdown list.

    • A schema in another component in any application in your workspace.

      1. Select From schemas in any workspace application

      2. Select the Project control to list the projects in your Package Explorer, and choose a project.

      3. Select the Application control to list the applications in the project you selected, and choose an application.

      4. Choose a schema from one of the components listed in the Copy schema from sectoin. You may need to expand a component to see its schemas.

  2. You can examine the Schema Preview section to verify the contents of the selected schema.

  3. Click OK to close the dialog.

  4. If your current component's schema table already contains schema fields, a dialog is displayed prompting you to confirm that you want to replace those fields. If you click Yes, the current fields in your table are overwritten.

The fields of the schema you chose are inserted in the schema table of your current component.