mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 19:42:00 +00:00
28 lines
753 B
Bash
28 lines
753 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||
|
. "$CURDIR"/../shell_config.sh
|
||
|
|
||
|
${CLICKHOUSE_CLIENT} --multiquery --query "
|
||
|
DROP TABLE IF EXISTS test;
|
||
|
CREATE TABLE test (a Array(String)) ENGINE = Memory;
|
||
|
"
|
||
|
|
||
|
${CLICKHOUSE_CLIENT} --query "INSERT INTO test FORMAT CSV" <<END
|
||
|
"['Hello', 'world', '42"" TV']"
|
||
|
END
|
||
|
|
||
|
${CLICKHOUSE_CLIENT} --format_csv_allow_single_quotes 0 --query "INSERT INTO test FORMAT CSV" <<END
|
||
|
"'Hello', 'world', '42"" TV'"
|
||
|
END
|
||
|
|
||
|
${CLICKHOUSE_CLIENT} --input_format_csv_arrays_as_nested_csv 1 --query "INSERT INTO test FORMAT CSV" <<END
|
||
|
"[""Hello"", ""world"", ""42"""" TV""]"
|
||
|
"""Hello"", ""world"", ""42"""" TV"""
|
||
|
END
|
||
|
|
||
|
${CLICKHOUSE_CLIENT} --multiquery --query "
|
||
|
SELECT * FROM test;
|
||
|
DROP TABLE IF EXISTS test;
|
||
|
"
|