Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
themeEclipse
languagejavascript
linenumberstrue
#DEFINE latencyOn
....
#IFDEF latencyOn
	#TRANSCFG StandardLatency	
#ELSE
	#TRANSCFG Standard
#ENDIF

 

Stored Procedures and Macros

#PROCEDURE

The #PROCEDURE allows to create stored procedures that are saved into the data dictionary and can be reused by any other scripts, see #EXECUTE how to use them.

 

Usage

Example

The example defines a variable called latencyOn and uses the #IFDEF command to use either StandardLatency for the transformation configuration, if latencyOn is set or Standard if it is not set. Obviously, this example uses allways the <then-command>-part (since latencyOn is set), so you may switch to another transformation config by simply commenting the #DEFINE command out so that the <else-commands> are used.

Code Block
themeEclipse
languagejavascript
linenumberstrue
#DEFINE latencyOn
....
#IFDEF latencyOn
	#TRANSCFG StandardLatency	
#ELSE
	#TRANSCFG Standard
#ENDIF

 

Commands

#ADDQUERY

This command executes a query in a certain langauge and is equal to #QUERY

...

Example

The first variable is called "one" and has no value. The second variable is called "two" and has the value "1234". See at Variables or at #IFDEF for examples how to use a variable.

...

Example

Code Block
themeEclipse
languagejavascript
linenumberstrue
/// query sharing off
#DOQUERYSHARING false
/// query sharing on
#DOQUERYSHARING true

...

Example

Code Block
themeEclipse
languagejavascript
linenumberstrue
/// query rewrite off
#DOREWRITE false
/// query rewrite on
#DOREWRITE true

...

Parameters

Example

Code Block
themeEclipse
languagejavascript
linenumberstrue
#DROPALLQUERIES

...

Parameters

Example

Code Block
themeEclipse
languagejavascript
linenumberstrue
#DROPALLSINKS

...

Parameters

Example

Code Block
themeEclipse
languagejavascript
linenumberstrue
#DROPALLSOURCES

...

Example

This example changes the user to "System" with password "manager"

...

Parameters

Example

Code Block
themeEclipse
languagejavascript
linenumberstrue
#LOGOUT

...

Example

Code Block
themeEclipse
languagejavascript
linenumberstrue
#ODYSSEUS_PARAM scheduler_TimeSlicePerStrategy 10

...

The parser: Which parsers are available strongly depends on the current system setting and installed features. Normally in the default product, there is "PQL" for Procedural Query Language (PQL) and "CQL" for Continuous Query Language (CQL).

Example

Code Block
themeEclipse
languagejavascript
linenumberstrue
#PARSER PQL

...

If #QName is defined before, the query will get this name.

Example

The example shows four queries after the parser is set to CQL and the transformation configuration is set to Standard. The first one uses #QUERY and it is executed as a CQL-Query, but not started. The second query is equal to the first one (it still uses CQL and is not started). The third query also uses CQL and the Standard transformation configuration, but is (in contrast to the first and second) started (it is directly running). Then, the parser is switched to PQL, so that the fourth query is parsed by the PQL-Parser and not  by the CQL-Parser anymore.

...

Example

Code Block
themeEclipse
languagejavascript
linenumberstrue
#RELOADFROMLOG

...

Example

Uses the "Single Thread Scheduler" with a "Round Robin" scheduling strategy

...

Example

Waiting 2 seconds (2000 milliseconds) until the next command is invoked.

...

Example

Code Block
themeEclipse
languagejavascript
linenumberstrue
#STARTQUERIES

...

Example

Code Block
themeEclipse
languagejavascript
linenumberstrue
#STARTSCHEDULER

...

Example

Code Block
themeEclipse
languagejavascript
linenumberstrue
#STOPSCHEDULER

...

Example

Code Block
themeEclipse
languagejavascript
linenumberstrue
#TRANSCFG Standard

...

Example

Code Block
themeEclipse
languagejavascript
linenumberstrue
#TRANSCFG Standard

...