I have a hive external tables that mapped to some directory. This directory includes a several files.
I want to run query like find file name where there is a user "abc"
select file_name , usr from usrs_tables where usr = "abc"
But of course the data doesn't includes file name inside.
In MapReduce I can do it by
FileSplit fileSplit = (FileSplit)context.getInputSplit();
String filename = fileSplit.getPath().getName();
System.out.println("File name "+filename);
System.out.println("Directory and File name"+fileSplit.getPath().toString());
How can I do it in Hive?