如何使用talend将json api加载到数据库

问题描述

我是塔伦的新人。这是我的api => http://api.dss.adapt-odisha.com/aagro?url=https://mausam.imd.gov.in/api/warnings_district_api.php

这是创建的设计=>

enter image description here


在tXMLMap中

enter image description here


但是当我运行它时,我没有获取数据

enter image description here


我该如何解决这个问题?

enter image description here

解决方法

您的api返回一个json,但是由于“将响应转换为DOM文档”设置,默认情况下tRESTClient会将其转换为xml。
我取消选中该设置,并使用tExtractJSONFields解析json,它按预期工作。
enter image description here

这是tExtractJSONFields的架构
enter image description here

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...