Skip to content

Commit ba27f8a

Browse files
[WSO2-Release] [Release 2.0.4] update documentation for release 2.0.4
1 parent a5c36be commit ba27f8a

File tree

5 files changed

+172
-75
lines changed

5 files changed

+172
-75
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@ For information on <a target="_blank" href="https://siddhi.io/">Siddhi</a> and i
1919

2020
## Latest API Docs
2121

22-
Latest API Docs is <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.0.3">2.0.3</a>.
22+
Latest API Docs is <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.0.4">2.0.4</a>.
2323

2424
## Features
2525

26-
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.0.3/#keyvalue-sink-mapper">keyvalue</a> *<a target="_blank" href="https://siddhi.io/en/v5.0/docs/query-guide/#sink-mapper">(Sink Mapper)</a>*<br><div style="padding-left: 1em;"><p>The <code>Event to Key-Value Map</code> output mapper extension allows you to convert Siddhi events processed by WSO2 SP to key-value map events before publishing them. You can either use pre-defined keys where conversion takes place without extra configurations, or use custom keys with which the messages can be published.</p></div>
27-
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.0.3/#keyvalue-source-mapper">keyvalue</a> *<a target="_blank" href="https://siddhi.io/en/v5.0/docs/query-guide/#source-mapper">(Source Mapper)</a>*<br><div style="padding-left: 1em;"><p><code>Key-Value Map to Event</code> input mapper extension allows transports that accept events as key value maps to convert those events to Siddhi events. You can either receive pre-defined keys where conversion takes place without extra configurations, or use custom keys to map from the message.</p></div>
28-
26+
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.0.4/#keyvalue-sink-mapper">keyvalue</a> *(<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#sink-mapper">Sink Mapper</a>)*<br> <div style="padding-left: 1em;"><p><p style="word-wrap: break-word;margin: 0;">The <code>Event to Key-Value Map</code> output mapper extension allows you to convert Siddhi events processed by WSO2 SP to key-value map events before publishing them. You can either use pre-defined keys where conversion takes place without extra configurations, or use custom keys with which the messages can be published.</p></p></div>
27+
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.0.4/#keyvalue-source-mapper">keyvalue</a> *(<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#source-mapper">Source Mapper</a>)*<br> <div style="padding-left: 1em;"><p><p style="word-wrap: break-word;margin: 0;"><code>Key-Value Map to Event</code> input mapper extension allows transports that accept events as key value maps to convert those events to Siddhi events. You can either receive pre-defined keys where conversion takes place without extra configurations, or use custom keys to map from the message.</p></p></div>
2928

3029
## Dependencies
3130

