Hi Gimantha,

How can we denote a given field in any data type as a facet in *spark-sql.*
Lets say as an example I have a field called processDefinitionId (string
data-type) and I need to define it as a facet as well (see below example).

CREATE TEMPORARY TABLE PROCESS_USAGE_SUMMARY USING CarbonAnalytics OPTIONS
(tableName "PROCESS_USAGE_SUMMARY_DATA",
schema "processDefinitionId string -i *-f*,
processVersion string -i,
processInstanceId string -i,,
primaryKeys "processInstanceId"
);

is this the way that we can define it in newer version ?


On Fri, Apr 22, 2016 at 2:39 AM, Gimantha Bandara <giman...@wso2.com> wrote:

> Hi all,
>
> We are planning to remove "FACET" (this type is used to categorize/group,
> to get unique values and to drill-down) from indexing data types and we
> will introduce an attribute to mark other data types as a FACET or not.
> Earlier FACETs can be defined only for STRING fields and even if we define
> a STRING as a FACET, then we will not be able to search it as a STRING
> field. With this change, any data type field can be marked as a FACET and
> then the field can be used as a FACET and as the usual data type as well.
> This change will not affect the older DAS capps or event-store
> configurations; It will be backward compatible with previous DAS versions
> (3.0.0 and 3.0.1). However if you try to get the Schema of a table using JS
> APIs, REST APIs or the Webservice, FACET type will not be there. A
> attribute called "isFacet" is used to identify the FACETed fields. See
> below for an example.
>
>
>
> *Older schema*
> {
>     "columns" : {
>            "logFile" : { "type" : "STRING", "isIndex" : true,
> "isScoreParam" : false },
>            "level" : { "type" : "DOUBLE", "isIndex" : true, "isScoreParam"
> : false },
>            "location" : { "type" : "FACET", "isIndex" : true,
> "isScoreParam" : false } },
>     "primaryKeys" : ["logFile", "level"]
> }
>
>
> *Equivalent new schema*
>
>
> *{     "columns" : {           "logFile" : { "type" : "STRING", "isIndex"
> : true, "isScoreParam" : false, **, isFacet : *false
> * },           "*level*" : { "type" : "DOUBLE", "isIndex" : true,
> "isScoreParam" : false, **, isFacet : *false* },    *
> *           "location" : { "type" : "*STRING*", "isIndex" : true,
> "isScoreParam" : false, isF*acet : true
> * } },    //FACET field is removed     "primaryKeys" : ["logFile", "*level
>
>
> *"] }*
> --
>
>
> _______________________________________________
> Architecture mailing list
> architect...@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Isuru Wijesinghe
*Software Engineer*
WSO2 inc : http://wso2.com
lean.enterprise.middleware
Mobile: 0710933706
isur...@wso2.com
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to