spark-sql显示表头header

cdh6.3.2集群中,使用命令启动spark-sql,执行
select name from table_001 limit 10;
返回结果:
aaa
bbb
ccc
实现效果:
name:
aaa
bbb
ccc

追加–hiveconf hive.cli.print.header=true

cd /opt/cloudera/parcels/CDH/bin
./spark-sql --num-executors 4 --executor-cores 8 --executor-memory 25G --driver-memory 6G --name test --hiveconf hive.cli.print.header=true
exit;

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