docs/api/2.0.4.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# API Docs - v2.0.4
2+
3+
!!! Info "Tested Siddhi Core version: *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/">5.1.5</a>*"
4+
It could also support other Siddhi Core minor versions.
5+
6+
## Sinkmapper
7+
8+
### keyvalue *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#sink-mapper">(Sink Mapper)</a>*
9+
<p></p>
10+
<p style="word-wrap: break-word;margin: 0;">The <code>Event to Key-Value Map</code> output mapper extension allows you to convert Siddhi events processed by WSO2 SP to key-value map events before publishing them. You can either use pre-defined keys where conversion takes place without extra configurations, or use custom keys with which the messages can be published.</p>
11+
<p></p>
12+
<span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span>
13+
14+
```
15+
@sink(..., @map(type="keyvalue")
16+
```
17+
18+
<span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span>
19+
<span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span>
20+
```
21+
@sink(type='inMemory', topic='stock', @map(type='keyvalue'))
22+
define stream FooStream (symbol string, price float, volume long);
23+
24+
```
25+
<p></p>
26+
<p style="word-wrap: break-word;margin: 0;">This query performs a default Key-Value output mapping. The expected output is something similar to the following: <br>symbol:'WSO2' <br>price : 55.6f <br>volume: 100L</p>
27+
<p></p>
28+
<span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span>
29+
```
30+
@sink(type='inMemory', topic='stock', @map(type='keyvalue', @payload(a='symbol',b='price',c='volume')))
31+
define stream FooStream (symbol string, price float, volume long);
32+
33+
```
34+
<p></p>
35+
<p style="word-wrap: break-word;margin: 0;">This query performs a custom Key-Value output mapping where values are passed as objects. Values for <code>symbol</code>, <code>price</code>, and <code>volume</code> attributes are published with the keys <code>a</code>, <code>b</code> and <code>c</code> respectively. The expected output is a map similar to the following: <br>a:'WSO2'<br>b : 55.6f<br>c: 100L</p>
36+
<p></p>
37+
<span id="example-3" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 3</span>
38+
```
39+
@sink(type='inMemory', topic='stock', @map(type='keyvalue', @payload(a='{{symbol}} is here',b='`price`',c='volume')))
40+
define stream FooStream (symbol string, price float, volume long);
41+
42+
```
43+
<p></p>
44+
<p style="word-wrap: break-word;margin: 0;">This query performs a custom Key-Value output mapping where the values of the <code>a</code> and <code>b</code> attributes are strings and c is object. The expected output should be a Map similar to the following: <br>a:'WSO2 is here'<br>b : 'price'<br>c: 100L</p>
45+
<p></p>
46+
## Sourcemapper
47+
48+
### keyvalue *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#source-mapper">(Source Mapper)</a>*
49+
<p></p>
50+
<p style="word-wrap: break-word;margin: 0;"><code>Key-Value Map to Event</code> input mapper extension allows transports that accept events as key value maps to convert those events to Siddhi events. You can either receive pre-defined keys where conversion takes place without extra configurations, or use custom keys to map from the message.</p>
51+
<p></p>
52+
<span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span>
53+
54+
```
55+
@source(..., @map(type="keyvalue", fail.on.missing.attribute="<BOOL>")
56+
```
57+
58+
<span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span>
59+
<table>
60+
<tr>
61+
<th>Name</th>
62+
<th style="min-width: 20em">Description</th>
63+
<th>Default Value</th>
64+
<th>Possible Data Types</th>
65+
<th>Optional</th>
66+
<th>Dynamic</th>
67+
</tr>
68+
<tr>
69+
<td style="vertical-align: top">fail.on.missing.attribute</td>
70+
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;"> If this parameter is set to <code>true</code>, if an event arrives without a matching key for a specific attribute in the connected stream, it is dropped and not processed by the Stream Processor. If this parameter is set to <code>false</code> the Stream Processor adds the required key to such events with a null value, and the event is converted to a Siddhi event so that you could handle them as required before they are further processed.</p></td>
71+
<td style="vertical-align: top">true</td>
72+
<td style="vertical-align: top">BOOL</td>
73+
<td style="vertical-align: top">Yes</td>
74+
<td style="vertical-align: top">No</td>
75+
</tr>
76+
</table>
77+
78+
<span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span>
79+
<span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span>
80+
```
81+
@source(type='inMemory', topic='stock', @map(type='keyvalue'))
82+
define stream FooStream (symbol string, price float, volume long);
83+
84+
```
85+
<p></p>
86+
<p style="word-wrap: break-word;margin: 0;">This query performs a default key value input mapping. The expected input is a map similar to the following: <br>symbol: 'WSO2'<br>price: 55.6f<br>volume: 100</p>
87+
<p></p>
88+
<span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span>
89+
```
90+
@source(type='inMemory', topic='stock', @map(type='keyvalue', fail.on.missing.attribute='true', @attributes(symbol = 's', price = 'p', volume = 'v')))define stream FooStream (symbol string, price float, volume long);
91+
```
92+
<p></p>
93+
<p style="word-wrap: break-word;margin: 0;">This query performs a custom key value input mapping. The matching keys for the <code>symbol</code>, <code>price</code> and <code>volume</code> attributes are be <code>s</code>, <code>p</code>, and <code>v</code> respectively. The expected input is a map similar to the following: <br>s: 'WSO2' <br>p: 55.6 <br>v: 100 <br></p>
94+
<p></p>

docs/api/latest.md

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
# API Docs - v2.0.3
1+
# API Docs - v2.0.4
22

3-
## Sinkmapper
4-
5-
### keyvalue *<a target="_blank" href="https://siddhi.io/en/v5.0/docs/query-guide/#sink-mapper">(Sink Mapper)</a>*
3+
!!! Info "Tested Siddhi Core version: *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/">5.1.5</a>*"
4+
It could also support other Siddhi Core minor versions.
65

7-
<p style="word-wrap: break-word">The <code>Event to Key-Value Map</code> output mapper extension allows you to convert Siddhi events processed by WSO2 SP to key-value map events before publishing them. You can either use pre-defined keys where conversion takes place without extra configurations, or use custom keys with which the messages can be published.</p>
6+
## Sinkmapper
87

