Skip to content

Instantly share code, notes, and snippets.

@tlberglund
Last active March 6, 2018 14:35
Show Gist options
  • Save tlberglund/077f1f47311888c7c8cba75f002982e2 to your computer and use it in GitHub Desktop.
Save tlberglund/077f1f47311888c7c8cba75f002982e2 to your computer and use it in GitHub Desktop.
CREATE STREAM twitter_summit AS
SELECT
TIMESTAMPTOSTRING(CreatedAt, 'yyyy-MM-dd HH:mm:ss.SSS') AS CreatedAt,
EXTRACTJSONFIELD(user,'$.Name') AS user_Name,
EXTRACTJSONFIELD(user,'$.ScreenName') AS user_ScreenName,
EXTRACTJSONFIELD(user,'$.Location') AS user_Location,
EXTRACTJSONFIELD(user,'$.Description') AS user_Description,
Text,
hashtagentities,
lang
FROM twitter_raw
WHERE LCASE(hashtagentities) LIKE '%kafkasummit%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment