Hi Florian,

listNestedEp from the SDK is a convenience method to create a list of event 
properties with complex/non-primitive members, e.g., when using JSON 
serialization, you could define something like {"positions": [{"wkt": "ABC", 
"epsg:": "XY"}, {"wkt: "DEF", "epsg": "XZ"}].

For complex output strategies, you could also consider a 
ContainerProvidedOutputStrategy, where the pipeline element's controller is 
called at runtime once a pipeline element is configured. See [1] for an example.
Hope this answers your question! If you have any problems when defining such 
data structures, let us know, I assume that we still have some bugs or things 
we could improve when working with complex event structures.


[1] 
https://github.com/apache/incubator-streampipes-extensions/blob/dc29746c5bdb3e1018854b294a2045eb40ced6b3/streampipes-processors-aggregation-flink/src/main/java/org/apache/streampipes/processors/aggregation/flink/processor/aggregation/AggregationController.java


On 2020/04/28 17:06:37, Florian Micklich <[email protected]> 
wrote: 
> Hi everyone,
> 
> i have a questions on how to create a nested output strategy.
> 
> As an example following code from the LatLngToGeo Controller [1].
> 
> 
> Here I created a simple output strategy:
> 
> 
> .outputStrategy(OutputStrategies.append(EpProperties.stringEp(
>   Labels.from(
>      "point_wkt",
>      "wkt",
>      "wkt point from long lat values"),
>    WKT,
>    SO.Text))
> )
> 
> 
> I see there are some options for EpProperties methods like
> 
> .outputStrategy(OutputStrategies.append(EpProperties.listNestedEp(
> 
> or
> 
> .outputStrategy(OutputStrategies.append(EpProperties.nestedEp(
> 
> that seems to support nested values. What are the difference between the 
> different listNestedEP methods and nestedEP method and how should the output 
> strategy looks like in the end?
> 
> My goal is to have an output event something like an array with point WKT on 
> position 0 and EPSG Code value on the position 1 (created in this source [2]).
> 
> 
> Thanks
> 
> Florian
> 
> 
> [1] 
> https://github.com/apache/incubator-streampipes-extensions/blob/dc29746c5bdb3e1018854b294a2045eb40ced6b3/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoController.java
> 
> [2] 
> https://github.com/apache/incubator-streampipes-extensions/blob/dc29746c5bdb3e1018854b294a2045eb40ced6b3/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgController.java
> 
> Disy Informationssysteme GmbH
> Florian Micklich
> Lösungsentwickler
> +49 721 16006 477,  [email protected]
> 
> Firmensitz: Ludwig-Erhard-Allee 6, 76131 Karlsruhe
> Registergericht: Amtsgericht Mannheim, HRB 107964
> Geschäftsführer: Claus Hofmann
> 
> Bitte beachten Sie folgende Informationen für Kunden, Lieferanten und Bewerber
> - Datenschutz: www.disy.net/datenschutz
> - Informationspflichten:  www.disy.net/informationspflichten
> 
> 

Reply via email to