8+
### keyvalue *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#sink-mapper">(Sink Mapper)</a>*
9+
<p></p>
10+
<p style="word-wrap: break-word;margin: 0;">The <code>Event to Key-Value Map</code> output mapper extension allows you to convert Siddhi events processed by WSO2 SP to key-value map events before publishing them. You can either use pre-defined keys where conversion takes place without extra configurations, or use custom keys with which the messages can be published.</p>
11+
<p></p>
912
<span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span>
13+
1014
```
1115
@sink(..., @map(type="keyvalue")
1216
```
@@ -18,34 +22,35 @@
1822
define stream FooStream (symbol string, price float, volume long);
1923
2024
```
21-
<p style="word-wrap: break-word">This query performs a default Key-Value output mapping. The expected output is something similar to the following : <br>symbol : 'WSO2'<br>price : 55.6f<br>volume : 100L</p>
22-
25+
<p></p>
26+
<p style="word-wrap: break-word;margin: 0;">This query performs a default Key-Value output mapping. The expected output is something similar to the following: <br>symbol:'WSO2' <br>price : 55.6f <br>volume: 100L</p>
27+
<p></p>
2328
<span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span>
2429
```
2530
@sink(type='inMemory', topic='stock', @map(type='keyvalue', @payload(a='symbol',b='price',c='volume')))
2631
define stream FooStream (symbol string, price float, volume long);
2732
2833
```
29-
<p style="word-wrap: break-word">This query performs a custom Key-Value output mapping where values are passed as objects. Values for <code>symbol</code>, <code>price</code>, and <code>volume</code> attributes are published with the keys <code>a</code>, <code>b</code> and <code>c</code> respectively. The expected output is a map similar to the following:<br>a :'WSO2'<br>b : 55.6f<br>c : 100L</p>
30-
34+
<p></p>
35+
<p style="word-wrap: break-word;margin: 0;">This query performs a custom Key-Value output mapping where values are passed as objects. Values for <code>symbol</code>, <code>price</code>, and <code>volume</code> attributes are published with the keys <code>a</code>, <code>b</code> and <code>c</code> respectively. The expected output is a map similar to the following: <br>a:'WSO2'<br>b : 55.6f<br>c: 100L</p>
36+
<p></p>
3137
<span id="example-3" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 3</span>
3238
```
3339
@sink(type='inMemory', topic='stock', @map(type='keyvalue', @payload(a='{{symbol}} is here',b='`price`',c='volume')))
3440
define stream FooStream (symbol string, price float, volume long);
3541
3642
```
37-
<p>This query performs a custom Key-Value output mapping where the values of the <code>a</code> and <code>b</code> attributes are strings and c is object. The expected output should be a Map similar to the following : <br>
38-
a : 'WSO2 is here'<br>
39-
b : 'price'<br>
40-
c : 100L</p>
41-
43+
<p></p>
44+
<p style="word-wrap: break-word;margin: 0;">This query performs a custom Key-Value output mapping where the values of the <code>a</code> and <code>b</code> attributes are strings and c is object. The expected output should be a Map similar to the following: <br>a:'WSO2 is here'<br>b : 'price'<br>c: 100L</p>
45+
<p></p>
4246
## Sourcemapper
4347

44-
### keyvalue *<a target="_blank" href="https://siddhi.io/en/v5.0/docs/query-guide/#source-mapper">(Source Mapper)</a>*
45-
46-
<p style="word-wrap: break-word"><code>Key-Value Map to Event</code> input mapper extension allows transports that accept events as key value maps to convert those events to Siddhi events. You can either receive pre-defined keys where conversion takes place without extra configurations, or use custom keys to map from the message.</p>
47-
48+
### keyvalue *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#source-mapper">(Source Mapper)</a>*
49+
<p></p>
50+
<p style="word-wrap: break-word;margin: 0;"><code>Key-Value Map to Event</code> input mapper extension allows transports that accept events as key value maps to convert those events to Siddhi events. You can either receive pre-defined keys where conversion takes place without extra configurations, or use custom keys to map from the message.</p>
51+
<p></p>
4852
<span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span>
53+
4954
```
5055
@source(..., @map(type="keyvalue", fail.on.missing.attribute="<BOOL>")
5156
```
@@ -62,7 +67,7 @@ c : 100L</p>
6267
</tr>
6368
<tr>
6469
<td style="vertical-align: top">fail.on.missing.attribute</td>
65-
<td style="vertical-align: top; word-wrap: break-word"> If this parameter is set to <code>true</code>, if an event arrives without a matching key for a specific attribute in the connected stream, it is dropped and not processed by the Stream Processor. If this parameter is set to <code>false</code> the Stream Processor adds the required key to such events with a null value, and the event is converted to a Siddhi event so that you could handle them as required before they are further processed.</td>
70+
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;"> If this parameter is set to <code>true</code>, if an event arrives without a matching key for a specific attribute in the connected stream, it is dropped and not processed by the Stream Processor. If this parameter is set to <code>false</code> the Stream Processor adds the required key to such events with a null value, and the event is converted to a Siddhi event so that you could handle them as required before they are further processed.</p></td>
6671
<td style="vertical-align: top">true</td>
6772
<td style="vertical-align: top">BOOL</td>
6873
<td style="vertical-align: top">Yes</td>
@@ -77,14 +82,13 @@ c : 100L</p>
7782
define stream FooStream (symbol string, price float, volume long);
7883
7984
```
80-
<p style="word-wrap: break-word">This query performs a default key value input mapping. The expected input is a map similar to the following:<br>symbol: 'WSO2'<br>price: 55.6f<br>volume: 100</p>
81-
85+
<p></p>
86+
<p style="word-wrap: break-word;margin: 0;">This query performs a default key value input mapping. The expected input is a map similar to the following: <br>symbol: 'WSO2'<br>price: 55.6f<br>volume: 100</p>
87+
<p></p>
8288
<span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span>
8389
```
8490
@source(type='inMemory', topic='stock', @map(type='keyvalue', fail.on.missing.attribute='true', @attributes(symbol = 's', price = 'p', volume = 'v')))define stream FooStream (symbol string, price float, volume long);
8591
```
86-
<p style="word-wrap: break-word">This query performs a custom key value input mapping. The matching keys for the <code>symbol</code>, <code>price</code> and <code>volume</code> attributes are be <code>s</code>, <code>p, and </code>v` respectively. The expected input is a map similar to the following:
87-
s: 'WSO2'
88-
p: 55.6
89-
v: 100</p>
90-
92+
<p></p>
93+
<p style="word-wrap: break-word;margin: 0;">This query performs a custom key value input mapping. The matching keys for the <code>symbol</code>, <code>price</code> and <code>volume</code> attributes are be <code>s</code>, <code>p</code>, and <code>v</code> respectively. The expected input is a map similar to the following: <br>s: 'WSO2' <br>p: 55.6 <br>v: 100 <br></p>
94+
<p></p>

docs/index.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@ For information on <a target="_blank" href="https://siddhi.io/">Siddhi</a> and i
1919

2020
## Latest API Docs
2121

22-
Latest API Docs is <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.0.3">2.0.3</a>.
22+
Latest API Docs is <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.0.4">2.0.4</a>.
2323

2424
## Features
2525

26-
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.0.3/#keyvalue-sink-mapper">keyvalue</a> *<a target="_blank" href="https://siddhi.io/en/v5.0/docs/query-guide/#sink-mapper">(Sink Mapper)</a>*<br><div style="padding-left: 1em;"><p>The <code>Event to Key-Value Map</code> output mapper extension allows you to convert Siddhi events processed by WSO2 SP to key-value map events before publishing them. You can either use pre-defined keys where conversion takes place without extra configurations, or use custom keys with which the messages can be published.</p></div>
27-
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.0.3/#keyvalue-source-mapper">keyvalue</a> *<a target="_blank" href="https://siddhi.io/en/v5.0/docs/query-guide/#source-mapper">(Source Mapper)</a>*<br><div style="padding-left: 1em;"><p><code>Key-Value Map to Event</code> input mapper extension allows transports that accept events as key value maps to convert those events to Siddhi events. You can either receive pre-defined keys where conversion takes place without extra configurations, or use custom keys to map from the message.</p></div>
28-
26+
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.0.4/#keyvalue-sink-mapper">keyvalue</a> *(<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#sink-mapper">Sink Mapper</a>)*<br> <div style="padding-left: 1em;"><p><p style="word-wrap: break-word;margin: 0;">The <code>Event to Key-Value Map</code> output mapper extension allows you to convert Siddhi events processed by WSO2 SP to key-value map events before publishing them. You can either use pre-defined keys where conversion takes place without extra configurations, or use custom keys with which the messages can be published.</p></p></div>
27+
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.0.4/#keyvalue-source-mapper">keyvalue</a> *(<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#source-mapper">Source Mapper</a>)*<br> <div style="padding-left: 1em;"><p><p style="word-wrap: break-word;margin: 0;"><code>Key-Value Map to Event</code> input mapper extension allows transports that accept events as key value maps to convert those events to Siddhi events. You can either receive pre-defined keys where conversion takes place without extra configurations, or use custom keys to map from the message.</p></p></div>
2928

3029
## Dependencies
3130

0 commit comments

Comments
 (0)