我在有UPDATE
关键字的查询上使用 ElasticSearch 上的 SQL 翻译器。我可以翻译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
}