Open shreyash184 opened 9 months ago
Please write the python script for below data generation - Real-time streams:
We have below given fields for
Stream 1 – Sales Transaction Stream
Sample data -
{ "transaction_id": "T1001", "product_id": "P501", "timestamp": "2023-11-24 00:01:00", "quantity": 2, "unit_price": 299.99, "store_id": "W001" }, { "transaction_id": "T1002", "product_id": "P502", "timestamp": "2023-11-24 00:03:00", "quantity": 1, "unit_price": 99.99, "store_id": "W002" }
Stream 2: Inventory Updates Stream
Sample Data - { "product_id": "P501", "timestamp": "2023-11-23 23:59:00", "quantity_change": -2, "store_id": "W001" }, { "product_id": "P502", "timestamp": "2023-11-24 00:02:00", "quantity_change": -1, "store_id": "W002" }
I am done with the sales transaction stream
Please write the python script for below data generation - Real-time streams:
We have below given fields for
Stream 1 – Sales Transaction Stream
Sample data -
{ "transaction_id": "T1001",
"product_id": "P501",
"timestamp": "2023-11-24 00:01:00",
"quantity": 2,
"unit_price": 299.99,
"store_id": "W001" }, {
"transaction_id": "T1002",
"product_id": "P502",
"timestamp": "2023-11-24 00:03:00",
"quantity": 1,
"unit_price": 99.99,
"store_id": "W002"
}
Stream 2: Inventory Updates Stream
Sample Data - { "product_id": "P501",
"timestamp": "2023-11-23 23:59:00",
"quantity_change": -2,
"store_id": "W001"
}, { "product_id": "P502",
"timestamp": "2023-11-24 00:02:00",
"quantity_change": -1,
"store_id": "W002"
}