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
+----------------+---------------+ | |
| Country | TotalOrders | | |
|----------------+---------------| | |
| United States | 4762 | | |
| India | 3304 | | |
| China | 3242 | | |
| United Kingdom | 1610 | | |
| Canada | 1524 | | |
+----------------+---------------+ | |
Time: 0.395s |
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 Country, COUNT(DISTINCT InvoiceNo) as TotalOrders | |
FROM "orders" | |
GROUP BY Country | |
ORDER By TotalOrders 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
+------------------------------------+------------------+ | |
| Description | QuantitiesSold | | |
|------------------------------------+------------------| | |
| ASSORTED COLOUR BIRD ORNAMENT | 87786 | | |
| WHITE METAL LANTERN | 65821 | | |
| WHITE HANGING HEART T-LIGHT HOLDER | 65319 | | |
| CREAM CUPID HEARTS COAT HANGER | 43978 | | |
| RED WOOLLY HOTTIE WHITE HEART. | 43260 | | |
+------------------------------------+------------------+ | |
Time: 0.423s |
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; |
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
{ | |
"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
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
# 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
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
git clone git@github.com:rockset/recipes.git | |
cd recipes/kafka-rockset-integration/ |