ClickHouse/tests/config/executable_dictionary.xml

257 lines
6.3 KiB
XML

<dictionaries>
<dictionary>
<name>executable_complex</name>
<source>
<executable>
<format>JSONEachRow</format>
<command>cd /; clickhouse-local --input-format JSONEachRow --output-format JSONEachRow --structure 'x UInt64, y UInt64' --query "SELECT x, y, x + y AS a, x * y AS b FROM table"</command>
</executable>
</source>
<lifetime>0</lifetime>
<layout>
<complex_key_cache>
<size_in_cells>1000</size_in_cells>
</complex_key_cache>
</layout>
<structure>
<key>
<attribute>
<name>x</name>
<type>UInt64</type>
</attribute>
<attribute>
<name>y</name>
<type>UInt64</type>
</attribute>
</key>
<attribute>
<name>a</name>
<type>UInt64</type>
<null_value>0</null_value>
</attribute>
<attribute>
<name>b</name>
<type>UInt64</type>
<null_value>0</null_value>
</attribute>
</structure>
</dictionary>
<dictionary>
<name>executable_simple</name>
<source>
<executable>
<format>JSONEachRow</format>
<command>cd /; clickhouse-local --input-format JSONEachRow --output-format JSONEachRow --structure 'x UInt64' --query "SELECT x, x + x AS a, x * x AS b FROM table"</command>
</executable>
</source>
<lifetime>0</lifetime>
<layout>
<cache>
<size_in_cells>1000</size_in_cells>
</cache>
</layout>
<structure>
<id>
<name>x</name>
</id>
<attribute>
<name>a</name>
<type>UInt64</type>
<null_value>0</null_value>
</attribute>
<attribute>
<name>b</name>
<type>UInt64</type>
<null_value>0</null_value>
</attribute>
</structure>
</dictionary>
<dictionary>
<name>executable_complex_direct</name>
<source>
<executable>
<format>JSONEachRow</format>
<command>cd /; clickhouse-local --input-format JSONEachRow --output-format JSONEachRow --structure 'x UInt64, y UInt64' --query "SELECT x, y, x + y AS a, x * y AS b FROM table"</command>
</executable>
</source>
<lifetime>0</lifetime>
<layout>
<complex_key_direct />
</layout>
<structure>
<key>
<attribute>
<name>x</name>
<type>UInt64</type>
</attribute>
<attribute>
<name>y</name>
<type>UInt64</type>
</attribute>
</key>
<attribute>
<name>a</name>
<type>UInt64</type>
<null_value>0</null_value>
</attribute>
<attribute>
<name>b</name>
<type>UInt64</type>
<null_value>0</null_value>
</attribute>
</structure>
</dictionary>
<dictionary>
<name>simple_executable_cache_dictionary_no_implicit_key</name>
<structure>
<id>
<name>id</name>
<type>UInt64</type>
</id>
<attribute>
<name>value</name>
<type>String</type>
<null_value></null_value>
</attribute>
</structure>
<source>
<executable>
<command>echo "1\tValue"</command>
<format>TabSeparated</format>
<implicit_key>false</implicit_key>
</executable>
</source>
<layout>
<cache>
<size_in_cells>10000</size_in_cells>
</cache>
</layout>
<lifetime>300</lifetime>
</dictionary>
<dictionary>
<name>simple_executable_cache_dictionary_implicit_key</name>
<structure>
<id>
<name>id</name>
<type>UInt64</type>
</id>
<attribute>
<name>value</name>
<type>String</type>
<null_value></null_value>
</attribute>
</structure>
<source>
<executable>
<command>echo "Value"</command>
<format>TabSeparated</format>
<implicit_key>true</implicit_key>
</executable>
</source>
<layout>
<cache>
<size_in_cells>10000</size_in_cells>
</cache>
</layout>
<lifetime>300</lifetime>
</dictionary>
<dictionary>
<name>complex_executable_cache_dictionary_no_implicit_key</name>
<structure>
<key>
<attribute>
<name>id</name>
<type>UInt64</type>
<null_value></null_value>
</attribute>
<attribute>
<name>id_key</name>
<type>String</type>
<null_value></null_value>
</attribute>
</key>
<attribute>
<name>value</name>
<type>String</type>
<null_value></null_value>
</attribute>
</structure>
<source>
<executable>
<command>echo "1\tFirstKey\tValue"</command>
<format>TabSeparated</format>
<implicit_key>false</implicit_key>
</executable>
</source>
<layout>
<complex_key_cache>
<size_in_cells>10000</size_in_cells>
</complex_key_cache>
</layout>
<lifetime>300</lifetime>
</dictionary>
<dictionary>
<name>complex_executable_cache_dictionary_implicit_key</name>
<structure>
<key>
<attribute>
<name>id</name>
<type>UInt64</type>
<null_value></null_value>
</attribute>
<attribute>
<name>id_key</name>
<type>String</type>
<null_value></null_value>
</attribute>
</key>
<attribute>
<name>value</name>
<type>String</type>
<null_value></null_value>
</attribute>
</structure>
<source>
<executable>
<command>echo "Value"</command>
<format>TabSeparated</format>
<implicit_key>true</implicit_key>
</executable>
</source>
<layout>
<complex_key_cache>
<size_in_cells>10000</size_in_cells>
</complex_key_cache>
</layout>
<lifetime>300</lifetime>
</dictionary>
</dictionaries>