Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Beeline command to output the result into a .tsv file failing

Beeline command to output the result into a .tsv file failing

New Contributor

I am trying to run a select query on an hive table using beeline command and store the output into .tsv file as below

beeline -u 'jdbc:hive2://localhost:10000/$dbname' --outputformat=dsv -e 'add jar hdfs://localhost:8020/tmp/hivexmlserde-; Select * from <tablename> where <columnname>between 1 and 10000; ' > <filename.tsv>

but its giving me below error . May some one please let me know the cause of the esame.


ERROR : Failed to execute tez graph. Previous writer likely failed to write hdfs:// Failing because I am unlikely to write too. at org.apache.hadoop.hive.ql.exec.tez.DagUtils.localizeResource( at org.apache.hadoop.hive.ql.exec.tez.DagUtils.addTempResources( at org.apache.hadoop.hive.ql.exec.tez.DagUtils.localizeTempFilesFromConf( at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.refreshLocalResourcesFromConf( at at org.apache.hadoop.hive.ql.exec.tez.TezTask.updateSession( at org.apache.hadoop.hive.ql.exec.tez.TezTask.execute( at org.apache.hadoop.hive.ql.exec.Task.executeTask( at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential( at org.apache.hadoop.hive.ql.Driver.launchTask( at org.apache.hadoop.hive.ql.Driver.execute( at org.apache.hadoop.hive.ql.Driver.runInternal( at at at org.apache.hive.service.cli.operation.SQLOperation.runQuery( at org.apache.hive.service.cli.operation.SQLOperation.access$100( at org.apache.hive.service.cli.operation.SQLOperation$1$ at Method) at at at org.apache.hive.service.cli.operation.SQLOperation$ at java.util.concurrent.Executors$ at at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at



Re: Beeline command to output the result into a .tsv file failing

@Kapil Khandelwal

Does your user you use to execute beeline command have the proper privileges to write to your current folder where you intend to place filename.tsv?

Don't have an account?
Coming from Hortonworks? Activate your account here