Replaces an existing Oracle CQL rule, query, or view with another rule, query, or view. Oracle Stream Analytics first destroys the original rule, query, or view and then inserts the new one in its place.
Syntax
java wlevs.Admin [ Connection Arguments ] [ User Credentials Arguments ] [ Common Arguments ] REPLACERULE -application application -processor processor -rule rulename rulestring
Table A-9 REPLACERULE 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:
|
-processor processor
|
Specifies the name of the particular Oracle CQL processor, attached to the Oracle Stream Analytics application specified with the See Query for Application and Processor Names for details on getting the exact name if you do not know it. |
-rule rulename rulestring |
Specifies the name of the Oracle CQL rule, query, or view you want to replace. Oracle Stream Analytics deletes the old rule, query, or view and then inserts a new one, with the same name but with the new rule text. In the case of a view, Oracle Stream Analytics generates the schema based on the select statement in the Enter the Oracle CQL |
Example
The following example shows how to replace an Oracle CQL query called myquery
with the Oracle CQL text SELECT * FROM Withdrawal [Rows 10]
in the Oracle CQL helloworldProcessor
of the helloworld
application:
java wlevs.Admin -url service:jmx:msarmi://localhost:9002/jndi/jmxconnector -username wlevs -password wlevs REPLACERULE -application helloworld -processor helloworldProcessor -rule myquery "SELECT * FROM Withdrawal [Rows 10]"