confluentinc / kafka-connect-datagen

Connector that generates data for demos
Apache License 2.0
20 stars 87 forks source link

New schemas for Retail #89

Closed ybyzek closed 3 years ago

ybyzek commented 3 years ago

Problem

New datasets:

Modified datasets:

Solution

Does this solution apply anywhere else?
If yes, where?

Test Strategy

Testing done:

Sample output:


credit_cards:
The local commands are intended for a single-node development environment only,
NOT for production usage. https://docs.confluent.io/current/cli/index.html

7   {"card_id":7,"card_number":5555555555554444,"cvv":273,"expiration_date":"10/27"}
8   {"card_id":8,"card_number":5105105105105100,"cvv":663,"expiration_date":"10/27"}
18  {"card_id":18,"card_number":4000000760000002,"cvv":922,"expiration_date":"04/27"}
8   {"card_id":8,"card_number":5105105105105100,"cvv":663,"expiration_date":"10/27"}
9   {"card_id":9,"card_number":4111111111111111,"cvv":822,"expiration_date":"10/26"}
Processed a total of 5 messages

stores:
The local commands are intended for a single-node development environment only,
NOT for production usage. https://docs.confluent.io/current/cli/index.html

3   {"store_id":3,"city":"Sacramento","state":"CA"}
4   {"store_id":4,"city":"Austin","state":"TX"}
5   {"store_id":5,"city":"Boston","state":"MA"}
1   {"store_id":1,"city":"Raleigh","state":"NC"}
3   {"store_id":3,"city":"Sacramento","state":"CA"}
Processed a total of 5 messages

transactions:
The local commands are intended for a single-node development environment only,
NOT for production usage. https://docs.confluent.io/current/cli/index.html

1   {"transaction_id":1,"card_id":7,"user_id":"User_1","purchase_id":0,"store_id":2}
2   {"transaction_id":2,"card_id":16,"user_id":"User_6","purchase_id":1,"store_id":3}
3   {"transaction_id":3,"card_id":10,"user_id":"User_5","purchase_id":2,"store_id":1}
4   {"transaction_id":4,"card_id":9,"user_id":"User_5","purchase_id":3,"store_id":3}
5   {"transaction_id":5,"card_id":2,"user_id":"User_3","purchase_id":4,"store_id":6}
Processed a total of 5 messages

purchases:
The local commands are intended for a single-node development environment only,
NOT for production usage. https://docs.confluent.io/current/cli/index.html

0   {"id":0,"item_type":"shirt","quantity":6,"price_per_unit":48.14}
1   {"id":1,"item_type":"clippers","quantity":5,"price_per_unit":11.81}
2   {"id":2,"item_type":"scarf","quantity":5,"price_per_unit":39.94}
3   {"id":3,"item_type":"clippers","quantity":8,"price_per_unit":21.87}
4   {"id":4,"item_type":"boots","quantity":9,"price_per_unit":41.41}
Processed a total of 5 messages

## Release Plan
<!--- Describe the release plan for this feature. -->
<!-- Are you backporting or merging to master? -->
<!-- If you are reverting or rolling back, is it safe? --> 
ybyzek commented 3 years ago

A few things have been cleaned up in this PR (thanks additionally to @C0urante who made a local commit and upstream change in the Avro Random Generator to support realistic pricing values), it's ready for another round of review.