This file contains hidden or 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
SELECT * FROM search_logs WHERE keyword = 'rockset' AND locale = 'en' |
This file contains hidden or 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
SELECT * | |
FROM search_logs | |
WHERE keyword = ‘rockset’ | |
AND locale = ‘en’ |
This file contains hidden or 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
SELECT keyword, count(*) c | |
FROM search_logs | |
GROUP BY keyword | |
ORDER BY c DESC |
This file contains hidden or 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
git clone git@github.com:rockset/recipes.git | |
cd recipes/kafka-rockset-integration/ |
This file contains hidden or 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
python3 -m virtualenv rockset-kafka-demo | |
source rockset-kafka-demo/bin/activate | |
pip install -r requirements.txt |
This file contains hidden or 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
# Kafka Configuration | |
KAFKA_TOPIC = 'orders' | |
KAFKA_BOOTSTRAP_SERVER = ['localhost:9092'] | |
# Rockset Configuration | |
ROCKSET_API_KEY = '' # Create API Key - https://console.rockset.com/manage/apikeys | |
ROCKSET_API_SERVER = 'https://api.rs2.usw2.rockset.com' |
This file contains hidden or 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
rock configure --api_key <YOUR-API-KEY> |
This file contains hidden or 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
{ | |
"InvoiceNo": 14, | |
"InvoiceDate": 1547523082, | |
"CustomerID": 10140, | |
"Country": "India", | |
"StockCode": 3009, | |
"Description": "HAND WARMER RED POLKA DOT", | |
"Quantity": 6, | |
"UnitPrice": 1.85 | |
} |
This file contains hidden or 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
SELECT Description, SUM(Quantity) as QuantitiesSold | |
FROM "orders" | |
GROUP BY Description | |
ORDER By QuantitiesSold DESC | |
LIMIT 5; |
This file contains hidden or 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
SELECT * | |
FROM orders | |
LIMIT 10; |
OlderNewer