On Fri, Dec 20, 2013 at 4:54 PM, Chamila Wijayarathna <[email protected]>wrote:

> Hello All,
> I am running BAM sample 1.
> In the analytic script which get run when I sent log line event it has
> query
>
> CREATE EXTERNAL TABLE IF NOT EXISTS ProcessedLogs (
>  logId STRING,remote_ip STRING,
> request_date STRING,request STRING,
> httpCode STRING,length STRING,
>  version STRING)
> STORED BY 'org.apache.hadoop.hive.cassandra.CassandraStorageHandler'
> WITH SERDEPROPERTIES (
>  "wso2.carbon.datasource.name" = "WSO2BAM_CASSANDRA_DATASOURCE" ,
> "cassandra.cf.name" = "processed_logs" ,
>  "cassandra.columns.mapping" =
> ":key,remote_ip, request_date, request,httpCode,length, version" );
>
> What I understand about this query is that it creates a table and load
> data from "processed_logs" column family which is available at
> Cassandra Keyspaces / EVENT_KS.
>
In this query it created the "processed_logs" column family and creates the
Hive table (which is a virtual table), "ProcessedLogs" wrapping the column
family, "processed_logs".

>
> I need to analyze a log file which is in a format different from
> access.log given in sample. How can I create a different column family for
> my requirement and access them in my script???
>
The script above can be used for creating a column family.

Read [1] for more information on writing Hive queries.

[1]
http://docs.wso2.org/display/BAM240/Creating+Hive+Queries+to+Analyze+Data

>
>
> Thank You!
> --
> *Chamila Wijayarathna*
> Engineering Intern,
> WSO2 Inc.
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to