A.11.7 UPLOAD

Replaces the configured Oracle CQL rules for a specified processor with the Oracle CQL rules from an uploaded component configuration file.

The component configuration file that contains the list of Oracle CQL rules conforms to the component configuration file schema (see Schema Reference for Oracle Stream Analytics). This file contains one or more Oracle CQL rules that replace those currently configured for the specified processor. An example of such a component configuration file follows:

<?xml version="1.0" encoding="UTF-8" ?> 
<config>
  <processor>
  <name>helloworldProcessor</name> 
    <rules>
      <query id="helloworldRule1">
          <![CDATA[  SELECT * FROM HelloWorldEvent [Rows 2] > 
      </query>
    </rules>
  </processor>
</config>

In the preceding example, the component configuration file configures a single Oracle CQL query, with name helloworldRule1, and its Oracle CQL query text is SELECT * FROM HelloWorldEvent [Rows 2].

Caution:

When you use the UPLOAD command of the wlevs.Admin utility, use the -processor argument to specify the name of the Oracle CQL processor to which you want to add the Oracle CQL rules, as you do with the other Oracle CQL commands. This means that the utility ignores any <name> elements in the component configuration file to avoid any naming conflicts.

For details about and examples of creating the component configuration file, Developing Applications for Event Processing with Oracle Stream Analytics.

You can obtain a copy of a processor's component configuration file using the DOWNLOAD command as DOWNLOAD describes.

Syntax

java wlevs.Admin 
    [ Connection Arguments ]
    [ User Credentials Arguments ]
    [ Common Arguments ] 
    UPLOAD -application application -processor processor -sourceURL sourcefileURL

Table A-12 UPLOAD Arguments

Argument Definition
-application application

Specifies the name of the Oracle Stream Analytics application whose Oracle CQL rules you want to manage.

To get the exact name of your application, you can:

  • Use wlevs.Admin to query for the name (see Query for Application and Processor Names).

  • Use the Oracle Stream Analytics Visualizer: Start the Oracle Stream Analytics Visualizer (see Oracle Stream Analytics Using Visualizer for Oracle Stream Analytics). In the left pane, navigate to and expand the Applications node of the Oracle Stream Analytics instance to which the application is deployed. Each node under the Applications node is named with the exact application name.

  • Look at the MANIFEST.MF file of the application; the application name is specified by the Bundle-SymbolicName header.

-processor processor

Specifies the name of the particular Oracle CQL processor, attached to the Oracle Stream Analytics application specified with the -application argument, whose Oracle CQL rules you want to manage.

See Query for Application and Processor Names for details on getting the exact name if you do not know it.

-sourceURL sourcefileURL

Specifies the URL of the component configuration file that contains the Oracle CQL rules in the form:

file:///path-to-file

Example

The following example shows how upload the Oracle CQL rules from the c:\processor\config\myrules.xml file to the Oracle CQL helloworldProcessor of the helloworld application:

java wlevs.Admin 
     -url service:jmx:msarmi://localhost:9002/jndi/jmxconnector 
     -username wlevs -password wlevs 
     UPLOAD -application helloworld -processor helloworldProcessor 
     -sourceURL file:///c:/processor/config/myrules.xml