Skip to main content

MARKOV_GENERATE

Using the model trained by MARKOV_TRAIN to anonymize the dataset.

Syntax

FEISTEL_OBFUSCATE( <model>, <params>, <seed>, <determinator> )

Arguments

ArgumentsDescription
modelThe return model of markov_train
paramsJson string: {"order": 5, "sliding_window_size": 8}
order:order of markov model to generate strings,
size of a sliding window in a source string - its hash is used as a seed for RNG in markov model
seedseed
determinatorSource string

Return Type

String.

Examples

create table model as
select markov_train(concat('bar', number::string)) as bar from numbers(100);

select markov_generate(bar,'{"order":5,"sliding_window_size":8}', 151, (number+100000)::string) as generate
from numbers(5), model;
+-----------+
| generate |
+-----------+
│ bar95 │
│ bar64 │
│ bar85 │
│ bar56 │
│ bar95 │
+-----------+
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today