我一直在尝试使用不同的功能,例如sub& join将参数资源的默认值连接到变量(其他输入参数)。
一个例子是:
"RuleQuery": {
"Description" : "rule query",
"Type" : "String",
"Default" : "SELECT parse_time(\"yyyy.MM.dd G 'at' HH:mm:ss
z\", timestamp(), \"Australia/Sydney\") AS
timestamp, * FROM {\"Ref\": \"TopicFilter\"}
WHERE CustomerId={\"Ref\": \"CustomerID\"}"
},
"TopicFilter": {
"Description" : "topic filter",
"Type" : "String",
"Default" : "001"
},
"CustomerID": {
"Description" : "condition",
"Type" : "String",
"Default" : "0001"
},
每次收到错误时,默认值都应保留为字符串。想知道是否有可能实现这一目标?
由于
答案 0 :(得分:0)
JSON不允许您传递多行字符串。所以,你得到的错误。
将模板更新为以下样式,理想情况下应解决您的问题。
"RuleQuery": {
"Description" : "rule query",
"Type" : "String",
"Default" : "SELECT parse_time(\"yyyy.MM.dd G 'at' HH:mm:ss z\", timestamp(), \"Australia/Sydney\") AS timestamp, * FROM {\"Ref\": \"TopicFilter\"} WHERE CustomerId={\"Ref\": \"CustomerID\"}"
}