Skip to content

Instantly share code, notes, and snippets.

@haileyok
Last active December 27, 2025 23:21
Show Gist options
  • Select an option

  • Save haileyok/fc13bb2d3b2b9adc56ad24595f26bc14 to your computer and use it in GitHub Desktop.

Select an option

Save haileyok/fc13bb2d3b2b9adc56ad24595f26bc14 to your computer and use it in GitHub Desktop.
Clickhouse ATProto Functions
-- CREATE FUNCTION atUriToBskyUrl AS (uri) -> concat(
-- 'https://bsky.app/profile/',
-- arrayElement(splitByChar('/', assumeNotNull(uri)), 3),
-- '/post/',
-- arrayElement(splitByChar('/', assumeNotNull(uri)), 5)
-- );
CREATE FUNCTION userIdToBskyProfile AS (userId) -> concat(
'https://bsky.app/profile/',
userId
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment