Database Reference
In-Depth Information
<!-- Here goes the query, based on the view, declared
above -->
<!-- We using the patterns and MATCH_RECOGNIZE here for
DEFINING the types of ports, purposes and loading
facilities -->
<!-- we want to identify according to Customer preferences
and inform him accordingly -->
<!-- This statement is for demonstration purposes only -->
<query id="detectScheduleByPOD">
<![CDATA[
SELECT *
FROM recentPortVoyageUpdateEvents
MATCH_RECOGNIZE (
MEASURES
A.port_voy_code as
port_voy_code,
B.call_status as call_status,
C. port_terminal_type as
port_terminal_type
PATTERN (A+ (B+ C+))
DEFINE
A as (A.port_voy_code = "<CLIENTS_POL>"
and A.call_purpose ="<LOAD_ONLY_CODE>"),
B as (B. voy_code = A. voy_code and
(B.port_voy_code="<CLIENTS_POD1 >" or
B.port_voy_code="<CLIENTS_POD2 >"),
C as (A.voy_code = C.voy_code and
C.port_terminal_type = "<REQUIRED_RAMP_TYPE>"
) as voypc
]]>
</query>
</rules>
</processor>
</n1:config>
In the preceding example, we partitioned the input stream (just one of the available
streams; we have many of them, such as the one for cargo, for instance, and coming from
booking offices) filteredStream using a port call purpose in order to separate load-
Search WWH ::




Custom Search