-
Notifications
You must be signed in to change notification settings - Fork 8.3k
A SQL function obfuscateQuery #98010
Copy link
Copy link
Open
Labels
Description
Company or project name
ClickHouse
Use case
An easy way to show and share an obfuscated query.
Describe the solution you'd like
A set of regular functions:
obfuscateQuery(query) -- perform obfuscation with a random seed
obfuscateQuery(query, tag) -- like the `rand` function, a tag allows for inhibiting common subexpression elimination
obfuscateQueryWithSeed(query, seed) -- perform deterministic obfuscation with a specified seed
These function call obfuscateQueries (see obfuscateQueries.h/cpp).
Both query and seed can be constant or non-constant. Even if the query is constant, calling obfuscateQuery(query) on multiple rows will return multiple different obfuscated queries.
Describe alternatives you've considered
No response
Additional context
These functions will accept not only a single query, but also a string with multiple queries - this is okay.
See also formatQuery.
Reactions are currently unavailable