Use the Copy Schema From dialog to insert an existing schema into the Fields grid of an Edit Schema tab in the Properties view. Copy Schema From is also available for arcs when StreamBase cannot automatically determine the schema to use (such as when there are multiple arcs between two components).
Copying schemas allows you to reuse an existing schema to avoid manually entering the fields. However, the copied fields are only copies, and are inserted as a private schema. If the original schema changes, the copy does not change. For most purposes, StreamBase Systems recommends using named schemas instead.
To display the Copy Schema From dialog, click the
Copy Schema from Existing Component button.
The following screen shows a Copy Schema From dialog:
-
You can copy schemas from the following places:
- From system container schemas
-
Copy from the schema of a stream in the global system container. For example, you can copy the schema of the standard StreamBase error tuple by selecting error:schema from the first drop-down list after selecting the From system container schemas radio button.
- From schemas in any workspace module or interface
-
Copy from the schema of any component in any EventFlow or StreamSQL module or interface in any project in the current Studio workspace. You can copy the schemas from named schemas defined in the current module, or from any intermediate stream in any module.
-
Select From schemas in any workspace application or interface.
-
Select the project of interest from the Project drop-down control. Projects are the same as the top-level folders in the Package Explorer view.
-
Select a module or interface from the Application control, which lists the EventFlow or StreamSQL modules and interfaces in the selected project.
-
Select a schema from one of the components listed in the Copy schema from section. Click the left-side arrowhead to expand component sections to see the available schemas of each type.
-
-
Confirm the contents of the selected schema in the Schema Preview section.
-
Click to close the dialog.
-
If your current component's schema grid already contains schema fields, a dialog is displayed prompting you to confirm that you want to replace those fields. Click to overwrite the current fields in the current schema grid.
The fields of the schema you selected are inserted in the Fields grid of the current component. If the grid is not empty, Studio prompts for permission to replace the existing contents with the selected schema.
