I am invoking a hql script from .ksh. The hql is used to format data from input files(.csv).
So, first I am loading the data to a table(tbl1) who columns are same as the input file. Then I am creating another table(tbl2) with the format I require and performing an insert select from tbl1 to tbl2.
As the substr of the file name has a field that is required I am retrieving using INPUT__FILE__NAME. But this has the complete hdfs hive table location along with the filename as the data is from tbl1.
Is there a way to only get the table location as parameter in hql?
I couldn't find the metastore database in the core-site.xml. We are using Clodera cluster. Is there a way to find the metastore database so that I can query the table location?