ClickHouse/tests/queries/0_stateless/01045_dictionaries_restrictions.sql
2024-05-30 19:41:08 +00:00

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;