我在ElasticSearch上使用SQL转换器来处理具有UPDATE
关键字的查询。 我可以翻译SELECT
查询,但UPDATE
不起作用。
POST /_sql/translate
{
"query": "UPDATE inspections SET business_state='RS' WHERE business_city='Passo Fundo'"
}
错误:
{
"error": {
"root_cause": [
{
"type": "parsing_exception",
"reason": "line 1:1: mismatched input 'UPDATE' expecting {'(', 'DEBUG', 'DESC', 'DESCRIBE', 'EXPLAIN', 'SELECT', 'SHOW', 'SYS', 'WITH'}"
}
],
"type": "parsing_exception",
"reason": "line 1:1: mismatched input 'UPDATE' expecting {'(', 'DEBUG', 'DESC', 'DESCRIBE', 'EXPLAIN', 'SELECT', 'SHOW', 'SYS', 'WITH'}",
"caused_by": {
"type": "input_mismatch_exception",
"reason": null
}
},
"status": 400
}
不支持更新 SQL 命令。 链接列出了支持的 SQL 命令