Running multiple hive queries using tHiveRow compo

2019-05-21 05:32发布

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?

2条回答
Explosion°爆炸
2楼-- · 2019-05-21 05:59

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").

查看更多
成全新的幸福
3楼-- · 2019-05-21 06:04

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.

查看更多
登录 后发表回答