9951 explained code solutions for 126 technologies

clickhouseUsing Template format to insert data in custom format

echo 'My name is ${col:CSV} and I am ${age:CSV}' > tmp.tpl
echo 'My name is Donald and I am 125' | clickhouse-client -q "INSERT INTO tbl FORMAT Template SETTINGS format_template_row = 'tmp.tpl'"ctrl + c

save custom format description to the temporary file


placeholder to pick value for col column, escaped using CSV rules (more details)


placeholder to pick value for age column

My name is Donald and I am 125

example string to insert using custom format

clickhouse-client -q

execute given query through client interface


insert given data into tbl table

FORMAT Template

use Template format


set path to our template format file