Running multiple hive queries using tHiveRow component in Talend

时光总嘲笑我的痴心妄想 提交于 2020-01-02 13:44:11

问题


Hi i want to tun multiple hive queries through a single component. Through tHiveRow i'm able to run single query but unable to run multiple queries at a time.

I know that we can run multiple sql queries after going through the following link http://www.vikramtakkar.com/2013/05/example-to-execute-multiple-sql-queries.html

But any one has any idea as how to run multiple queries?


回答1:


Your link reference shows a MySQL connection... this says nothing about the Hive JDBC driver capabilities, since running multiple statements in one JDBC statement is a driver specific feature!

To run multiple queries: Start with a tFixedFlowInput component. Configure one String column and choose table input option; you will get a table with one column. Each line, you add, will be one Hive statement. Now connect it with a tHiveRow component and use the column of the ingoing flow in the SQL textarea by <flowName>.<columnName> e.g.: row1.sqlStatement (if the String column in your tFixedFlowInput has the name "sqlStatement" and the connection between the tFixedFlowInput and the tHiveRow component is called "row1").




回答2:


I was looking for a way to do it and found this workaround: https://community.talend.com/t5/Design-and-Development/Run-Multiple-Queries-in-Thive-Row-Component/td-p/36196

May someone have the same need in the future.



来源:https://stackoverflow.com/questions/36899060/running-multiple-hive-queries-using-thiverow-component-in-talend

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!