请求
POST /api/v1/apps/{appId}/rules/preview?datasetId=1
{
"dataFilters": [
{
"datasetId": 1,
"filter": {
"where": [
{
"kind": "function",
"op": "and",
"args": [
{
"kind": "function",
"op": "<",
"args": [
{
"kind": "field",
"op": "id",
"type": "number"
},
{
"kind": "constant",
"op": 5,
"type": "number"
}
]
}
]
}
]
}
}
]
}
返回{
"version": "3.2-SNAPSHOT@@git.commit.id.abbrev@#null",
"code": 0,
"msg": "success",
"data": {
"data": [
[
1,
"星际穿越",
"克里斯托弗·诺兰",
"剧情",
169,
7.750885747373100000,
416252,
"马修·麦康纳",
null,
"2014-11-12",
2014,
11,
12,
"2014-11-12 08:30:00.000",
null,
"2014-11-12 16:30:00.000",
true,
{
"msg": "audit-log/create-dataset-from-connection",
"args": [
"datalake-pg"
]
},
{
"msg": "audit-log/create-dataset-from-connection",
"args": [
"datalake-pg"
]
},
"~!@#$%^&*(){}|”’<>?/.,;’"
],
[
2,
"辛德勒的名单",
"史蒂文·斯皮尔伯格",
"剧情",
195,
7.970806439407170000,
329749,
"连姆·尼森",
null,
"1993-11-30",
1993,
11,
30,
"1993-11-30 09:00:06.000",
null,
"1993-11-30 17:00:06.000",
false,
{
"msg": "audit-log/rename-column-label",
"args": [
"test20171016",
"test 20171016"
]
},
{
"msg": "audit-log/rename-column-label",
"args": [
"test20171016",
"test 20171016"
]
},
"~!@#$%^&*(){}|”’<>?/.,;’"
],
[
3,
"唐伯虎点秋香",
"李力持",
"喜剧",
102,
4.254042804241180000,
260928,
"周星驰",
null,
"1993-07-01",
1993,
7,
1,
"1993-07-01 08:20:09.000",
null,
"1993-07-01 16:20:09.000",
true,
{
"address": {
"country": "中国",
"city": "江苏苏州",
"street": "科技园路."
},
"isNonProfit": true,
"name": "BeJson",
"links": [
{
"name": "Google",
"url": "http://www.google.com"
},
{
"name": "Baidu",
"url": "http://www.baidu.com"
},
{
"name": "SoSo",
"url": "http://www.SoSo.com"
}
],
"page": 88,
"url": "http://www.bejson.com"
},
{
"address": {
"country": "中国",
"city": "江苏苏州",
"street": "科技园路."
},
"isNonProfit": true,
"name": "BeJson",
"links": [
{
"name": "Google",
"url": "http://www.google.com"
},
{
"name": "Baidu",
"url": "http://www.baidu.com"
},
{
"name": "SoSo",
"url": "http://www.SoSo.com"
}
],
"page": 88,
"url": "http://www.bejson.com"
},
"~!@#$%^&*(){}|”’<>?/.,;’"
],
[
4,
"致命ID",
"詹姆斯·曼高德",
"剧情",
90,
9.574219468049710000,
271970,
"约翰·库萨克",
null,
"2003-04-25",
2003,
4,
25,
"2003-04-25 20:08:08.000",
null,
"2003-04-26 04:08:08.000",
false,
{
"msg": "audit-log/create-chart",
"args": [
"wss-movie-join-weird"
]
},
{
"msg": "audit-log/create-chart",
"args": [
"wss-movie-join-weird"
]
},
"~!@#$%^&*(){}|”’<>?/.,;’"
]
],
"schema": [
{
"fieldName": "id",
"type": "number",
"config": {
"dialectName": "PostgresqlDialect"
},
"label": "id",
"nativeType": "bigserial",
"suggestedTypes": [
"number",
"string"
],
"detectedType": "integer",
"visible": true,
"originType": "integer",
"basicType": "number",
"defaultAggrType": "sum"
},
{
"fieldName": "zh_name",
"hsVersion": 1,
"type": "string",
"config": {},
"label": "zh_name",
"nativeType": "text",
"suggestedTypes": [
"string"
],
"detectedType": "string",
"visible": true,
"originType": "string",
"basicType": "string",
"defaultAggrType": "count"
},
{
"fieldName": "director",
"hsVersion": 1,
"type": "string",
"config": {},
"label": "director",
"nativeType": "text",
"suggestedTypes": [
"string"
],
"detectedType": "string",
"visible": true,
"originType": "string",
"basicType": "string",
"defaultAggrType": "count"
},
{
"fieldName": "prime_genre",
"hsVersion": 1,
"type": "string",
"config": {},
"label": "prime_genre",
"nativeType": "varchar",
"suggestedTypes": [
"string"
],
"detectedType": "string",
"visible": true,
"originType": "string",
"basicType": "string",
"defaultAggrType": "count"
},
{
"fieldName": "runtime",
"hsVersion": 1,
"type": "number",
"config": {
"dialectName": "PostgresqlDialect"
},
"label": "runtime",
"nativeType": "int2",
"suggestedTypes": [
"number",
"string"
],
"detectedType": "integer",
"visible": true,
"originType": "integer",
"basicType": "number",
"defaultAggrType": "sum"
},
{
"fieldName": "rate_num",
"hsVersion": 1,
"type": "number",
"config": {
"dialectName": "PostgresqlDialect"
},
"label": "rate_num",
"nativeType": "numeric",
"suggestedTypes": [
"number",
"string"
],
"detectedType": "number",
"visible": true,
"originType": "number",
"basicType": "number",
"defaultAggrType": "sum"
},
{
"fieldName": "votes",
"hsVersion": 1,
"type": "number",
"config": {
"dialectName": "PostgresqlDialect"
},
"label": "votes",
"nativeType": "int8",
"suggestedTypes": [
"number",
"string"
],
"detectedType": "integer",
"visible": true,
"originType": "integer",
"basicType": "number",
"defaultAggrType": "sum"
},
{
"fieldName": "stars",
"hsVersion": 1,
"type": "string",
"config": {},
"label": "stars",
"nativeType": "varchar",
"suggestedTypes": [
"string"
],
"detectedType": "string",
"visible": true,
"originType": "string",
"basicType": "string",
"defaultAggrType": "count"
},
{
"fieldName": "tags",
"hsVersion": 1,
"type": "string",
"config": {},
"label": "tags",
"nativeType": "text",
"suggestedTypes": [
"string",
"number"
],
"detectedType": "string",
"visible": true,
"originType": "string",
"basicType": "string",
"defaultAggrType": "count"
},
{
"fieldName": "pubdate",
"hsVersion": 1,
"type": "date",
"config": {
"dialectName": "PostgresqlDialect"
},
"label": "pubdate",
"nativeType": "date",
"suggestedTypes": [
"date",
"string"
],
"detectedType": "date",
"visible": true,
"originType": "date",
"basicType": "date",
"defaultAggrType": "year"
},
{
"fieldName": "pubyear",
"hsVersion": 1,
"type": "number",
"config": {
"dateFormat": "yyyy",
"dialectName": "PostgresqlDialect"
},
"label": "pubyear",
"nativeType": "int4",
"suggestedTypes": [
"number",
"string",
"date"
],
"detectedType": "integer",
"visible": true,
"originType": "integer",
"basicType": "number",
"defaultAggrType": "sum"
},
{
"fieldName": "month",
"hsVersion": 1,
"type": "number",
"config": {
"dialectName": "PostgresqlDialect"
},
"label": "month",
"nativeType": "int4",
"suggestedTypes": [
"number",
"string"
],
"detectedType": "integer",
"visible": true,
"originType": "integer",
"basicType": "number",
"defaultAggrType": "sum"
},
{
"fieldName": "day",
"hsVersion": 1,
"type": "number",
"config": {
"dialectName": "PostgresqlDialect"
},
"label": "day",
"nativeType": "int4",
"suggestedTypes": [
"number",
"string"
],
"detectedType": "integer",
"visible": true,
"originType": "integer",
"basicType": "number",
"defaultAggrType": "sum"
},
{
"fieldName": "release_time",
"hsVersion": 1,
"type": "date",
"config": {
"dialectName": "PostgresqlDialect"
},
"label": "release_time",
"nativeType": "timestamp",
"suggestedTypes": [
"date",
"string"
],
"detectedType": "time",
"visible": true,
"originType": "time",
"basicType": "date",
"defaultAggrType": "year"
},
{
"fieldName": "happytime",
"hsVersion": 1,
"type": "unknown",
"config": {},
"label": "happytime",
"nativeType": "time",
"suggestedTypes": [
"unknown"
],
"detectedType": "unknown",
"visible": true,
"originType": "unknown",
"basicType": "unknown",
"defaultAggrType": "count"
},
{
"fieldName": "utc_time",
"hsVersion": 1,
"type": "date",
"config": {
"dialectName": "PostgresqlDialect"
},
"label": "utc_time",
"nativeType": "timestamptz",
"suggestedTypes": [
"date",
"string"
],
"detectedType": "time",
"visible": true,
"originType": "time",
"basicType": "date",
"defaultAggrType": "year"
},
{
"fieldName": "likeit",
"hsVersion": 1,
"type": "bool",
"config": {},
"label": "likeit",
"nativeType": "bool",
"suggestedTypes": [
"bool",
"string"
],
"detectedType": "bool",
"visible": true,
"originType": "bool",
"basicType": "bool",
"defaultAggrType": "count"
},
{
"fieldName": "description",
"hsVersion": 1,
"type": "json",
"config": {},
"label": "description",
"nativeType": "json",
"suggestedTypes": [
"json",
"string"
],
"detectedType": "json",
"visible": true,
"originType": "json",
"basicType": "json",
"defaultAggrType": "count"
},
{
"fieldName": "descrip_b",
"hsVersion": 1,
"type": "json",
"config": {},
"label": "descrip_b",
"nativeType": "jsonb",
"suggestedTypes": [
"json",
"string"
],
"detectedType": "json",
"visible": true,
"originType": "json",
"basicType": "json",
"defaultAggrType": "count"
},
{
"fieldName": "special",
"hsVersion": 1,
"type": "string",
"config": {},
"label": "special",
"nativeType": "varchar",
"suggestedTypes": [
"string"
],
"detectedType": "string",
"visible": true,
"originType": "string",
"basicType": "string",
"defaultAggrType": "count"
}
],
"pagable": true,
"importSwitchable": true,
"randomable": false
}
}