Community Articles
Find and share helpful community-sourced technical articles.


# this will execute a hive query and save result to hdfs file in your home directory called output

curl -s -d execute="select+*+from+sample_08;" \
  -d statusdir="output" \ 

# if you ls on the directory, it will have two files, stderr and stdout

hdfs dfs -ls output

# if the job succeeded, you can cat the stdout file and view the results

hdfs dfs -cat output/stdout  


# list the output directory, notice the webhdfs port

curl -i ""

# read the output file

curl -i -L ""

# rename a file, if you get dr. who error, add & or any other user in the context

curl -i -X PUT ""

# read the output of the new file

curl -i -L ""

A great beginning! Thanks!


Hello @Artem Ervits

To read data from WebHcat do I have to put the data inside HDFS? Is there a way to read this data directly via Rest API?

I mean, the data of the table, not the metadata.

Thank you so much

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.
Version history
Last update:
‎02-05-2016 06:36 PM
Updated by:
Top Kudoed Authors
; ;