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!

3
  • 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. Commented Feb 12, 2019 at 23:49
  • can you explain the comparisons you are trying to perform? Commented Feb 13, 2019 at 2: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 Commented Feb 13, 2019 at 15:18

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.