Skip to content

Commit

Permalink
[WSO2-Release] [Release 2.1.2] update documentation for release 2.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
wso2-jenkins-bot committed Feb 15, 2022
1 parent aef5af0 commit 3115e90
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ For information on <a target="_blank" href="https://siddhi.io/">Siddhi</a> and i

## Latest API Docs

Latest API Docs is <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.1.1">2.1.1</a>.
Latest API Docs is <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.1.2">2.1.2</a>.

## Features

* <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.1.1/#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>
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.1.1/#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>
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.1.2/#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>
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.1.2/#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>

## Dependencies

Expand Down
109 changes: 109 additions & 0 deletions docs/api/2.1.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# API Docs - v2.1.2

!!! Info "Tested Siddhi Core version: *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/">5.1.21</a>*"
It could also support other Siddhi Core minor versions.

## Sinkmapper

### keyvalue *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#sink-mapper">(Sink Mapper)</a>*
<p></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></p>
<span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span>

```
@sink(..., @map(type="keyvalue")
```

<span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span>
<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>
```
@sink(type='inMemory', topic='stock', @map(type='keyvalue'))
define stream FooStream (symbol string, price float, volume long);
```
<p></p>
<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>
<p></p>
<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>
```
@sink(type='inMemory', topic='stock', @map(type='keyvalue', @payload(a='symbol',b='price',c='volume')))
define stream FooStream (symbol string, price float, volume long);
```
<p></p>
<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>
<p></p>
<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>
```
@sink(type='inMemory', topic='stock', @map(type='keyvalue', @payload(a='{{symbol}} is here',b='`price`',c='volume')))
define stream FooStream (symbol string, price float, volume long);
```
<p></p>
<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>
<p></p>
## Sourcemapper

### keyvalue *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#source-mapper">(Source Mapper)</a>*
<p></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></p>
<span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span>

```
@source(..., @map(type="keyvalue", fail.on.missing.attribute="<BOOL>", implicit.cast.enable="<BOOL>")
```

<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>
<table>
<tr>
<th>Name</th>
<th style="min-width: 20em">Description</th>
<th>Default Value</th>
<th>Possible Data Types</th>
<th>Optional</th>
<th>Dynamic</th>
</tr>
<tr>
<td style="vertical-align: top">fail.on.missing.attribute</td>
<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>
<td style="vertical-align: top">true</td>
<td style="vertical-align: top">BOOL</td>
<td style="vertical-align: top">Yes</td>
<td style="vertical-align: top">No</td>
</tr>
<tr>
<td style="vertical-align: top">implicit.cast.enable</td>
<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 with a different datatype than the defined in siddhi app, the value will try to cast in to the provided datatype before it fails </p></td>
<td style="vertical-align: top">false</td>
<td style="vertical-align: top">BOOL</td>
<td style="vertical-align: top">Yes</td>
<td style="vertical-align: top">No</td>
</tr>
</table>

<span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span>
<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>
```
@source(type='inMemory', topic='stock', @map(type='keyvalue'))
define stream FooStream (symbol string, price float, volume long);
```
<p></p>
<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>
<p></p>
<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>
```
@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);
```
<p></p>
<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>
<p></p>
<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>
```
@source(type='inMemory', topic='stock', @map(type='keyvalue', fail.on.missing.attribute='true', implicit.cast.enable='true', @attributes(symbol = 's', price = 'p', volume = 'v')))define stream FooStream (symbol string, price float, volume long);
```
<p></p>
<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>
<p></p>
4 changes: 2 additions & 2 deletions docs/api/latest.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# API Docs - v2.1.1
# API Docs - v2.1.2

!!! Info "Tested Siddhi Core version: *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/">5.1.19</a>*"
!!! Info "Tested Siddhi Core version: *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/">5.1.21</a>*"
It could also support other Siddhi Core minor versions.

## Sinkmapper
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ For information on <a target="_blank" href="https://siddhi.io/">Siddhi</a> and i

## Latest API Docs

Latest API Docs is <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.1.1">2.1.1</a>.
Latest API Docs is <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.1.2">2.1.2</a>.

## Features

* <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.1.1/#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>
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.1.1/#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>
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.1.2/#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>
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-map-keyvalue/api/2.1.2/#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>

## Dependencies

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pages:
- Information: index.md
- API Docs:
- latest: api/latest.md
- 2.1.2: api/2.1.2.md
- 2.1.1: api/2.1.1.md
- 2.1.0: api/2.1.0.md
- 2.0.7: api/2.0.7.md
Expand Down

0 comments on commit 3115e90

Please sign in to comment.