0

I am working on writing a Bash script to effectively save the individual rows of a Hive query as Shell variables, where I can perform comparisons on the results. I know some shell scripting but this is beyond my knowledge.

Can I pass 4 columns of row 1 as "Array1", for example, and 4 columns of row 2 as "Array2" into bash? Even better, can I pass each column of 2 separate rows in to 8 shell variables?

Would it be better for me to perform my comparisons in Hive and pass either "Success" or "Failure" messages back to the shell?

I appreciate any guidance, examples, and/or references!

CarCrazyBen
  • 1,066
  • 5
  • 14
  • 37
  • 1
    Update the question with a sample of your hive query output. See this post for help: [Store mysql query output into a shell variable](https://stackoverflow.com/q/1636977/6862601). – codeforester Feb 12 '19 at 23:49
  • can you explain the comparisons you are trying to perform? – Vamsi Prabhala Feb 13 '19 at 02:17
  • Your second option is simple to implement: return Success and Failure from sql. Or Green, Yellow, Red, etc. Or create a table with difference percent by categories and check if percents exceed margin then generate status – leftjoin Feb 13 '19 at 15:18

0 Answers0