gpt4 book ai didi

json - 通过talend上的REST请求发送json数据

转载 作者:行者123 更新时间:2023-12-02 23:53:09 25 4
gpt4 key购买 nike

我想将数据发送到我的elasticsearch数据库。
为此,我从oracle数据库中恢复了数据,然后将其转换为json并通过talend上的REST请求发送

我使用elasticsearch版本7.0.1和talend 7.1.1

数据发送:

{“名称”:“工厂”,“地点”:“巴黎”,“部门”:“西北”}

该URL中的方法:“http://localhost:9200/my_index

我有这个错误:

组件tRESTClient_1(myProject)中的异常
javax.ws.rs.WebApplicationException:不允许的HTTP 405方法

最佳答案

如果您没有在网址中传递ID,则需要使用“ POST ”方法。

我尝试运行您在Kibana中发布的查询时遇到类似的错误。

你可以在这里阅读更多:
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html

PS:我不知道Talend是如何发挥作用的,但是我假设您在本地运行它,否则我会因无法访问“localhost”而遇到一个不同的错误。

关于json - 通过talend上的REST请求发送json数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56169225/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com