Skip to content

Commit 54b1d2f

Browse files
[WSO2-Release] [Release 2.0.3] update documentation for release 2.0.3
1 parent 74dff60 commit 54b1d2f

File tree

5 files changed

+95
-7
lines changed

5 files changed

+95
-7
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Find some useful links below:
1212

1313
## Latest API Docs
1414

15-
Latest API Docs is <a target="_blank" href="https://wso2-extensions.github.io/siddhi-map-keyvalue/api/2.0.2">2.0.2</a>.
15+
Latest API Docs is <a target="_blank" href="https://wso2-extensions.github.io/siddhi-map-keyvalue/api/2.0.3">2.0.3</a>.
1616

1717
## How to use
1818

@@ -46,8 +46,8 @@ Latest API Docs is <a target="_blank" href="https://wso2-extensions.github.io/si
4646

4747
## Features
4848

49-
* <a target="_blank" href="https://wso2-extensions.github.io/siddhi-map-keyvalue/api/2.0.2/#keyvalue-sink-mapper">keyvalue</a> *<a target="_blank" href="http://siddhi.io/documentation/siddhi-5.x/query-guide-5.x/#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>
50-
* <a target="_blank" href="https://wso2-extensions.github.io/siddhi-map-keyvalue/api/2.0.2/#keyvalue-source-mapper">keyvalue</a> *<a target="_blank" href="http://siddhi.io/documentation/siddhi-5.x/query-guide-5.x/#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>
49+
* <a target="_blank" href="https://wso2-extensions.github.io/siddhi-map-keyvalue/api/2.0.3/#keyvalue-sink-mapper">keyvalue</a> *<a target="_blank" href="http://siddhi.io/documentation/siddhi-5.x/query-guide-5.x/#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>
50+
* <a target="_blank" href="https://wso2-extensions.github.io/siddhi-map-keyvalue/api/2.0.3/#keyvalue-source-mapper">keyvalue</a> *<a target="_blank" href="http://siddhi.io/documentation/siddhi-5.x/query-guide-5.x/#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>
5151

5252
## How to Contribute
5353

docs/api/2.0.3.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# API Docs - v2.0.3
2+
3+
## Sinkmapper
4+
5+
### keyvalue *<a target="_blank" href="http://siddhi.io/documentation/siddhi-5.x/query-guide-5.x/#sink-mapper">(Sink Mapper)</a>*
6+
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>
8+
9+
<span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span>
10+
```
11+
@sink(..., @map(type="keyvalue")
12+
```
13+
14+
<span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span>
15+
<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>
16+
```
17+
@sink(type='inMemory', topic='stock', @map(type='keyvalue'))
18+
define stream FooStream (symbol string, price float, volume long);
19+
20+
```
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:symbol:'WSO2'<br>price : 55.6f<br>volume: 100L</p>
22+
23+
<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>
24+
```
25+
@sink(type='inMemory', topic='stock', @map(type='keyvalue', @payload(a='symbol',b='price',c='volume')))
26+
define stream FooStream (symbol string, price float, volume long);
27+
28+
```
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+
31+
<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>
32+
```
33+
@sink(type='inMemory', topic='stock', @map(type='keyvalue', @payload(a='{{symbol}} is here',b='`price`',c='volume')))
34+
define stream FooStream (symbol string, price float, volume long);
35+
36+
```
37+
<p style="word-wrap: break-word">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:a:'WSO2 is here'<br>b : 'price'<br>c: 100L</p>
38+
39+
## Sourcemapper
40+
41+
### keyvalue *<a target="_blank" href="http://siddhi.io/documentation/siddhi-5.x/query-guide-5.x/#source-mapper">(Source Mapper)</a>*
42+
43+
<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>
44+
45+
<span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span>
46+
```
47+
@source(..., @map(type="keyvalue", fail.on.missing.attribute="<BOOL>")
48+
```
49+
50+
<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>
51+
<table>
52+
<tr>
53+
<th>Name</th>
54+
<th style="min-width: 20em">Description</th>
55+
<th>Default Value</th>
56+
<th>Possible Data Types</th>
57+
<th>Optional</th>
58+
<th>Dynamic</th>
59+
</tr>
60+
<tr>
61+
<td style="vertical-align: top">fail.on.missing.attribute</td>
62+
<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>
63+
<td style="vertical-align: top">true</td>
64+
<td style="vertical-align: top">BOOL</td>
65+
<td style="vertical-align: top">Yes</td>
66+
<td style="vertical-align: top">No</td>
67+
</tr>
68+
</table>
69+
70+
<span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span>
71+
<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>
72+
```
73+
@source(type='inMemory', topic='stock', @map(type='keyvalue'))
74+
define stream FooStream (symbol string, price float, volume long);
75+
76+
```
77+
<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>
78+
79+
<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>
80+
```
81+
@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);
82+
```
83+
<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:
84+
s: 'WSO2'
85+
p: 55.6
86+
v: 100</p>
87+

docs/api/latest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# API Docs - v2.0.2
1+
# API Docs - v2.0.3
22

33
## Sinkmapper
44

docs/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Find some useful links below:
1212

1313
## Latest API Docs
1414

15-
Latest API Docs is <a target="_blank" href="https://wso2-extensions.github.io/siddhi-map-keyvalue/api/2.0.2">2.0.2</a>.
15+
Latest API Docs is <a target="_blank" href="https://wso2-extensions.github.io/siddhi-map-keyvalue/api/2.0.3">2.0.3</a>.
1616

1717
## How to use
1818

@@ -46,8 +46,8 @@ Latest API Docs is <a target="_blank" href="https://wso2-extensions.github.io/si
4646

4747
## Features
4848

49-
* <a target="_blank" href="https://wso2-extensions.github.io/siddhi-map-keyvalue/api/2.0.2/#keyvalue-sink-mapper">keyvalue</a> *<a target="_blank" href="http://siddhi.io/documentation/siddhi-5.x/query-guide-5.x/#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>
50-
* <a target="_blank" href="https://wso2-extensions.github.io/siddhi-map-keyvalue/api/2.0.2/#keyvalue-source-mapper">keyvalue</a> *<a target="_blank" href="http://siddhi.io/documentation/siddhi-5.x/query-guide-5.x/#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>
49+
* <a target="_blank" href="https://wso2-extensions.github.io/siddhi-map-keyvalue/api/2.0.3/#keyvalue-sink-mapper">keyvalue</a> *<a target="_blank" href="http://siddhi.io/documentation/siddhi-5.x/query-guide-5.x/#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>
50+
* <a target="_blank" href="https://wso2-extensions.github.io/siddhi-map-keyvalue/api/2.0.3/#keyvalue-source-mapper">keyvalue</a> *<a target="_blank" href="http://siddhi.io/documentation/siddhi-5.x/query-guide-5.x/#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>
5151

5252
## How to Contribute
5353

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ markdown_extensions:
3232
pages:
3333
- Welcome: index.md
3434
- API Docs:
35+
- 2.0.3: api/2.0.3.md
3536
- 2.0.2: api/2.0.2.md
3637
- 2.0.1: api/2.0.1.md
3738
- 2.0.0: api/2.0.0.md

0 commit comments

Comments
 (0)