I have a shell script example.sh
hive -e "select max(id) from dummy.table;" > data.txt
hdfs dfs -put -f data.txt /user/username/data.txt
This script fetches data from hive and stores the result in hdfs. This is working as expected in terminal. But when I create an oozie workflow, the file created is empty. I tried printing some hardcoded value then the workflow runs fine. The problem is that when hive query is involved the data is absent though the job is successful. I tried running the same thing with hql and it was working successfully.
insert overwrite directory '/user/username/hiveData' select max(id) from dummy.table;
But my requirement is such that I have to get hive data in my shell script.
workflow.xmllook like? I.e. are you simply calling a shell action in it? - mazaneicha