mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-05 22:12:21 +00:00
18 lines
533 B
SQL
18 lines
533 B
SQL
|
|
CREATE DICTIONARY {CLICKHOUSE_DATABASE:Identifier}.restricted_dict (
|
|
key UInt64,
|
|
value String
|
|
)
|
|
PRIMARY KEY key
|
|
SOURCE(EXECUTABLE(COMMAND 'echo -E "1\thello"' FORMAT TabSeparated))
|
|
LIFETIME(MIN 0 MAX 1)
|
|
LAYOUT(CACHE(SIZE_IN_CELLS 10));
|
|
|
|
-- because of lazy load we can check only in dictGet query
|
|
select dictGetString({CLICKHOUSE_DATABASE:String} || '.restricted_dict', 'value', toUInt64(1)); -- {serverError DICTIONARY_ACCESS_DENIED}
|
|
|
|
select 'Ok.';
|
|
|
|
DROP DICTIONARY IF EXISTS {CLICKHOUSE_DATABASE:Identifier}.restricted_dict;
|
|
|