presto和hive将查询结果保存到本地的方法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/chenKFKevin/article/details/86676131
Insert overwrite LOCAL directory 'file:///xx/xx/xxx' ROW format delimited fields terminated BY "\t"

上面是hive中将查询语句的结果插入到文件夹的方法。

presto的方法如下:

presto --server ip:port --catalog hive --schema default --execute "
这里放执行的语句
" --output-format CSV > /xx/xx/xxx/file_name

猜你喜欢

转载自blog.csdn.net/chenKFKevin/article/details/86676131