Skip to content

Instantly share code, notes, and snippets.

@filimonov
Created September 11, 2019 14:39
Show Gist options
  • Save filimonov/42c1c5c720d9880615ac10bb67617ebd to your computer and use it in GitHub Desktop.
Save filimonov/42c1c5c720d9880615ac10bb67617ebd to your computer and use it in GitHub Desktop.
ClickHouse dictionary based word generator
CREATE TABLE words ENGINE = Join(ANY,LEFT,id) AS SELECT rowNumberInAllBlocks() AS id, * FROM url('http://rawcdn.githack.com/dwyl/english-words/54b470a763d3df98ec33cb049382711972975317/words.txt', 'TSV', 'word String');
select arrayMap( i -> joinGet( 'default.words', 'word', toUInt64( rand(i) % 466551)), range(10));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment