0

I Have a requirement to check if ant table is missing from the hql file while the beeline query is getting executed from shell script!

Example :

beeline -u 'jdbc:hive2://server.domain.<>.com:10000/default;principal=hive/server.domain.com@SERVER.DOMAIN.COM' -f filename.hql

In filename.hql we have 10 tables and 9 of them got executed while there is a failure of one table.

In this case what can be the possible solution . I am not able to figure it out via a shell script?

Can somenone please help?

Bodo
  • 9,287
  • 1
  • 13
  • 29
  • Can you use a transaction to make sure either all or none of the changes are applied? Maybe related: https://stackoverflow.com/q/1043554/10622916 – Bodo May 04 '23 at 10:08
  • No we do not have permission for this – shikha. agarwal May 04 '23 at 10:17
  • Please [edit] your question and add details about all your requirements or restrictions. You could run the query on a test server first before using it on the real server. – Bodo May 04 '23 at 10:20
  • Are you looking for something like https://stackoverflow.com/questions/60552179/get-an-accurate-return-code-from-beeline-when-using-an-hql-file – Raid May 09 '23 at 22:59
  • But @Raid if there are multiple table in hql file how to detect missing table? – shikha. agarwal May 18 '23 at 09:13

0 Answers0