Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Execute hive script (.HQL) from talend

Hi,
Is there any way that i can just execute the hive script which is there on hdfs from talend?
All i can see in talend is component to write hive queries like thiveconncetion,thiveload etc... but none of them have way to execute hive script.
you can easily do this in oozie editor (Hue) by calling and executing hive script.
is this possible in talend?
Please advice!
Thanks

Labels (2)
15 Replies
willm1
Creator
Creator

rdubois - I see where you're going with your question :-). Parse the lines and execute them in HiveRow within Talend? Smart if it works...
Anonymous
Not applicable
Author

Yes, thinking about reading the HQL file with a tFileInputFullRaw (or tFileInputDelimited) and using the tFlowToIterate and finally the tHiveRow. In such a case, the tHiveRow would be called for each single input query.
Anonymous
Not applicable
Author

Hi,
I have the hql statement which should create the directory in the local unix server.Something like below
insert overwrite local directory 'abc/xyz/sum' select sum(open),sum(high),sum(low),sum(close),sum(volume) from database.tablename;
Ideally, When you execute this statement, sum folder will be created inside /abc/xyz and inside the folder , a file will be created with the result of the select statement.
However,When i am using thiverow ,It is not creating folder neither with thiveinput.
If i am executing manually in Hive CLI, Like hive -f hqlname.hql,It is giving the desired output.
But, through talend, I am not able to achieve.
It is not even giving any error message.
Can someone please advise.
Anonymous
Not applicable
Author

Hi,
i am getting below error while trying to use sqoop import from oracle.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
at org.apache.sqoop.manager.oracle.OracleUtils.escapeIdentifier(OracleUtils.java:36)
at org.apache.sqoop.manager.OracleManager.escapeTableName(OracleManager.java:927)
at org.apache.sqoop.manager.OracleManager.getColNamesQuery(OracleManager.java:264)
at org.apache.sqoop.manager.SqlManager.getColTypesQuery(SqlManager.java:240)
at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:245)
at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:328)
at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1853)
at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1653)
at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:488)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:615)
at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
disconnected
disconnected
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
at test.oth_test_0_1.oth_test.tSqoopImport_1Process(oth_test.java:586)
at test.oth_test_0_1.oth_test.tOracleConnection_1Process(oth_test.java:428)
at test.oth_test_0_1.oth_test.runJobInTOS(oth_test.java:994)
at test.oth_test_0_1.oth_test.main(oth_test.java:851)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 18 more
Job oth_test ended at 16:49 05/01/2017.

I have added ojdbc6.jar and class name as "oracle.jdbc.driver.OracleDriver" in the component.
i am using below
please help me further.
thanks,
Rishit Shah
Anonymous
Not applicable
Author

Sorry for wrong reply here.
Anonymous
Not applicable
Author

Sorry for wrong reply here.

Sorry to bother you.
I installed Hadoop 1.1.2 and Hive 0.9.0. I didn't set username and password when i installed Hive. Now i use hiveconnection component. What can i set in the  username and password part?
Thanks.