本文介绍了在Talend中使用tHiveRow组件运行多个配置单元查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我想通过一个组件来调用多个配置单元查询。通过tHiveRow,我可以运行单个查询,但无法同时运行多个查询。

我知道我们可以通过以下链接运行多个sql查询



但是任何人都有任何想法可以运行多个查询?

解决方案

您的链接引用显示了一个MySQL连接...这没有提及Hive JDBC驱动程序的功能,因为在一个JDBC语句中运行多个语句是驱动程序特定功能!



运行多个查询:
tFixedFlowInput 组件开始。配置一个字符串列并选择表格输入选项;你会得到一列一列。您添加的每一行都将是一个Hive语句。现在,将它与tHiveRow组件连接起来,并通过< flowName>。< columnName>来使用SQL textarea中的ingoing流的列。例如:row1.sqlStatement (如果tFixedFlowInput中的String列名称为sqlStatement,并且tFixedFlowInput和tHiveRow组件之间的连接称为row1)。


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?

解决方案

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

这篇关于在Talend中使用tHiveRow组件运行多个配置单元查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 21:34