Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Traceback (most recent call last):
- File "/Users/olehkopyl/Dropbox/Development/Python/cdict/sandbox.py", line 3565, in <module>
- client.execute(
- File "/usr/local/lib/python3.8/site-packages/clickhouse_driver/client.py", line 267, in execute
- rv = self.process_ordinary_query(
- File "/usr/local/lib/python3.8/site-packages/clickhouse_driver/client.py", line 453, in process_ordinary_query
- return self.receive_result(with_column_types=with_column_types,
- File "/usr/local/lib/python3.8/site-packages/clickhouse_driver/client.py", line 117, in receive_result
- return result.get_result()
- File "/usr/local/lib/python3.8/site-packages/clickhouse_driver/result.py", line 50, in get_result
- for packet in self.packet_generator:
- File "/usr/local/lib/python3.8/site-packages/clickhouse_driver/client.py", line 133, in packet_generator
- packet = self.receive_packet()
- File "/usr/local/lib/python3.8/site-packages/clickhouse_driver/client.py", line 150, in receive_packet
- raise packet.exception
- clickhouse_driver.errors.ServerException: Code: 42.
- DB::Exception: Storage MergeTree requires 3 to 4 parameters:
- name of column with date,
- [sampling element of primary key],
- primary key expression,
- index granularity
- Syntax for the MergeTree table engine:
- CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster]
- (
- name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1] [TTL expr1],
- name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2] [TTL expr2],
- ...
- INDEX index_name1 expr1 TYPE type1(...) GRANULARITY value1,
- INDEX index_name2 expr2 TYPE type2(...) GRANULARITY value2
- ) ENGINE = MergeTree()
- ORDER BY expr
- [PARTITION BY expr]
- [PRIMARY KEY expr]
- [SAMPLE BY expr]
- [TTL expr [DELETE|TO DISK 'xxx'|TO VOLUME 'xxx'], ...]
- [SETTINGS name=value, ...]
- See details in documentation: https://clickhouse.tech/docs/en/engines/table-engines/mergetree-family/mergetree/. Other engines of the family support different syntax, see details in the corresponding documentation topics.
- If you use the Replicated version of engines, see https://clickhouse.tech/docs/en/engines/table-engines/mergetree-family/replication/.
- . Stack trace:
- 0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x8b5b17a in /usr/bin/clickhouse
- 1. ? @ 0x102eb130 in /usr/bin/clickhouse
- 2. DB::StorageFactory::get(DB::ASTCreateQuery const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<DB::Context>, std::__1::shared_ptr<DB::Context>, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, bool) const @ 0xfdce3e1 in /usr/bin/clickhouse
- 3. DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&) @ 0xf63204f in /usr/bin/clickhouse
- 4. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0xf62e4ce in /usr/bin/clickhouse
- 5. DB::InterpreterCreateQuery::execute() @ 0xf634187 in /usr/bin/clickhouse
- 6. ? @ 0xfbc0da1 in /usr/bin/clickhouse
- 7. DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum, bool) @ 0xfbbf423 in /usr/bin/clickhouse
- 8. DB::TCPHandler::runImpl() @ 0x103e5eb2 in /usr/bin/clickhouse
- 9. DB::TCPHandler::run() @ 0x103f8db9 in /usr/bin/clickhouse
- 10. Poco::Net::TCPServerConnection::start() @ 0x129f64af in /usr/bin/clickhouse
- 11. Poco::Net::TCPServerDispatcher::run() @ 0x129f7f3a in /usr/bin/clickhouse
- 12. Poco::PooledThread::run() @ 0x12b31f39 in /usr/bin/clickhouse
- 13. Poco::ThreadImpl::runnableEntry(void*) @ 0x12b2df2a in /usr/bin/clickhouse
- 14. start_thread @ 0x9609 in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
- 15. __clone @ 0x122293 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement