Dictionary 如何在clickhouse中使用地图数据类型?如何打开实验功能?

Dictionary 如何在clickhouse中使用地图数据类型?如何打开实验功能?,dictionary,configuration,clickhouse,Dictionary,Configuration,Clickhouse,我试图在clickhouse中创建一个map数据类型的表,但它给出了这个错误 query: CREATE TABLE table_map (a Map(String, UInt64)) ENGINE=Memory; Received exception from server (version 21.3.4): Code: 44. DB::Exception: Received from localhost:9000. DB::Exception: Cannot create table wi

我试图在clickhouse中创建一个map数据类型的表,但它给出了这个错误

query: CREATE TABLE table_map (a Map(String, UInt64)) ENGINE=Memory;

Received exception from server (version 21.3.4):
Code: 44. DB::Exception: Received from localhost:9000. DB::Exception: Cannot create table with column 'a' which type is 'Map(String,UInt64)' because experimental Map type is not allowed. Set 'allow_experimental_map_type = 1' setting to enable.

如何打开此功能?我想不出来。

您可以在默认配置文件中启用它

cat /etc/clickhouse/users.d/allow_experimental_map_type.xml
<?xml version="1.0"?>
<yandex>
    <profiles>
        <default>
             <allow_experimental_map_type>1</allow_experimental_map_type>
         </default>
    </profiles>
</yandex>
cat/etc/clickhouse/users.d/allow\u experimental\u map\u type.xml
1.
请参阅官方文档--“要使用它,您必须“将allow\u Experional\u map\u type设置为1;”。