一、從hive中導出csv格式的數據:
hive -e "select * from tablename limit 1000" | tr "\t" "," > /opt/hadoop/tablename.csv
二、把csv格式的數據導入到clickhouse中:
clickhouse-client -h 127.0.0.1 --query='INSERT INTO tablename FORMAT CSV' < /opt/hadoop/tablename.csv
一、從hive中導出csv格式的數據:
hive -e "select * from tablename limit 1000" | tr "\t" "," > /opt/hadoop/tablename.csv
二、把csv格式的數據導入到clickhouse中:
clickhouse-client -h 127.0.0.1 --query='INSERT INTO tablename FORMAT CSV' < /opt/hadoop/tablename.csv