+1 this makes integration between connectors much simpler. (recipes) To begin we need to support XML, JSON and CSV
On Tue, Apr 8, 2014 at 9:57 AM, Sohani Weerasinghe <[email protected]> wrote: > Hi All, > > As per discussed the Data Mapper Mediator should aware about the data > type/format given as input by the input connector/mediator and about the > data type/format should be given to the output connector/mediator. > Therefore the DataMapperMediator should have two extra properties to define > input and output types. Altogether there will be five attributes/ > properties in the DataMapperMediator as listed below > > Configuration key > InputSchema key > OutputSchema key > InputType > OutputType > > In order to make type awareness, for the time been user should mention the > required data type/format and then the DataMapperMediator defines them as > parameters/attributes. If the user didn't mention the type, there should be > a default data type (eg.JSON) as the output data type. Based on the defined > data type/format the DataMapperMediator needs to be implemented to do > type/format conversion using Datum Writers and Readers. > > > Thanks and Regards, > Sohani > > > Sohani Weerasinghe > Software Engineer > WSO2, Inc: http://wso2.com > > Mobile : +94 716439774 > Blog :http://christinetechtips.blogspot.com/ > Twitter : https://twitter.com/sohanichristine > > > On Mon, Apr 7, 2014 at 7:42 PM, Lali Devamanthri <[email protected]> wrote: > >> Hi, >> >> >> On Fri, Apr 4, 2014 at 11:09 AM, Gayan Yalpathwala <[email protected]>wrote: >> >>> Hi Sohani, >>> >>> >>> On Fri, Apr 4, 2014 at 10:44 AM, Sohani Weerasinghe <[email protected]>wrote: >>> >>>> Hi, >>>> >>>> As I mentioned above the data mapper engine gives the output as JSON >>>> and the output format can be anything not only JSON or XML. Therefore >>>> 'DataMapperMediator' needs to be implemented in such a way to have two >>>> properties for input and output types. Basically there can be a default >>>> format based on the connectors (mediators) or user can define a data type. >>>> >>> >>> This will not be an issue once connectors are made type aware. If the >>> connector which is added next to data-mapper mediator clearly defines its >>> input type, data-mapper mediator can be designed in a way it creates an >>> output based on that. I am +1 for providing an option for user to define >>> the output type for now. >>> >> >> What if we return default result data type from DataMapperMediator and >> use an another mediator for format conversion ? >> This will delegate format conversion from DataMapperMediator and data >> mapper engine. >> >> Thanks, >> Lali >> >>> >>> Thanks, >>> >>> >>>> Thanks, >>>> Sohani >>>> >>>> >>>> >>>> >>>> Sohani Weerasinghe >>>> Software Engineer >>>> WSO2, Inc: http://wso2.com >>>> >>>> Mobile : +94 716439774 >>>> Blog :http://christinetechtips.blogspot.com/ >>>> Twitter : https://twitter.com/sohanichristine >>>> >>>> >>>> On Fri, Apr 4, 2014 at 10:26 AM, Chanaka Fernando <[email protected]>wrote: >>>> >>>>> Hi Sohani, >>>>> >>>>> +1 for the "DataMapperMediator" idea. If you could give another option >>>>> to select the output format either as XML or JSON, that would be really >>>>> helpful. >>>>> >>>>> WDYT? >>>>> >>>>> >>>>> Thanks, >>>>> Chanaka >>>>> >>>>> >>>>> On Thu, Apr 3, 2014 at 6:32 PM, Sohani Weerasinghe <[email protected]>wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> As per previous discussions we had, the objective of the datamapper >>>>>> mediator is to map input (payload) from one mediator (most probably this >>>>>> would be a connector) an gives the required output to the other mediator. >>>>>> Currently we are using a class mediator for this purpose. Therefore we >>>>>> are >>>>>> going to implement a custom mediator for data mapping called >>>>>> 'DataMapperMediator'. >>>>>> >>>>>> Mainly for the mapping done in the data mapper engine we need three >>>>>> inputs as mapping configuration, input avro schema and output avro >>>>>> schema. >>>>>> References for these inputs should be in the Data Mapper Mediator, >>>>>> therefore below mentioned properties or attributes should be defined for >>>>>> the Mediator. >>>>>> >>>>>> - Configuration key >>>>>> - InputSchema key >>>>>> - OutputSchema key >>>>>> >>>>>> The Data Mapper Mediator implemented based on the above properties >>>>>> will get the resources from the pointed locations and give them to the >>>>>> data >>>>>> mapper engine as inputs. And also it generates a required output for the >>>>>> next mediator based on the output received from the datamapper backend. >>>>>> >>>>>> Currently the payload is in XML and the data mapper engine gives the >>>>>> output as JSON therefore, for the time been Data Mapper Mediator is going >>>>>> to implement to get the XML input and to generate an XML output. >>>>>> >>>>>> Thanks, >>>>>> Sohani >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Sohani Weerasinghe >>>>>> Software Engineer >>>>>> WSO2, Inc: http://wso2.com >>>>>> >>>>>> Mobile : +94 716439774 >>>>>> Blog :http://christinetechtips.blogspot.com/ >>>>>> Twitter : https://twitter.com/sohanichristine >>>>>> >>>>>> _______________________________________________ >>>>>> Architecture mailing list >>>>>> [email protected] >>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> -- >>>>> Chanaka Fernando >>>>> Technical Lead >>>>> WSO2, Inc.; http://wso2.com >>>>> lean.enterprise.middleware >>>>> >>>>> mobile: +94 773337238 >>>>> Blog : http://soatutorials.blogspot.com >>>>> LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0 >>>>> Twitter:https://twitter.com/chanakaudaya >>>>> Wordpress:http://chanakaudaya.wordpress.com >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Architecture mailing list >>>>> [email protected] >>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> Architecture mailing list >>>> [email protected] >>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>> >>>> >>> >>> >>> -- >>> *Gayan Kaushalya Yalpathwala* >>> Software Engineer >>> WSO2 Inc.; http://wso2.com >>> lean.enterprise.middleware >>> >>> mobile: +94 71 8682704 <http://asia14.wso2con.com/> >>> >>> <http://asia14.wso2con.com/> >>> >>> _______________________________________________ >>> Architecture mailing list >>> [email protected] >>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>> >>> >> >> >> -- >> *Lali Sudaththa Devamanthri* >> Software Engineer >> WSO2 Inc.; http://wso2.com >> lean.enterprise.middleware >> >> mobile: +94 71 895 4922 >> <http://www.wso2.com> >> >> _______________________________________________ >> Architecture mailing list >> [email protected] >> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >> >> > > _______________________________________________ > Architecture mailing list > [email protected] > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > > -- Best Regards, Malaka Silva Senior Tech Lead M: +94 777 219 791 Tel : 94 11 214 5345 Fax :94 11 2145300 Skype : malaka.sampath.silva LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77 Blog : http://mrmalakasilva.blogspot.com/ WSO2, Inc. lean . enterprise . middleware http://www.wso2.com/ http://www.wso2.com/about/team/malaka-silva/<http://wso2.com/about/team/malaka-silva/> Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
