CANNOT_READ_MAP_FROM_TEXT error when try to load data with map field

20 views
Skip to first unread message

dyang

unread,
Feb 23, 2022, 5:52:46 AMFeb 23
to ClickHouse
Hi , I got a insert error like below when doing data ingest with clickhouse-client

Code: 563. DB::Exception: Cannot read Map from text. (CANNOT_READ_MAP_FROM_TEXT), Stack trace (when copying this message, always include the lines below):

0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0xa21959a in /usr/bin/clickhouse
1. DB::SerializationMap::deserializeText(DB::IColumn&, DB::ReadBuffer&, DB::FormatSettings const&, bool) const @ 0x12a9e922 in /usr/bin/clickhouse
2. bool DB::SerializationNullable::deserializeTextEscapedAndRawImpl<bool, true>(DB::IColumn&, DB::ReadBuffer&, DB::FormatSettings const&, std::__1::shared_ptr<DB::ISerialization const> const&) @ 0x12aa1877 in /usr/bin/clickhouse
3. DB::RowInputFormatWithNamesAndTypes::readRow(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&, DB::RowReadExtension&) @ 0x14096eea in /usr/bin/clickhouse
4. DB::IRowInputFormat::generate() @ 0x14089cd0 in /usr/bin/clickhouse
5. DB::ISource::tryGenerate() @ 0x14024515 in /usr/bin/clickhouse
6. DB::ISource::work() @ 0x140240da in /usr/bin/clickhouse
7. DB::ParallelParsingInputFormat::InternalParser::getChunk() @ 0x140f01cc in /usr/bin/clickhouse
8. DB::ParallelParsingInputFormat::parserThreadFunction(std::__1::shared_ptr<DB::ThreadGroupStatus>, unsigned long) @ 0x140ef7ab in /usr/bin/clickhouse
9. ThreadPoolImpl<ThreadFromGlobalPool>::worker(std::__1::__list_iterator<ThreadFromGlobalPool, void*>) @ 0xa25cfaa in /usr/bin/clickhouse
10. ThreadFromGlobalPool::ThreadFromGlobalPool<void ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()>(void&&, void ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()&&...)::'lambda'()::operator()() @ 0xa25edc4 in /usr/bin/clickhouse
11. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0xa25a3b7 in /usr/bin/clickhouse
12. ? @ 0xa25ddbd in /usr/bin/clickhouse
13. ? @ 0x7fe9e4965609 in ?
14. __clone @ 0x7fe9e488c293 in ?
(version 21.12.3.32 (official build))


My table have a map filed  described as  tags Map(String,String) to store some arbitrary key value pair , after several tests I find this error is trigged by one entry 'badUrlEncoded':'%'b' , when I remove the  middle " ' " character away from '%'b' , to '%b', this error is gone.

My question is , is there any way I can still keep " ' " character between string values and insert this original value into ClickHouse map filed?

Thanks!
Reply all
Reply to author
Forward
0 new messages