I have a sample.hql file which contains below lines.
desc db.table1;
desc db.table2;
desc db.table3;
I am trying to run it from shell command I want to find out if a particular column is present in the table or not For eg-If col_1 is present in table1 the output should say col1_1 is found in db.table1
I am not sure how to find it. I am executing below command
hive -f sample.hql | grep -q "<column_name>"
But I am not sure how to get the db and table name from each executing line.