原生查询组件 · ApacheDruid中文技术文档(原生资源数据库)

  本篇文章为你整理了原生查询组件 · ApacheDruid中文技术文档(原生资源数据库)的详细内容,包含有原生sql查询 原生资源数据库 原生ip查询方法 原生http 原生查询组件 · ApacheDruid中文技术文档,希望能帮助你了解 原生查询组件 · ApacheDruid中文技术文档。

  [!WARNING]

  Apache Druid Druid SQL Druid SQL SQL

  Filter JSON SQL WHERE Apache Druid

   filtered-aggregator having-filter

   (Selector Filter)

  

 filter : { type : selector , dimension : dimension_string , value : dimension_value_string }

 

  

 

   WHERE dimension_string = dimension_value_string

   (Column Comparison Filter)

  

 filter : { type : columnComparison , dimensions : [ dimension_a , dimension_b ] }

 

  

 

   WHERE dimension_a = dimension_b

  dimensions DimensionSpecs list

   (Regular expression Filter)

   Java

  

 filter : { type : regex , dimension : dimension_string , pattern : pattern_string }

 

  

 

   (Logical expression Filter)

  AND

  AND

  

 filter : { type : and , fields : [ filter , filter , ...] }

 

  

 

   fields

  OR

  OR

  

 filter : { type : or , fields : [ filter , filter , ...] }

 

  

 

   fields

  NOT

  NOT

  

 filter : { type : not , field : filter }

 

  

 

   field

  JavaScript

  JavaScript js true

  JavaScript true false

  

{

 

   type : javascript ,

   dimension : dimension_string ,

   function : function(value) { ... }

  

 

   name bar foo

  

{

 

   type : javascript ,

   dimension : name ,

   function : function(x) { return(x = bar x = foo ) }

  

 

  JavaScript

  [!WARNING]

   JavaScript Druid JavaScript JavaScript

   (Extraction Filter)

  [!WARNING]

   input_key=output_value output_value value input_key

   product [product_1, product_3, product_5]

  

{

 

   filter : {

   type : extraction ,

   dimension : product ,

   value : bar_1 ,

   extractionFn : {

   type : lookup ,

   lookup : {

   type : map ,

   map : {

   product_1 : bar_1 ,

   product_5 : bar_1 ,

   product_3 : bar_1

  

 

   (Search Filter)

  

{

 

   filter : {

   type : search ,

   dimension : product ,

   query : {

   type : insensitive_contains ,

   value : foo

  

 

  
In SQL

  

 SELECT COUNT(*) AS Count FROM `table` WHERE `outlaw` IN ( Good , Bad , Ugly )

 

  

 

   In

  

 {

 

   type : in ,

   dimension : outlaw ,

   values : [ Good , Bad , Ugly ]

  

 

  In

   values In dimension values In true

  Like

  Like SQL LIKE % ( ) _ ( )

  
String

   lexicographic , alphanumeric , numeric , strlen , version Sorting-Orders

   lexicographic

  
2014-10-01T00:00:00.000Z/2014-10-07T00:00:00.000Z ,

   2014-11-15T00:00:00.000Z/2014-11-16T00:00:00.000Z

  

 

 

   OR

  

{

 

   type : or ,

   fields : [

   type : bound ,

   dimension : __time ,

   lower : 1412121600000 ,

   lowerStrict : false,

   upper : 1412640000000 ,

   upperStrict : true,

   ordering : numeric

   type : bound ,

   dimension : __time ,

   lower : 1416009600000 ,

   lowerStrict : false,

   upper : 1416096000000 ,

   upperStrict : true,

   ordering : numeric

  

 

   spatial extractionFn

   lookup bar_1

   product [product_1, product_3, product_5]

  

{

 

   filter : {

   type : selector ,

   dimension : product ,

   value : bar_1 ,

   extractionFn : {

   type : lookup ,

   lookup : {

   type : map ,

   map : {

   product_1 : bar_1 ,

   product_5 : bar_1 ,

   product_3 : bar_1

  

 

  Druid

   myFloatColumn = 10.1:

  

 filter : {

 

   type : selector ,

   dimension : myFloatColumn ,

   value : 10.1

  

 

   10 = myFloatColumn 20:

  

 filter : {

 

   type : bound ,

   dimension : myFloatColumn ,

   ordering : numeric ,

   lower : 10 ,

   lowerStrict : false,

   upper : 20 ,

   upperStrict : true

  

 

   __time

  

 filter : {

 

   type : selector ,

   dimension : __time ,

   value : 124457387532

  

 

  

 filter : {

 

   type : selector ,

   dimension : __time ,

   value : Friday ,

   extractionFn : {

   type : timeFormat ,

   format : EEEE ,

   timeZone : America/New_York ,

   locale : en

  

 

   ISO-8601

  

{

 

   type : interval ,

   dimension : __time ,

   intervals : [

   2014-10-01T00:00:00.000Z/2014-10-07T00:00:00.000Z ,

   2014-11-15T00:00:00.000Z/2014-11-16T00:00:00.000Z

  

 

  True

  true

  

{ type : true }

 

  

 

  以上就是原生查询组件 · ApacheDruid中文技术文档(原生资源数据库)的详细内容,想要了解更多 原生查询组件 · ApacheDruid中文技术文档的内容,请持续关注盛行IT软件开发工作室。

郑重声明:本文由网友发布,不代表盛行IT的观点,版权归原作者所有,仅为传播更多信息之目的,如有侵权请联系,我们将第一时间修改或删除,多谢。

留言与评论(共有 条评论)
   
验证码: