CREATE TABLE IF NOT EXISTS table_{format} ENGINE = File({format}) AS test.hits INSERT INTO table_{format} SELECT * FROM test.hits LIMIT 100000 format TabSeparated TabSeparatedWithNames TabSeparatedWithNamesAndTypes CSV CSVWithNames Values JSONEachRow JSONCompactEachRow JSONCompactEachRowWithNamesAndTypes TSKV RowBinary Native Avro MsgPack test.hits SELECT * FROM table_{format} FORMAT Null DROP TABLE IF EXISTS table_{format}