clickhouse export or import data

Export data from clickhouse into csv file:

:) SELECT * FROM table INTO OUTFILE 'file'

Import data from csv file:

clickhouse-client -q "INSERT INTO database.tablename FORMAT CSV" < tablename.csv

Comments

Popular posts from this blog

BdsDex: failed to load Boot0001 "UEFI BHYVE SATA DISK BHYVE-OABE-20A5-E582" from PciRoot(0x0)/Pci (0x2, 0x0)/Stat(0x0,0xFFFF,0x0) : Not Found

Install Shadowsocks-libev as Client on Debian Linux

FreeBSD安装SCIM中文输入法(csh/tcsh)