Created
March 6, 2018 14:34
-
-
Save tlberglund/a03a87dbea42e2becd7b6b93891f3b9d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE STREAM twitter_reinvent_kafka_ksql 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%' AND | |
(LCASE(hashtagentities) LIKE '%ksql%' OR | |
LCASE(hashtagentities) LIKE '%apachekafka%'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment