File: prepare_clickhouse.sh

package info (click to toggle)
rsyslog 8.2512.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 30,464 kB
  • sloc: ansic: 123,809; sh: 42,109; makefile: 5,962; javascript: 1,842; python: 1,222; lex: 607; yacc: 193; perl: 162; sql: 103; tcl: 9; ruby: 2
file content (13 lines) | stat: -rwxr-xr-x 646 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
# this script prepares a clickhouse instance for use by the rsyslog testbench


clickhouse-client --query="CREATE DATABASE rsyslog"
echo clickouse create database RETURN STATE: $?

# At the moment only the database is created for preperation.
# Every test creates a table for itself and drops it afterwards.
# This could look something like this:

#clickhouse-client --query="CREATE TABLE IF NOT EXISTS rsyslog.test ( id Int32, severity Int8, facility Int8, timestamp DateTime, ipaddress String, tag String, message String ) ENGINE = MergeTree() PARTITION BY severity Order By id"
#clickhouse-client --query="DROP TABLE rsyslog.test"