Importing and Exporting StreamBase Resources

This topic describes the different ways to move resources between StreamBase Studio and your file system. Exporting resources to your file system is a useful way to share them between different StreamBase Studio workspaces. Importing a resource brings it into the IDE in a controlled way. By contrast, if you don't import a file but simply copy it into your workspace, or if you open an application file directly in StreamBase Studio, StreamBase cannot operate on it as a resource of your project.

Migration Note

In previous versions, StreamBase Studio included several wizards for importing and exporting resources. Beginning in Version 5.0, most of these wizards are replaced by Eclipse wizards, as described in this topic.

To get started:

  1. Click FileImport or FileExport.

  2. In the Import or Export wizard, choose one of the available categories. Optionally, use the Select field at the top to filter the categories. For example, if you enter StreamBase, only the StreamBase category appears.

  3. Choose one of the specialized import or export functions within a category, and click Next to proceed.

The remaining sections in this topic describe the functions provided by StreamBase in the import and export wizards.

Importing

Importing Existing Projects

To import a StreamBase project into your workspace, choose Existing Projects into Workspace in the General category, and click Next. An existing project contains all the folders and resources in a project that was previously created in StreamBase.

  1. Select either a root directory or an archive file that contains the resources you want to import. You can either enter the path, or click Browse to navigate and select the path to the folder or archive file in your file system.

    Note

    If no project appears in the Projects area at this point, check whether a project with the same name already exists in your workspace. If so, your options include renaming the existing project, or switching to a different workspace, then importings again.

  2. Project resources imported from a zip file are copied into your current workspace. If you are importing from a directory, you have the option of not copying the projects into your workspace. If you choose that option, you will be working directly on the files in that directory.

    Tip

    The option to work directly on the imported files without copying them can be useful for sharing the same project between more than one workspace, or even between people on different systems. For example, after a project is exported on one system to a network share (such as C:\Shared, multiple people working on other networked systems can import the shared project.

    However, this scenario runs a risk if the same resources might be changed concurrently. In this case, consider setting up the share in an area that is version controlled. Finallly, depending on your version control system, working StreamSQL instead of EventFlow applications might make it easier to merge and resolve conflicts between versions.

  3. Select one or more of the projects found in the directory or zip file, and click Finish.

Importing Local Resources

To import files from your local file system, click File System in the General category, and click Next.

For more information about this function, click the Help button in the File system page.

Importing JAR Files

To import JAR files from your local system (for example, for custom operators or adapters), click JAR file in the Java category, and click Next.

Note

If you want to use JAR files (instead of its source files) in a StreamBase application, you need to add them to your project's Java Build Path, as described in StreamBase Project Properties.

Importing Projects from Earlier Versions of StreamBase

If you are upgrading from a version of StreamBase older than 5.0, StreamBase provides a wizard to help you migrate any projects from the older version. Click Import Projects from StreamBase Studio 3.x in the StreamBase Category to get started.

Importing Saved Schemas

To import StreamBase schemas that have been previously saved and Exported from another workspace, click Saved Schemas in the StreamBase category. Then:

  1. Click the Select button to navigate your file system and select the *.xml schema file you want to import. If the file contains one or more valid schemas, they are shown in the Schemas list. You can expand and collapse the schemas in the list to see their fields.

  2. Select one or more schemas in the list that you want to import. (You cannot individual fields within a schema.)

  3. Click Finish. The selected schemas are added to your Saved Schema view, making them available to all the projects in your current workspace.

Exporting

Exporting Resources

To export project resources files to your local file system, click File System in the General category, and click Next. Select and folders or files to export. For example, select a project's root folder to export the entire project. Choose the target directory and select the options you want, and click Finish to run the export.

For more information about this function, click the Help button in the File system page.

Exporting JAR Files

To package Java resources into JAR files and export them to your local system (for example, when you deploy a client, adapter, or custom function), click JAR file in the Java category. Use the Jar File Specification page to choose the resources to include in the JAR, the export destination, and various package options like compression and (if a class file is included), how to create the manifest.

For more information about this function, click the Help button in the Jar File Specification page.

Exporting Saved Schemas

Before using this option, you must first have saved one or more schemas from within a StreamBase application, as described in Using Saved Schemas. Then, after clicking FileExport and Saved Schemas, complete the export as follows:

  1. Choose the schemas that you want to export.

    Note that you can expand each schema listed to see its fields.

  2. Specify the full path of the xml file you want to be created.

  3. Click Finish.

    The exported file contains definitions for each of the schemas you selected. Thus, you can export a single file for each schema, or a single file for multiple schemas. The exported schemas is now available for import into other StreamBase workspaces.