CREATE EXTERNAL TABLE IF NOT EXISTS stocks (
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
I do not see any folder stocks in HDFS.where it will be created?
Since it is external table hive won't create any folder for data storage, in hdfs. It will expect the folder and data to be present with appropriate permission. You can create the folder /data/stocks in hdfs and move data files there