Hi Chamila,

You need to set the 'referer' attribute as

*    <property>*
*            <from dataType="meta" name="referer"/>*
*            <to name="meta_referer" type="string"/>*
*        </property>*

 Using meta_, correlation_, you can specify if it is an meta attribute or a
correlation attribute for the exported stream. Otherwise, it will be
treated as a payload attribute.

I've updated the docs to reflect this.

Thanks,
Lasantha


On 10 January 2014 11:12, Chamila Wijayarathna <[email protected]> wrote:

> Hello all,
> I created an event builder with following configuration.
>
> *<?xml version="1.0" encoding="UTF-8"?>*
> *<eventBuilder name="logger3" statistics="disable" trace="enable"
> xmlns="http://wso2.org/carbon/eventbuilder
> <http://wso2.org/carbon/eventbuilder>">*
> *    <from eventAdaptorName="WSO2EventAdaptor"
> eventAdaptorType="wso2event">*
> *        <property
> name="stream">org.wso2.log_analyzer.netflow.info1</property>*
> *        <property name="version">1.0.0</property>*
> *    </from>*
> *    <mapping customMapping="enable" type="wso2event">*
> *        <property>*
> *            <from dataType="meta" name="referer"/>*
> *            <to name="referer" type="string"/>*
> *        </property>*
> *        <property>*
> *            <from dataType="payload" name="SrcIp"/>*
> *            <to name="SrcIp" type="string"/>*
> *        </property>*
> *        <property>*
> *            <from dataType="payload" name="DestIp"/>*
> *            <to name="DestIp" type="string"/>*
> *        </property>*
> *        <property>*
> *            <from dataType="payload" name="size"/>*
> *            <to name="size" type="string"/>*
> *        </property>*
> *        <property>*
> *            <from dataType="payload" name="timestamp"/>*
> *            <to name="timestamp" type="string"/>*
> *        </property>*
> *    </mapping>*
> *    <to streamName="org.wso2.log_analyzer.out" version="1.0.0"/>*
> *</eventBuilder>*
>
> CEP shows it as an inactive builder with notification
>
> "stream validation exception : The meta data attribute 'referer' in
> stream : 'org.wso2.log_analyzer.out:1.0.0' cannot be found under attributes
> exported by this event builder mapping"
>
> As you can see, I have added that in mu event builder mapping. What is
> wrong here?
>
> Stream Definition of stream -
>
> StreamDefinition{ streamId='org.wso2.log_analyzer.out:1.0.0',
> name='org.wso2.log_analyzer.out', version='1.0.0', nickName='',
> description='', tags=null, metaData=[Attribute{name='referer',
> type=STRING}], correlationData=null, payloadData=[Attribute{name='SrcIp',
> type=STRING}, Attribute{name='DestIp', type=STRING}, Attribute{name='size',
> type=STRING}, Attribute{name='timestamp', type=STRING}], }
>
> Thank you.
> --
> *Chamila Wijayarathna*
> Engineering Intern,
> WSO2 Inc.
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Lasantha Fernando*
Software Engineer - Data Technologies Team
WSO2 Inc. http://wso2.com

email: [email protected]
mobile: (+94) 71 5247551
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to