直接开。
导出dat
vsql -U dbadmin -wlizhenghua -At -F'|' -c "select * from APP_INTER_BOSS_CDR_COUNT_T" -o APP_INTER_BOSS_CDR_COUNT_T.dat;
导入dat
COPY APP_INTER_BOSS_CDR_COUNT_T FROM local '/opt/vertica/script/APP_INTER_BOSS_CDR_COUNT_T.dat' DELIMITER '|';
导出csv(‘,’是分隔符)
vsql -U dbadmin -w lizhenghua -F ‘,‘ -At -o APP_INTER_BOSS_CDR_COUNT_T.csv -c "SELECT * FROM public.APP_INTER_BOSS_CDR_COUNT_T;"
导出csv(不需要指定分隔符,默认指定分隔符是|)
vsql -U dbadmin -w lizhenghua -At -o APP_INTER_BOSS_CDR_COUNT_T002.csv -c "SELECT * FROM public.APP_INTER_BOSS_CDR_COUNT_T;"
导入csv
copy APP_INTER_BOSS_CDR_COUNT_T from local '/opt/vertica/script/APP_INTER_BOSS_CDR_COUNT_T002.csv' DELIMITER '|';