Consider there are few hive queries in a file, my moto is to run the file using hivecontext
or sparkcontext
Using command line I can do that by hive -f 'filepath/filename'
But I have to run it via code (hivecontext
or sparkcontext
)
Can anybody help on this?
For a single query I can use:
sparkContext.SQL('query')
But I have to run a file which is having queries.