002.clickhouse-ck导出csv文件

 clickhouse-client --host=xx.xxx.xx.xx --user=xxxxxxx --password=xxxxxxx -m -d 库名 --query " 
 select 
b.member_no ,b.phone_number 
from 
(
SELECT entity_id   
FROM  memberxxxxxxxxxxxx
WHERE  id = 1234
) a 
join  
(
  select member_no ,phone_number 
  from 
  dws_xxxxxxxxxx
 group by  member_no ,phone_number )  b 
on a.entity_id = b.member_no
FORMAT CSV
" > /root/xxxxtest/xxxxx.csv

 

posted @ 2023-06-27 10:38  star521  阅读(264)  评论(0编辑  收藏  举报