2020-05-14 17:36:59 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
2020-08-01 00:51:12 +00:00
|
|
|
. "$CURDIR"/../shell_config.sh
|
2020-05-14 17:36:59 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2020-08-01 00:56:32 +00:00
|
|
|
touch "${CLICKHOUSE_TMP}"/empty.tsv
|
2020-12-04 02:15:44 +00:00
|
|
|
$CLICKHOUSE_CLIENT --query="SELECT count() FROM data" --external --file="${CLICKHOUSE_TMP}"/empty.tsv --name=data --types=UInt32
|
2020-08-01 00:56:32 +00:00
|
|
|
rm "${CLICKHOUSE_TMP}"/empty.tsv
|
2020-05-14 17:36:59 +00:00
|
|
|
|
2020-12-04 02:15:44 +00:00
|
|
|
echo -n | $CLICKHOUSE_CLIENT --query="SELECT count() FROM data" --external --file=- --name=data --types=UInt32
|
|
|
|
echo | $CLICKHOUSE_CLIENT --query="SELECT count() FROM data" --external --file=- --name=data --types=String
|