【发布时间】:2019-05-02 09:17:58
【问题描述】:
我有一个包含连接和别名的特定查询,我需要在 Talend 中检索 REST 请求的列名。
我正在使用 Talend Open Studio for Data Integration 6.2,并且我有一个带有只读帐户的 Oracle 11g 数据库。我可以使用 Talend 执行脚本,例如查询:
select
u.name as "user",
f.name as "food",
e.rate
from
Users as u
join Eval as e on u.user_id = e.user_id
join Food as f on e.food_id = f.food_id
where
1 = 1
应该给出以下结果:
+------+--------+------+
| user | food | rate |
+------+--------+------+
| Baba | Donuts | 16.0 |
| Baba | Cheese | 20.0 |
| Keke | Pasta | 12.5 |
| Keke | Cheese | 15.0 |
+------+--------+------+
我尝试使用脚本或 Talend 获取列(按正确的顺序):
+--------+
| Column |
+--------+
| user |
| food |
| rate |
+--------+
有没有办法查询 Oracle 数据库以获取列或使用 talend 检索它们?
更新
感谢 Marmite Bomber,已为 Oracle 方法识别出重复的 here。现在我们需要一个 Talend 方法来解决这个问题。
【问题讨论】:
-
查看重复问题here的答案,您可以使用
DBMS_SQL或JDBC方法
标签: sql oracle oracle11g talend