63 lines
1.7 KiB
XML
63 lines
1.7 KiB
XML
|
<!--
|
||
|
CREATE DICTIONARY IF NOT EXISTS default.test_dict1(
|
||
|
Nom String,
|
||
|
Code Nullable(String) DEFAULT Null,
|
||
|
Cur Nullable(String) DEFAULT Null
|
||
|
) PRIMARY KEY nom
|
||
|
SOURCE(
|
||
|
MYSQL(port 3306 host '127.0.0.1' user 'default' password '' db 'default' table 'test')
|
||
|
)
|
||
|
LAYOUT(COMPLEX_KEY_HASHED())
|
||
|
LIFETIME(MIN 300 MAX 600);
|
||
|
-->
|
||
|
<yandex>
|
||
|
<dictionary>
|
||
|
<name>default.test_dict</name>
|
||
|
|
||
|
<structure>
|
||
|
<!-- Complex key configuration -->
|
||
|
<key>
|
||
|
<attribute>
|
||
|
<name>Nom</name>
|
||
|
<type>String</type>
|
||
|
<null_value></null_value>
|
||
|
</attribute>
|
||
|
</key>
|
||
|
<!-- Attribute parameters -->
|
||
|
<attribute>
|
||
|
<name>Code</name>
|
||
|
<type>String</type>
|
||
|
<null_value></null_value>
|
||
|
</attribute>
|
||
|
<attribute>
|
||
|
<name>Cur</name>
|
||
|
<type>String</type>
|
||
|
<null_value></null_value>
|
||
|
</attribute>
|
||
|
</structure>
|
||
|
|
||
|
<source>
|
||
|
<!-- Source configuration -->
|
||
|
<mysql>
|
||
|
<port>3306</port>
|
||
|
<user>default</user>
|
||
|
<password/>
|
||
|
<replica>
|
||
|
<host>127.0.0.1</host>
|
||
|
<priority>1</priority>
|
||
|
</replica>
|
||
|
<db>default</db>
|
||
|
<table>test</table>
|
||
|
</mysql>
|
||
|
</source>
|
||
|
|
||
|
<layout>
|
||
|
<!-- Memory layout configuration -->
|
||
|
<complex_key_hashed />
|
||
|
</layout>
|
||
|
|
||
|
<!-- Lifetime of dictionary in memory -->
|
||
|
<lifetime>300</lifetime>
|
||
|
</dictionary>
|
||
|
</yandex>
|